3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-17 02:30:01 +00:00

Add arith.nl.nra_before_lemma_return parameter to try bounded nlsat before returning lemmas

When monomial_bounds.propagate() generates interval-refinement lemmas,
bounded_nlsat() was blocked by the no_effect() gate and never reached.
This caused timeouts on QF_NRA/QF_NIRA/QF_UFNRA problems that nlsat
can solve directly via cylindrical algebraic decomposition.

The new parameter (default true) moves the bounded_nlsat() call before
the early lemma return, allowing nlsat a chance to solve the problem.
Set to false to restore the old behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Lev Nachmanson 2026-03-04 12:47:43 -10:00
parent d40c4721d8
commit ec9a87976c
2 changed files with 9 additions and 2 deletions

View file

@ -1327,12 +1327,18 @@ lbool core::check(unsigned level) {
if (lp_settings().get_cancel_flag())
return l_undef;
if (params().arith_nl_nra_before_lemma_return() && should_run_bounded_nlsat()) {
ret = bounded_nlsat();
if (ret == l_true)
return l_true;
}
if (!m_lemmas.empty() || !m_literals.empty() || m_check_feasible)
return l_false;
}
if (no_effect() && should_run_bounded_nlsat())
if (!params().arith_nl_nra_before_lemma_return() && no_effect() && should_run_bounded_nlsat())
ret = bounded_nlsat();
if (no_effect())