3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-18 02:53:46 +00:00
Commit graph

1 commit

Author SHA1 Message Date
Nikolaj Bjorner
f48040d809 Add Phase 3: Nielsen transformation engine and equation solving
- New nseq_nielsen.h/cpp in src/ast/rewriter/: self-contained Nielsen
  transformation engine for word equations
  - simplify(): strip common prefix/suffix, empty elimination, variable
    stripping, single-var assignment detection
  - split(): case analysis for var vs constant, var vs var
  - is_conflict(): mismatch detection (different constants, one side
    has constants while other is empty)

- Wire Nielsen into theory_nseq:
  - solve_eqs()/solve_eq(): process word equations using Nielsen
    transformations with e-graph canonization
  - branch_eq()/branch_var_prefix(): binary empty/non-empty decisions
    and prefix enumeration (no fresh variable creation)
  - canonize(): rewrite equation sides using current e-graph equivalences
  - all_eqs_solved(): check if all equations are satisfied
  - mk_value(): basic model generation (walk e-class for string constants)

- Passes basic tests: simple equalities, concat equations, unsat detection

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 18:01:08 -08:00