-
Notifications
You must be signed in to change notification settings - Fork 19
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
replace TraceBindingAccess
with SymbolAccess
#258
Conversation
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.
Looks good! Thank you! I left a couple of non-blocking comments inline.
Self::Constant(_) => write!(f, "ConstantBinding"), | ||
Self::Trace(_) => { | ||
write!(f, "TraceBinding") | ||
} | ||
Self::PublicInput(_) => write!(f, "PublicInput"), | ||
Self::PeriodicColumn(_, _) => write!(f, "PeriodicColumn"), | ||
Self::Variable(_) => write!(f, "Variable"), | ||
Self::Variable(_) => write!(f, "VariableBinding"), | ||
Self::RandomValues(_, _) => write!(f, "RandomValues"), |
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.
Question: is there a reason why we sometimes add "Binding" at the end and sometimes don't?
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.
I think it's clearer in the errors if it has binding in it, but we don't ever refer to the other ones as bindings (even though they are). Not that this is a great reason - I prefer consistency too, but when I was looking at the errors I felt it was a little unclear without adding Binding
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.
Thanks @grjte, looks great.
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.
Looks great, thank you @grjte!
This PR consolidates
TraceBindingAccess
intoSymbolAccess
. It aims to be as straightforward as possible without losing correctness, which means that some things are not fully addressed yet.TraceBindingAccess
withSymbolAccess
in the parser/IR/codegenSymbolAccess
handling changes anywayRemaining items to address:
TraceAccess
usage from parser. This will require some cleanup in the parser, so it will be done in a separate PRSlice
access type. Previously this was only allowed for trace columns. I don't think there's a good reason not to allow this for variables/constants, but it needs to be done carefully. Similarly, within theListComprehension
we need to be careful about this, but because theListComprehension
is still quite complicated I think this should be revisited separately.