mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
use param_ref in nla_solver (#6862)
* use param_ref in nla_solver Signed-off-by: Lev Nachmanson <levnach@hotmail.com> * add parameters Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * add parameters Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * replace nla_setting by command line parameters * delete nla_setting.h --------- Signed-off-by: Lev Nachmanson <levnach@hotmail.com> Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
63ea8efcfb
commit
252a30e727
16 changed files with 67 additions and 164 deletions
|
@ -21,10 +21,11 @@ namespace nla {
|
|||
|
||||
typedef lp::lar_term term;
|
||||
|
||||
core::core(lp::lar_solver& s, reslimit & lim) :
|
||||
core::core(lp::lar_solver& s, params_ref const& p, reslimit & lim) :
|
||||
m_evars(),
|
||||
m_lar_solver(s),
|
||||
m_reslim(lim),
|
||||
m_params(p),
|
||||
m_tangents(this),
|
||||
m_basics(this),
|
||||
m_order(this),
|
||||
|
@ -1428,7 +1429,7 @@ void core::patch_monomials_on_to_refine() {
|
|||
void core::patch_monomials() {
|
||||
m_cautious_patching = true;
|
||||
patch_monomials_on_to_refine();
|
||||
if (m_to_refine.size() == 0 || !m_nla_settings.expensive_patching) {
|
||||
if (m_to_refine.size() == 0 || !params().arith_nl_expensive_patching()) {
|
||||
return;
|
||||
}
|
||||
NOT_IMPLEMENTED_YET();
|
||||
|
@ -1566,11 +1567,11 @@ lbool core::check(vector<lemma>& l_vec) {
|
|||
check_weighted(3, checks);
|
||||
|
||||
unsigned num_calls = lp_settings().stats().m_nla_calls;
|
||||
if (!conflict_found() && m_nla_settings.run_nra && num_calls % 50 == 0 && num_calls > 500)
|
||||
if (!conflict_found() && params().arith_nl_nra() && num_calls % 50 == 0 && num_calls > 500)
|
||||
ret = bounded_nlsat();
|
||||
}
|
||||
|
||||
if (l_vec.empty() && !done() && m_nla_settings.run_nra && ret == l_undef) {
|
||||
if (l_vec.empty() && !done() && params().arith_nl_nra() && ret == l_undef) {
|
||||
ret = m_nra.check();
|
||||
m_stats.m_nra_calls++;
|
||||
}
|
||||
|
@ -1590,7 +1591,7 @@ lbool core::check(vector<lemma>& l_vec) {
|
|||
}
|
||||
|
||||
bool core::should_run_bounded_nlsat() {
|
||||
if (!m_nla_settings.run_nra)
|
||||
if (!params().arith_nl_nra())
|
||||
return false;
|
||||
if (m_nlsat_delay > m_nlsat_fails)
|
||||
++m_nlsat_fails;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue