summaryrefslogtreecommitdiff
path: root/src/theory/theory_model.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-09-20 10:59:36 -0500
committerGitHub <noreply@github.com>2020-09-20 10:59:36 -0500
commit63e7c6bb6d9c99a5282241be8b32a04ea67dfb8d (patch)
tree8841b287b35143ff7470811ae164f74c71bc2cad /src/theory/theory_model.cpp
parent5f04a78336d648b02bc5cfdaaf734b6b350ee805 (diff)
More flexible design for model manager distributed (#4976)
This PR makes it so that the distributed model manager can be used independently of the architecture for equality engine management for theories, meaning the choice of using a separate equality engine for the model can be done in both the current distributed architecture, or the proposed central architecture (where there would be 2 equality engines, the central one and the model one). The "central model manager" on the other hand will only be combined with the central architecture. This will make it easier to test the centralized equality engine manager, since all things related to model construction can be preserved when using a central architecture. This PR moves some of the responsibilities from the (distributed) equality engine manager to the distributed model manager, including the management of the context of the model equality engine and the allocation of its equality engine. This PR is not intended to make any behavior changes to the current architecture.
Diffstat (limited to 'src/theory/theory_model.cpp')
-rw-r--r--src/theory/theory_model.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/theory/theory_model.cpp b/src/theory/theory_model.cpp
index da9f28d01..53267727b 100644
--- a/src/theory/theory_model.cpp
+++ b/src/theory/theory_model.cpp
@@ -44,22 +44,10 @@ TheoryModel::TheoryModel(context::Context* c,
TheoryModel::~TheoryModel() {}
-void TheoryModel::setEqualityEngine(eq::EqualityEngine* ee)
+void TheoryModel::finishInit(eq::EqualityEngine* ee)
{
+ Assert(ee != nullptr);
d_equalityEngine = ee;
-}
-
-bool TheoryModel::needsEqualityEngine(EeSetupInfo& esi)
-{
- // no notifications
- esi.d_name = d_name;
- esi.d_constantsAreTriggers = false;
- return true;
-}
-
-void TheoryModel::finishInit()
-{
- Assert(d_equalityEngine != nullptr);
// The kinds we are treating as function application in congruence
d_equalityEngine->addFunctionKind(kind::APPLY_UF, false, options::ufHo());
d_equalityEngine->addFunctionKind(kind::HO_APPLY);
@@ -772,5 +760,7 @@ std::vector< Node > TheoryModel::getFunctionsToAssign() {
return funcs_to_assign;
}
+const std::string& TheoryModel::getName() const { return d_name; }
+
} /* namespace CVC4::theory */
} /* namespace CVC4 */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback