diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-06-03 08:47:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 08:47:46 -0500 |
commit | 6c8702ab5eb08466bf954e202241df39de680081 (patch) | |
tree | 3feb6e0f2dc64619ce131006f479350eb8e275fd /test | |
parent | 0a960638857ae4682162cf19b47801bc19dd94c3 (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')
-rw-r--r-- | test/regress/CMakeLists.txt | 3 | ||||
-rw-r--r-- | test/regress/regress0/quantifiers/issue4437-unc-quant.smt2 | 7 | ||||
-rw-r--r-- | test/regress/regress0/unconstrained/4481.smt2 | 3 | ||||
-rw-r--r-- | test/regress/regress0/unconstrained/4484.smt2 | 8 | ||||
-rw-r--r-- | test/regress/regress0/unconstrained/4486.smt2 | 8 | ||||
-rw-r--r-- | test/regress/regress1/strings/norn-ab.smt2 | 2 |
6 files changed, 11 insertions, 20 deletions
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index b66d4e973..801f38b29 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -740,6 +740,7 @@ set(regress_0_tests regress0/quantifiers/issue3655.smt2 regress0/quantifiers/issue4086-infs.smt2 regress0/quantifiers/issue4275-qcf-cegqi-rep.smt2 + regress0/quantifiers/issue4437-unc-quant.smt2 regress0/quantifiers/issue4476-ext-rew.smt2 regress0/quantifiers/lra-triv-gn.smt2 regress0/quantifiers/macros-int-real.smt2 @@ -1127,8 +1128,6 @@ set(regress_0_tests regress0/uflra/simple.03.cvc regress0/uflra/simple.04.cvc regress0/unconstrained/4481.smt2 - regress0/unconstrained/4484.smt2 - regress0/unconstrained/4486.smt2 regress0/unconstrained/arith.smt2 regress0/unconstrained/arith3.smt2 regress0/unconstrained/arith4.smt2 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) diff --git a/test/regress/regress1/strings/norn-ab.smt2 b/test/regress/regress1/strings/norn-ab.smt2 index 63a95bb78..6109a01dd 100644 --- a/test/regress/regress1/strings/norn-ab.smt2 +++ b/test/regress/regress1/strings/norn-ab.smt2 @@ -1,5 +1,5 @@ (set-info :smt-lib-version 2.6) -(set-logic QF_SLIA) +(set-logic SLIA) (set-info :status unsat) (set-option :strings-exp true) |