Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1c052af
Support completed reduction recovery through witness and value mappings
isPANN Sep 18, 2026
6c16bda
Keep reduction chains outcome-independent and fix reduction correctness
isPANN Sep 18, 2026
4b7b327
Preserve TSP reduction correctness for signed costs and boundary graphs
isPANN Sep 18, 2026
8c99ce6
fix: enforce model construction constraints when loading JSON
isPANN Sep 18, 2026
90b8c4f
fix: correct model variants, reference solvers, and reductions
isPANN Sep 18, 2026
e3ef9cc
Fix model validation, numeric bounds, and reduction contracts
isPANN Sep 19, 2026
7ed850b
Align reduction result mappings and decision-rule contracts
isPANN Sep 19, 2026
1cfa02b
Isolate HiGHS execution in a concrete adapter
isPANN Sep 19, 2026
641631d
Solve native integer ILP variants directly through HiGHS adapter
isPANN Sep 19, 2026
134be18
Simplify model construction and completed result extraction
isPANN Sep 19, 2026
b4c10fe
Enumerate brute-force candidates without total cardinality limits
isPANN Sep 19, 2026
138ce7a
Separate model validity from enumeration and ILP encoding limits
isPANN Sep 20, 2026
5030cd6
Clarify reduction construction and answer recovery definitions
isPANN Sep 20, 2026
22750e1
Model decision targets explicitly and simplify CLI result extraction
isPANN Sep 20, 2026
d6c0256
Recover negative decision results through ILP pipelines
isPANN Sep 20, 2026
d754abc
Persist QUBO as coordinate entries and rename CVP coefficient variant
isPANN Sep 20, 2026
47d5303
Fix QUBO paper examples for coordinate serialization
isPANN Sep 20, 2026
6d5ad93
Support unit-weight decision vertex cover and decision ILP pipelines
isPANN Sep 20, 2026
2959932
Fix infeasibility propagation and solver dispatch
isPANN Sep 20, 2026
e48e6f3
Enumerate permutation witnesses with Lehmer coordinates
isPANN Sep 21, 2026
ef634c2
Encode scheduling and circuit decision bounds as ILP constraints
isPANN Sep 21, 2026
67715f1
Simplify ILP recovery test pipeline construction
isPANN Sep 21, 2026
31bdb31
Merge branch 'main' into codex/reduction-result-recovery
isPANN Sep 21, 2026
8dfa3a4
Validate target feasibility during extraction and remove test-only API
isPANN Sep 21, 2026
0b118a1
Expose rule solution and value mappings directly in pred extract
isPANN Sep 21, 2026
8291c5b
Simplify CLI and MCP solver execution
isPANN Sep 21, 2026
29097e9
Reject oversized QUBO allocations and zero-color KColoring reduction …
GiggleLiu Sep 25, 2026
7077637
Cap persisted QUBO size and guard TSP-to-QUBO tour energy range
GiggleLiu Sep 25, 2026
6dfdaa7
fix(cvp): prefer representable witnesses among tied optima
GiggleLiu Sep 25, 2026
91c89f9
docs(paper): align decision bounds and TSP coefficients
GiggleLiu Sep 25, 2026
74f896f
test: cover K2 solver and short SAT to decision cover reductions
GiggleLiu Sep 25, 2026
c1ecfb3
docs: remove unregistered K4 and K5 diagram nodes
GiggleLiu Sep 25, 2026
b7920de
fix(help): describe decision inputs and bound directions in CLI help
GiggleLiu Sep 25, 2026
3690a98
fix: restore actual and expected counts in length errors
GiggleLiu Sep 25, 2026
942bc21
fix(cli): clarify raw aggregate extraction and omit solver metadata
GiggleLiu Sep 25, 2026
1096b78
fix: explain legacy CVP and QUBO persisted formats
GiggleLiu Sep 25, 2026
039d1b2
docs(cli): use runnable QUBO and aggregate recovery examples
GiggleLiu Sep 25, 2026
28d4db9
test: cross-check decision search on a five-cycle
GiggleLiu Sep 25, 2026
9ab6222
feat(examples): add tiny decision scheduling circuit and unit cover e…
GiggleLiu Sep 25, 2026
206ad7d
fix(qubo): reject lower-triangle entries and serialize the upper tria…
GiggleLiu Sep 25, 2026
b818741
fix(kcoloring): allow zero colors in construction and random generation
GiggleLiu Sep 25, 2026
056db24
refactor: unify completed-result recovery
GiggleLiu Sep 25, 2026
280b510
refactor: share witness validation and aggregate mapping boilerplate
GiggleLiu Sep 25, 2026
d45318a
refactor: deserialize models through validating conversions
GiggleLiu Sep 25, 2026
be05d56
Store QUBO coefficients sparsely instead of capping num_vars
GiggleLiu Sep 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 6 additions & 3 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,11 @@ Max<V>, Min<V>, Sum<W>, Or, And, Extremum<V>, ExtremumSense
- Problems parameterized by graph type `G` and optionally weight type `W` (problem-dependent)
- `BruteForce::solve()` returns `Result<Option<P::Solution>, SolveError>`; `None` means exhaustive search proved infeasibility
- `BruteForce::find_all_witnesses()` is a reference-testing helper for collecting every optimal or satisfying solution
- `ReductionResult` provides `target_problem()` and `extract_solution()` for witness/config workflows; `AggregateReductionResult` provides `extract_value()` for aggregate/value workflows
- Every direct `extract_solution()` must call `validate_target_solution()` once before decoding; composed extractors delegate validation to the first direct decoder.
- `ReductionResult` provides `target_problem()` and `extract_solution()` for witness/config workflows; `AggregateReductionResult` provides `extract_value()` for aggregate/value workflows. Neither requires a rule-category tag. When both are registered, completed-result recovery borrows both mappings from the same constructed reduction.
- Register a completed-value mapping with `#[aggregate_reduction]` on its concrete `AggregateReductionResult` implementation. Use `#[aggregate_reduction(identity)]` or `#[aggregate_reduction(ilp_feasibility)]` on an empty impl for identity or ILP-feasibility maps; the shorthand reuses the witness result's source, target, and target accessor. Generic implementations use `register_aggregate_reduction!(ResultType)` for each concrete result type. These register implementations, not rule categories. Read resolved edges through `reduction_entries()`, not raw inventory entries.
- Reduction chains expose solution and aggregate-value mappings and recover completed results through `ReductionChain::extract_result()`. Every witness reduction preserves existence: source feasibility implies target feasibility. Established target or intermediate infeasibility propagates to the source without a value map or witness extraction. Shared library recovery checks each mapped value against the extracted witness; callers establish optimality or infeasibility under their solver's numerical contract. A missing required mapping or failed witness extraction is an error, not proof of infeasibility. Counting and universal aggregates use `AggregateReductionChain::extract_value()` without a representative witness.
- Every direct `extract_solution()` must validate once before decoding, using `validate_target_solution()` or `validate_target_witness(target, solution, certifies_source, message)`. The latter evaluates once, applies the rule's feasibility predicate or value-map threshold, and returns a typed `ExtractionError` with the rule's rejection reason; composed extractors delegate validation to the first direct decoder.
- Decision-equivalence rules map completed `Or` values identically. Decision-to-optimization rules own their feasibility/threshold map; reject target configurations that do not certify YES instead of returning an invalid source witness. Optimization rules decode optimal witnesses and evaluate the source; register a value map only when mathematically defined. Counting and universal rules map completed folds without witnesses. Follow [result mappings](../docs/src/design.md#result-mappings); no mandatory rule-category tags.
- Decode only the reduction's defined mathematical mapping. Reject malformed structure with `ExtractionError`; never panic, truncate, clamp, invent defaults, or add recovery branches. Explicit mathematical alternatives and sentinels are allowed. Test successful decoding and every rejected representation.
- CLI-facing dynamic formatting uses aggregate wrapper names directly (for example `Max(2)`, `Min(None)`, `Or(true)`, or `Sum(56)`)
- Graph types: SimpleGraph, PlanarGraph, BipartiteGraph, UnitDiskGraph, KingsSubgraph, TriangularSubgraph
Expand Down Expand Up @@ -210,7 +213,7 @@ Reduction graph nodes use variant key-value pairs from `Problem::variant()`:
- Each primitive reduction is determined by the exact `(source_variant, target_variant)` endpoint pair
- Reduction edges carry `EdgeCapabilities { witness, aggregate, turing }`; graph search defaults to witness mode, aggregate mode is available through `ReductionMode::Aggregate`, and Turing (multi-query) mode via `ReductionMode::Turing`
- `#[reduction]` requires one `transform = exact`, `transform = upper_bound`, or `transform = unavailable` declaration and currently registers witness/config reductions; aggregate-only and Turing edges require manual `ReductionEntry` registration
- `Decision<P> → P` is an aggregate-only edge (solve optimization, compare to bound); `P → Decision<P>` is a Turing edge (binary search over decision bound)
- `Decision<P> → P` supports both mappings: compare the exact optimum to the bound, and recover a witness only if it meets the bound. `P → Decision<P>` is a Turing edge (binary search over decision bound).

### Extension Points
- New models register dynamic load/serialize metadata through `declare_variants!` and, when finite enumeration exists, register it separately through `register_brute_force!`; neither belongs in CLI match arms
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ thiserror = "2.0.20"
num-bigint = "0.4.8"
num-rational = "0.4.2"
num-traits = "0.2.19"
good_lp = { version = "=1.14.2", default-features = false, features = ["highs"] }
highs = "2.4.0"
inventory = "0.3.24"
rand = "0.10.2"
criterion = { version = "0.8.2", optional = true }
Expand Down
Loading
Loading