summaryrefslogtreecommitdiff
path: root/src/theory/combination_engine.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/combination_engine.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/combination_engine.cpp')
-rw-r--r--src/theory/combination_engine.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/theory/combination_engine.cpp b/src/theory/combination_engine.cpp
index 5c9e6713b..7ff2848df 100644
--- a/src/theory/combination_engine.cpp
+++ b/src/theory/combination_engine.cpp
@@ -18,8 +18,6 @@
#include "theory/care_graph.h"
#include "theory/ee_manager_distributed.h"
#include "theory/model_manager_distributed.h"
-#include "theory/shared_terms_database.h"
-#include "theory/term_registration_visitor.h"
#include "theory/theory_engine.h"
namespace CVC4 {
@@ -46,11 +44,9 @@ void CombinationEngine::finishInit()
if (options::eeMode() == options::EqEngineMode::DISTRIBUTED)
{
// make the distributed equality engine manager
- std::unique_ptr<EqEngineManagerDistributed> eeDistributed(
- new EqEngineManagerDistributed(d_te));
+ d_eemanager.reset(new EqEngineManagerDistributed(d_te));
// make the distributed model manager
- d_mmanager.reset(new ModelManagerDistributed(d_te, *eeDistributed.get()));
- d_eemanager = std::move(eeDistributed);
+ d_mmanager.reset(new ModelManagerDistributed(d_te, *d_eemanager.get()));
}
else
{
@@ -65,13 +61,9 @@ void CombinationEngine::finishInit()
d_eemanager->initializeTheories();
Assert(d_mmanager != nullptr);
- // initialize the model manager
- d_mmanager->finishInit();
-
- // initialize equality engine of the model using the equality engine manager
- TheoryModel* m = d_mmanager->getModel();
+ // initialize the model manager, based on the notify object of this class
eq::EqualityEngineNotify* meen = getModelEqualityEngineNotify();
- d_eemanager->initializeModel(m, meen);
+ d_mmanager->finishInit(meen);
}
const EeTheoryInfo* CombinationEngine::getEeTheoryInfo(TheoryId tid) const
@@ -118,7 +110,7 @@ void CombinationEngine::sendLemma(TrustNode trn, TheoryId atomsTo)
void CombinationEngine::resetRound()
{
- // do nothing
+ // compute the relevant terms?
}
} // namespace theory
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback