3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-26 05:43:33 +00:00

Add Phase 4: length reasoning and canonize fix

- Length axiom generation: concat decomposition, unit=1, empty=0, string=k
- Bidirectional len(x)=0 <-> x="" axioms
- check_zero_length: propagate zero-length variables to empty
- propagate_length_eqs: equate lengths of equation sides
- Fixed canonize: decompose structurally first, then follow e-graph roots
  Prevents both equation sides resolving to same root expression
- Fixed branch_var_prefix: skip cyclic candidates (containing variable itself)
  and ground candidates with wrong length
- check_length_conflict prevents e-graph corruption from incompatible merges
- Fresh value pinning for model generation (m_fresh_values)
- Regression: 36/62 correct, 0 wrong, 26 unknown on string-concat.smt2

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Nikolaj Bjorner 2026-02-27 22:48:58 -08:00
parent f48040d809
commit 4b58d57b61
5 changed files with 259 additions and 25 deletions

0
spec/log.txt Normal file
View file