summaryrefslogtreecommitdiff
path: root/test/regress/regress0
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-06-03 08:47:46 -0500
committerGitHub <noreply@github.com>2020-06-03 08:47:46 -0500
commit6c8702ab5eb08466bf954e202241df39de680081 (patch)
tree3feb6e0f2dc64619ce131006f479350eb8e275fd /test/regress/regress0
parent0a960638857ae4682162cf19b47801bc19dd94c3 (diff)
Do not apply unconstrained simplification when quantifiers are present (#4532)
Fixes #4437. This is a simpler fix that aborts the preprocessing pass when a quantifier is encountered. It also updates our smt2 parser to throw a logic exception when forall/exists is used in non-quantified logics. This is required to ensure that unconstrained simplification does not throw an exception to a user as a result of accidentally setting the wrong logic.
Diffstat (limited to 'test/regress/regress0')
-rw-r--r--test/regress/regress0/quantifiers/issue4437-unc-quant.smt27
-rw-r--r--test/regress/regress0/unconstrained/4481.smt23
-rw-r--r--test/regress/regress0/unconstrained/4484.smt28
-rw-r--r--test/regress/regress0/unconstrained/4486.smt28
4 files changed, 9 insertions, 17 deletions
diff --git a/test/regress/regress0/quantifiers/issue4437-unc-quant.smt2 b/test/regress/regress0/quantifiers/issue4437-unc-quant.smt2
new file mode 100644
index 000000000..61f792999
--- /dev/null
+++ b/test/regress/regress0/quantifiers/issue4437-unc-quant.smt2
@@ -0,0 +1,7 @@
+; EXPECT: (error "Parse Error: issue4437-unc-quant.smt2:6.15: Quantifier used in non-quantified logic.")
+; EXIT: 1
+(set-logic QF_AUFBVLIA)
+(declare-fun a () (_ BitVec 8))
+(declare-fun b () (_ BitVec 8))
+(assert (forall ((c (_ BitVec 8))) (= (bvashr c a) b)))
+(check-sat)
diff --git a/test/regress/regress0/unconstrained/4481.smt2 b/test/regress/regress0/unconstrained/4481.smt2
index 028607093..19179f4d7 100644
--- a/test/regress/regress0/unconstrained/4481.smt2
+++ b/test/regress/regress0/unconstrained/4481.smt2
@@ -1,5 +1,6 @@
; COMMAND-LINE: --unconstrained-simp
-; EXPECT: unsat
+; EXPECT: (error "Cannot use unconstrained simplification in this logic, due to (possibly internally introduced) quantified formula.")
+; EXIT: 1
(set-logic ALL)
(set-info :status unsat)
(declare-fun a () Int)
diff --git a/test/regress/regress0/unconstrained/4484.smt2 b/test/regress/regress0/unconstrained/4484.smt2
deleted file mode 100644
index f2f11295b..000000000
--- a/test/regress/regress0/unconstrained/4484.smt2
+++ /dev/null
@@ -1,8 +0,0 @@
-; COMMAND-LINE: --unconstrained-simp
-; EXPECT: unsat
-(set-logic QF_NIRA)
-(set-info :status unsat)
-(declare-fun a () Real)
-(assert (= (to_int a) 2))
-(assert (= (to_int (/ a 2.0)) 2))
-(check-sat)
diff --git a/test/regress/regress0/unconstrained/4486.smt2 b/test/regress/regress0/unconstrained/4486.smt2
deleted file mode 100644
index 01771ce66..000000000
--- a/test/regress/regress0/unconstrained/4486.smt2
+++ /dev/null
@@ -1,8 +0,0 @@
-; COMMAND-LINE: --unconstrained-simp
-; EXPECT: sat
-(set-logic ALL)
-(set-info :status sat)
-(declare-fun x () Real)
-(assert (is_int x))
-(assert (is_int (+ x 1)))
-(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback