diff --git a/src/math/dd/pdd_interval.h b/src/math/dd/pdd_interval.h index 9849b3f48..999444b3b 100644 --- a/src/math/dd/pdd_interval.h +++ b/src/math/dd/pdd_interval.h @@ -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(p), dep); } }; diff --git a/src/math/lp/nla_core.cpp b/src/math/lp/nla_core.cpp index 712704b6d..4b5ca5c06 100644 --- a/src/math/lp/nla_core.cpp +++ b/src/math/lp/nla_core.cpp @@ -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()) { diff --git a/src/math/lp/nla_params.pyg b/src/math/lp/nla_params.pyg index a17f44482..21a5ab596 100644 --- a/src/math/lp/nla_params.pyg +++ b/src/math/lp/nla_params.pyg @@ -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') )) diff --git a/src/math/lp/nla_settings.h b/src/math/lp/nla_settings.h index 772589a2d..a3e01d4c9 100644 --- a/src/math/lp/nla_settings.h +++ b/src/math/lp/nla_settings.h @@ -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; } diff --git a/src/smt/theory_lra.cpp b/src/smt/theory_lra.cpp index 89341a7f1..96f7e05ae 100644 --- a/src/smt/theory_lra.cpp +++ b/src/smt/theory_lra.cpp @@ -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.grobner()); m_nla->get_core()->m_nla_settings.grobner_eqs_threshold() = nla.grobner_eqs_threshold(); } }