summaryrefslogtreecommitdiff
path: root/src/theory/theory_engine.cpp
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2019-09-26 17:52:37 -0700
committerGitHub <noreply@github.com>2019-09-26 17:52:37 -0700
commit3aafd4a2ced87f0fd82ebe5279b73c84552502d5 (patch)
tree2e96b3cf82d4a1d2c74bb5a6b3227d5afb3716d1 /src/theory/theory_engine.cpp
parent9ba1854be7d798a899a2b46c2707d376938c5d18 (diff)
parent923abd7000a2ab6e3c0776c59d159bdc3a4d9a52 (diff)
Merge branch 'master' into splitEqRew
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r--src/theory/theory_engine.cpp38
1 files changed, 12 insertions, 26 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp
index dceeeae7a..5d185ad9d 100644
--- a/src/theory/theory_engine.cpp
+++ b/src/theory/theory_engine.cpp
@@ -260,24 +260,6 @@ void TheoryEngine::eqNotifyNewClass(TNode t){
}
}
-void TheoryEngine::eqNotifyPreMerge(TNode t1, TNode t2){
- if (d_logicInfo.isQuantified()) {
- d_quantEngine->eqNotifyPreMerge( t1, t2 );
- }
-}
-
-void TheoryEngine::eqNotifyPostMerge(TNode t1, TNode t2){
- if (d_logicInfo.isQuantified()) {
- d_quantEngine->eqNotifyPostMerge( t1, t2 );
- }
-}
-
-void TheoryEngine::eqNotifyDisequal(TNode t1, TNode t2, TNode reason){
- if (d_logicInfo.isQuantified()) {
- d_quantEngine->eqNotifyDisequal( t1, t2, reason );
- }
-}
-
TheoryEngine::TheoryEngine(context::Context* context,
context::UserContext* userContext,
RemoveTermFormulas& iteRemover,
@@ -292,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),
@@ -900,7 +882,12 @@ TheoryModel* TheoryEngine::getBuiltModel()
{
// If this method was called, we should be in SAT mode, and produceModels
// should be true.
- AlwaysAssert(d_inSatMode && options::produceModels());
+ AlwaysAssert(options::produceModels());
+ if (!d_inSatMode)
+ {
+ // not available, perhaps due to interuption.
+ return nullptr;
+ }
// must build model at this point
d_curr_model_builder->buildModel(d_curr_model);
}
@@ -923,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
@@ -946,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
@@ -1061,9 +1049,7 @@ Node TheoryEngine::ppTheoryRewrite(TNode term) {
Node newTerm;
// do not rewrite inside quantifiers
- if (term.getKind() == kind::FORALL || term.getKind() == kind::EXISTS
- || term.getKind() == kind::CHOICE
- || term.getKind() == kind::LAMBDA)
+ if (term.isClosure())
{
newTerm = Rewriter::rewrite(term);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback