-
Notifications
You must be signed in to change notification settings - Fork 11
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
Implement codegen option for generic constraint evaluation format #56
Comments
@bobbinth is |
Should be just |
Although, I wonder if just |
I prefer |
The output of this codegen option should be a JSON file with the following structure:
In the above, node reference has the following structure:
Where:
POL
refers to the value in the column at the specifiedindex
in the current row.POL_NEXT
refers to the value in the column at the specifiedindex
in the next row.VAR
refers to a public input or a random value at the specifiedindex
.CONST
refers to a constant at the specifiedindex
.REF
refers to a previously defined expression at the specifiedindex
.An expression has the following structure:
Where
ADD
,SUB
, andMUL
are the corresponding operations in the Goldilocks base field.Code generation
To generate the code in the above format, we would need to do the following:
variables
array for the expressions.In addition to the above, we also need to add constraint merging logic to the constraint evaluation description. There should be only 3 entry points in the
outputs
section:The logic for merging transition constraints is described here and the logic for computing and merging boundary constraints is described here.
A few other things to consider:
variables
section. We also may need to add degree adjust factors to thevariables
array as well.Implementation approach
It would probably make senes to split implementation of this into several steps. The first step should probably not involve constraint merging and should have one output for each boundary and transition constraint. Only after this is working, we should implement constraint merging.
The text was updated successfully, but these errors were encountered: