mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
fix the build and extend options to run grobner
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
1d217595c8
commit
aafdab65bd
|
@ -65,7 +65,7 @@ public:
|
|||
}
|
||||
|
||||
bool separated_from_zero(pdd const& p, u_dependency*& dep) {
|
||||
return m_dep_intervals.check_interval_for_conflict_on_zero((*this)(p), dep);
|
||||
return m_dep_intervals.check_interval_for_conflict_on_zero(get_interval<w_dep::with_deps>(p), dep);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -1282,7 +1282,7 @@ lbool core::inner_check(bool constraint_derived) {
|
|||
if (constraint_derived) {
|
||||
if (need_to_call_algebraic_methods())
|
||||
if (!(m_nla_settings.run_horner() && m_horner.horner_lemmas())) {
|
||||
if (m_nla_settings.run_grobner())
|
||||
if (m_nla_settings.run_grobner() == nla_settings::NEX_GROBNER || m_nla_settings.run_grobner() == nla_settings::BOTH_GROBNER)
|
||||
m_grobner.grobner_lemmas();
|
||||
}
|
||||
if (done()) {
|
||||
|
|
|
@ -6,7 +6,7 @@ def_module_params('nla',
|
|||
('horner', BOOL, True, 'run horner\'s heuristic'),
|
||||
('horner_frequency', UINT, 4, 'horner\'s call frequency'),
|
||||
('horner_row_length_limit', UINT, 10, 'row is disregarded by the heuristic if its length is longer than the value'),
|
||||
('grobner', BOOL, True, 'run grobner\'s heuristic'),
|
||||
('grobner', UINT, 1, '1 - grobner nex, 2 - grobner pdd, 3 - both, 0 - none'),
|
||||
('grobner_frequency', UINT, 5, 'grobner\'s call frequency'),
|
||||
('grobner_eqs_threshold', UINT, 512, 'grobner\'s maximum number of equalities')
|
||||
))
|
||||
|
|
|
@ -21,6 +21,10 @@ Revision History:
|
|||
#pragma once
|
||||
namespace nla {
|
||||
class nla_settings {
|
||||
public:
|
||||
enum run_grobner_enum {
|
||||
NO_GROBNER, NEX_GROBNER, PDD_GROBNER, BOTH_GROBNER };
|
||||
private:
|
||||
bool m_run_order;
|
||||
bool m_run_tangents;
|
||||
bool m_run_horner;
|
||||
|
@ -28,7 +32,7 @@ class nla_settings {
|
|||
unsigned m_horner_frequency;
|
||||
unsigned m_horner_row_length_limit;
|
||||
// grobner fields
|
||||
bool m_run_grobner;
|
||||
run_grobner_enum m_run_grobner;
|
||||
unsigned m_grobner_frequency;
|
||||
unsigned m_grobner_eqs_threshold;
|
||||
unsigned m_grobner_row_length_limit;
|
||||
|
@ -40,7 +44,7 @@ public:
|
|||
m_run_horner(true),
|
||||
m_horner_frequency(4),
|
||||
m_horner_row_length_limit(10),
|
||||
m_run_grobner(true),
|
||||
m_run_grobner(NEX_GROBNER),
|
||||
m_grobner_frequency(5),
|
||||
m_grobner_eqs_threshold(512),
|
||||
m_grobner_row_length_limit(10),
|
||||
|
@ -64,8 +68,8 @@ public:
|
|||
unsigned horner_row_length_limit() const { return m_horner_row_length_limit; }
|
||||
unsigned& horner_row_length_limit() { return m_horner_row_length_limit; }
|
||||
|
||||
bool run_grobner() const { return m_run_grobner; }
|
||||
bool& run_grobner() { return m_run_grobner; }
|
||||
run_grobner_enum run_grobner() const { return m_run_grobner; }
|
||||
run_grobner_enum& run_grobner() { return m_run_grobner; }
|
||||
|
||||
unsigned grobner_row_length_limit() const { return m_grobner_row_length_limit; }
|
||||
unsigned grobner_expr_size_limit() const { return m_grobner_expr_size_limit; }
|
||||
|
|
|
@ -452,7 +452,7 @@ class theory_lra::imp {
|
|||
m_nla->get_core()->m_nla_settings.run_horner() = nla.horner();
|
||||
m_nla->get_core()->m_nla_settings.horner_frequency() = nla.horner_frequency();
|
||||
m_nla->get_core()->m_nla_settings.horner_row_length_limit() = nla.horner_row_length_limit();
|
||||
m_nla->get_core()->m_nla_settings.run_grobner() = nla.grobner();
|
||||
m_nla->get_core()->m_nla_settings.run_grobner() = static_cast<nla::nla_settings::run_grobner_enum>(nla.grobner());
|
||||
m_nla->get_core()->m_nla_settings.grobner_eqs_threshold() = nla.grobner_eqs_threshold();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue