revert last patch
it broke build bots and perf degraded
Z3 simplifies left to right first and changing the order is not a good idea it seems
MODIFY
smt/expr.cpp
smt/expr.cpp
@@ -1211,11 +1211,8 @@ expr expr::operator&&(const expr &rhs) const {
return rhs;
C(rhs);
- return binop_commutative(rhs,
- [](auto ctx, auto a, auto b) {
- Z3_ast args[] = { a, b };
- return Z3_mk_and(ctx, 2, args);
- });
+ Z3_ast args[] = { ast(), rhs() };
+ return Z3_mk_and(ctx(), 2, args);
}
expr expr::operator||(const expr &rhs) const {
@@ -1230,11 +1227,8 @@ expr expr::operator||(const expr &rhs) const {
return true;
C(rhs);
- return binop_commutative(rhs,
- [](auto ctx, auto a, auto b) {
- Z3_ast args[] = { a, b };
- return Z3_mk_or(ctx, 2, args);
- });
+ Z3_ast args[] = { ast(), rhs() };
+ return Z3_mk_or(ctx(), 2, args);
}
void expr::operator&=(const expr &rhs) {

revert last patch
it broke build bots and perf degraded
Z3 simplifies left to right first and changing the order is not a good idea it seems