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/regress/regress0/unconstrained | |
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/regress/regress0/unconstrained')
-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 |
3 files changed, 2 insertions, 17 deletions
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) |