3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 13:28:47 +00:00

expose settings, not all of core

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-03-15 01:38:29 -07:00 committed by Lev Nachmanson
parent 56584922e9
commit 919f687df6
5 changed files with 20 additions and 18 deletions

View file

@ -1386,7 +1386,7 @@ std::ostream& core::print_term( const lp::lar_term& t, std::ostream& out) const
void core::run_grobner() { void core::run_grobner() {
unsigned& quota = m_grobner_quota; unsigned& quota = m_nla_settings.grobner_quota();
if (quota == 1) { if (quota == 1) {
return; return;
} }

View file

@ -95,7 +95,6 @@ private:
mutable lp::int_set m_active_var_set; mutable lp::int_set m_active_var_set;
lp::int_set m_rows; lp::int_set m_rows;
public: public:
unsigned m_grobner_quota;
reslimit m_reslim; reslimit m_reslim;

View file

@ -38,6 +38,7 @@ class nla_settings {
unsigned m_grobner_expr_degree_growth; unsigned m_grobner_expr_degree_growth;
unsigned m_grobner_max_simplified; unsigned m_grobner_max_simplified;
unsigned m_grobner_number_of_conflicts_to_report; unsigned m_grobner_number_of_conflicts_to_report;
unsigned m_grobner_quota;
public: public:
nla_settings() : m_run_order(true), nla_settings() : m_run_order(true),
m_run_tangents(true), m_run_tangents(true),
@ -47,7 +48,8 @@ public:
m_horner_subs_fixed(2), m_horner_subs_fixed(2),
m_run_grobner(true), m_run_grobner(true),
m_grobner_row_length_limit(50), m_grobner_row_length_limit(50),
m_grobner_subs_fixed(false) m_grobner_subs_fixed(false),
m_grobner_quota(0)
{} {}
unsigned grobner_eqs_growth() const { return m_grobner_eqs_growth;} unsigned grobner_eqs_growth() const { return m_grobner_eqs_growth;}
unsigned& grobner_eqs_growth() { return m_grobner_eqs_growth;} unsigned& grobner_eqs_growth() { return m_grobner_eqs_growth;}
@ -90,6 +92,7 @@ public:
unsigned grobner_number_of_conflicts_to_report() const { return m_grobner_number_of_conflicts_to_report; } 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; } unsigned & grobner_number_of_conflicts_to_report() { return m_grobner_number_of_conflicts_to_report; }
unsigned& grobner_quota() { return m_grobner_quota; }
}; };
} }

View file

@ -38,7 +38,7 @@ public:
solver(lp::lar_solver& s); solver(lp::lar_solver& s);
~solver(); ~solver();
core& get_core() { return *m_core; } nla_settings& settings() { return m_core->m_nla_settings; }
void push(); void push();
void pop(unsigned scopes); void pop(unsigned scopes);
bool need_check(); bool need_check();

View file

@ -450,20 +450,20 @@ class theory_lra::imp {
m_nla->push(); m_nla->push();
} }
smt_params_helper prms(ctx().get_params()); smt_params_helper prms(ctx().get_params());
m_nla->get_core().m_nla_settings.run_order() = prms.arith_nl_order(); m_nla->settings().run_order() = prms.arith_nl_order();
m_nla->get_core().m_nla_settings.run_tangents() = prms.arith_nl_tangents(); m_nla->settings().run_tangents() = prms.arith_nl_tangents();
m_nla->get_core().m_nla_settings.run_horner() = prms.arith_nl_horner(); m_nla->settings().run_horner() = prms.arith_nl_horner();
m_nla->get_core().m_nla_settings.horner_subs_fixed() = prms.arith_nl_horner_subs_fixed(); m_nla->settings().horner_subs_fixed() = prms.arith_nl_horner_subs_fixed();
m_nla->get_core().m_nla_settings.horner_frequency() = prms.arith_nl_horner_frequency(); m_nla->settings().horner_frequency() = prms.arith_nl_horner_frequency();
m_nla->get_core().m_nla_settings.horner_row_length_limit() = prms.arith_nl_horner_row_length_limit(); m_nla->settings().horner_row_length_limit() = prms.arith_nl_horner_row_length_limit();
m_nla->get_core().m_nla_settings.run_grobner() = prms.arith_nl_grobner(); m_nla->settings().run_grobner() = prms.arith_nl_grobner();
m_nla->get_core().m_nla_settings.grobner_subs_fixed() = prms.arith_nl_grobner_subs_fixed(); m_nla->settings().grobner_subs_fixed() = prms.arith_nl_grobner_subs_fixed();
m_nla->get_core().m_nla_settings.grobner_eqs_growth() = prms.arith_nl_grobner_eqs_growth(); m_nla->settings().grobner_eqs_growth() = prms.arith_nl_grobner_eqs_growth();
m_nla->get_core().m_nla_settings.grobner_expr_size_growth() = prms.arith_nl_grobner_expr_size_growth(); m_nla->settings().grobner_expr_size_growth() = prms.arith_nl_grobner_expr_size_growth();
m_nla->get_core().m_nla_settings.grobner_expr_degree_growth() = prms.arith_nl_grobner_expr_degree_growth(); m_nla->settings().grobner_expr_degree_growth() = prms.arith_nl_grobner_expr_degree_growth();
m_nla->get_core().m_nla_settings.grobner_max_simplified() = prms.arith_nl_grobner_max_simplified(); m_nla->settings().grobner_max_simplified() = prms.arith_nl_grobner_max_simplified();
m_nla->get_core().m_nla_settings.grobner_number_of_conflicts_to_report() = prms.arith_nl_grobner_cnfl_to_report(); m_nla->settings().grobner_number_of_conflicts_to_report() = prms.arith_nl_grobner_cnfl_to_report();
m_nla->get_core().m_grobner_quota = prms.arith_nl_gr_q(); m_nla->settings().grobner_quota() = prms.arith_nl_gr_q();
} }
} }