*/
void finishInit();
- /**
- * This is called by SolverEngine, at shutdown time, just before
- * destruction. It is important because there are destruction
- * ordering issues between some parts of the system (notably between
- * PropEngine and Theory). For now, there's nothing to do here in
- * the PropEngine.
- */
- void shutdown() {}
-
/**
* Preprocess the given node. Return the REWRITE trust node corresponding to
* rewriting node. New lemmas and skolems are added to ppLemmas and
}
}
-void SmtSolver::shutdown()
-{
- if (d_propEngine != nullptr)
- {
- d_propEngine->shutdown();
- }
- if (d_theoryEngine != nullptr)
- {
- d_theoryEngine->shutdown();
- }
-}
-
Result SmtSolver::checkSatisfiability(Assertions& as,
const std::vector<Node>& assumptions,
bool isEntailmentCheck)
* isn't currently in a query.
*/
void interrupt();
- /**
- * This is called by the destructor of SolverEngine, just before destroying
- * the PropEngine, TheoryEngine, and DecisionEngine (in that order). It is
- * important because there are destruction ordering issues between PropEngine
- * and Theory.
- */
- void shutdown();
/**
* Check satisfiability (used to check satisfiability and entailment)
* in SolverEngine. This is done via adding assumptions (when necessary) to
void SolverEngine::shutdown()
{
d_state->shutdown();
-
- d_smtSolver->shutdown();
-
d_env->shutdown();
}
bool collectModelValues(TheoryModel* m,
const std::set<Node>& termSet) override;
- void shutdown() override {}
-
void presolve() override;
void notifyRestart() override;
PPAssertStatus ppAssert(TrustNode tin,
void presolve() override;
- void shutdown() override {}
/////////////////////////////////////////////////////////////////////////////
// MAIN SOLVER
TrustNode expandDefinition(Node node) override;
static inline void init() {}
- static inline void shutdown() {}
private:
/**
/** Collect model values in m based on the relevant terms given by termSet */
bool collectModelValues(TheoryModel* m,
const std::set<Node>& termSet) override;
- void shutdown() override {}
std::string identify() const override
{
return std::string("TheoryQuantifiers");
public:
void presolve() override;
- void shutdown() override {}
/////////////////////////////////////////////////////////////////////////////
// MAIN SOLVER
TrustNode explain(TNode literal) override;
/** presolve */
void presolve() override;
- /** shutdown */
- void shutdown() override {}
/** preregister term */
void preRegisterTerm(TNode n) override;
//--------------------------------- standard check
Valuation valuation,
std::string instance = ""); // taking : No default.
- /**
- * This is called at shutdown time by the TheoryEngine, just before
- * destruction. It is important because there are destruction
- * ordering issues between PropEngine and Theory (based on what
- * hard-links to Nodes are outstanding). As the fact queue might be
- * nonempty, we ensure here that it's clear. If you overload this,
- * you must make an explicit call here to this->Theory::shutdown()
- * too.
- */
- virtual void shutdown() {}
-
/**
* The output channel for the Theory.
*/
d_relManager(nullptr),
d_inConflict(context(), false),
d_inSatMode(false),
- d_hasShutDown(false),
d_incomplete(context(), false),
d_incompleteTheory(context(), THEORY_BUILTIN),
d_incompleteId(context(), IncompleteId::UNKNOWN),
}
TheoryEngine::~TheoryEngine() {
- Assert(d_hasShutDown);
for(TheoryId theoryId = theory::THEORY_FIRST; theoryId != theory::THEORY_LAST; ++ theoryId) {
if(d_theoryTable[theoryId] != NULL) {
return true;
}
-void TheoryEngine::shutdown() {
- // Set this first; if a Theory shutdown() throws an exception,
- // at least the destruction of the TheoryEngine won't confound
- // matters.
- d_hasShutDown = true;
-
- // Shutdown all the theories
- for(TheoryId theoryId = theory::THEORY_FIRST; theoryId < theory::THEORY_LAST; ++theoryId) {
- if(d_theoryTable[theoryId]) {
- theoryOf(theoryId)->shutdown();
- }
- }
-}
-
theory::Theory::PPAssertStatus TheoryEngine::solve(
TrustNode tliteral, TrustSubstitutionMap& substitutionOut)
{
* or during LAST_CALL effort.
*/
bool isRelevant(Node lit) const;
- /**
- * This is called at shutdown time by the SolverEngine, just before
- * destruction. It is important because there are destruction
- * ordering issues between PropEngine and Theory.
- */
- void shutdown();
/**
* Solve the given literal with a theory that owns it. The proof of tliteral
*/
bool d_inSatMode;
- /**
- * Debugging flag to ensure that shutdown() is called before the
- * destructor.
- */
- bool d_hasShutDown;
-
/**
* True if a theory has notified us of incompleteness (at this
* context level or below).