void CSolver::replaceBooleanWithTrueNoRemove(BooleanEdge bexpr) {
updateMustValue(bexpr.getBoolean(), bexpr.isNegated() ? BV_MUSTBEFALSE : BV_MUSTBETRUE);
- ASSERT(bexpr->boolVal != BV_UNSAT);
+ ASSERT((bexpr->boolVal != BV_UNSAT ) || unsat);
uint size = bexpr->parents.getSize();
for (uint i = 0; i < size; i++) {
BooleanEdge be = solver->orderConstraint(graph->getOrder(), source->getID(), dstnode->getID());
BooleanEdge benew = solver->orderConstraint(graph->getOrder(), source->getID(), node->getID());
updateEdgePolarity(benew, be);
- solver->replaceBooleanWithBoolean(be, benew);
+ if (solver->isTrue(benew))
+ solver->replaceBooleanWithTrue(be);
+ else if (solver->isFalse(benew))
+ solver->replaceBooleanWithFalse(be);
+ else
+ solver->replaceBooleanWithBoolean(be, benew);
}
dstnode->inEdges.reset();
delete inedgeit;
BooleanEdge be = solver->orderConstraint(graph->getOrder(), dstnode->getID(), sink->getID());
BooleanEdge benew = solver->orderConstraint(graph->getOrder(), node->getID(), sink->getID());
updateEdgePolarity(benew, be);
- solver->replaceBooleanWithBoolean(be, benew);
+ if (solver->isTrue(benew))
+ solver->replaceBooleanWithTrue(be);
+ else if (solver->isFalse(benew))
+ solver->replaceBooleanWithFalse(be);
+ else
+ solver->replaceBooleanWithBoolean(be, benew);
}
dstnode->outEdges.reset();
delete outedgeit;