From b11e5a4f34b785c2cf709ef9a7810f056f2c382b Mon Sep 17 00:00:00 2001 From: Lev Nachmanson Date: Fri, 13 Mar 2026 07:59:09 -1000 Subject: [PATCH] Add cha_abort_on_fail parameter to control failure counter decrement Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/math/lp/nla_core.cpp | 2 +- src/params/smt_params_helper.pyg | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/math/lp/nla_core.cpp b/src/math/lp/nla_core.cpp index 96f18ccf3..5f256bc9f 100644 --- a/src/math/lp/nla_core.cpp +++ b/src/math/lp/nla_core.cpp @@ -1336,7 +1336,7 @@ lbool core::check(unsigned level) { ret = m_nra.check_assignment(); if (ret != l_true) ++m_check_assignment_fail_cnt; - else + else if (!params().arith_nl_cha_abort_on_fail()) --m_check_assignment_fail_cnt; } diff --git a/src/params/smt_params_helper.pyg b/src/params/smt_params_helper.pyg index 6cb7d315d..bdcc96c4a 100644 --- a/src/params/smt_params_helper.pyg +++ b/src/params/smt_params_helper.pyg @@ -62,6 +62,7 @@ def_module_params(module_name='smt', ('arith.nl.nra', BOOL, True, 'call nra_solver when incremental linearization does not produce a lemma, this option is ignored when arith.nl=false, relevant only if smt.arith.solver=6'), ('arith.nl.nra_check_assignment', BOOL, True, 'call check_assignment in nra_solver to verify current assignment against nlsat constraints'), ('arith.nl.nra_check_assignment_max_fail', UINT, 10, 'maximum consecutive check_assignment failures before disabling it'), + ('arith.nl.cha_abort_on_fail', BOOL, False, 'if true, never decrement check_assignment failure counter on success'), ('arith.nl.branching', BOOL, True, 'branching on integer variables in non linear clusters'), ('arith.nl.expensive_patching', BOOL, False, 'use the expensive of monomials'), ('arith.nl.rounds', UINT, 1024, 'threshold for number of (nested) final checks for non linear arithmetic, relevant only if smt.arith.solver=2'),