3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-22 08:30:28 +00:00

lp: add lp.random_cut_period to toggle randomized cut/cube gates

Introduce the boolean lp.random_cut_period parameter (default true).
When enabled, the periodic integer heuristic gates (find_cube, lcube,
hnf, gomory, dio) fire at random with the same 1/period expected rate;
when disabled they fall back to the deterministic every-k-th-call
modulus on m_number_of_calls. The shared hit_period() helper centralizes
this decision, and m_number_of_calls is restored for the deterministic
path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Lev Nachmanson 2026-06-19 07:38:06 -07:00
parent 029ce10d22
commit 30dc804d25
4 changed files with 26 additions and 14 deletions

View file

@ -43,6 +43,7 @@ void lp::lp_settings::updt_params(params_ref const& _p) {
m_dio_ignore_big_nums = lp_p.dio_ignore_big_nums();
m_dio_calls_period = lp_p.dio_calls_period();
m_dio_run_gcd = lp_p.dio_run_gcd();
m_random_cut_period = lp_p.random_cut_period();
m_lcube = lp_p.lcube();
m_lcube_flips = lp_p.lcube_flips();
unsigned cut_period = lp_p.cut_period();