From: Andrew Reynolds Date: Mon, 25 Oct 2021 20:38:28 +0000 (-0500) Subject: Fix spurious checks to closed proofs (#7484) X-Git-Tag: cvc5-1.0.0~980 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85f57e1b106e0c91ef73a51ff3ad5194d6634b60;p=cvc5.git Fix spurious checks to closed proofs (#7484) This leads to issues when (1) proofs are enabled, (2) unsat cores are enabled and full proofs are disabled in a subsolver. This is the case for the abduction algorithm that uses unsat core learning, when proofs are explicitly enabled. This led to spurious assertion failures when testing proof new. --- diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp index 0f3260920..ee1528f4d 100644 --- a/src/theory/theory_engine.cpp +++ b/src/theory/theory_engine.cpp @@ -1428,14 +1428,14 @@ void TheoryEngine::conflict(TrustNode tconflict, TheoryId theoryId) // Process the explanation TrustNode tncExp = getExplanation(vec); - Trace("te-proof-debug") - << "Check closed conflict explained with sharing" << std::endl; - tncExp.debugCheckClosed("te-proof-debug", - "TheoryEngine::conflict_explained_sharing"); Node fullConflict = tncExp.getNode(); if (isProofEnabled()) { + Trace("te-proof-debug") + << "Check closed conflict explained with sharing" << std::endl; + tncExp.debugCheckClosed("te-proof-debug", + "TheoryEngine::conflict_explained_sharing"); Trace("te-proof-debug") << "Process conflict: " << conflict << std::endl; Trace("te-proof-debug") << "Conflict " << tconflict << " from " << tconflict.identifyGenerator() << std::endl; @@ -1498,7 +1498,10 @@ void TheoryEngine::conflict(TrustNode tconflict, TheoryId theoryId) Assert(properConflict(fullConflict)); Trace("te-proof-debug") << "Check closed conflict with sharing" << std::endl; - tconf.debugCheckClosed("te-proof-debug", "TheoryEngine::conflict:sharing"); + if (isProofEnabled()) + { + tconf.debugCheckClosed("te-proof-debug", "TheoryEngine::conflict:sharing"); + } lemma(tconf, LemmaProperty::REMOVABLE); } else { // When only one theory, the conflict should need no processing