-
Notifications
You must be signed in to change notification settings - Fork 0
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
Simplification pass #256
base: main
Are you sure you want to change the base?
Simplification pass #256
Conversation
519f558
to
95744f7
Compare
This improves the DSA, and adds a check for the property. It also adds block coalescing and a debugging flag to perform procedure trimming before running the analysis (so I can test a specific function in cntlm). This no longer adds all globals from specs to the boogie, because we can't tell if they are global or have been promoted to local. If they are referenced in spec they must be defined in the actual program, so this shouldn't matter. |
…o simplification-pass
b81e661
to
21efc16
Compare
…mp-pass-main-merge
Merge main into the simplification pass branch
Adds the flag
--simplify
(which implies--parameter-form
) which, before running analysis performs partial evaluation and simplification of the IR. To assist this it does a DSA transform, but the copy propagation which runs afterwards is going to undo this somewhat.This usually removes the flag registers and pushes the comparisons into the assume statements where they are used, folds constants through and does some canonicalisation and term simplification.
It sits on top of the interpreter #241 for partial evaluation, and includes improvements to the parameter form which I will copy into that PR #255. When #243 is merged we should use the interpreter to validate the transform using the memory state hash the csmith examples produce. Currently this is just validated against the system tests, all of which pass with the transform applied.
this implements:
The simplification/partial eval/copyprop rewrites are applied repeatedly with a fixed number of iterations.
For an example of what simplifications this produces: http://0x0.st/XE79.html