diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-08-31 14:24:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-31 12:24:27 -0700 |
commit | 7b3b19f73ceb2168ced48d07a590c0f3be82a8d4 (patch) | |
tree | a2ca8f1cae261c87ea659c2d8f36a8090475e88d /src/theory/arrays | |
parent | 57a02fd0c7faa7a87b8619d52cf519e033633c1d (diff) |
Simplify interface for computing relevant terms. (#4966)
This is a followup to #4945 which simplifies the contract for computeRelevantTerms.
Diffstat (limited to 'src/theory/arrays')
-rw-r--r-- | src/theory/arrays/theory_arrays.cpp | 23 | ||||
-rw-r--r-- | src/theory/arrays/theory_arrays.h | 8 |
2 files changed, 9 insertions, 22 deletions
diff --git a/src/theory/arrays/theory_arrays.cpp b/src/theory/arrays/theory_arrays.cpp index b4a234748..3adcd4f49 100644 --- a/src/theory/arrays/theory_arrays.cpp +++ b/src/theory/arrays/theory_arrays.cpp @@ -1090,19 +1090,11 @@ void TheoryArrays::computeCareGraph() // MODEL GENERATION ///////////////////////////////////////////////////////////////////////////// -bool TheoryArrays::collectModelInfo(TheoryModel* m) +bool TheoryArrays::collectModelValues(TheoryModel* m, + const std::set<Node>& termSet) { - // Compute terms appearing in assertions and shared terms, and also - // include additional reads due to the RIntro1 and RIntro2 rules. - std::set<Node> termSet; - computeRelevantTerms(termSet); - - // Send the equality engine information to the model - if (!m->assertEqualityEngine(d_equalityEngine, &termSet)) - { - return false; - } - + // termSet contains terms appearing in assertions and shared terms, and also + // includes additional reads due to the RIntro1 and RIntro2 rules. NodeManager* nm = NodeManager::currentNM(); // Compute arrays that we need to produce representatives for std::vector<Node> arrays; @@ -2263,13 +2255,8 @@ TrustNode TheoryArrays::expandDefinition(Node node) return TrustNode::null(); } -void TheoryArrays::computeRelevantTerms(std::set<Node>& termSet, - bool includeShared) +void TheoryArrays::computeRelevantTerms(std::set<Node>& termSet) { - // include all standard terms - std::set<Kind> irrKinds; - computeRelevantTermsInternal(termSet, irrKinds, includeShared); - NodeManager* nm = NodeManager::currentNM(); // make sure RIntro1 reads are included in the relevant set of reads eq::EqClassesIterator eqcs_i = eq::EqClassesIterator(d_equalityEngine); diff --git a/src/theory/arrays/theory_arrays.h b/src/theory/arrays/theory_arrays.h index 8cbf826c1..9044b9950 100644 --- a/src/theory/arrays/theory_arrays.h +++ b/src/theory/arrays/theory_arrays.h @@ -264,7 +264,8 @@ class TheoryArrays : public Theory { ///////////////////////////////////////////////////////////////////////////// public: - bool collectModelInfo(TheoryModel* m) override; + bool collectModelValues(TheoryModel* m, + const std::set<Node>& termSet) override; ///////////////////////////////////////////////////////////////////////////// // NOTIFICATIONS @@ -480,11 +481,10 @@ class TheoryArrays : public Theory { Node getNextDecisionRequest(); /** - * Compute relevant terms. This includes additional select nodes for the + * Compute relevant terms. This includes select nodes for the * RIntro1 and RIntro2 rules. */ - void computeRelevantTerms(std::set<Node>& termSet, - bool includeShared = true) override; + void computeRelevantTerms(std::set<Node>& termSet) override; };/* class TheoryArrays */ }/* CVC4::theory::arrays namespace */ |