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/dsl #60

Merged
merged 12 commits into from
Jul 1, 2024
Prev Previous commit
Next Next commit
add more docs
  • Loading branch information
lonerapier committed May 15, 2024
commit 69cc35a2ff067f65976ffb6250ed8c47a2ba03c0
3 changes: 3 additions & 0 deletions src/compiler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# DSL

introduces a simple DSL for writing circuits that can be compiled to polynomials specific to PLONK.
9 changes: 9 additions & 0 deletions src/compiler/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
//! - each token should be separated by space.
//!
//! Outputs parsed output in form of [`WireCoeffs`] values and coefficients.
//! - `wires`: represent variables corresponding to gate wires in each constraint.
//! - `coefficients`: coefficient corresponding to each variable.
//!
//! ## Note
//!
//! Some default coefficients are used for certain constraints:
//! - `$constant`: for constant variables
//! - `$output_coeffs`: for output variables. Example: `-a <== b * b` has `$output_coeffs` as `-1`
//! - `$public`: for public variable declarations
//!
//! ## Example
//! - `a public` => `(['a', None, None], {'$public': 1, 'a': -1,
Expand Down