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

Throttle nra solver when progress is being made by linearization

This commit is contained in:
Nikolaj Bjorner 2021-02-26 05:05:36 -08:00
parent 08f55f9d1f
commit c6eb55537a
3 changed files with 18 additions and 2 deletions

View file

@ -1523,8 +1523,14 @@ lbool core::check(vector<lemma>& l_vec) {
{ 1, check3 }};
check_weighted(3, checks);
if (!conflict_found() && m_nla_settings.run_nra() && random() % 30 == 0) {
ret = m_nra.check();
if (!conflict_found() && m_nla_settings.run_nra() && random() % 50 == 0 &&
lp_settings().stats().m_nla_calls > 500) {
params_ref p;
p.set_uint("max_conflicts", 100);
m_nra.updt_params(p);
ret = m_nra.check();
p.set_uint("max_conflicts", UINT_MAX);
m_nra.updt_params(p);
m_stats.m_nra_calls++;
}
}

View file

@ -235,6 +235,11 @@ struct solver::imp {
return m_nlsat->am();
}
void updt_params(params_ref& p) {
m_params.append(p);
}
std::ostream& display(std::ostream& out) const {
for (auto m : m_nla_core.emons()) {
out << "j" << m.var() << " = ";
@ -276,4 +281,8 @@ nlsat::anum_manager& solver::am() {
return m_imp->am();
}
void solver::updt_params(params_ref& p) {
m_imp->updt_params(p);
}
}

View file

@ -48,6 +48,7 @@ namespace nra {
nlsat::anum_manager& am();
void updt_params(params_ref& p);
/*
\brief display state