-
Notifications
You must be signed in to change notification settings - Fork 1
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
Simplify known bits #335
Open
morriisw
wants to merge
18
commits into
main
Choose a base branch
from
simplify-known-bits
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Simplify known bits #335
+1,388
−1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
morriisw
commented
Feb 21, 2025
- Added a 'SimplifyKnownBits.scala' file under 'src/main/scala/ir/transforms' that defines the known bits/TNum abstract domain
- Added a Z3 Python test script called 'tnum_test_z3.py' under the 'scripts' folder to verify the TNum simplification logic that appears in 'SimplifyKnownBits.scala'
- Made changes to 'simplification-solvers.md' under 'docs/development' to include an explanation of the known bits analysis
5754331
to
2b0de8f
Compare
f57168d
to
e8eb03e
Compare
…or efficiency and logic simplification. Logic for bitwise operations between TNums remains the same but join method under TNumDomain now only merges the TNum of variables that appear in more than one program state.
…into a separate method called evaluateExprToTNum to allow for recursive matching and evaluation. Create new method called evaluateBinOp that evaluates binary operations and can be called within evaluateExprToTNum method.
…tors. Add evaluateUnOp method under TNumDomain class to handle evaluation of unary operations.
… to merge TNum values of variables that appear in both maps.
…toTNum method under TNumDomain class.
…iate between bitvector and boolean types. Change bitwise comparison method TCOMP to return a bitvector equivalent TNumValue instead of a boolean.
…ranslation of literals.
…both TNumValue and TNumBool instances.
…lyTransform method to generate IL.
0ef10ac
to
f5e635f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.