-
Notifications
You must be signed in to change notification settings - Fork 219
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
fix: rationalise witness for constant values #984
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.
Some clippy stuff
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
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.
LGTM overall -- just two comments left to resolve
Not going to block a PR over a small logic refactor so feel free to resolve. However in general, breaking our logic into discrete steps massively improves readability compared to pushing everything into a single nested for-loop. |
I think you have a good point re readability of the codebase -- At the offsite, I think we should reserve some time to go over some of these points. It may be that we need a document that specifies certain things we should avoid. Loosely speaking, I tend to grunt at rightwards shifting code. |
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.
LGTM
Related issue(s)
Resolves #770
Description
Summary of changes
Update the internalVarCache when we generate a witness for an internalVar. The Pr also ensures that we create only one witness per constant value.
Test additions / changes
Unit tests added to internalVarCache
Checklist
cargo fmt
with default settings.Documentation needs