summaryrefslogtreecommitdiff
path: root/src/theory/arrays
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/arrays')
-rw-r--r--src/theory/arrays/theory_arrays.cpp27
-rw-r--r--src/theory/arrays/theory_arrays.h2
2 files changed, 1 insertions, 28 deletions
diff --git a/src/theory/arrays/theory_arrays.cpp b/src/theory/arrays/theory_arrays.cpp
index 3a109b51a..e079c4010 100644
--- a/src/theory/arrays/theory_arrays.cpp
+++ b/src/theory/arrays/theory_arrays.cpp
@@ -649,36 +649,11 @@ void TheoryArrays::computeCareGraph()
/////////////////////////////////////////////////////////////////////////////
-void TheoryArrays::collectTerms(TNode n, set<Node>& termSet)
-{
- if (termSet.find(n) != termSet.end()) {
- return;
- }
- termSet.insert(n);
- if (n.getType().isBoolean() || !isLeaf(n)) {
- for(TNode::iterator child_it = n.begin(); child_it != n.end(); ++child_it) {
- collectTerms(*child_it, termSet);
- }
- }
-}
-
-
void TheoryArrays::collectModelInfo( TheoryModel* m, bool fullModel )
{
set<Node> termSet;
- set<Node> cache;
- // Collect all terms appearing in assertions
- context::CDList<Assertion>::const_iterator assert_it = facts_begin(), assert_it_end = facts_end();
- for (; assert_it != assert_it_end; ++assert_it) {
- collectTerms(*assert_it, termSet);
- }
-
- // Add terms that are shared terms
- context::CDList<TNode>::const_iterator shared_it = shared_terms_begin(), shared_it_end = shared_terms_end();
- for (; shared_it != shared_it_end; ++shared_it) {
- collectTerms(*shared_it, termSet);
- }
+ computeRelevantTerms(termSet);
// Add selects that were generated internally
context::CDHashSet<TNode, TNodeHashFunction>::iterator internal_it = d_readsInternal.begin(), internal_it_end = d_readsInternal.end();
diff --git a/src/theory/arrays/theory_arrays.h b/src/theory/arrays/theory_arrays.h
index 9bf1201f3..65b77f801 100644
--- a/src/theory/arrays/theory_arrays.h
+++ b/src/theory/arrays/theory_arrays.h
@@ -218,8 +218,6 @@ class TheoryArrays : public Theory {
/////////////////////////////////////////////////////////////////////////////
private:
- /** Helper function for collectModelInfo */
- void collectTerms(TNode n, std::set<Node>& termSet);
public:
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback