Skip to content

feat: add CustomizedSolver with structure-exploiting backends#766

Merged
GiggleLiu merged 10 commits intomainfrom
feat/customized-solver
Mar 24, 2026
Merged

feat: add CustomizedSolver with structure-exploiting backends#766
GiggleLiu merged 10 commits intomainfrom
feat/customized-solver

Conversation

@GiggleLiu
Copy link
Contributor

Summary

  • Add CustomizedSolver — a new solver backend for exact witness recovery using structure-exploiting search, exposed via pred solve --solver customized
  • Implement three backend families:
    • FD subset search: shared branch-and-bound with closure pruning for MinimumCardinalityKey, AdditionalKey, PrimeAttributeName, BoyceCoddNormalFormViolation
    • Bounded cycle hitting: enumerates short cycles then finds minimum hitting set for PartialFeedbackEdgeSet
    • Tree arrangement backtracking: interleaves tree construction and permutation mapping for RootedTreeArrangement
  • Wire into CLI dispatch (--solver customized), with helpful error messages for unsupported problems

Test plan

  • 19 unit tests: parity checks against BruteForce, exact witness validation, edge cases (no solution, tight bounds)
  • 2 CLI integration tests: unsupported problem hint, end-to-end solve
  • All 3360 existing tests pass (zero regressions)
  • Pre-existing clippy warnings in ilp_helpers.rs are unrelated to this PR

🤖 Generated with Claude Code

GiggleLiu and others added 7 commits March 24, 2026 15:50
…-M, abs-diff, minimax, one-hot)

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

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 96.23477% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.82%. Comparing base (bc974d1) to head (abe7fcb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/solvers/customized/fd_subset_search.rs 91.39% 13 Missing ⚠️
src/unit_tests/solvers/customized/solver.rs 96.15% 10 Missing ⚠️
src/solvers/customized/rooted_tree_arrangement.rs 97.19% 5 Missing ⚠️
...rc/solvers/customized/partial_feedback_edge_set.rs 97.77% 3 Missing ⚠️
src/solvers/customized/solver.rs 98.30% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #766      +/-   ##
==========================================
- Coverage   97.84%   97.82%   -0.03%     
==========================================
  Files         583      588       +5     
  Lines       65521    66422     +901     
==========================================
+ Hits        64112    64976     +864     
- Misses       1409     1446      +37     

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

@GiggleLiu GiggleLiu merged commit 88fb8f7 into main Mar 24, 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.

1 participant