diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2019-09-19 09:44:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-19 09:44:04 -0500 |
commit | 7988675ce9666b6f2214b583d42b9fa8be52ae60 (patch) | |
tree | 12cda1e352a6d80819f00d131f969d7728bf28ec /src/theory/theory_engine.cpp | |
parent | cfe4f59c0a10d49a35b9f59bb2fd6ab7d224e53d (diff) |
Support context-(in)dependent decision strategies. (#3281)
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r-- | src/theory/theory_engine.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp index 8348c24d5..5d185ad9d 100644 --- a/src/theory/theory_engine.cpp +++ b/src/theory/theory_engine.cpp @@ -274,7 +274,7 @@ TheoryEngine::TheoryEngine(context::Context* context, d_masterEqualityEngine(nullptr), d_masterEENotify(*this), d_quantEngine(nullptr), - d_decManager(new DecisionManager(context)), + d_decManager(new DecisionManager(userContext)), d_curr_model(nullptr), d_aloc_curr_model(false), d_curr_model_builder(nullptr), @@ -910,6 +910,10 @@ bool TheoryEngine::presolve() { // Reset the interrupt flag d_interrupted = false; + // Reset the decision manager. This clears its decision strategies that are + // no longer valid in this user context. + d_decManager->presolve(); + try { // Definition of the statement that is to be run by every theory #ifdef CVC4_FOR_EACH_THEORY_STATEMENT @@ -933,9 +937,6 @@ bool TheoryEngine::presolve() { }/* TheoryEngine::presolve() */ void TheoryEngine::postsolve() { - // Reset the decision manager. This clears its decision strategies, which are - // user-context-dependent. - d_decManager->reset(); // no longer in SAT mode d_inSatMode = false; // Reset the interrupt flag |