3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-08 04:01:22 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-07-27 09:22:53 -07:00
parent ae502bc2c4
commit a08082e392
5 changed files with 31 additions and 4 deletions

View file

@ -813,12 +813,17 @@ br_status bool_rewriter::mk_ite_core(expr * c, expr * t, expr * e, expr_ref & re
s = true;
}
// (ite c (ite c t1 t2) t3) ==> (ite c t1 t3)
// (ite c (ite c t1 t2) t3) ==> (ite c t1 t3
if (m().is_ite(t) && to_app(t)->get_arg(0) == c) {
// Remark: (ite c (ite (not c) t1 t2) t3) ==> (ite c t2 t3) does not happen if applying rewrites bottom up
t = to_app(t)->get_arg(1);
s = true;
}
// (ite c t1 (ite c2 t1 t2)) ==> (ite (or c c2) t1 t2)
if (m().is_ite(e) && to_app(e)->get_arg(1) == t) {
result = m().mk_ite(m().mk_or(c, to_app(e)->get_arg(0)), t, to_app(e)->get_arg(2));
return BR_REWRITE3;
}
// (ite c t1 (ite c t2 t3)) ==> (ite c t1 t3)
if (m().is_ite(e) && to_app(e)->get_arg(0) == c) {