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:
parent
08f55f9d1f
commit
c6eb55537a
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ namespace nra {
|
|||
|
||||
nlsat::anum_manager& am();
|
||||
|
||||
void updt_params(params_ref& p);
|
||||
|
||||
/*
|
||||
\brief display state
|
||||
|
|
Loading…
Reference in a new issue