Arithmetic generally generates nonlinear lemmas as full effort checks, but only sends them out in the subsequent last call effort check. If this one does not happen, the next full effort check still has pending lemmas that may not only be irrelevant now, but possibly carry proofs that are already out of scope.
This PR makes sure that such lemmas are always pruned.
Fixes cvc5/cvc5-projects#465
{
d_im.reset();
Trace("arith-check") << "TheoryArith::postCheck " << level << std::endl;
+ if (Theory::fullEffort(level))
+ {
+ // Make sure we don't have old lemmas floating around. This can happen if we
+ // didn't actually reach a last call effort check, but backtracked for some
+ // other reason. In such a case, these lemmas are likely to be irrelevant
+ // and possibly even harmful. If we produce proofs, their proofs have most
+ // likely been deallocated already as well.
+ d_im.clearPending();
+ d_im.clearWaitingLemmas();
+ }
// check with the non-linear solver at last call
if (level == Theory::EFFORT_LAST_CALL)
{
- if (d_nonlinearExtension != nullptr)
+ // If we computed lemmas in the last FULL_EFFORT check, send them now.
+ if (d_im.hasPendingLemma())
{
- // If we computed lemmas in the last FULL_EFFORT check, send them now.
- if (d_im.hasPendingLemma())
- {
- d_im.doPendingFacts();
- d_im.doPendingLemmas();
- d_im.doPendingPhaseRequirements();
- return;
- }
+ d_im.doPendingFacts();
+ d_im.doPendingLemmas();
+ d_im.doPendingPhaseRequirements();
}
return;
}
regress0/nl/proj-issue-444-memout-eqelim.smt2
regress0/nl/proj-issue-451-ran-combination-1.smt2
regress0/nl/proj-issue-451-ran-combination-2.smt2
+ regress0/nl/proj-issue-465-asan-proofs.smt2
regress0/nl/real-as-int.smt2
regress0/nl/real-div-ufnra.smt2
regress0/nl/sin-cos-346-b-chunk-0169.smt2
regress1/nl/proj-issue215.smt2
regress1/nl/proj-issue231.smt2
regress1/nl/proj-issue232.smt2
- regress1/nl/proj-issue251.smt2
regress1/nl/proj-issue253.smt2
regress1/nl/proj-issue279.smt2
regress1/nl/proj-issue280.smt2
regress1/nl/NAVIGATION2.smt2
# sat or unknown in different builds
regress1/nl/issue3307.smt2
+ # times out after changes to nl-ext in #8236
+ regress1/nl/proj-issue251.smt2
# slow with sygus-inference after removing anti-skolemization
regress1/quantifiers/anti-sk-simp.smt2
# no longer support snorm option
--- /dev/null
+; COMMAND-LINE: -i -q --produce-proofs
+; EXPECT: sat
+; EXPECT: sat
+(set-logic NRA)
+(declare-fun v () Real)
+(push)
+(assert (and (forall ((V Real)) (and (< 0.0 (/ 0.0 v)) (= (/ 0.0 0.0) (/ (- 1.0) (- v 1.0)))))))
+(check-sat)
+(pop)
+(assert (= 0 (* v v)))
+(check-sat)
; REQUIRES: glpk
+; DISABLE-TESTER: unsat-core
; COMMAND-LINE: --use-approx
; EXPECT: unsat
(set-logic UFNIA)
+; DISABLE-TESTER: unsat-core
; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRAT)
TEST_F(TestTheoryBlackArithNl, cvc5Projects455)
{
+ if (!Configuration::isBuiltWithPoly())
+ {
+ return;
+ }
Solver slv;
slv.setLogic("QF_UFNRA");
slv.setOption("produce-unsat-assumptions", "true");