3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-29 03:48:51 +00:00
z3/src
Margus Veanes 9fa8adb742 Make derivative union reduction iterative to avoid stack overflow
The previous commit reduced unions by recursively inserting each disjunct
into the other operand, which recurses with depth proportional to the
union width.  On wide range-product unions (z3test 5721 sub#2) that
overflowed the stack (exit 0xC00000FD), turning a timeout into a crash.

Reformulate mk_union_core to flatten both operands into a disjunct set via
an explicit worklist and reduce it with add_union_elem (a bounded loop
applying subsumption, prefix factoring and same-condition ITE merge
against every existing member).  No width-proportional recursion remains.

5731 stays fixed (0.04s), 5728 stays at ~0.02s, 5721 sub#2 no longer
crashes (cleanly times out as before), 92/92 unit tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-26 10:12:13 +03:00
..
ackermannization block ackermann over nested selects 2026-06-19 10:41:56 -07:00
api Fix clang warnings about casting away const. (#9933) 2026-06-23 19:57:46 -06:00
ast Make derivative union reduction iterative to avoid stack overflow 2026-06-26 10:12:13 +03:00
cmd_context Use "override" keyword where needed. (#9892) 2026-06-18 13:36:14 -06:00
math lp: gate Gomory-with-dio on genuine dio failures; separate config from runtime state (#9958) 2026-06-25 14:21:44 -07:00
model Term enumeration (#9908) 2026-06-20 18:14:44 -06:00
muz Add rlimit support in fixedpoint parameters (#9798) 2026-06-10 15:13:05 -07:00
nlsat fix build warnings 2026-06-22 18:20:23 -07:00
opt Fixes necessary to compile z3 included in clang-tidy via FetchContents. (#9768) 2026-06-08 19:44:01 -07:00
params prepare for lambda unfolding in ho-matcher and selectively enable ho matching 2026-05-22 13:25:01 -07:00
parsers Fix off-by-one column after comment lines in SMT2 scanner (#9808) 2026-06-10 06:49:31 -07:00
qe Cleanup thanks to Copilot (#9709) 2026-06-04 10:46:33 -07:00
sat Fix constant array UNSAT missed for small-domain store chains (#9907) 2026-06-19 18:31:44 -06:00
shell Fixes necessary to compile z3 included in clang-tidy via FetchContents. (#9768) 2026-06-08 19:44:01 -07:00
smt Detect empty regex membership via re_is_empty fallback; fix test build 2026-06-26 08:47:55 +03:00
solver Use "override" keyword where needed. (#9892) 2026-06-18 13:36:14 -06:00
tactic Fix reference to recfun::util in lia2card_tactic.cpp 2026-06-16 14:02:24 -06:00
test Detect empty regex membership via re_is_empty fallback; fix test build 2026-06-26 08:47:55 +03:00
util Fix GMP bit-vector modulo semantics causing signed BV unsoundness and invalid SMT2 numerals (#9899) 2026-06-19 10:08:51 -06:00
CMakeLists.txt git bindings v1.0 2026-02-18 21:02:25 -08:00