Skip to content

Commit

Permalink
revert last patch
Browse files Browse the repository at this point in the history
it broke build bots and perf degraded
Z3 simplifies left to right first and changing the order is not a good idea it seems
  • Loading branch information
nunoplopes committed Nov 6, 2020
1 parent 201ee95 commit aa27ab3
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions smt/expr.cpp
Expand Up @@ -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 {
Expand All @@ -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) {
Expand Down

0 comments on commit aa27ab3

Please sign in to comment.