3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-15 11:35:42 +00:00
Commit graph

7 commits

Author SHA1 Message Date
Margus Veanes
22eb098cd9 WIP seq_split: derivative-based complement split (NOT for merge - soundness bug)
Prototype of the notes.md redesign: Split(~a) for star-free a via r = E(~a) | RE(LF(delta(~a))) using brz_derivative_cofactors, of_pred(lambda) char-classes, per-iterator memo (threaded through head_normalize) + De Morgan fallback at ~(R*)/cyclic revisit.

RESULT: De Morgan split blow-up ELIMINATED (L15: complement/max-split-set 65536 -> 0), validating the core idea. BUT: (1) SOUNDNESS BUG - concat membership over a derivative-split complement returns spurious unsat ((x.y) in ~([0-9]^2): default sat, nseq unsat; single-var x in ~([0-9]^2) is correct). Split-set not collapsed (49 splits) so of_pred not empty-dropped; fault is downstream handling of of_pred(lambda) char-classes in the concat split/primitive path. (2) bottleneck moved to DFS nodes (7 -> 33071). FIX DIRECTION: represent the cofactor char-class as range/union-of-ranges nseq fully supports, not of_pred(lambda). Do not build on this until fixed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-03 22:33:29 +03:00
Margus Veanes
07c797c32b seq_split: dedup identical <D,N> pairs in intersect (sound, memory-only)
A split-set denotes the UNION of its pairs, so identical (hash-consed) <D,N> pairs are redundant; skipping them in the De Morgan cross-product cuts the materialized split-set ~7x on L15 negcount (65536 -> 9216) with no behaviour change (verified L11 sat / L14 unsat). NOTE: memory-only -- it does not fix the underlying combinatorial blow-up of complement()'s structural De Morgan on a concatenation of predicates (root cause; see spec analysis). Adds nseq-split-dedup-drops counter. Easily reverted if a derivative/minterm-based complement supersedes the cross-product.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-03 19:40:26 +03:00
Margus Veanes
8992d5fc53 seq_split: add behaviour-neutral perf counters, surfaced via nseq -st
Adds a split_stats struct to seq_split (make/sigma-expand/materialize/splits/pushes/oracle-prunes/intersect/intersect-pairs/complement/giveups/threshold-overruns/max-split-set/simplify) and reports them in nielsen_graph::collect_statistics as 'nseq split *'. Read-only counters; solver behaviour is unchanged (verified: L11 sat, L14 unsat, gen cssfunc sat). Diagnosis on gen-lb L15 negcount: the De Morgan complement -> intersect cross-product blows up to 2^16 split-set pairs (1.3M intersect-pairs) while simplify() and the oracle never fire on that path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-03 16:05:31 +03:00
CEisenhofer
b5ec0889bd Put it into an iterator 2026-06-30 12:36:18 +02:00
CEisenhofer
a88dfa64ac Lazy decomposition
Test-cases
2026-06-26 17:37:40 +02:00
CEisenhofer
bbe473cb8e Bug fixes 2026-06-26 16:12:52 +02:00
CEisenhofer
871a2b3bc8 Porting seq_split to master 2026-06-12 15:18:14 +02:00