3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-20 01:03:20 +00:00
Commit graph

175 commits

Author SHA1 Message Date
Lev Nachmanson
5727e1d040 Add dynamic heuristic selection for levelwise projection
Implement weight-based dynamic selection of projection heuristics in
levelwise CAD. The weight function w(p, level) = deg(p, level) estimates
projection complexity, with w(res(a,b)) ≈ w(a) + w(b).

At each level, all three heuristics (biggest_cell, chain, lowest_degree)
are evaluated and the one with minimum estimated resultant weight is
selected. When fewer than 2 root functions exist, the default heuristic
is used since all produce equivalent results.

Add parameter nlsat.lws_dynamic_heuristic (default: true) to enable or
disable dynamic selection. When disabled, the static heuristic from
lws_sector_rel_mode/lws_section_rel_mode is used.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 19:20:19 -10:00
Lev Nachmanson
ce0067ca67 Cache partition boundary to avoid repeated algebraic number comparisons
Store the partition boundary (index of first root > sample) in
relation_E after sorting root functions. Use this cached value
in compute_omit_lc_sector_chain() and compute_omit_lc_section_chain()
instead of recomputing via algebraic number comparisons.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 19:18:15 -10:00
Lev Nachmanson
90971bc356 align with SMT-RAT
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-15 10:13:12 -10:00
Lev Nachmanson
a75f878c4a fix a bug with non-adding ldcf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
d87d1d009f hook up different relation build strategies for lws
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
946f209b4c t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
7c14b5eebb Revert "make normalize optional"
This reverts commit c80cfb0b8e.
2026-01-14 07:45:14 -10:00
Lev Nachmanson
cc56749e84 make normalize optional
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
cca6f44b11 canonicalize polynomials in nlsat
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
5985f9bd34 cosmetics
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
0ccf23428d call levelwise on a correct set of polynomials
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
74c880ba96 remove debug instruction
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
13bd583252 fix a bug in Rule 4.2
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
c58652bf5b add stats to track levelwise calls
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
6518b7d0cc rebase with master
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
24bc88c88b fix an assert statement
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
7f7658cc52 t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:14 -10:00
Lev Nachmanson
d57c0444f7 t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:13 -10:00
Lev Nachmanson
14cdad13cd add parameter to suppress/enable levelwise
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:13 -10:00
Lev Nachmanson
e4f609715f refactor
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:13 -10:00
Lev Nachmanson
dfa87e68dc refactor
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:13 -10:00
Lev Nachmanson
ed5d9364d7 add trace tag for levelwise
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-01-14 07:45:13 -10:00
Nikolaj Bjorner
233184944c fix build warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-11-26 09:43:52 -08:00
Lev Nachmanson
4b5fb2607f try reordering before analyzing bounds
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 13:08:52 -10:00
Lev Nachmanson
9529275e2f parameter correct order experiment
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 13:08:52 -10:00
Lev Nachmanson
784ea42521 optionally call add_zero_assumption on a vanishing discriminant
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
fe6b777638 improve logging
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
2768962aa8 improve log_lemma
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
0ee272a9d1 log for smtrat
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
6856a61a83 use indexed root expressions id add_zero_assumption
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
c6eb9d7eb7 t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
8e4557647f t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
847f471015 t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
36c711d95b t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
c8959dc67a t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
7eb18771c2 t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
bce477530a t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
27f4150e2e t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
5fec29f4cd t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
54c23bb446 t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
d0fea0b714 t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
3c07fa40a6 t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
a512005d5c better state
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
f49f5376b0 unsound lemma
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Lev Nachmanson
38a346fa1b change logic NRA->ALL in log_lemma
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-01 08:47:30 -10:00
Lev Nachmanson
efd5d04af5 enable always add all coeffs in nlsat
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-10-24 17:47:16 -07:00
Nikolaj Bjorner
2337e68169 fix #7822 2025-08-27 09:17:55 -07:00
Lev Nachmanson
d2990e2f68 use usize to suppress the data loss warnings
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-07-02 14:42:55 -07:00
Nikolaj Bjorner
f544dd4ab2 deal with warnings
@levnach - there are some additional warnings.
You could revert the change to std_vector or use usize() that I added to vector.h. Look at build logs from the pipelines or actions or figure out how to add a continuous AI script to fixup build warnings (I tried a few times earlier on but the features available to do this were not for laymen).
2025-07-02 10:59:56 -07:00
Lev Nachmanson
f2912b25a2 remove debug output 2025-06-17 07:22:03 -07:00