-
Notifications
You must be signed in to change notification settings - Fork 100
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
Witgen: Pass range constraints separately #2451
Conversation
executor/src/witgen/machines/double_sorted_witness_machine_16.rs
Outdated
Show resolved
Hide resolved
executor/src/witgen/machines/double_sorted_witness_machine_32.rs
Outdated
Show resolved
Hide resolved
for (r, l) in identity.right.expressions.iter().zip(&outer_query.left) { | ||
for (r, l) in identity | ||
.right | ||
.expressions |
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.
These are the parameters, I would say.
rows, | ||
outer_query.left.first().unwrap(), | ||
outer_query.range_constraints, | ||
outer_query.parameters.first().unwrap(), | ||
AlgebraicVariable::Column(column_reference), | ||
); | ||
} |
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.
Should we respect the range constraints in the rest of the code or is it just a hint? Please document in the trait function.
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.
Not sure what you mean. Document in Machine::process_plookup
(when are we going to rename this haha)?
I think it would be nice to respect them and could even lead to a unique result when it's not unique just from the known values. But seems like it's not needed in practice. Seems a out of the scope of this PR to fix this.
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.
ah true, because we get a single result anyway. ok!
connection: Connection<'a, T>, | ||
) -> Result<Self, IncompleteCause<AlgebraicVariable<'a>>> { | ||
// Evaluate once, for performance reasons. |
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.
What was this comment about?
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.
That we don't want to evaluate to an affine expression many times. Now, this happens even earlier in the caller.
Co-authored-by: chriseth <[email protected]>
this PR changes the signature of
Machine::process_plookup
fromTo
Previously, each machine evaluated the parameters themselves, using the
caller_rows
and the calling bus send, stored in the connection. But in the future, the calling bus send will not be static, so I moved this to the caller.This will enable #2447 and eventually the dynamic bus.