-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support BitVec.ofBool in bv_decide (#5852)
This is the first step towards fixing the issue of not having mutual recursion between the `Bool` and `BitVec` fragment of `QF_BV` in `bv_decide`. This PR adds support for `BitVec.ofBool` by doing the following: 1. Introduce a new mechanism into the reification engine that allows us to add additional lemmas to the top level on the fly as we are traversing the expression tree. 2. If we encounter an expression `BitVec.ofBool boolExpr` we reify `boolExpr` and then abstract `BitVec.ofBool boolExpr` as some atom `a` 3. We add two lemmas `boolExpr = true -> a = 1#1` and `boolExpr = false -> a = 0#1`. This mirrors the full behavior of `BitVec.ofBool` and thus makes our atom `a` correctly interpreted again. In order to do the reification in step 2 mutual recursion in the reification engine is required. For this reason I started pulling out logic from the, now rather large, mutual block into other files and document the invariants that they assume explicitly.
- Loading branch information
Showing
14 changed files
with
743 additions
and
516 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.