summaryrefslogtreecommitdiff
path: root/test/regress
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2017-10-28 16:45:16 -0700
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>2017-10-28 18:45:16 -0500
commita5c79c991506610e47a8f503a2b775aa4b5fa63f (patch)
tree7f5cbdf9294407219dec181e3ba99fc6294677e0 /test/regress
parentd33fc58a4fccfe6bc9059e0dd47afea2ed69d1ad (diff)
Change bvudiv semantics based on input language (#1292)
* Change bvudiv semantics based on input language The semantics of division by zero have changed from SMT 2.5 to SMT 2.6. This commit sets the default options for the division semantics based on the language version used. The input language was already kept track of in the options, so this commit just updates the input language option when there is a set-info command. This mirrors how the code already deals with the output language. Note: With this commit, set-info overwrites the option set by the user. This is done to be consistent with the parser. This partially fixes #1241. * clang format
Diffstat (limited to 'test/regress')
-rw-r--r--test/regress/regress0/bv/Makefile.am4
-rw-r--r--test/regress/regress0/bv/divtest_2_5.smt29
-rw-r--r--test/regress/regress0/bv/divtest_2_6.smt29
3 files changed, 21 insertions, 1 deletions
diff --git a/test/regress/regress0/bv/Makefile.am b/test/regress/regress0/bv/Makefile.am
index 4ff7f8530..0ae0c69e0 100644
--- a/test/regress/regress0/bv/Makefile.am
+++ b/test/regress/regress0/bv/Makefile.am
@@ -101,7 +101,9 @@ SMT_TESTS = \
bv2nat-simp-range-sat.smt2 \
bv-int-collapse1.smt2 \
bv-int-collapse2.smt2 \
- bv-int-collapse2-sat.smt2
+ bv-int-collapse2-sat.smt2 \
+ divtest_2_5.smt2 \
+ divtest_2_6.smt2
# This benchmark is currently disabled as it uses --check-proof
# bench_38.delta.smt2
diff --git a/test/regress/regress0/bv/divtest_2_5.smt2 b/test/regress/regress0/bv/divtest_2_5.smt2
new file mode 100644
index 000000000..b2712e520
--- /dev/null
+++ b/test/regress/regress0/bv/divtest_2_5.smt2
@@ -0,0 +1,9 @@
+; EXPECT: sat
+(set-info :smt-lib-version 2.5)
+(set-logic QF_BV)
+(set-info :status sat)
+(declare-fun x () (_ BitVec 8))
+(declare-fun y () (_ BitVec 8))
+
+(assert (not (= (bvudiv x (_ bv0 8)) (_ bv255 8))))
+(check-sat)
diff --git a/test/regress/regress0/bv/divtest_2_6.smt2 b/test/regress/regress0/bv/divtest_2_6.smt2
new file mode 100644
index 000000000..4dfd22d7c
--- /dev/null
+++ b/test/regress/regress0/bv/divtest_2_6.smt2
@@ -0,0 +1,9 @@
+; EXPECT: unsat
+(set-info :smt-lib-version 2.6)
+(set-logic QF_BV)
+(set-info :status unsat)
+(declare-fun x () (_ BitVec 8))
+(declare-fun y () (_ BitVec 8))
+
+(assert (not (= (bvudiv x (_ bv0 8)) (_ bv255 8))))
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback