Commit 2b5f0fd
Add parity tests against Julia ProblemReductions.jl (#65)
* Add design doc for testing against ProblemReductions.jl (#64)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add implementation plan for testing against ProblemReductions.jl (#64)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add Julia local environment for ProblemReductions.jl testing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add Julia test data generation script and fixtures
Generates JSON fixtures from ProblemReductions.jl for parity testing:
- 10 model fixtures (IndependentSet, SpinGlass, MaxCut, QUBO, SAT, KSat,
VertexCovering, SetPacking, Matching, Factoring)
- 17 reduction fixtures covering all Julia test/rules/rules.jl pairs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add Rust parity tests for Julia ProblemReductions.jl
22 active tests covering:
- 10 model evaluations (IS, SpinGlass, MaxCut, QUBO, SAT, KSat,
VertexCover, SetPacking, Matching, Factoring)
- 12 reduction closed-loop tests (IS↔SetPacking, IS→VC, VC→SetCovering,
SpinGlass↔MaxCut, SpinGlass↔QUBO, SAT↔KSat, CircuitSAT→SpinGlass,
Factoring→CircuitSAT)
- 4 ignored stubs for unimplemented reductions (SAT→Coloring,
SAT→IS, SAT→DominatingSet, Matching→SetPacking)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add jl-testdata Makefile target and fix clippy warnings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add Julia doc examples and rule test instances as parity tests
- Reorganize fixtures: tests/data/jl_*.json → tests/data/jl/*.json with compact JSON
- Add doc example instances for 5 new problem types (DominatingSet, MaximalIS,
PaintShop, KColoring, SetCovering) and doc instances for existing problems
- Add 22 individual rule test instances from Julia test/rules/*.jl covering
spinglass↔maxcut, qubo→spinglass, vc→setcovering, is→setpacking,
matching→setpacking, sat→ksat/coloring/independentset/dominatingset
- Implement 11 new reduction parity tests (replaced 4 #[ignore] stubs)
- Use ILP solver for SAT→Coloring test (brute force was 185s, now 0.02s)
- Handle unsatisfiable SAT instances in evaluation test
39 passing, 1 ignored (SAT→CircuitSAT not in Rust)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Resolve PR review comments
- Fix boolean values in extracted solutions (true/false → 0/1 integers)
- Replace .unwrap() with descriptive .expect() messages in JSON parsers
- Compact JSON already addressed in previous commit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Remove Manifest.toml from tracking and add to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Move JL parity tests from integration tests to unit tests
All 40 Julia ProblemReductions.jl parity tests (model evaluations and
reduction round-trips) are now in src/unit_tests/jl_parity.rs, removing
duplication with the existing unit test suite. The integration test file
tests/suites/jl_parity.rs is reduced to a stub comment.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Revert "Move JL parity tests from integration tests to unit tests"
This reverts commit f3fc90b.
* Move JL parity tests into existing unit test files
Distribute Julia parity tests from tests/suites/jl_parity.rs into
the corresponding unit test files (15 model + 12 rule files). Tests
use shared JSON parsing helpers via include!("../jl_helpers.rs").
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* rm plan files
* Remove redundant tests now covered by JL parity tests
Remove ~95 hand-written evaluate/brute_force tests from model and rule
unit test files that are fully covered by the JL fixture-based parity
tests. Keep construction, utility, trait compliance, edge case, and
relationship tests that verify distinct concerns.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Replace .unwrap() with .expect() in jl_helpers.rs for consistency
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 2eb68fb commit 2b5f0fd
90 files changed
Lines changed: 1758 additions & 2534 deletions
File tree
- scripts/jl
- src/unit_tests
- models
- graph
- optimization
- satisfiability
- set
- specialized
- rules
- tests
- data/jl
- suites
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments