d_private->addUseTheoryListListener(d_theoryEngine);
- // global push/pop around everything, to ensure proper destruction
- // of context-dependent data structures
- d_userContext->push();
- d_context->push();
-
// ensure that our heuristics are properly set up
setDefaults();
Trace("smt-debug") << "Finishing init for theory engine..." << std::endl;
d_theoryEngine->finishInit();
+ // global push/pop around everything, to ensure proper destruction
+ // of context-dependent data structures
+ d_userContext->push();
+ d_context->push();
+
Trace("smt-debug") << "Set up assertion list..." << std::endl;
// [MGD 10/20/2011] keep around in incremental mode, due to a
// cleanup ordering issue and Nodes/TNodes. If SAT is popped
Debug("equality") << "EqualityEdge::EqualityEngine(): edge_null = " << +null_edge << std::endl;
Debug("equality") << "EqualityEdge::EqualityEngine(): trigger_null = " << +null_trigger << std::endl;
+ // If we are not at level zero when we initialize this equality engine, we
+ // may remove true/false from the equality engine when we pop to level zero,
+ // which leads to issues.
+ Assert(d_context->getLevel() == 0);
+
d_true = NodeManager::currentNM()->mkConst<bool>(true);
d_false = NodeManager::currentNM()->mkConst<bool>(false);
regress0/smtlib/get-unsat-assumptions.smt2
regress0/smtlib/global-decls.smt2
regress0/smtlib/issue4028.smt2
+ regress0/smtlib/issue4077.smt2
regress0/smtlib/reason-unknown.smt2
regress0/smtlib/reset.smt2
regress0/smtlib/reset-assertions1.smt2
--- /dev/null
+; COMMAND-LINE: --incremental
+; EXPECT: sat
+
+; Use a quantified logic to make sure that TheoryEngine creates a master
+; equality engine
+(set-logic BV)
+(declare-const x (_ BitVec 4))
+(push)
+(reset-assertions)
+(assert (bvslt (bvsrem (_ bv1 4) x) (_ bv1 4)))
+(check-sat)
// the following call, which constructs its underlying theory engine.
d_smt->finalOptionsAreSet();
- // guard against duplicate statistics assertion errors
- delete d_smt->d_theoryEngine->d_theoryTable[THEORY_ARITH];
- delete d_smt->d_theoryEngine->d_theoryOut[THEORY_ARITH];
- d_smt->d_theoryEngine->d_theoryTable[THEORY_ARITH] = NULL;
- d_smt->d_theoryEngine->d_theoryOut[THEORY_ARITH] = NULL;
-
- d_arith = new TheoryArith(d_ctxt, d_uctxt, d_outputChannel, Valuation(NULL),
- d_logicInfo);
+ d_smt->d_theoryEngine->d_theoryTable[THEORY_ARITH]->setOutputChannel(
+ d_outputChannel);
+ d_arith = static_cast<TheoryArith*>(
+ d_smt->d_theoryEngine->d_theoryTable[THEORY_ARITH]);
preregistered = new std::set<Node>();
delete preregistered;
- delete d_arith;
d_outputChannel.clear();
delete d_scope;
delete d_smt;