mirror of
https://github.com/Z3Prover/z3
synced 2026-06-19 15:16:29 +00:00
lp: rename random_cut_period to cut_period_random
Rename the toggle so it sits beside lp.cut_period and reads as a modifier on it (cut_period + random) rather than burying "cut" in the middle of the name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
30dc804d25
commit
74899eeb93
4 changed files with 7 additions and 7 deletions
|
|
@ -195,7 +195,7 @@ namespace lp {
|
|||
lp_settings& settings() { return lra.settings(); }
|
||||
|
||||
// Decide whether a periodic heuristic fires on this call. When
|
||||
// random_cut_period is enabled the gate is drawn at random with the
|
||||
// cut_period_random is enabled the gate is drawn at random with the
|
||||
// same 1/period expected rate instead of a deterministic "every k-th
|
||||
// call" modulus: a deterministic period can phase-lock with the search
|
||||
// on some families and drown the solver in conflicts while another
|
||||
|
|
@ -203,7 +203,7 @@ namespace lp {
|
|||
bool hit_period(unsigned period) {
|
||||
if (period <= 1)
|
||||
return true;
|
||||
if (settings().random_cut_period())
|
||||
if (settings().cut_period_random())
|
||||
return settings().random_next(period) == 0;
|
||||
return m_number_of_calls % period == 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ def_module_params(module_name='lp',
|
|||
('lcube', BOOL, True, 'use the largest cube test for integer feasibility'),
|
||||
('lcube_flips', UINT, 16, 'maximal number of coordinate flips when repairing the rounded largest cube center, only relevant when lcube is true'),
|
||||
('cut_period', UINT, 4, 'period (in final_check calls) for the integer cut/cube heuristics (find_cube, hnf, gomory); a smaller value calls them more often'),
|
||||
('random_cut_period', BOOL, True, 'draw the integer cut/cube heuristic gates (find_cube, lcube, hnf, gomory, dio) at random with the same 1/period rate instead of a deterministic every-k-th-call modulus'),
|
||||
('cut_period_random', BOOL, True, 'draw the integer cut/cube heuristic gates (find_cube, lcube, hnf, gomory, dio) at random with the same 1/period rate instead of a deterministic every-k-th-call modulus'),
|
||||
))
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +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_cut_period_random = lp_p.cut_period_random();
|
||||
m_lcube = lp_p.lcube();
|
||||
m_lcube_flips = lp_p.lcube_flips();
|
||||
unsigned cut_period = lp_p.cut_period();
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ private:
|
|||
bool m_dio_ignore_big_nums = false;
|
||||
unsigned m_dio_calls_period = 4;
|
||||
bool m_dio_run_gcd = true;
|
||||
bool m_random_cut_period = true;
|
||||
bool m_cut_period_random = true;
|
||||
bool m_lcube = true;
|
||||
unsigned m_lcube_flips = 16;
|
||||
public:
|
||||
|
|
@ -272,8 +272,8 @@ public:
|
|||
unsigned lcube_flips() const { return m_lcube_flips; }
|
||||
unsigned dio_calls_period() const { return m_dio_calls_period; }
|
||||
unsigned & dio_calls_period() { return m_dio_calls_period; }
|
||||
bool random_cut_period() const { return m_random_cut_period; }
|
||||
bool & random_cut_period() { return m_random_cut_period; }
|
||||
bool cut_period_random() const { return m_cut_period_random; }
|
||||
bool & cut_period_random() { return m_cut_period_random; }
|
||||
bool print_external_var_name() const { return m_print_external_var_name; }
|
||||
bool propagate_eqs() const { return m_propagate_eqs;}
|
||||
unsigned hnf_cut_period() const { return m_hnf_cut_period; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue