summaryrefslogtreecommitdiff
path: root/src/theory/sets
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-08-09 17:36:22 -0500
committerGitHub <noreply@github.com>2020-08-09 17:36:22 -0500
commit33b96c656515f9634ec97b021da8da5dee2b9bcd (patch)
treedcfb186b6bfadf2824e2b22b2f6ebb7f1fcc5cb6 /src/theory/sets
parent28f5438df1e5ba87aab60552658aa09b79c35ba2 (diff)
Make valuation class more robust to null underlying TheoryEngine. (#4864)
In some use cases (unit tests, old proofs infrastructure), we use a Theory with no associated TheoryEngine. This PR makes the Valuation class more robust to this case. This includes making the "unevaluated kinds" a no-op in this case (this is necessary for Theory::finishInit with no TheoryEngine) and adding some assertions to cases that the Theory should never call without TheoryEngine. This is required for a new policy for dynamically configuring equality engine infrastructure in Theory.
Diffstat (limited to 'src/theory/sets')
-rw-r--r--src/theory/sets/theory_sets.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/theory/sets/theory_sets.cpp b/src/theory/sets/theory_sets.cpp
index c4e3e9add..9c680cc64 100644
--- a/src/theory/sets/theory_sets.cpp
+++ b/src/theory/sets/theory_sets.cpp
@@ -54,11 +54,9 @@ TheoryRewriter* TheorySets::getTheoryRewriter()
void TheorySets::finishInit()
{
- TheoryModel* tm = d_valuation.getModel();
- Assert(tm != nullptr);
- tm->setUnevaluatedKind(COMPREHENSION);
+ d_valuation.setUnevaluatedKind(COMPREHENSION);
// choice is used to eliminate witness
- tm->setUnevaluatedKind(WITNESS);
+ d_valuation.setUnevaluatedKind(WITNESS);
}
void TheorySets::addSharedTerm(TNode n) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback