3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00

simplify has-fixed-length

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-07-31 11:57:07 -07:00
parent 97ed1cd07d
commit 566a0d540a

View file

@ -3094,15 +3094,8 @@ br_status seq_rewriter::mk_str_in_regexp(expr* a, expr* b, expr_ref& result) {
bool seq_rewriter::has_fixed_length_constraint(expr* a, unsigned& len) {
unsigned minl = re().min_length(a), maxl = re().max_length(a);
if (minl == maxl) {
len = minl;
return true;
}
expr* b = nullptr, *c = nullptr;
if (re().is_intersection(a, b, c)) {
return has_fixed_length_constraint(b, len) || has_fixed_length_constraint(c, len);
}
return false;
len = minl;
return minl == maxl;
}
br_status seq_rewriter::mk_str_to_regexp(expr* a, expr_ref& result) {