diff options
author | Clark Barrett <barrett@cs.nyu.edu> | 2012-11-15 02:14:42 +0000 |
---|---|---|
committer | Clark Barrett <barrett@cs.nyu.edu> | 2012-11-15 02:14:42 +0000 |
commit | dc0372a91ae46e6fc5ead1f51a1fe033cfd19944 (patch) | |
tree | a45d1ae09a4026f516af9e68e37cab4cc76d2506 /src/theory/arrays | |
parent | 0cf2cf65658ce8128d0cc87d6a9714b5284d45c4 (diff) |
Fixed another AUFBV model bug. BV equality subtheory needed to do something
similar to arrays - limit the set of terms reported to those relevant in the
current context. Also removed collectModelInfo from sharedTermsDatabase -
doesn't seem to be needed any more.
Diffstat (limited to 'src/theory/arrays')
-rw-r--r-- | src/theory/arrays/theory_arrays.cpp | 27 | ||||
-rw-r--r-- | src/theory/arrays/theory_arrays.h | 2 |
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: |