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

Z3 all the things #282

Merged
merged 57 commits into from
Sep 6, 2022
Merged

Z3 all the things #282

merged 57 commits into from
Sep 6, 2022

Conversation

frabert
Copy link
Collaborator

@frabert frabert commented Jul 21, 2022

Converts Rellic to operate on Z3 expressions for as long as possible, only materializing to Clang AST before expression simplification.

Also keeps conditions in CNF without exponential blowup with a neat trick*

*it's still quadratic tho

@frabert
Copy link
Collaborator Author

frabert commented Jul 21, 2022

Also removes a bunch of options from the external API. I figured nobody was actually using them, and if someone actually needs the amount of control it provided, they may as well use the passes manually

@frabert
Copy link
Collaborator Author

frabert commented Jul 21, 2022

Unfortunately this still seems way too slow to be actually usable, especially on some Anvill-produced modules

@frabert frabert force-pushed the frabert/z3-nonsense branch 2 times, most recently from 1a44bd2 to 5ca16f7 Compare August 19, 2022 14:52
@frabert frabert force-pushed the frabert/z3-nonsense branch 2 times, most recently from 36acd97 to 706c7da Compare August 26, 2022 10:47
@frabert frabert requested a review from surovic August 26, 2022 12:55
Copy link
Contributor

@surovic surovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall great work! May the Z3ConvVisitor rest in piece.

PS: I haven't gotten to GenerateAST.(h|cpp) or IRToASTVisitor.(h|cpp) yet, but could you add some short comments to the affected parts? Think "if there's a blank line, I might as well use it for a short comment describing what follows".

include/rellic/AST/GenerateAST.h Outdated Show resolved Hide resolved
include/rellic/AST/Util.h Show resolved Hide resolved
include/rellic/AST/Util.h Outdated Show resolved Hide resolved
include/rellic/AST/Util.h Show resolved Hide resolved
lib/AST/CondBasedRefine.cpp Outdated Show resolved Hide resolved
lib/AST/NestedScopeCombine.cpp Show resolved Hide resolved
lib/AST/NestedCondProp.cpp Outdated Show resolved Hide resolved
lib/AST/NestedCondProp.cpp Show resolved Hide resolved
lib/AST/NestedCondProp.cpp Show resolved Hide resolved
include/rellic/AST/GenerateAST.h Outdated Show resolved Hide resolved
@frabert
Copy link
Collaborator Author

frabert commented Aug 31, 2022

There wasn't much change in GenerateAST or IRToASTVisitor, I mainly just moved the Z3->C conversion from one to the other because it now needs to happen later in the process.

@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@lifting-bits lifting-bits deleted a comment from github-actions bot Sep 2, 2022
@frabert
Copy link
Collaborator Author

frabert commented Sep 2, 2022

I think this is ready for merge now

@surovic surovic merged commit fb4a663 into master Sep 6, 2022
@frabert frabert deleted the frabert/z3-nonsense branch September 6, 2022 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants