3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-30 07:53:15 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-06-09 11:11:07 -07:00
parent 1fd567d1e9
commit 08cc5bc2e5
2 changed files with 7 additions and 6 deletions

View file

@ -2995,6 +2995,7 @@ br_status seq_rewriter::mk_re_union(expr* a, expr* b, expr_ref& result) {
result = re().mk_union(a1, re().mk_union(a2, b));
return BR_REWRITE2;
}
auto get_id = [&](expr* e) { re().is_complement(e, e); return e->get_id(); };
if (re().is_union(b, b1, b2)) {
if (is_subset(a, b1)) {
@ -3015,10 +3016,6 @@ br_status seq_rewriter::mk_re_union(expr* a, expr* b, expr_ref& result) {
}
}
else {
if (get_id(a) > get_id(b)) {
result = re().mk_union(b, a);
return BR_DONE;
}
if (is_subset(a, b)) {
result = b;
return BR_DONE;
@ -3027,6 +3024,10 @@ br_status seq_rewriter::mk_re_union(expr* a, expr* b, expr_ref& result) {
result = a;
return BR_DONE;
}
if (get_id(a) > get_id(b)) {
result = re().mk_union(b, a);
return BR_DONE;
}
}
return BR_FAILED;
}