mirror of
https://github.com/Z3Prover/z3
synced 2026-03-19 19:43:11 +00:00
fix: move m_fixed insertion after check_long_strings guard
m_fixed.insert(e) was placed before the check_long_strings guard, causing check_fixed_length(false, false) to mark variables with len > 20 as processed without actually decomposing them. The subsequent check_fixed_length(false, true) then skipped them. Move the insertion after the guard so variables are only marked as fixed once they are actually decomposed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
960ab8e67a
commit
b5bf4be87e
1 changed files with 5 additions and 6 deletions
|
|
@ -504,12 +504,6 @@ bool theory_seq::fixed_length(expr* len_e, bool is_zero, bool check_long_strings
|
|||
m_fixed.contains(e)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_trail_stack.push(insert_obj_trail<expr>(m_fixed, e));
|
||||
m_fixed.insert(e);
|
||||
|
||||
expr_ref seq(e, m), head(m), tail(m);
|
||||
|
||||
|
||||
TRACE(seq, tout << "Fixed: " << mk_bounded_pp(e, m, 2) << " " << lo << "\n";);
|
||||
literal a = mk_eq(len_e, m_autil.mk_numeral(lo, true), false);
|
||||
|
|
@ -519,6 +513,11 @@ bool theory_seq::fixed_length(expr* len_e, bool is_zero, bool check_long_strings
|
|||
if (!check_long_strings && lo > 20 && !is_zero)
|
||||
return false;
|
||||
|
||||
m_trail_stack.push(insert_obj_trail<expr>(m_fixed, e));
|
||||
m_fixed.insert(e);
|
||||
|
||||
expr_ref seq(e, m), head(m), tail(m);
|
||||
|
||||
if (lo.is_zero()) {
|
||||
seq = m_util.str.mk_empty(e->get_sort());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue