summaryrefslogtreecommitdiff
path: root/src/theory/shared_terms_database.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-09-18 12:52:16 -0500
committerGitHub <noreply@github.com>2020-09-18 12:52:16 -0500
commit30678fb782e88412469db4decd2cb42919f4ea02 (patch)
tree505b7d4ec705e74d036d3b498f8ab2b4092c9fae /src/theory/shared_terms_database.cpp
parentf92c4476e335322c1eeaa9e15ff5e1fda06181fe (diff)
Add the shared solver (#4982)
This PR adds the definition for the "shared solver", it does not connect it to TheoryEngine/CombinationEngine yet. This is an object that behaves like a "glue" theory solver and has a special role in TheoryEngine. In the current architecture, the "SharedTermsDatabase" is the "shared solver", although in the central architecture, the shared solver will be required to behave differently. This PR adds the abstract definition of shared solver, where notice SharedSolverDistributed is a thin layer on top of SharedTermsDatabase. In a followup PR, CombinationEngine will maintain a shared solver and ~5 blocks of code in TheoryEngine will be callbacks to the SharedSolver. Also, eventually the code for SharedTermsDatabase should be split: the parts involving equality reason/propagation/explanation should be migrated into SharedSolverDistributed, and the parts related to registration will remain in SharedTermsDatabase (to also be used in the planned SharedSolverCentral). FYI @barrettcw
Diffstat (limited to 'src/theory/shared_terms_database.cpp')
-rw-r--r--src/theory/shared_terms_database.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/theory/shared_terms_database.cpp b/src/theory/shared_terms_database.cpp
index b01cef377..034401b9a 100644
--- a/src/theory/shared_terms_database.cpp
+++ b/src/theory/shared_terms_database.cpp
@@ -44,6 +44,18 @@ SharedTermsDatabase::~SharedTermsDatabase()
smtStatisticsRegistry()->unregisterStat(&d_statSharedTerms);
}
+void SharedTermsDatabase::setEqualityEngine(eq::EqualityEngine* ee)
+{
+ // TODO (project #39): dynamic allocation of equality engine here
+}
+
+bool SharedTermsDatabase::needsEqualityEngine(EeSetupInfo& esi)
+{
+ esi.d_notify = &d_EENotify;
+ esi.d_name = "SharedTermsDatabase";
+ return true;
+}
+
void SharedTermsDatabase::addEqualityToPropagate(TNode equality) {
d_registeredEqualities.insert(equality);
d_equalityEngine.addTriggerPredicate(equality);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback