diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-08-09 17:36:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-09 17:36:22 -0500 |
commit | 33b96c656515f9634ec97b021da8da5dee2b9bcd (patch) | |
tree | dcfb186b6bfadf2824e2b22b2f6ebb7f1fcc5cb6 /src/theory/strings | |
parent | 28f5438df1e5ba87aab60552658aa09b79c35ba2 (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/strings')
-rw-r--r-- | src/theory/strings/theory_strings.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/theory/strings/theory_strings.cpp b/src/theory/strings/theory_strings.cpp index 2c7573949..54c4759a8 100644 --- a/src/theory/strings/theory_strings.cpp +++ b/src/theory/strings/theory_strings.cpp @@ -114,9 +114,8 @@ eq::EqualityEngine* TheoryStrings::getEqualityEngine() } void TheoryStrings::finishInit() { - TheoryModel* tm = d_valuation.getModel(); // witness is used to eliminate str.from_code - tm->setUnevaluatedKind(WITNESS); + d_valuation.setUnevaluatedKind(WITNESS); } bool TheoryStrings::areCareDisequal( TNode x, TNode y ) { |