Skip to content

Make derivable reduction parameters exact - #1174

Draft
isPANN wants to merge 5 commits into
mainfrom
fix/exact-reduction-parameters
Draft

isPANN wants to merge 5 commits into
mainfrom
fix/exact-reduction-parameters

Conversation

@isPANN

@isPANN isPANN commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Several reductions marked target parameters unavailable even though their constructed values have exact formulas in registered source parameters. This PR adds 24 such formulas across 22 rules. For example, ExactCoverBy3Sets → ILP now reports num_nonzeros = 4 * num_subsets. HamiltonianPath → ILP reports all three ILP sizes exactly, including the empty-graph case, using a source parameter for consecutive positions. BMF → BicliqueCover no longer claims an exact edge count from matrix dimensions alone.

One registry-wide test checks every declared formula field against a constructed target: equality for exact, and predicted ≥ measured for upper_bound. It uses canonical examples or registered generators where examples are unavailable. Turing Decision wrappers and two proof-only rules have test-only target constructions because they have no single-shot reduction callback. This check caught a false QUBO → SpinGlass exact claim: sparse QUBOs do not have num_vars² interactions. QUBO now exposes its natural nonzero quadratic-term count, which restores an exact interaction formula and also makes all three QUBO → ILP size formulas exact. The canonical instructions and add-rule guide now require coverage for every formula field in future rules.

Validation: make check passed (formatting, Clippy, workspace tests, and doctests).

@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.25668% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.74%. Comparing base (309ac65) to head (84f1bd2).

Files with missing lines Patch % Lines
src/unit_tests/parameter_formula_validation.rs 90.90% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1174      +/-   ##
==========================================
+ Coverage   96.73%   96.74%   +0.01%     
==========================================
  Files        1069     1070       +1     
  Lines      138549   138920     +371     
==========================================
+ Hits       134023   134397     +374     
+ Misses       4526     4523       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@isPANN
isPANN marked this pull request as draft September 26, 2026 03:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant