summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2020-06-01 10:14:56 -0700
committerGitHub <noreply@github.com>2020-06-01 12:14:56 -0500
commita6c8c9a293eca7cd753368d7f23f9978deb2b2d5 (patch)
tree2bfe5246c3af73f0da3e0fa7b84f7f02058776d6 /test
parent7c2045123b177334cc47b24266225d6b38599bf5 (diff)
Set theoryof-mode after theory widening (#4545)
Fixes #4367. We set the theoryof-mode depending on whether sharing is enabled or not. However, we were checking whether sharing was enabled before theory widening, leading to unexpected results. This commit moves the check after widening the theories. For the benchmark in the issue, setting the theoryof-mode before theory widening lead to problems because of the following: The main solver checks the condition for enabling term-based theoryof-mode, decides not to do it because sharing is not enabled Main solver adds UF to the logic Main solver does a check-sat all Unsat core check runs, sees both UF and NRA enabled, and switches to term-based mode Main solver gets to second check-sat call, now the theoryof-mode is suddenly changed, which leads to problems in the equality engine This commit fixes the issue in this particular instance but it is important to note that it does not address the issue of the subsolver changing settings in general. This can only really be solved by separating the options from the ExprManager/NodeManager and having separate options for each SmtEngine/Solver instance.
Diffstat (limited to 'test')
-rw-r--r--test/regress/CMakeLists.txt1
-rw-r--r--test/regress/regress0/arith/issue3480.smt22
-rw-r--r--test/regress/regress0/arith/issue4367.smt211
3 files changed, 13 insertions, 1 deletions
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt
index 10a1b6ba0..0f1b090d4 100644
--- a/test/regress/CMakeLists.txt
+++ b/test/regress/CMakeLists.txt
@@ -37,6 +37,7 @@ set(regress_0_tests
regress0/arith/issue3413.smt2
regress0/arith/issue3480.smt2
regress0/arith/issue3683.smt2
+ regress0/arith/issue4367.smt2
regress0/arith/issue4525.smt2
regress0/arith/ite-lift.smt2
regress0/arith/leq.01.smtv1.smt2
diff --git a/test/regress/regress0/arith/issue3480.smt2 b/test/regress/regress0/arith/issue3480.smt2
index 7609ad3e7..74ce8d32b 100644
--- a/test/regress/regress0/arith/issue3480.smt2
+++ b/test/regress/regress0/arith/issue3480.smt2
@@ -1,4 +1,4 @@
-; COMMAND-LINE: --quiet
+; COMMAND-LINE: --theoryof-mode=type --quiet
(set-logic QF_NIA)
(declare-fun a () Int)
(declare-fun b () Int)
diff --git a/test/regress/regress0/arith/issue4367.smt2 b/test/regress/regress0/arith/issue4367.smt2
new file mode 100644
index 000000000..abe5b09fd
--- /dev/null
+++ b/test/regress/regress0/arith/issue4367.smt2
@@ -0,0 +1,11 @@
+; COMMAND-LINE: --incremental --check-unsat-cores
+; EXPECT: unsat
+; EXPECT: unsat
+(set-logic NRA)
+(declare-const r0 Real)
+(assert (! (forall ((q0 Bool) (q1 Real)) (= (* r0 r0) r0 r0)) :named IP_2))
+(assert (! (not (forall ((q2 Real)) (not (<= 55.033442 r0 55.033442 q2)))) :named IP_5))
+(push 1)
+(check-sat)
+(pop 1)
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback