mirror of
https://github.com/Z3Prover/z3
synced 2025-10-03 14:33:56 +00:00
move some grobner settings to pdd_solver.m_config
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
bb6511b425
commit
00e1049ff2
6 changed files with 35 additions and 16 deletions
|
@ -1401,10 +1401,13 @@ void core::run_grobner() {
|
|||
configure_grobner();
|
||||
m_pdd_grobner.saturate();
|
||||
bool conflict = false;
|
||||
unsigned n = m_pdd_grobner.number_of_conflicts_to_report();
|
||||
SASSERT(n > 0);
|
||||
for (auto eq : m_pdd_grobner.equations()) {
|
||||
if (check_pdd_eq(eq)) {
|
||||
conflict = true;
|
||||
break;
|
||||
if (--n == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (conflict) {
|
||||
|
@ -1452,11 +1455,12 @@ void core::configure_grobner() {
|
|||
cfg.m_expr_size_limit = (unsigned)tree_size;
|
||||
cfg.m_max_steps = gr_eq_size;
|
||||
cfg.m_max_simplified = m_nla_settings.grobner_max_simplified();
|
||||
|
||||
cfg.m_eqs_growth = m_nla_settings.grobner_eqs_growth();
|
||||
cfg.m_expr_size_growth = m_nla_settings.grobner_expr_size_growth();
|
||||
cfg.m_expr_degree_growth = m_nla_settings.grobner_expr_degree_growth();
|
||||
cfg.m_number_of_conflicts_to_report = m_nla_settings.grobner_number_of_conflicts_to_report();
|
||||
m_pdd_grobner.set(cfg);
|
||||
m_pdd_grobner.set_thresholds(m_nla_settings.grobner_eqs_growth(), m_nla_settings.grobner_expr_size_growth(),
|
||||
m_nla_settings.grobner_expr_degree_growth());
|
||||
|
||||
m_pdd_grobner.adjust_cfg();
|
||||
m_pdd_manager.set_max_num_nodes(10000); // or something proportional to the number of initial nodes.
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ def_module_params('nla',
|
|||
('grobner_expr_size_growth', UINT, 10, 'grobner\'s maximum expr size growth'),
|
||||
('grobner_expr_degree_growth', UINT, 10, 'grobner\'s maximum expr degree growth'),
|
||||
('grobner_max_simplified', UINT, 10000, 'grobner\'s maximum number of simplifications'),
|
||||
('grobner_cnfl_to_report', UINT, 1, 'grobner\'s maximum number of conflicts to report'),
|
||||
('grobner_subs_fixed', BOOL, False, 'substitute fixed variables by constants')
|
||||
))
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ class nla_settings {
|
|||
unsigned m_grobner_expr_size_growth;
|
||||
unsigned m_grobner_expr_degree_growth;
|
||||
unsigned m_grobner_max_simplified;
|
||||
unsigned m_grobner_number_of_conflicts_to_report;
|
||||
public:
|
||||
nla_settings() : m_run_order(true),
|
||||
m_run_tangents(true),
|
||||
|
@ -86,6 +87,9 @@ public:
|
|||
unsigned grobner_max_simplified() const { return m_grobner_max_simplified; }
|
||||
unsigned & grobner_max_simplified() { return m_grobner_max_simplified; }
|
||||
|
||||
unsigned grobner_number_of_conflicts_to_report() const { return m_grobner_number_of_conflicts_to_report; }
|
||||
unsigned & grobner_number_of_conflicts_to_report() { return m_grobner_number_of_conflicts_to_report; }
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue