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

Unify basic and recursive constraints (WIP) #1211

Closed
wants to merge 1 commit into from

Conversation

matthiasgoergens
Copy link
Collaborator

No description provided.

@@ -228,3 +244,482 @@ mod tests {
Ok(())
}
}

#[derive(Debug, Clone)]
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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>(
Copy link
Collaborator Author

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.

@matthiasgoergens matthiasgoergens linked an issue Feb 13, 2024 that may be closed by this pull request
@matthiasgoergens
Copy link
Collaborator Author

Closed in favour of @jakzale's implementation of the same idea.

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.

Single Circuit Representation for Plonky2 and Starky
1 participant