Fixed bug in arrays
authorClark Barrett <barrett@cs.nyu.edu>
Thu, 28 Mar 2013 02:43:18 +0000 (22:43 -0400)
committerClark Barrett <barrett@cs.nyu.edu>
Thu, 28 Mar 2013 02:43:18 +0000 (22:43 -0400)
src/theory/arrays/theory_arrays.cpp

index 62de6092b5ac0e3c8c36380b200ea7b0cc57c0ae..02575edd43b3249d9152e3ee79244d06fa08f9f5 100644 (file)
@@ -1141,6 +1141,19 @@ void TheoryArrays::checkModel(Effort e)
         d_decisions.pop_back();
         if (all.find(decision) != all.end()) {
           if (getSatContext()->getLevel() < baseLevel) {
+            if (all.size() == 1) {
+              d_lemmas.push_back(decision.negate());
+            }
+            else {
+              NodeBuilder<> disjunction(kind::OR);
+              std::set<TNode>::const_iterator it = all.begin();
+              std::set<TNode>::const_iterator it_end = all.end();
+              while (it != it_end) {
+                disjunction << (*it).negate();
+                ++it;
+              }
+              d_lemmas.push_back(disjunction);
+            }
             goto finish;
           }
           all.erase(decision);