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

Feature Request: Automatic Documentation Generation for Constraints #211

Open
aszepieniec opened this issue Jul 3, 2023 · 1 comment
Open
Labels
✨ enhancement Improvement or new feature 🤔 question More information is needed 📜 specification Relates to the specification

Comments

@aszepieniec
Copy link
Collaborator

Currently, the constraints are described in 3 places:

  • in the specification, in human-readable form;
  • in the specification, in circuit form;
  • in the code, in circuit form.

Downsides: We need at least 2 equivalences between pairs of forms, which is confusing for humans and exposes a larger than necessary vulnerability surface. Furthermore, the various forms are in disparate locations, compounding the problem.

Proposed solution: Let's embed the human-readable form in comments in the source code, and then generate the documentation (both human-readable and circuit forms) from the comments and subsequent code using a script. With this approach, there is one source of truth: the code. But to verify that the code is correct is suffices to read the documentation and verify the human-readable description against the nicely rendered circuit form in the browser.

@jan-ferdinand jan-ferdinand added 🤔 question More information is needed 📜 specification Relates to the specification ✨ enhancement Improvement or new feature labels Jul 4, 2023
@jan-ferdinand
Copy link
Member

jan-ferdinand commented Jul 4, 2023

I like the idea and will investigate tools to help the endeavor. Writing such tools ourselves currently seems like too much effort for the benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Improvement or new feature 🤔 question More information is needed 📜 specification Relates to the specification
Projects
None yet
Development

No branches or pull requests

2 participants