-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bv-to-int: fix translation of bvneg (cvc5#8437)
The translation of bvneg to integers did not match the comment documenting it, causing cvc5#8413 . This PR fixes the issue and includes the test from cvc5#8413 as well as a simpler test. Fixes cvc5#8413 .
- Loading branch information
Showing
4 changed files
with
24 additions
and
2 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
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,12 @@ | ||
; COMMAND-LINE: --solve-bv-as-int=sum | ||
; EXPECT: sat | ||
|
||
(set-logic QF_BV) | ||
|
||
(declare-fun zero () (_ BitVec 16)) | ||
(declare-fun x () (_ BitVec 16)) | ||
|
||
(assert (= zero (_ bv0 16))) | ||
(assert (= zero (bvneg x))) | ||
|
||
(check-sat) |
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 @@ | ||
; COMMAND-LINE: --solve-bv-as-int=sum | ||
; EXPECT: sat | ||
|
||
(set-logic QF_BV) | ||
(declare-fun a () (_ BitVec 1)) | ||
(assert (= (_ bv0 16) (bvsdiv ((_ zero_extend 8) ((_ zero_extend 7) a)) (bvnor (_ bv0 16) (_ bv0 16))))) | ||
(check-sat) |