-
Notifications
You must be signed in to change notification settings - Fork 8
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
Unify basic and recursive constraints (WIP) #1211
Conversation
@@ -228,3 +244,482 @@ mod tests { | |||
Ok(()) | |||
} | |||
} | |||
|
|||
#[derive(Debug, Clone)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For simplicity, we are going with the 'initial' style of encoding an embedded DSL here.
Further down, there's some scratch code that can show you how to use the 'final' style in Rust. See https://okmij.org/ftp/tagless-final/index.html for background.
However, I'm not sure whether the final style makes a lot of sense in Rust for what we are doing. Mostly because evaluation for the extended circuit needs mutable access to the builder object; but we also want to ideally use overloaded operators (like *
and +
) to build our expressions.
// P: PackedField<Scalar = FE>, { | ||
|
||
// And now we can evaluate expressions in the language: | ||
pub fn eval_as_packed_generic<F, FE, P, const D2: usize>(&self) -> P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This evaluates the AST for the base prover..
// ) { | ||
// ExtensionTarget<const D: usize> | ||
|
||
pub fn eval_as_builder<F, P, const D: usize>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. and this evaluates the AST for the recursive prover.
Closed in favour of @jakzale's implementation of the same idea. |
No description provided.