Debug("circuit-prop") << "CircuitPropagator::propagate(): assigned to " << (assignment ? "true" : "false") << std::endl;
// Is this an atom
- bool atom = Theory::theoryOf(current) != THEORY_BOOL || current.isVar();
+ bool atom = Theory::theoryOf(current) != THEORY_BOOL || current.isVar()
+ || (current.getKind() == kind::EQUAL
+ && (current[0].isVar() && current[1].isVar()));
// If an atom, add to the list for simplification
if (atom) {
// Add the substitution from the variable to its value
if (in.getKind() == kind::NOT) {
- if (in[0].getKind() == kind::VARIABLE) {
+ if (in[0].isVar())
+ {
outSubstitutions.addSubstitution(in[0], NodeManager::currentNM()->mkConst<bool>(false));
- } else {
- return PP_ASSERT_STATUS_UNSOLVED;
+ return PP_ASSERT_STATUS_SOLVED;
}
} else {
- if (in.getKind() == kind::VARIABLE) {
+ if (in.isVar())
+ {
outSubstitutions.addSubstitution(in, NodeManager::currentNM()->mkConst<bool>(true));
- } else {
- return PP_ASSERT_STATUS_UNSOLVED;
+ return PP_ASSERT_STATUS_SOLVED;
}
}
- return PP_ASSERT_STATUS_SOLVED;
+ return Theory::ppAssert(in, outSubstitutions);
}
/*