fix TheoryEngine::collectModelInfo() to only call collectModelInfo() on active theori...
authorMorgan Deters <mdeters@gmail.com>
Fri, 24 Aug 2012 21:40:46 +0000 (21:40 +0000)
committerMorgan Deters <mdeters@gmail.com>
Fri, 24 Aug 2012 21:40:46 +0000 (21:40 +0000)
src/theory/theory_engine.cpp

index 7cf356d2c996ed6368ab19af660a03691c316b5b..d4e1c89c51cc236dc1ff03e2d06fc76141e32856 100644 (file)
@@ -561,10 +561,11 @@ bool TheoryEngine::properExplanation(TNode node, TNode expl) const {
 }
 
 void TheoryEngine::collectModelInfo( theory::TheoryModel* m ){
-  //consult each theory to get all relevant information concerning the model
-  for( int i=0; i<theory::THEORY_LAST; i++ ){
-    if( d_theoryTable[i] ){
-      d_theoryTable[i]->collectModelInfo( m );
+  // Consult each active theory to get all relevant information
+  // concerning the model.
+  for(TheoryId theoryId = theory::THEORY_FIRST; theoryId < theory::THEORY_LAST; ++theoryId) {
+    if(d_logicInfo.isTheoryEnabled(theoryId)) {
+      d_theoryTable[theoryId]->collectModelInfo(m);
     }
   }
 }