Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/introspection #774

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Feat/introspection #774

wants to merge 8 commits into from

Conversation

jaromil
Copy link
Member

@jaromil jaromil commented Nov 30, 2023

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.

@jaromil jaromil self-assigned this Nov 30, 2023
@jaromil
Copy link
Member Author

jaromil commented Nov 30, 2023

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

@jaromil
Copy link
Member Author

jaromil commented Nov 30, 2023

Most frequent tokens (occurring 5 or more times)

image

@jaromil jaromil force-pushed the feat/introspection branch 2 times, most recently from 9c48c73 to f6f2fd7 Compare May 2, 2024 23:16
@jaromil jaromil force-pushed the feat/introspection branch from f6f2fd7 to f49f944 Compare June 20, 2024 04:39
@matteo-cristino
Copy link
Collaborator

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?

@puria
Copy link
Member

puria commented Sep 10, 2024

@matteo-cristino 😘

@jaromil

This comment was marked as resolved.

@jaromil jaromil force-pushed the feat/introspection branch from 230fb4e to 68b6b34 Compare January 21, 2025 21:24
@matteo-cristino

This comment was marked as resolved.

@matteo-cristino matteo-cristino force-pushed the feat/introspection branch 2 times, most recently from d0f819a to 9e2c70d Compare January 22, 2025 17:42
@matteo-cristino
Copy link
Collaborator

Regarding

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?

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

@matteo-cristino matteo-cristino marked this pull request as ready for review January 22, 2025 18:14
@matteo-cristino matteo-cristino linked an issue Jan 22, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introspection scenario
3 participants