-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(BV): Allow substituting constants
Substituting a constant should be a no-op (just like substituting a variable that is not in the substitution). Somehow this case was missed in the new version of `apply_sub`. It is fairly hard to trigger this case however: it can only happen in `apply_subs`, and requires a C-substitution to be created, which in turn requires a C-variable to be split during B-variable slicing, and then the C-substitution must be applied to an equation rooted in a distinct term that contains a constant. This patch includes a test case where this happens.
- Loading branch information
1 parent
1ae67fa
commit eec38ff
Showing
4 changed files
with
263 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
unknown |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(set-logic QF_BV) | ||
(declare-const x (_ BitVec 8)) | ||
(declare-const y (_ BitVec 8)) | ||
; This used to crash | ||
(assert (= (concat #b00000000 (concat x (concat ((_ extract 6 5) x) ((_ extract 3 1) x)))) (concat y (concat y (concat #b00 ((_ extract 6 4) x))) | ||
))) | ||
(check-sat) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.