Feat/introspection
Improve the introspection capabilities of Zenroom to list all statements, tokens and stats connected, as well cleanup the init to narrow down strictly necessary scenarios. At last implement Norvig's autocorrection on detected tokens.
List of Zencode Scenarios to be loaded by default
D + load: given D + load: foreach D + load: verify D + load: when D + load: then
D + load: table D + load: dictionary D + load: random D + load: keyring D + load: debug D + load: array
- load: ethereum
- load: eddsa
- load: secshare
- load: schnorr
- load: ecdh
- load: qp
- load: hash
- load: pvss
- load: w3c
- load: bitcoin
- load: petition
- load: pack
- load: credential
- load: planetmint
- load: reflow
- load: http
- load: bbs
- load: dp3t
- load: p256
Most frequent tokens (occurring 5 or more times)
Looking at this PR I got an idea, can we also create an API that list all statements divided by Given, When, Then, If and Foreach (maybe also all Rules) and then wrap it into js? This will help to automatize the autocompletion for the editor we are working on. Any thoughts on this?
@matteo-cristino 😘
TODO: create a zenroom standalone API introspection call to retrieve all zencode statements in JSON.
Add the possibility to pass a scenario to zencode_get_statements
Regarding
Looking at this PR I got an idea, can we also create an API that list all statements divided by
Given,When,Then,IfandForeach(maybe also all Rules) and then wrap it into js? This will help to automatize the autocompletion for the editor we are working on. Any thoughts on this?
This has been implemented, unfortunately Rule does not seem so simple to extract since they are hidden in ZEN:begin() function, but since they are not that many of them and they change very rarelly we could hardcode them in the slangroom autocompletion without too many problem
happy about how this turned out. Veeery naaiis