diff options
author | Dejan Jovanović <dejan.jovanovic@gmail.com> | 2012-02-29 20:06:21 +0000 |
---|---|---|
committer | Dejan Jovanović <dejan.jovanovic@gmail.com> | 2012-02-29 20:06:21 +0000 |
commit | 9062483193f4ec9b38aaa57b228cae1fb551566a (patch) | |
tree | 09f8ccefbd00ff5f63b12a501076e0e0aa4aac80 /src/theory/theory.cpp | |
parent | 39af3d2f0391aba90a1941433dfd57e37218f3c2 (diff) |
fixing bug310
* theories that are parametric and therefore need the combination framwork should be tagged as "parametric" in the kinds file
* default care graph computation was not sufficient, fixed
Diffstat (limited to 'src/theory/theory.cpp')
-rw-r--r-- | src/theory/theory.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/theory/theory.cpp b/src/theory/theory.cpp index fa2eed861..1998498f5 100644 --- a/src/theory/theory.cpp +++ b/src/theory/theory.cpp @@ -52,11 +52,12 @@ void Theory::addSharedTermInternal(TNode n) { } void Theory::computeCareGraph(CareGraph& careGraph) { - for (; d_sharedTermsIndex < d_sharedTerms.size(); d_sharedTermsIndex = d_sharedTermsIndex + 1) { - TNode a = d_sharedTerms[d_sharedTermsIndex]; + Debug("sharing") << "Theory::computeCareGraph<" << getId() << ">()" << std::endl; + for (unsigned i = 0; i < d_sharedTerms.size(); ++ i) { + TNode a = d_sharedTerms[i]; TypeNode aType = a.getType(); - for (unsigned i = 0; i < d_sharedTermsIndex; ++ i) { - TNode b = d_sharedTerms[i]; + for (unsigned j = i + 1; j < d_sharedTerms.size(); ++ j) { + TNode b = d_sharedTerms[j]; if (b.getType() != aType) { // We don't care about the terms of different types continue; |