// thus requiring the rest of the disjunction to be further processed in
// the then-branch as the current value.
bool pol = curr[0].getKind() != kind::NOT;
- bool inverted = (pol && ck == kind::AND) || (!pol && ck == kind::OR);
+ bool inverted = (pol == (ck == kind::AND));
index_eq = pol ? curr[0] : curr[0][0];
// processed : the value that is determined by the first child of curr
// remainder : the remaining children of curr
<< " process base : " << curr << std::endl;
// Simple Boolean return cases, in which
// (1) lambda x. (= x v) becomes lambda x. (ite (= x v) true false)
- // (2) lambda x. v becomes lambda x. (ite (= x v) true false)
+ // (2) lambda x. x becomes lambda x. (ite (= x true) true false)
// Note the negateg cases of the bodies above are also handled.
bool pol = ck != kind::NOT;
index_eq = pol ? curr : curr[0];
{
Trace("builtin-rewrite-debug2")
<< " ...could not infer index value." << std::endl;
- return Node::null();
+ // it could correspond to the default value that does not involve the
+ // current argument, hence we break and take curr as the default value
+ // below. For example, if we are processing lambda xy. (not y) for x,
+ // we have index_eq is (= y true), which does not match for x, hence
+ // (not y) is taken as the default value below.
+ break;
}
// [4] Recurse to ensure that "curr_val" has been normalized w.r.t. the
regress0/ho/ho-matching-nested-app.smt2
regress0/ho/ho-std-fmf.smt2
regress0/ho/hoa0008.smt2
+ regress0/ho/issue4434-const-preserve.smt2
regress0/ho/issue4477.smt2
regress0/ho/issue4990-care-graph.smt2
regress0/ho/issue5233-part1-usort-owner.smt2