summaryrefslogtreecommitdiff
path: root/src/theory/shared_terms_database.h
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.h
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.h')
-rw-r--r--src/theory/shared_terms_database.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/theory/shared_terms_database.h b/src/theory/shared_terms_database.h
index ca4f6c183..1a50224e1 100644
--- a/src/theory/shared_terms_database.h
+++ b/src/theory/shared_terms_database.h
@@ -21,6 +21,7 @@
#include "context/cdhashset.h"
#include "expr/node.h"
+#include "theory/ee_setup_info.h"
#include "theory/theory_id.h"
#include "theory/uf/equality_engine.h"
#include "util/statistics_registry.h"
@@ -158,6 +159,16 @@ public:
SharedTermsDatabase(TheoryEngine* theoryEngine, context::Context* context);
~SharedTermsDatabase();
+ //-------------------------------------------- initialization
+ /** Called to set the equality engine. */
+ void setEqualityEngine(theory::eq::EqualityEngine* ee);
+ /**
+ * Returns true if we need an equality engine, this has the same contract
+ * as Theory::needsEqualityEngine.
+ */
+ bool needsEqualityEngine(theory::EeSetupInfo& esi);
+ //-------------------------------------------- end initialization
+
/**
* Asserts the equality to the shared terms database,
*/
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback