Skip to content

fix(#974): add 39 example-db tests and 31 paper entries for reduction rules#997

Merged
GiggleLiu merged 31 commits intomainfrom
fix/974-example-db-paper-entries
Apr 4, 2026
Merged

fix(#974): add 39 example-db tests and 31 paper entries for reduction rules#997
GiggleLiu merged 31 commits intomainfrom
fix/974-example-db-paper-entries

Conversation

@zazabap
Copy link
Copy Markdown
Collaborator

@zazabap zazabap commented Apr 3, 2026

Summary

Test plan

  • make check passes (fmt + clippy + test)
  • cargo test --lib --features example-db test_find_rule_example_ — all 44 rule lookup tests pass
  • typst compile docs/paper/reductions.typ — compiles with no errors
  • canonical_rule_examples_cover_exactly_authored_direct_reductions — coverage test passes

Closes #974

🤖 Generated with Claude Code — Institute of Science Tokyo

zazabap and others added 3 commits April 3, 2026 07:58
Covers 9 reductions: 2 NP-hardness chain extensions (#973, #198),
4 Tier 1a blocked issues (#379, #380, #888, #822), and
3 Tier 1b blocked issues (#892, #894, #890).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… entries

Complete missing documentation and test coverage for 41 reduction rules
shipped across PRs #777, #779, #804, and #972.

Check 10: 39 new `test_find_rule_example_*` tests in example_db.rs covering
all cross-problem reductions from the four PRs (ILP i32→bool excluded as a
same-name variant edge).

Check 11: 31 new `#reduction-rule(...)` entries in reductions.typ — 30 for
cross-problem reductions (PRs #777, #779, #972) plus 1 for the ILP<i32> →
ILP<bool> variant reduction via FBBT + truncated binary encoding.

Closes #974

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.16%. Comparing base (c57a131) to head (15052ea).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #997      +/-   ##
==========================================
+ Coverage   98.15%   98.16%   +0.01%     
==========================================
  Files         896      896              
  Lines       91150    91715     +565     
==========================================
+ Hits        89472    90036     +564     
- Misses       1678     1679       +1     

☔ View full report in Codecov by Sentry.
📢 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.

zazabap and others added 2 commits April 3, 2026 09:23
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@GiggleLiu
Copy link
Copy Markdown
Contributor

GiggleLiu commented Apr 3, 2026

Wield, did you use the paper writing skills? why data are hard coded in examples? Example data in manual should be loaded from json, and json is dumped from example_db.

zazabap and others added 10 commits April 4, 2026 11:34
…tion

Upgrade the prose-only reduction-rule entry to include data-driven
example with load-example binding, pred-commands, three construction
steps, and multiplicity note.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Path reduction

Upgrade the prose-only reduction-rule entry with load-example data binding,
pred-commands reproducibility block, and a 3-step worked example showing the
vertex-splitting construction on a C4 cycle graph.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ravelingSalesman reduction

Add data-driven example with load-example binding, pred-commands block,
step-by-step construction walkthrough, and solution verification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ctivityAugmentation reduction

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t paper entry

Upgrade the prose-only reduction-rule entry to include a data-driven
worked example with load-example binding, pred-commands block, and
step-by-step construction/verification using the C4 cycle graph fixture.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ng reduction

Add data-driven example with load-example binding, pred-commands block,
and step-by-step walkthrough showing the m=1 canonical instance with
3 elements, sizes (4,5,6), bound B=15 on 2 machines.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…uction

Upgrade the prose-only reduction-rule entry to include a data-driven
worked example with load-example binding, pred-commands block, and
step-by-step verification of the canonical witness.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…inedScheduling reduction

Also remove duplicate Partition -> ShortestWeightConstrainedPath entry that caused a label collision.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@zazabap
Copy link
Copy Markdown
Collaborator Author

zazabap commented Apr 4, 2026

You're right — the entries weren't generated with the paper writing skill. Fixing now: upgrading all 30 cross-problem entries to use load-example() with data-driven examples. Will push shortly.

zazabap and others added 12 commits April 4, 2026 11:51
…eleaseTimesAndDeadlines reduction

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…uction

Add data-driven example with load-example binding, pred-commands block,
and step-by-step walkthrough showing source instance, job construction,
separator window mechanism, and end-to-end solution verification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add data-driven worked example with load-example binding, pred-commands
reproducibility block, step-by-step construction walkthrough, and
end-to-end solution verification for the 3-SAT to k-clique reduction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…backArcSet reduction

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ty reduction

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cking reduction

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…over reduction

Also remove duplicate ThreePartition -> FlowShopScheduling entry that caused
a duplicate label compilation error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ts reduction

Also remove duplicate ThreePartition -> FlowShopScheduling prose entry
that was left over from a merge conflict.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
zazabap and others added 4 commits April 4, 2026 12:09
Leftover from parallel worktree merge — the data-driven entry
was placed at line ~10136 by the SAT→NAE agent, but the original
prose-only entry at line ~13454 was not cleaned up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts in docs/paper/reductions.typ: combine PR's 31 paper
entries with main's batch-of-18 reduction rules. Fix HP→IST test to
use updated variant (graph dimension added in main).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@GiggleLiu GiggleLiu merged commit 2c81f94 into main Apr 4, 2026
5 checks passed
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.

Complete missing example-db and paper entries for 43 rules from #770

2 participants