Skip to content

Commit ef804a6

Browse files
author
Daniel Kroening
committed
smt2_solver: add another test for bit-vector let
1 parent 330ecfe commit ef804a6

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
let-with-bv2.smt2
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^unsat$
7+
--
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
(set-logic QF_BV)
2+
3+
(define-fun x () (_ BitVec 8) #x12)
4+
5+
; let hides the function 'x'
6+
(define-fun let1 () Bool (let ((x #x4567)) (= x #x4567)))
7+
8+
; the binding isn't visible immediately
9+
(define-fun let2 () Bool (= (let ((x x)) x) #x12))
10+
11+
; parallel let
12+
(define-fun let3 () Bool (= (let ((x #x45) (y x)) y) #x12))
13+
14+
; limited scope
15+
(define-fun let4 () Bool (and (let ((x true)) x) (= x #x12)))
16+
17+
; all must be true
18+
19+
(assert (not (and
20+
let1
21+
let2
22+
let3
23+
let4
24+
)))
25+
26+
(check-sat)

0 commit comments

Comments
 (0)