Commit c400651
docs: replace Rust code with JSON schema tables in paper (#38)
* docs: replace Rust code with JSON schema tables in reductions.typ
1. Replace render-struct (Rust code blocks) with render-schema (JSON field
tables from problem_schemas.json) — more useful for interop users.
2. Classify reduction references as "Reduces to" / "Reduces from" instead
of flat "Implemented reductions" lists.
3. Remove all Rust code blocks and "See ... .rs" links from the paper.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* update
* refactor: add reduction-rule function for unified theorem rendering
Add `reduction-rule(source, target, ...)` Typst function that:
- Auto-generates theorem labels (<thm:source-to-target>)
- Auto-generates bold header (Source → Target) with display names
- Auto-generates [Problems: Definition X, Definition Y] links
- Renders proof and optional example with custom extra content
- Supports bidirectional (↔), display name overrides
Converts all 28 reduction theorems to use the new function,
eliminating repeated boilerplate (manual labels, problem links,
header formatting).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: correct overhead formulas and add Display for polynomials
- Fix Monomial/Polynomial Display to use `*` between terms
- Add num_literals to Satisfiability::problem_size()
- Fix 6 incorrect overhead polynomials:
SAT→DS, SAT→IS, SAT→Coloring, SAT→kSAT, Factoring→Circuit, Coloring→QUBO
- Add poly!(a * b) macro variant for variable products
- Export overhead data in reduction_graph.json
- Simplify coloring_ilp.rs to use poly! macro
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: show reduction overhead in theorem statements
Add auto-generated overhead line to each reduction theorem by looking up
the edge data from reduction_graph.json. Format: field = formula pairs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add edge click and hover handlers to mdBook reduction graph
- Add edge hover tooltip showing source→target and overhead formulas
- Add edge click handler to highlight edge and show overhead info
- Add cursor:pointer to edges for visual feedback
- Sync reduction_graph.json with overhead data
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* save
* refactor: rename 7 problem types with Maximum/Minimum prefix, improve paper and perf
Problem type renames for clarity:
- Clique → MaximumClique
- IndependentSet → MaximumIndependentSet
- Matching → MaximumMatching
- VertexCovering → MinimumVertexCover
- DominatingSet → MinimumDominatingSet
- SetPacking → MaximumSetPacking
- SetCovering → MinimumSetCovering
Renamed all source files, test files, rule files, example files, and test
data across 118 files. Updated all references in code, docs, benchmarks,
and the Typst paper.
Typst paper improvements:
- Removed name-abbrev and def-label-map dictionaries; use full names
- Added problem-def() wrapper for programmatic definition labels
- Added completeness warnings for missing models/rules vs JSON graph
- Made reduction-rule use context+query for resilient label references
- Swapped MVC↔MIS and MSP↔MIS theorem directions to match JSON edges
- Deleted redundant examples/qubo_reductions.rs (already split)
Performance:
- Added Auto variant to PathDecompositionMethod (now default)
- Auto uses exact branch-and-bound for ≤30 vertices, greedy for larger
- Fixes slow unit disk mapping tests on larger graphs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add edge doc links and compound variant nodes to reduction graph
Edge documentation:
- Add module_path field to ReductionEntry, populated via module_path!()
in the proc macro and 3 manual inventory::submit! calls
- Add doc_path to EdgeJson, computed from module_path
- Add edge double-click handler to navigate to reduction module rustdoc
Compound variant nodes:
- Replace base-node-only filtering with compound parent + variant children
- Parent nodes show problem name with dashed border, children show variant
(Unweighted/Weighted/etc.)
- Edges connect variant nodes directly, preserving full reduction detail
- Update all event handlers (tooltip, path selection, edge click)
Also fix problem-def Typst function to accept (name, title, body) matching
all 16 call sites, and update CLAUDE.md/rules documentation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use flat nodes with variant placement in reduction graph
Replace compound node grouping with flat nodes where variant nodes are
placed physically near their parent problem. Base variants sit at the
cose-computed position labeled with the problem name; non-base variants
are offset below labeled like "ProblemName (Weighted)". Edge double-click
now navigates to GitHub source. Also: remove mermaid dependency, enable
previously ignored tests, simplify paper problem-def signatures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add design plan for improving example instances
Replace trivial P4/K3/C4 instances across 30 examples with Petersen
graph (canonical), Octahedron (clique), random 3-SAT(5,7), and other
non-trivial instances sized 6-10 variables.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add implementation plan for improving example instances
13 tasks covering all 30 example files: Petersen graph for graph problems,
octahedron for clique, 5-var 3-SAT, Petersen SpinGlass, full adder circuit,
6-var knapsack ILP, and factor 35=5x7.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: use lower(ProblemName) convention for all example filenames
Rename example files to strictly follow lower(ProblemName) convention
(sat→satisfiability, circuit→circuitsat, coloring→kcoloring). Replace
hardcoded write_example names with env!("CARGO_BIN_NAME") and auto-derive
Typst example references from source/target. Also fix PR review comments:
doubled words, stale headers, coverage gaps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove unused import in polynomial tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent d6e82e3 commit c400651
151 files changed
Lines changed: 3972 additions & 2625 deletions
File tree
- .claude
- rules
- benches
- docs
- paper
- plans
- src
- reductions
- examples
- problemreductions-macros/src
- scripts
- src
- models
- graph
- satisfiability
- set
- registry
- rules
- unitdiskmapping
- ksg
- triangular
- solvers/ilp
- testing
- topology
- unit_tests
- models
- graph
- set
- registry
- rules
- unitdiskmapping
- testing
- unitdiskmapping_algorithms
- tests
- data/qubo
- 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 | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
88 | | - | |
89 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
92 | 105 | | |
93 | 106 | | |
94 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
28 | 26 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 8 | | |
12 | | - | |
| 9 | + | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
| |||
0 commit comments