summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.nyu.edu>2012-06-28 11:26:07 +0000
committerClark Barrett <barrett@cs.nyu.edu>2012-06-28 11:26:07 +0000
commit7fcf0cb48a02115ff93395b89db722d10abf5f41 (patch)
treec087609c08ac23331122470afc037a6da463b7c5 /test
parent2f282e67ed10bd58c24cdc14ec53857b79e59a35 (diff)
Fixed bug in bv rewriter that caused wrong answer in SMT-COMPsmtcomp2012-resubmission-2
Diffstat (limited to 'test')
-rw-r--r--test/regress/regress0/aufbv/Makefile.am9
-rw-r--r--test/regress/regress0/aufbv/rewrite_bug.smt28
-rw-r--r--test/regress/regress0/bv/Makefile.am3
-rw-r--r--test/regress/regress0/bv/smtcompbug.smt13
4 files changed, 47 insertions, 6 deletions
diff --git a/test/regress/regress0/aufbv/Makefile.am b/test/regress/regress0/aufbv/Makefile.am
index 41bb5db5b..482c06ac7 100644
--- a/test/regress/regress0/aufbv/Makefile.am
+++ b/test/regress/regress0/aufbv/Makefile.am
@@ -22,9 +22,10 @@ TESTS = \
wchains010ue.delta02.smt \
dubreva005ue.delta01.smt \
fuzz00.smt \
+ fuzz01.smt \
fuzz01.delta01.smt \
fuzz02.delta01.smt \
- fuzz02.smt \
+ fuzz02.smt \
fuzz03.delta01.smt \
fuzz03.smt \
fuzz04.delta01.smt \
@@ -37,11 +38,9 @@ TESTS = \
fuzz08.smt \
fuzz09.smt \
fuzz10.smt \
- fifo32bc06k08.delta01.smt
+ fifo32bc06k08.delta01.smt \
+ rewrite_bug.smt
-# failing
-# fuzz01.smt \
-#
EXTRA_DIST = $(TESTS)
diff --git a/test/regress/regress0/aufbv/rewrite_bug.smt b/test/regress/regress0/aufbv/rewrite_bug.smt
new file mode 100644
index 000000000..c0906ba0d
--- /dev/null
+++ b/test/regress/regress0/aufbv/rewrite_bug.smt
@@ -0,0 +1,28 @@
+(benchmark B_
+:logic QF_AUFBV
+:extrafuns ((a Array[32:8]))
+:status sat
+:formula
+(flet ($n1 true)
+(let (?n2 bv0[8])
+(let (?n3 (sign_extend[24] ?n2))
+(let (?n4 bv1[32])
+(let (?n5 bv1[8])
+(let (?n6 (store a ?n4 ?n5))
+(let (?n7 bv0[32])
+(let (?n8 (select a ?n4))
+(let (?n9 (sign_extend[24] ?n8))
+(let (?n10 (extract[7:0] ?n9))
+(let (?n11 (store ?n6 ?n7 ?n10))
+(let (?n12 (select ?n11 ?n4))
+(let (?n13 (store ?n11 ?n4 ?n12))
+(let (?n14 (select ?n13 ?n7))
+(let (?n15 (sign_extend[24] ?n14))
+(flet ($n16 (bvslt ?n3 ?n15))
+(flet ($n17 (not $n16))
+(let (?n18 (select ?n13 ?n4))
+(let (?n19 (sign_extend[24] ?n18))
+(flet ($n20 (bvslt ?n7 ?n19))
+(flet ($n21 (and $n1 $n1 $n1 $n1 $n17 $n20))
+$n21
+))))))))))))))))))))))
diff --git a/test/regress/regress0/bv/Makefile.am b/test/regress/regress0/bv/Makefile.am
index a21c772b1..937a886f6 100644
--- a/test/regress/regress0/bv/Makefile.am
+++ b/test/regress/regress0/bv/Makefile.am
@@ -81,7 +81,8 @@ SMT_TESTS = \
fuzz40.delta01.smt \
fuzz40.smt \
fuzz41.smt \
- calc2_sec2_shifter_mult_bmc15.atlas.delta01.smt
+ calc2_sec2_shifter_mult_bmc15.atlas.delta01.smt \
+ smtcompbug.smt
# Regression tests for SMT2 inputs
SMT2_TESTS =
diff --git a/test/regress/regress0/bv/smtcompbug.smt b/test/regress/regress0/bv/smtcompbug.smt
new file mode 100644
index 000000000..7efe3015c
--- /dev/null
+++ b/test/regress/regress0/bv/smtcompbug.smt
@@ -0,0 +1,13 @@
+(benchmark B_
+ :status sat
+ :category { unknown }
+ :logic QF_BV
+ :extrafuns ((x781 BitVec[32]))
+ :extrafuns ((x803 BitVec[8]))
+ :extrafuns ((x804 BitVec[8]))
+ :extrafuns ((x791 BitVec[8]))
+ :formula (and
+(= x804 (bvxor (bvxor (extract[7:0] (bvadd bv1[32] x781)) x791) x803))
+(= (bvnot (extract[0:0] x804)) bv0[1])
+(= x781 bv0[32]))
+)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback