return addInequality(a, b, true, explanation);
}
if (b.getKind() == kind::CONST_BITVECTOR) {
- return addInequality(b, a, true, reason);
+ // then we know b cannot be smaller than the assigned value so we try to make it larger
+ std::vector<ReasonId> explanation_ids;
+ computeExplanation(UndefinedTermId, id_a, explanation_ids);
+ std::vector<TNode> explanation_nodes;
+ explanation_nodes.push_back(reason);
+ for (unsigned i = 0; i < explanation_ids.size(); ++i) {
+ explanation_nodes.push_back(getReasonNode(explanation_ids[i]));
+ }
+ Node explanation = utils::mkAnd(explanation_nodes);
+ d_reasonSet.insert(explanation);
+ return addInequality(b, a, true, explanation);
}
// if none of the terms are constants just add the lemma
splitDisequality(reason);
Debug("bv-inequality-internal") << getTermNode(it->next) <<" " << it->strict << "\n";
}
Assert (!edges.empty());
- InequalityEdge back = edges.back();
- Assert (back == edge);
+ Assert (edges.back() == edge);
edges.pop_back();
}
}
// only reason about equalities
if (fact.getKind() == kind::EQUAL || (fact.getKind() == kind::NOT && fact[0].getKind() == kind::EQUAL)) {
- ok = decomposeFact(fact);
+ // ok = decomposeFact(fact);
+ ok = assertFactToEqualityEngine(fact, fact);
} else {
ok = assertFactToEqualityEngine(fact, fact);
}
}
// make sure to assert the new splits
- std::vector<Node> new_splits;
- d_slicer->getNewSplits(new_splits);
- for (unsigned i = 0; i < new_splits.size(); ++i) {
- ok = assertFactToEqualityEngine(new_splits[i], utils::mkTrue());
- if (!ok)
- return false;
- }
+ // std::vector<Node> new_splits;
+ // d_slicer->getNewSplits(new_splits);
+ // for (unsigned i = 0; i < new_splits.size(); ++i) {
+ // ok = assertFactToEqualityEngine(new_splits[i], utils::mkTrue());
+ // if (!ok)
+ // return false;
+ // }
return true;
}
ExtractTerm top = getExtractTerm(id);
Assert (d_topLevelIds.find(top.id) != d_topLevelIds.end());
- Index top_high = top.high;
Index top_low = top.low;
- Assert (top_high - top_low + 1 > high);
+ Assert (top.high - top_low + 1 > high);
high += top_low;
low += top_low;
id = top.id;
}
void UnionFind::undoMerge(TermId id) {
- TermId repr = getRepr(id);
- Assert (repr != UndefinedId);
+ Assert (getRepr(id) != UndefinedId);
setRepr(id, UndefinedId, UndefinedId);
}
Kind kind = node.getKind();
if (kind != kind::BITVECTOR_EXTRACT &&
kind != kind::BITVECTOR_CONCAT &&
- kind != kind::EQUAL && kind != kind::NOT &&
+ kind != kind::EQUAL &&
+ kind != kind::STORE &&
+ kind != kind::SELECT &&
+ kind != kind::NOT &&
node.getMetaKind() != kind::metakind::VARIABLE &&
kind != kind::CONST_BITVECTOR) {
d_coreTermCache[node] = false;
return Rewriter::rewrite(result);
}
- if (t.getKind() == kind::EQUAL) {
- std::vector<Node> equalities;
- Slicer::splitEqualities(t, equalities);
- return utils::mkAnd(equalities);
- }
+ // if (t.getKind() == kind::EQUAL) {
+ // std::vector<Node> equalities;
+ // Slicer::splitEqualities(t, equalities);
+ // return utils::mkAnd(equalities);
+ // }
return t;
}