inequality solver now only splits on disequalities when complete
authorlianah <lianahady@gmail.com>
Wed, 27 Mar 2013 03:34:25 +0000 (23:34 -0400)
committerlianah <lianahady@gmail.com>
Wed, 27 Mar 2013 03:34:25 +0000 (23:34 -0400)
src/theory/bv/bv_subtheory_core.cpp
src/theory/bv/bv_subtheory_inequality.cpp

index 15720885d2f594bad7ed05e089a192cd6c310509..811e9a200e2690b15d2ce55580ae12bd747d42b6 100644 (file)
@@ -403,8 +403,12 @@ void CoreSolver::collectModelInfo(TheoryModel* m) {
 
 Node CoreSolver::getModelValue(TNode var) {
   Assert (isComplete());
-  Assert (d_modelValues.find(var) != d_modelValues.end()); 
-  return d_modelValues[d_equalityEngine.getRepresentative(var)]; 
+  TNode repr = d_equalityEngine.getRepresentative(var);
+  if (repr.getKind() == kind::CONST_BITVECTOR) {
+    return repr; 
+  }
+  Assert (d_modelValues.find(repr) != d_modelValues.end()); 
+  return d_modelValues[repr]; 
 }
 
 CoreSolver::Statistics::Statistics()
index 27047f6af4efe3456dc7672c7851ac91f06b3e8b..d6539f3edb0c0f68c4f4c327828db4765ce83522 100644 (file)
@@ -74,12 +74,13 @@ bool InequalitySolver::check(Theory::Effort e) {
   // make sure all the disequalities we didn't split on are still satisifed
   // and split on the ones that are not
   d_inequalityGraph.checkDisequalities();
-
-  // send out any lemmas
-  std::vector<Node> lemmas;
-  d_inequalityGraph.getNewLemmas(lemmas); 
-  for(unsigned i = 0; i < lemmas.size(); ++i) {
-    d_bv->lemma(lemmas[i]); 
+  if (isComplete()) {
+    // if we are complete we want to send out any inequality lemmas 
+    std::vector<Node> lemmas;
+    d_inequalityGraph.getNewLemmas(lemmas); 
+    for(unsigned i = 0; i < lemmas.size(); ++i) {
+      d_bv->lemma(lemmas[i]); 
+    }
   }
   return true; 
 }