-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat(BV): Interval domains for bit-vectors #1058
Merged
Merged
Commits on Jun 20, 2024
-
feat(BV): Interval domains for bit-vectors
This patch adds interval domains to the Bitv_rel module, as well as interreductions between the bitlist and interval domains following: Sharpening Constraint Programming approaches for Bit-Vector Theory. Zakaria Chihani, Bruno Marre, François Bobot, Sébastien Bardin. CPAIOR 2017. International Conference on AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems, Jun 2017, Padova, Italy. More precisely: - The `Intervals` module is extended to support the `extract` operation, which is used to propagate between bit-vector compositions and their components; - The interreductions are implemented using the new `Bitlist.increase_lower_bound`, `Bitlist.decrease_upper_bound`, and the new `shared_msb` helper in `Bitv_rel`; - Propagations are performed by alternating propagations until fixpoint in each domain, followed by interreductions and propagations until fixpoint in the other domain, until reaching a fixpoint for the whole procedure. It is not clear that this is the best strategy; the goal is to try and limit interreductions since they are relatively expensive but we should revisit this once more operations are supported. For now, only the `bvule`, `bvult`, `bvugt` and `bvuge` primitives are supported as built-in bit-vector operations; other operations such as `bvadd` are still encoded using `bv2nat`. These operations will be migrated to bit-vector primitives in a follow-up PR. Finally, there are some tests for the tricky bits (`Intervals.extract` and the interreduction primitives) using QCheck.
Configuration menu - View commit details
-
Copy full SHA for a396b5e - Browse repository at this point
Copy the full SHA a396b5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b9fab02 - Browse repository at this point
Copy the full SHA b9fab02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 96e99bd - Browse repository at this point
Copy the full SHA 96e99bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for a8772c2 - Browse repository at this point
Copy the full SHA a8772c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5000254 - Browse repository at this point
Copy the full SHA 5000254View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ef7477 - Browse repository at this point
Copy the full SHA 7ef7477View commit details -
Configuration menu - View commit details
-
Copy full SHA for 13a695c - Browse repository at this point
Copy the full SHA 13a695cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 143b640 - Browse repository at this point
Copy the full SHA 143b640View commit details
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.