-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
80 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
(set-logic HORN) | ||
(declare-fun foo ((_ BitVec 1)) Bool) | ||
(declare-fun bar (Int Int) Bool) | ||
(assert (foo (_ bv1 1))) | ||
|
||
; bv2int: cast from signed bit-vectors to ints | ||
; bv2nat: cast from unsigned bit-vectors to ints | ||
(assert | ||
(forall | ||
((x (_ BitVec 1))) | ||
(=> (foo x) (bar (bv2int x) (bv2nat x))))) | ||
|
||
; int2bv and nat2bv have the same semantics | ||
(assert | ||
(forall | ||
((x Int) (y Int)) | ||
(=> (bar x y) (= ((_ int2bv 1) x) (_ bv1 1)) | ||
(= ((_ nat2bv 1) y) (_ bv1 1))))) | ||
(assert | ||
(forall | ||
((x Int) (y Int)) | ||
(=> (bar x y) (distinct x y)))) | ||
(check-sat) | ||
(get-model) |
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,17 @@ | ||
; Problem that is sat; due to incorrect handling of sign_extend, | ||
; Eldarica reported unsat in earlier versions. | ||
|
||
(set-logic HORN) | ||
(declare-fun foo ((_ BitVec 1)) Bool) | ||
(declare-fun bar ((_ BitVec 2)) Bool) | ||
(assert (foo (_ bv1 1))) | ||
(assert | ||
(forall | ||
((x (_ BitVec 1))) | ||
(=> (foo x) (bar ((_ sign_extend 1) x))))) | ||
(assert | ||
(forall | ||
((x (_ BitVec 2))) | ||
(=> (bar x) (= x (_ bv3 2))))) | ||
(check-sat) | ||
(get-model) |
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