diff options
author | lianah <lianahady@gmail.com> | 2014-06-12 15:00:27 -0400 |
---|---|---|
committer | lianah <lianahady@gmail.com> | 2014-06-12 15:00:27 -0400 |
commit | 47224a4596a4131a260d9dd9ceec8e55ede0aad3 (patch) | |
tree | a521ddbdbead7517680c08c2688efa1681717c90 /src/theory | |
parent | ca633914d065d2c9abdc624da10c4eea5c7e0020 (diff) |
fixing bv inequality solver explanation bug
Diffstat (limited to 'src/theory')
-rw-r--r-- | src/theory/bv/bv_inequality_graph.cpp | 6 | ||||
-rw-r--r-- | src/theory/bv/bv_subtheory_inequality.cpp | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/theory/bv/bv_inequality_graph.cpp b/src/theory/bv/bv_inequality_graph.cpp index feb061ee1..ff344d307 100644 --- a/src/theory/bv/bv_inequality_graph.cpp +++ b/src/theory/bv/bv_inequality_graph.cpp @@ -141,6 +141,11 @@ bool InequalityGraph::processQueue(BFSQueue& queue, TermId start) { // it means we have an overflow and hence a conflict std::vector<TermId> conflict; conflict.push_back(it->reason); + Assert (hasModelValue(start)); + ReasonId start_reason = getModelValue(start).reason; + if (start_reason != UndefinedReasonId) { + conflict.push_back(start_reason); + } computeExplanation(start, current, conflict); Debug("bv-inequality") << "InequalityGraph::addInequality conflict: cycle \n"; setConflict(conflict); @@ -261,6 +266,7 @@ ReasonId InequalityGraph::registerReason(TNode reason) { ReasonId id = d_reasonNodes.size(); d_reasonNodes.push_back(reason); d_reasonToIdMap[reason] = id; + Debug("bv-inequality-internal") << "InequalityGraph::registerReason " << reason << " => id"<< id << "\n"; return id; } diff --git a/src/theory/bv/bv_subtheory_inequality.cpp b/src/theory/bv/bv_subtheory_inequality.cpp index 222ba3039..c6a92a439 100644 --- a/src/theory/bv/bv_subtheory_inequality.cpp +++ b/src/theory/bv/bv_subtheory_inequality.cpp @@ -79,7 +79,9 @@ bool InequalitySolver::check(Theory::Effort e) { if (!ok) { std::vector<TNode> conflict; d_inequalityGraph.getConflict(conflict); - d_bv->setConflict(utils::flattenAnd(conflict)); + Node confl = utils::flattenAnd(conflict); + d_bv->setConflict(confl); + Debug("bv-subtheory-inequality") << "InequalitySolver::conflict: "<< confl <<"\n"; return false; } @@ -92,6 +94,7 @@ bool InequalitySolver::check(Theory::Effort e) { d_bv->lemma(lemmas[i]); } } + Debug("bv-subtheory-inequality") << "InequalitySolver done. "; return true; } |