From: Clark Barrett Date: Thu, 28 Mar 2013 02:43:18 +0000 (-0400) Subject: Fixed bug in arrays X-Git-Tag: cvc5-1.0.0~7361^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3242df3ac7fba2393659cdccd1579084e6a8e59a;p=cvc5.git Fixed bug in arrays --- diff --git a/src/theory/arrays/theory_arrays.cpp b/src/theory/arrays/theory_arrays.cpp index 62de6092b..02575edd4 100644 --- a/src/theory/arrays/theory_arrays.cpp +++ b/src/theory/arrays/theory_arrays.cpp @@ -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::const_iterator it = all.begin(); + std::set::const_iterator it_end = all.end(); + while (it != it_end) { + disjunction << (*it).negate(); + ++it; + } + d_lemmas.push_back(disjunction); + } goto finish; } all.erase(decision);