summaryrefslogtreecommitdiff
path: root/src/theory/combination_engine.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-09-26 10:07:42 -0500
committerGitHub <noreply@github.com>2020-09-26 10:07:42 -0500
commit1fe9c2efe36b126c70097b0f83db5654e0abcabe (patch)
tree46323cb7c712618a974092bced6f66dd07be3862 /src/theory/combination_engine.cpp
parent6ad02b5e0599149e0bd1548855aec8ac890f5a87 (diff)
Connect the shared solver to theory engine (#5103)
This makes SharedSolver the main communication point for TheoryEngine during solving for combination-related solving tasks. This class is a generalization of SharedTermsDatabase, and in the distributed architecture is a wrapper around shared terms database. It has 5 callbacks in theory engine: for preregistration, preNotifyFact (which calls addSharedTerms on theories), assertSharedEquality, explain, getEqualityStatus. This PR has no intended behavior changes. FYI @barrettcw
Diffstat (limited to 'src/theory/combination_engine.cpp')
-rw-r--r--src/theory/combination_engine.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/theory/combination_engine.cpp b/src/theory/combination_engine.cpp
index d972a4d8e..32af15054 100644
--- a/src/theory/combination_engine.cpp
+++ b/src/theory/combination_engine.cpp
@@ -18,6 +18,7 @@
#include "theory/care_graph.h"
#include "theory/ee_manager_distributed.h"
#include "theory/model_manager_distributed.h"
+#include "theory/shared_solver_distributed.h"
#include "theory/theory_engine.h"
namespace CVC4 {
@@ -31,6 +32,7 @@ CombinationEngine::CombinationEngine(TheoryEngine& te,
d_paraTheories(paraTheories),
d_eemanager(nullptr),
d_mmanager(nullptr),
+ d_sharedSolver(nullptr),
d_cmbsPg(pnm ? new EagerProofGenerator(pnm, te.getUserContext())
: nullptr)
{
@@ -43,8 +45,11 @@ void CombinationEngine::finishInit()
// create the equality engine, model manager, and shared solver
if (options::eeMode() == options::EqEngineMode::DISTRIBUTED)
{
+ // use the distributed shared solver
+ d_sharedSolver.reset(new SharedSolverDistributed(d_te));
// make the distributed equality engine manager
- d_eemanager.reset(new EqEngineManagerDistributed(d_te));
+ d_eemanager.reset(
+ new EqEngineManagerDistributed(d_te, *d_sharedSolver.get()));
// make the distributed model manager
d_mmanager.reset(new ModelManagerDistributed(d_te, *d_eemanager.get()));
}
@@ -95,6 +100,10 @@ theory::TheoryModel* CombinationEngine::getModel()
return d_mmanager->getModel();
}
+SharedSolver* CombinationEngine::getSharedSolver()
+{
+ return d_sharedSolver.get();
+}
bool CombinationEngine::isProofEnabled() const { return d_cmbsPg != nullptr; }
eq::EqualityEngineNotify* CombinationEngine::getModelEqualityEngineNotify()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback