summaryrefslogtreecommitdiff
path: root/src/theory/theory_model.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-08-26 23:17:57 -0500
committerGitHub <noreply@github.com>2020-08-26 23:17:57 -0500
commit63905da0f55f99dfc1f4ab40a1ce61d3e7d58ce1 (patch)
tree75138b0c38fb43c2b86ffbcf034f2e192b15d1ab /src/theory/theory_model.h
parent34953e8f4d9928cd8a92177f104b87e56479b437 (diff)
Add irrelevant kinds infrastructure to TheoryModel (#4945)
Currently, Theory is responsible for implementing a computeRelevantTerms method collects the union of: (1) The terms appearing in its assertions and its shared terms, (2) The set of additional terms the theory believes are relevant. Currently, (1) is computed by an internal Theory method computeRelevantTermsInternal, and the overall computeRelevantTerms is overridden by the theory (for datatypes and arrays only) for also including (2). The new plan is that Theory will only need to compute (2). Computing (1) will be the job of ModelManager::collectAssertedTerms and the model manager will call Theory::computeRelevantTerms as an additional step prior to its calls to collect model info. This will make certain optimizations possible in theory combination (e.g. tracking asserted terms incrementally). This PR adds the ModelManager::collectAssertedTerms method and also adds infrastructure for irrelevant kinds in the model object (which have an analogous interface as when "unevaluated" kinds are marked during initialization). It does not connect the implementation yet. FYI @barrettcw
Diffstat (limited to 'src/theory/theory_model.h')
-rw-r--r--src/theory/theory_model.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/theory/theory_model.h b/src/theory/theory_model.h
index b725cfa09..c31f208a0 100644
--- a/src/theory/theory_model.h
+++ b/src/theory/theory_model.h
@@ -262,6 +262,17 @@ public:
*/
void setUnevaluatedKind(Kind k);
void setSemiEvaluatedKind(Kind k);
+ /**
+ * Set irrelevant kind. These kinds do not impact model generation, that is,
+ * registered terms in theories of this kind do not need to be sent to
+ * the model. An example is APPLY_TESTER.
+ */
+ void setIrrelevantKind(Kind k);
+ /**
+ * Get the set of irrelevant kinds that have been registered by the above
+ * method.
+ */
+ const std::set<Kind>& getIrrelevantKinds() const;
/** is legal elimination
*
* Returns true if x -> val is a legal elimination of variable x.
@@ -358,6 +369,8 @@ public:
std::unordered_set<Kind, kind::KindHashFunction> d_unevaluated_kinds;
/** a set of kinds that are semi-evaluated */
std::unordered_set<Kind, kind::KindHashFunction> d_semi_evaluated_kinds;
+ /** The set of irrelevant kinds */
+ std::set<Kind> d_irrKinds;
/**
* Map of representatives of equality engine to used representatives in
* representative set
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback