From 3242df3ac7fba2393659cdccd1579084e6a8e59a Mon Sep 17 00:00:00 2001 From: Clark Barrett Date: Wed, 27 Mar 2013 22:43:18 -0400 Subject: [PATCH] Fixed bug in arrays --- src/theory/arrays/theory_arrays.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); -- 2.30.2