Repository navigation
Conversation
Use clause rows in the fixed SAT and 3-SAT ILP pipelines. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1249 +/- ##
==========================================
- Coverage 97.19% 96.94% -0.26%
==========================================
Files 1146 1148 +2
Lines 151558 154253 +2695
==========================================
+ Hits 147308 149539 +2231
- Misses 4250 4714 +464 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Agentic Review ReportPR: #1249, Reduce Satisfiability directly to ILP (a) Structural and semantic
Whitelist: the packet's whitelist check failed on Semantic trace (by hand). I traced the canonical example by hand:
Independent check (scratch only, not committed). On a 6-variable, 7-clause instance with repeated and complementary literals, I enumerated all 64 assignments. Paper proof. Both directions are sound. The overhead paragraph is correct: the coefficient, RHS and endpoint magnitudes are at most L + 1. The degenerate cases (repeated, complementary, empty clause, no clauses) are discussed correctly. Pipelines. These were the only two fixed pipelines that contained Issue compliance: no linked issue. Judged against the PR description, which the code matches. Graph topology (how-to-verify, redundancy check). I ran
Verdict: PASS (not dominated). Codecov: patch coverage is 98.4%. The 3 uncovered lines are (b) Quality
(c) Feature testI built the PR's CLI with
FindingsCritical: none. Important: none. Minor
CI note (not caused by this PR)CI Clippy fails on |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review follow-up (89ca257): added a 6-variable, 7-clause closed-loop instance with repeated and complementary literals (Minor 1). No verification certificate is attached because this is the textbook clause-row encoding: each row is exactly |
Address needless_bool and needless_range_loop lints that the updated stable toolchain reports on existing code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Adds a direct primitive reduction
Satisfiability -> ILP<bool>(the standard clause-row encoding) and makes it the fixed ILP pipeline for SAT and 3-SAT.Cbecomes one rowΣ_{i∈P} x_i − Σ_{j∈N} x_j ≥ 1 − |N|, i.e.Σ_{ℓ∈C} val(ℓ) ≥ 1withval(¬x) = 1 − x. Repeated literals add to coefficients; opposite literals cancel, leaving a redundant row; an empty clause gives0 ≥ 1.num_vars,num_constraintsexact;num_nonzeros ≤ num_literals,max_constraint_magnitude_bits ≤ num_literals + 1.x_i = 1as true; feasibility maps throughilp_feasibility.Satisfiability -> ILPandKSatisfiability<K3> -> Satisfiability -> ILP, replacing the detour throughNAESatisfiability. These were the only two fixed pipelines using NAE-SAT as an intermediate; NAE-SAT keeps its own direct pipeline.Why
The previous route
SAT -> NAESAT -> ILPadds a variablezto every clause, which turns each pairwise conflictx_a + x_b ≤ 1into one that depends onz. HiGHS can then no longer find the clique structure it needs. On pigeonhole CNFs (n+1 pigeons, n holes),pred solvewith the default pipeline:Test plan
make check(Rust 1.99): 7214 passed, 0 failedmake paper: builds with the newreduction-ruleentry and worked exampleparameter_formula_validation.rs; resolver tests for both pipelines🤖 Generated with Claude Code