3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-15 11:35:42 +00:00
z3/src/ast/rewriter
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
..
bit_blaster goal2sat: drop unsafe ref_count≤1 cache-skip optimization; keep bit_blaster mk_eq improvement (#9882) 2026-06-16 12:09:20 -06:00
arith_rewriter.cpp Fix #7507: simplify (>= product_of_consecutive_ints 0) to true 2026-02-27 06:37:07 -10:00
arith_rewriter.h Refactor arith_rewriter::find_nl_factor() to use std::optional (#8313) 2026-02-18 20:57:53 -08:00
array_rewriter.cpp Fix unsound array equality rewrite for const-array store chains (#9572) 2026-05-21 11:15:42 -07:00
array_rewriter.h split into separate function 2023-01-08 19:16:46 -08:00
ast_counter.cpp Refactor counter::get_max_positive to use std::optional (#8289) 2026-02-18 20:57:52 -08:00
ast_counter.h Refactor counter::get_max_positive to use std::optional (#8289) 2026-02-18 20:57:52 -08:00
bit2int.cpp Fix static analysis findings: uninitialized vars, bitwise shift UB, garbage values 2026-03-02 00:13:55 +00:00
bit2int.h Convert internal class enums to enum class for type safety (#8158) 2026-02-18 20:57:09 -08:00
bool_rewriter.cpp Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
bool_rewriter.h Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
bv2int_translator.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
bv2int_translator.h Replace empty destructors with = default for compiler optimization (#8189) 2026-02-18 20:57:12 -08:00
bv_bounds.cpp Refactor mk_and/mk_or call sites to use vector overloads (#8286) 2026-02-18 20:57:52 -08:00
bv_bounds.h
bv_bounds_base.h Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
bv_elim.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
bv_elim.h
bv_rewriter.cpp Refactor mk_concat call sites to use std::initializer_list (#8494) 2026-02-18 20:58:03 -08:00
bv_rewriter.h fix #7572 and fix #7574 2025-03-07 10:46:29 -08:00
cached_var_subst.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
cached_var_subst.h Migrate codebase to std::string_view (except z3++.h) (#8266) 2026-02-18 20:57:50 -08:00
char_rewriter.cpp
char_rewriter.h
CMakeLists.txt Porting seq_split to master (#9840) 2026-06-30 10:18:28 -07:00
datatype_rewriter.cpp Refactor mk_and and mk_app to use std::span API (#8285) 2026-02-18 20:57:52 -08:00
datatype_rewriter.h
der.cpp Refactor der.cpp topological sort to use structured bindings (#8401) 2026-02-18 20:57:59 -08:00
der.h add destructive equality resolution to existentials 2022-11-19 18:43:46 +07:00
distribute_forall.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
distribute_forall.h
dl_rewriter.cpp
dl_rewriter.h
dom_simplifier.cpp Refactor mk_and and mk_app to use std::span API (#8285) 2026-02-18 20:57:52 -08:00
dom_simplifier.h move dominator simplifier functionality to rewriter and simplifier, move bv_bounds simplifier functionality to simplifier 2023-01-27 17:11:48 -08:00
elim_bounds.cpp Refactor mk_and/mk_or call sites to use vector overloads (#8286) 2026-02-18 20:57:52 -08:00
elim_bounds.h
enum2bv_rewriter.cpp build warnings 2026-05-29 10:17:46 -07:00
enum2bv_rewriter.h
expr_replacer.cpp set up model reconstruction trail 2022-11-04 11:25:39 -07:00
expr_replacer.h fixing build, wip on model reconstruction integration into dependent-expr-state 2022-11-04 14:04:44 -07:00
expr_safe_replace.cpp Optimize expr_safe_replace for quantifiers when all source patterns are vars (#7481) 2024-12-19 23:05:13 +01:00
expr_safe_replace.h add bv-size reduce #6137 2022-08-16 16:35:14 -07:00
factor_equivs.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
factor_equivs.h fix warning with iterators due to non-const comparator 2024-09-23 08:10:56 +01:00
factor_rewriter.cpp Refactor mk_and and mk_app to use std::span API (#8285) 2026-02-18 20:57:52 -08:00
factor_rewriter.h
finite_set_axioms.cpp fix bug reported by Maria Novoszel 2026-02-27 12:02:55 -08:00
finite_set_axioms.h remove incorrect assertion, make sat case for range + size conservative 2025-12-06 13:07:14 -08:00
finite_set_rewriter.cpp fix empty set declaration, add axioms and rewrites 2025-10-27 18:18:46 +01:00
finite_set_rewriter.h add finite sets to datatype recursion, delay initialize finite_set plugin, fix bugs in are_distinct and equality simplification 2025-10-27 10:37:19 +01:00
fpa_rewriter.cpp Refactor mk_concat call sites to use std::initializer_list (#8494) 2026-02-18 20:58:03 -08:00
fpa_rewriter.h
func_decl_replace.cpp
func_decl_replace.h
inj_axiom.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
inj_axiom.h
label_rewriter.cpp remove default destructors & some default constructors 2024-09-04 22:30:23 +01:00
label_rewriter.h remove default destructors & some default constructors 2024-09-04 22:30:23 +01:00
macro_replacer.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
macro_replacer.h wip - dependent expr simpliifer 2022-11-30 13:41:40 +07:00
maximize_ac_sharing.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
maximize_ac_sharing.h
mk_extract_proc.cpp minor fixes 2022-11-02 08:44:55 -07:00
mk_extract_proc.h
mk_simplified_app.cpp
mk_simplified_app.h
pb2bv_rewriter.cpp replace some copies with moves 2026-02-18 21:02:17 -08:00
pb2bv_rewriter.h
pb_rewriter.cpp Refactor pb_rewriter to use structured bindings for expression/coefficient pairs (#8380) 2026-02-18 20:57:57 -08:00
pb_rewriter.h
pb_rewriter_def.h Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
poly_rewriter.h try big M for linux build 2022-12-04 09:49:32 -08:00
poly_rewriter_def.h Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
push_app_ite.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
push_app_ite.h
quant_hoist.cpp Refactor mk_and and mk_app to use std::span API (#8285) 2026-02-18 20:57:52 -08:00
quant_hoist.h
recfun_replace.h
recfun_rewriter.cpp fix #8109 2026-02-18 20:57:05 -08:00
recfun_rewriter.h fix #8109 2026-02-18 20:57:05 -08:00
rewriter.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
rewriter.h Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
rewriter.txt
rewriter_def.h fix #9657 2026-05-28 09:01:48 -07:00
rewriter_types.h fix #7006 2023-11-28 15:06:27 -08:00
seq_axioms.cpp Merge remote-tracking branch 'origin/master' into c3 2026-07-01 17:18:21 +02:00
seq_axioms.h fix crashes when using replace_all 2026-04-16 22:37:36 +02:00
seq_derive.cpp Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
seq_derive.h Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
seq_eq_solver.cpp Remove unreachable return false in match_ubv2s1 2026-03-05 17:59:50 +00:00
seq_eq_solver.h
seq_range_collapse.cpp Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
seq_range_collapse.h Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
seq_range_predicate.cpp Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
seq_range_predicate.h Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
seq_regex_bisim.cpp Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
seq_regex_bisim.h Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
seq_rewriter.cpp Merge remote-tracking branch 'origin/master' into c3 2026-07-01 17:18:21 +02:00
seq_rewriter.h seq_split: add behaviour-neutral perf counters, surfaced via nseq -st 2026-07-03 16:05:31 +03:00
seq_skolem.cpp First step towards not-reusing variables 2026-05-20 10:11:50 +02:00
seq_skolem.h First step towards not-reusing variables 2026-05-20 10:11:50 +02:00
seq_split.cpp WIP seq_split: derivative-based complement split (NOT for merge - soundness bug) 2026-07-03 22:33:29 +03:00
seq_split.h WIP seq_split: derivative-based complement split (NOT for merge - soundness bug) 2026-07-03 22:33:29 +03:00
seq_subset.cpp Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
seq_subset.h Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
term_enumeration.cpp disregard skolems 2026-06-28 12:05:32 -07:00
term_enumeration.h Term enumeration (#9908) 2026-06-20 18:14:44 -06:00
th_rewriter.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
th_rewriter.h remove theory_str and classes that are only used by it 2025-08-07 21:05:12 -07:00
value_sweep.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
value_sweep.h
var_subst.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
var_subst.h delete more default constructors 2024-09-23 12:59:04 +01:00