Skip to content

Comments

Rewrite getting-started with Factoring→SpinGlass and path overhead API#78

Merged
GiggleLiu merged 3 commits intomainfrom
jg/getting-started-factoring-overhead
Feb 16, 2026
Merged

Rewrite getting-started with Factoring→SpinGlass and path overhead API#78
GiggleLiu merged 3 commits intomainfrom
jg/getting-started-factoring-overhead

Conversation

@GiggleLiu
Copy link
Contributor

Summary

  • Rewrite getting-started.md Example 2 from ksat→MIS to Factoring→SpinGlass with jupyter notebook style (code input followed by text output)
  • Add path_overheads() as single source of truth for per-edge overhead lookup; refactor compose_path_overhead() to build on it (DRY)
  • Remove evaluate_path_overhead() in favor of symbolic per-edge polynomial checks in tests
  • Add 7 rich paper examples recovered from stash (SAT→KColoring, SAT→DominatingSet, SAT→KSatisfiability, CircuitSAT→SpinGlass, Factoring→CircuitSAT, MaxCut→SpinGlass, SpinGlass→MaxCut)
  • Fix rustdoc unresolved link to ProblemSize
  • Add force-push prohibition to CLAUDE.md

Test plan

  • make test passes (all 47 doctests + unit/integration tests)
  • Example runs correctly: cargo run --features ilp --example chained_reduction_factoring_to_spinglass
  • make doc builds mdBook with updated getting-started page
  • Verify paper compiles with make paper

🤖 Generated with Claude Code

…th overhead API

- Rewrite getting-started.md Example 2 to Factoring→SpinGlass with notebook style
- Add path_overheads() as single source of truth for per-edge overhead lookup
- Refactor compose_path_overhead() and tests to build on path_overheads() (DRY)
- Remove evaluate_path_overhead() in favor of symbolic per-edge checks
- Add 7 rich paper examples recovered from stash (SAT→KColoring, SAT→DS, etc.)
- Fix rustdoc unresolved link to ProblemSize
- Add force-push prohibition to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 93.42105% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.13%. Comparing base (5be5149) to head (3313354).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/rules/graph.rs 88.37% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   96.10%   96.13%   +0.02%     
==========================================
  Files         193      193              
  Lines       26567    26585      +18     
==========================================
+ Hits        25532    25557      +25     
+ Misses       1035     1028       -7     

☔ 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the reduction graph overhead API and updates documentation with richer examples. The main changes include adding path_overheads() as a new API for per-edge overhead inspection, removing the old evaluate_path_overhead() function in favor of symbolic polynomial checks, and rewriting the getting-started guide's Example 2 to demonstrate the Factoring→SpinGlass reduction path.

Changes:

  • Adds path_overheads() API returning per-edge overhead polynomials, refactors compose_path_overhead() to build on it (DRY principle)
  • Replaces numeric overhead evaluation with symbolic polynomial checks in tests for better clarity
  • Rewrites getting-started Example 2 from KSat→MIS to Factoring→SpinGlass with Jupyter-style code/output blocks
  • Adds Display implementations for ReductionPath and ReductionStep with arrow notation (→)
  • Fixes rustdoc link, corrects JSON field names (num_elementsuniverse_size), and adds 7 paper reduction examples

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/rules/graph.rs Added path_overheads() for per-edge polynomials, refactored compose_path_overhead(), added Display impls for ReductionPath/Step
src/unit_tests/reduction_graph.rs Replaced evaluate_path_overhead() numeric checks with symbolic polynomial assertions
src/traits.rs Fixed rustdoc link to use full path crate::types::ProblemSize
src/rules/mod.rs Minor formatting change (line wrapping)
examples/chained_reduction_factoring_to_spinglass.rs Added anchors and overhead inspection code demonstrating path_overheads() and compose_path_overhead()
docs/src/getting-started.md Rewrote Example 2 to use Factoring→SpinGlass path with step-by-step walkthrough
docs/src/reductions/reduction_graph.json Corrected field names (num_elementsuniverse_size, added num_literals fields, fixed num_gatesnum_variables+num_assignments)
docs/paper/reductions.typ Added 7 paper examples with real test data (SAT→KColoring, SAT→DominatingSet, SAT→KSat, CircuitSAT→SpinGlass, Factoring→CircuitSAT, MaxCut→SpinGlass, SpinGlass→MaxCut)
.claude/CLAUDE.md Added force-push prohibition guideline

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

GiggleLiu and others added 2 commits February 17, 2026 01:28
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@GiggleLiu GiggleLiu merged commit eb92e0a into main Feb 16, 2026
3 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.

1 participant