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

Store equality sets in AcirContext #1431

Closed
Tracked by #1376
kevaundray opened this issue May 28, 2023 · 1 comment · Fixed by #2137 or #2378
Closed
Tracked by #1376

Store equality sets in AcirContext #1431

kevaundray opened this issue May 28, 2023 · 1 comment · Fixed by #2137 or #2378
Assignees
Labels
enhancement New feature or request refactor ssa

Comments

@kevaundray
Copy link
Contributor

Problem

There are many operations which enforce an equivalence relation between AcirVars, the explicit one being assert_eq_var.

This assert_eq means that we can replace lhs with rhs wherever we see fit. This is useful in the context, where lhs might be an Expression whereas rhs is a Witness and instead of creating an extra gate to convert lhs to a Witness, we can instead use rhs

Happy Case

Create a Map in AcirContext to store equivalence relations. As noted above the obvious case is assert_eq_var however, whenever a constrain is called there is opportunity to capture an equivalnce relation and whenever get_or_create_witness is called, there is an opportunity to capture an equivalence relation.

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@TomAFrench
Copy link
Member

This is partially resolved in #2378 but doesn't account for transitive equivalences.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor ssa
Projects
Archived in project
2 participants