Re-enable solution-blocking-constraint deletion (closes #59) - #71
Open
ciaranm wants to merge 1 commit into
Open
Conversation
Counting/enumeration proofs log a solx blocking constraint per solution and keep it at the top proof level, making the proof linear in the number of solutions. The fix -- move each backtrack nogood into the core (core id) so the blocking constraints it subsumes can be checked-deleted (del id) on backtrack, keeping the proof linear in the search depth -- was implemented in #55 but reverted in #60: core id-ing the nogoods tripped an upstream VeriPB monotonicity bug (adding core id statements turned a verifying proof into a failing one), reported upstream and tracked in #59. That VeriPB bug is now fixed: the minimal reproducer (a proof plus two extra core id lines that previously failed a later rup) now verifies. Re-apply the deletion. It is always on rather than gated behind a count-solutions flag: the core id / del id of backtrack nogoods is sound in every mode, so there is no reason to make it an option (decision and unsat searches simply have few or no blocking constraints to delete). homomorphism.cc and proof.hh therefore go back to their pre-#60 state; the whole change is local to proof.cc. Verified: ctest 48/48 (release and sanitize), including decision, unsat, clique and MCS proofs (which now also core id / del id their backtrack nogoods), proof_count_loopy, and the proof_random_sweep that originally caught the regression; an extended 240-instance counting sweep all verify; and the cake_pb_iso pipeline tests pass, so core id/del id survive elaboration to the formally-verified checker. Closes #59. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ciaranm
force-pushed
the
proofs/reenable-blocking-deletion
branch
from
June 30, 2026 15:37
767a194 to
c3d6184
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Counting/enumeration proofs log a
solxblocking constraint per solution and keep it at the top proof level, so proof size is linear in the number of solutions. The optimisation to keep it linear in the search depth — move each backtrack nogood into the core (core id) so the blocking constraints it subsumes can be checked-deleted (del id) on backtrack — was added in #55 but reverted in #60:core id-ing those nogoods tripped an upstream VeriPB monotonicity bug (addingcore idstatements turned a verifying proof into a failing one), reported upstream and tracked in #59.That VeriPB bug is now fixed. The saved minimal reproducer — a proof plus exactly two extra
core idlines that previously failed a laterrup— now verifies (s VERIFIED COMPLETE ENUMERATION OF 4 SOLUTIONS) on the installed VeriPB.This PR re-applies the deletion. It is always on rather than gated behind a
--count-solutionsflag: thecore id/del idof backtrack nogoods is sound in every mode (decision and unsat searches simply have few or no blocking constraints to delete), so there's no reason to make it an option.homomorphism.ccandproof.hhtherefore go back to their pre-#60 state and the whole change is local toproof.cc, plus a proof-logging docs refresh.Verification
ctest48/48 under both the release and sanitize (ASan+UBSan) presets — including decision, unsat, clique and MCS proofs (which now alsocore id/del idtheir backtrack nogoods),proof_count_loopy, and theproof_random_sweepthat originally caught the regression.cake_pb_isopipeline tests pass, socore id/del idsurvive elaboration down to the formally-verified checker.Spot checks: counting
path4 → k4(24 solutions) emits 40core id, 60del id, 24solx→s VERIFIED COMPLETE ENUMERATION OF 24 SOLUTIONS; a backtracking decision proof emitscore id/del idand verifiess VERIFIED SATISFIABLE.Closes #59.
🤖 Generated with Claude Code