3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-02 18:08:57 +00:00
z3/src
Copilot 8db175447b
Handle unit-unit prefix/suffix splits in simplify_and_init (#9097)
When both leading (or trailing) tokens of a string equality are
is_char_or_unit(), split the equality:
  unit(a) ++ rest1 == unit(b) ++ rest2  ->  unit(a)==unit(b), rest1==rest2
  unit(a) ++ rest1 == unit(b)           ->  unit(a)==unit(b), rest1==empty
  unit(a) == unit(b) ++ rest2           ->  unit(a)==unit(b), empty==rest2
(symmetric suffix case handled too)

Add three unit tests covering prefix split, prefix split with empty
rest, and suffix split.


Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/565287e9-a121-4bae-8aa4-6c2ec93e660f

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-22 19:39:33 -07:00
..
ackermannization Fix off-by-one vulnerabilities: use range-based for on goals; cache loop bound 2026-02-19 22:37:22 +00:00
api Add missing API functions to Go, OCaml, and TypeScript bindings 2026-02-27 02:55:37 +00:00
ast implement replace_all_axiom using recursive predicate ra(s,p,t,r) (#9095) 2026-03-22 18:44:29 -07:00
cmd_context Remove redundant default constructors when they're the only constructor (#8461) 2026-02-18 20:58:01 -08:00
math Simplify def_ref smart pointer: default ctor, init list, clearer bool, remove extra semicolon 2026-03-01 02:10:19 +00:00
model Remove redundant default constructors when they're the only constructor (#8461) 2026-02-18 20:58:01 -08:00
muz Eliminate unnecessary copies with std::move for ref-counted types (#8591) 2026-02-18 21:02:24 -08:00
nlsat remove an unnecessary template from levelwise 2026-02-25 07:03:23 -10:00
opt Refactor optimization and model to use C++17 structured bindings for pairs (#8426) 2026-02-18 20:57:59 -08:00
params Fixed couple of regex problems [there are still others] 2026-03-18 14:29:18 +01:00
parsers Revert "Refactor find_psort_decl() to return std::optional<psort_decl*> (#8339)" 2026-02-18 20:57:56 -08:00
qe Fix true positive critical bugs from static analysis discussion #8764 2026-02-25 00:41:59 +00:00
sat Fix assertion violation in q_mbi diagnostic output 2026-02-28 11:15:28 -10:00
shell Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
smt Handle unit-unit prefix/suffix splits in simplify_and_init (#9097) 2026-03-22 19:39:33 -07:00
solver Remove copies (#8583) 2026-02-18 21:02:22 -08:00
tactic Merge pull request #8779 from Z3Prover/copilot/convert-bv1-blast-to-simplifier 2026-02-26 15:52:18 -08:00
test Handle unit-unit prefix/suffix splits in simplify_and_init (#9097) 2026-03-22 19:39:33 -07:00
util updates 2026-03-13 18:19:25 -07:00
CMakeLists.txt Move seq_nielsen from src/ast/rewriter to src/smt/seq with new smt_seq component 2026-03-03 00:17:10 +00:00