From 2cc0e2c6a691fb6d30ed8879832b49bc1f277d77 Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Thu, 3 May 2018 16:36:48 -0700 Subject: Fix redundant internalPush calls. (#1865) The SMT2 parser by default passes a true expression to the CheckSatCommand, which results in checkSatisfiability (in SmtEngine) to always do an internal push. As a consequence, the work of each check-sat was reset even though no user level push/pop happened. --- src/smt/smt_engine.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/smt/smt_engine.cpp') diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp index 0cff9c8fa..c1e8596cf 100644 --- a/src/smt/smt_engine.cpp +++ b/src/smt/smt_engine.cpp @@ -4530,6 +4530,12 @@ Result SmtEngine::checkSatisfiability(const vector& assumptions, d_assumptions = assumptions; } + if (!d_assumptions.empty()) + { + internalPush(); + didInternalPush = true; + } + Result r(Result::SAT_UNKNOWN, Result::UNKNOWN_REASON); for (Expr e : d_assumptions) { @@ -4540,8 +4546,6 @@ Result SmtEngine::checkSatisfiability(const vector& assumptions, ensureBoolean(e); /* Add assumption */ - internalPush(); - didInternalPush = true; if (d_assertionList != NULL) { d_assertionList->push_back(e); -- cgit v1.2.3