diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2020-06-01 10:14:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 12:14:56 -0500 |
commit | a6c8c9a293eca7cd753368d7f23f9978deb2b2d5 (patch) | |
tree | 2bfe5246c3af73f0da3e0fa7b84f7f02058776d6 /test/regress/regress0/arith | |
parent | 7c2045123b177334cc47b24266225d6b38599bf5 (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/regress/regress0/arith')
-rw-r--r-- | test/regress/regress0/arith/issue3480.smt2 | 2 | ||||
-rw-r--r-- | test/regress/regress0/arith/issue4367.smt2 | 11 |
2 files changed, 12 insertions, 1 deletions
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) |