From f8242c58dd41bdb6cda7860ecdafe1a056b07b56 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Tue, 4 Apr 2023 22:29:22 -0700 Subject: [PATCH] fix regression from Grobner port - scan_for_linear returns true if it finds a new linear equation. It then should break GB. - if scan_for_linear returns false, it should still allow try_modify_eqs. This behavior was masked by requiring scan_for_linear to always be true before allowing try_to_modify_eqs. based on repro from Guido Martinez @mtzguido --- src/smt/theory_arith_nl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/smt/theory_arith_nl.h b/src/smt/theory_arith_nl.h index 3aa34cbc7..d6d30cb33 100644 --- a/src/smt/theory_arith_nl.h +++ b/src/smt/theory_arith_nl.h @@ -2264,8 +2264,10 @@ typename theory_arith::gb_result theory_arith::compute_grobner(svector return GB_FAIL; if (get_gb_eqs_and_look_for_conflict(eqs, gb)) return GB_PROGRESS; + if (scan_for_linear(eqs, gb)) + return GB_NEW_EQ; } - while(scan_for_linear(eqs, gb) && m_params.m_nl_arith_gb_perturbate && + while(m_params.m_nl_arith_gb_perturbate && (!m_nl_gb_exhausted) && try_to_modify_eqs(eqs, gb, next_weight)); return GB_FAIL; }