Command reference
Every command accepts --json for structured output, -o FILE to save JSON, and -q to silence informational messages. pred <command> --help lists all flags; this page shows one example per command.
Catalog
pred list
pred show MIS
pred list --rules
list reports every problem with its aliases, variants, and reduction counts. show describes the resolved variant, its parameter fields, input schema, and incoming and outgoing reductions. Read that schema before constructing an instance.
Example: pred show MIS
MaximumIndependentSet/SimpleGraph/One
Find maximum weight independent set in a graph
Best Known Complexity: O(1.1996^num_vertices)
Inputs (2):
graph (Vec<(usize,usize)>)
num_vertices (usize) [optional]
Parameters (2):
num_edges
num_vertices
Outgoing reductions (6):
→ MaximumIndependentSet/TriangularSubgraph/i64 (num_edges <= 108 * num_vertices + 108 * num_vertices^2, num_vertices <= 36 * num_vertices + 36 * num_vertices^2)
→ MaximumSetPacking/One (num_sets <= num_vertices, universe_size <= num_edges)
→ MaximumIndependentSet/SimpleGraph/i64 (num_edges = num_edges, num_vertices = num_vertices)
→ DecisionMaximumIndependentSet/SimpleGraph/One (num_edges = num_edges, num_vertices = num_vertices)
→ MaximumClique/SimpleGraph/One (num_edges = -1 * num_edges + num_vertices * (-1 + num_vertices) * 2^-1, num_vertices = num_vertices)
→ MaximumIndependentSet/KingsSubgraph/One (num_edges <= 48 + 64 * num_vertices^2 + 128 * num_vertices, num_vertices <= 12 + 16 * num_vertices^2 + 32 * num_vertices)
Incoming reductions (6):
LongestCommonSubsequence → (num_edges <= cross_frequency_product^2, num_vertices <= cross_frequency_product)
MaximumClique/SimpleGraph/One → (num_edges = -1 * num_edges + num_vertices * (-1 + num_vertices) * 2^-1, num_vertices = num_vertices)
Satisfiability → (num_edges <= num_literals^2, num_vertices <= num_literals)
MaximumSetPacking/One → (num_edges <= num_sets^2, num_vertices <= num_sets)
MaximumIndependentSet/UnitDiskGraph/One → (num_edges = num_edges, num_vertices = num_vertices)
DecisionMaximumIndependentSet/SimpleGraph/One → (num_edges = num_edges, num_vertices = num_vertices)
Names and variants
pred show MIS/SimpleGraph/i64
pred path MIS/SimpleGraph/i64 ILP/bool
Aliases such as MIS resolve to full names, and a bare name selects the declared default variant: MIS is MaximumIndependentSet/SimpleGraph/One. Slash-separated parameters select graph, weight, or other variant values. One means unit weights; passing non-unit --weights to create upgrades a default instance to i64. Name the exact variant when a reproducible endpoint matters.
| Alias | Full Name |
|---|---|
2SAT | KSatisfiability |
3-Partition | ThreePartition |
3DM | ThreeDimensionalMatching |
3Partition | ThreePartition |
3SAT | KSatisfiability |
BCNF | BoyceCoddNormalFormViolation |
BCNFViolation | BoyceCoddNormalFormViolation |
CBM | ConsecutiveBlockMinimization |
CBQ | ConjunctiveBooleanQuery |
CMO | MaximumContactMapOverlap |
CVP | ClosestVectorProblem |
Clique | KClique |
D2CIF | DirectedTwoCommodityIntegralFlow |
DHP | DirectedHamiltonianPath |
DMIS | DecisionMaximumIndependentSet |
DMVC | DecisionMinimumVertexCover |
DOLA | DecisionOptimalLinearArrangement |
FAS | MinimumFeedbackArcSet |
FVS | MinimumFeedbackVertexSet |
HC | HamiltonianCircuit |
IndependentSet | DecisionMaximumIndependentSet |
KSAT | KSatisfiability |
LCS | LongestCommonSubsequence |
MAX2SAT | Maximum2Satisfiability |
MCC | MinimumCostCirculation |
MCES | MaximumCommonEdgeSubgraph |
MCMF | MinimumCostMaximumFlow |
MCPP | MixedChinesePostman |
MCST | MinimumCapacitatedSpanningTree |
MECF | MinimumEdgeCostFlow |
MGB | MinimumGraphBandwidth |
MIS | MaximumIndependentSet |
MVC | MinimumVertexCover |
MaxCMO | MaximumContactMapOverlap |
MaxMatching | MaximumMatching |
MaximumBipartiteSubgraph | MaxCut |
MinDNF | MinimumDisjunctiveNormalForm |
N3DM | Numerical3DimensionalMatching |
NAESAT | NAESatisfiability |
NMTS | NumericalMatchingWithTargetSums |
OCST | OptimumCommunicationSpanningTree |
OLA | OptimalLinearArrangement |
POK | PartiallyOrderedKnapsack |
QAP | QuadraticAssignment |
QBF | QuantifiedBooleanFormulas |
QDE | QuadraticDiophantineEquations |
RPP | RuralPostman |
SAT | Satisfiability |
SCS | ShortestCommonSupersequence |
SCSS | ShortestCommonSuperstring |
TSP | TravelingSalesman |
VC | DecisionMinimumVertexCover |
VertexCover | DecisionMinimumVertexCover |
WangTiling | SquareTiling |
X3C | ExactCoverBy3Sets |
pCenter | MinMaxMulticenter |
pmedian | MinimumSumMulticenter |
Paths
pred path MIS ILP
pred path MIS QUBO --limit 50
pred path MIS QUBO --json -o paths.json
pred from MIS --hops 2
pred to QUBO
path enumerates witness-capable simple routes between exact endpoints, without ranking. --limit accepts 1 through 999, or all for 999; the default is 20. JSON output contains paths and truncated. from and to explore outgoing and incoming neighbors.
Example: a multi-step path from Factoring to SpinGlass
Found 3 paths from Factoring to SpinGlass:
--- Path 1 ---
Path (2 steps): Factoring → CircuitSAT → SpinGlass/SimpleGraph/i64
Step 1: Factoring → CircuitSAT
num_assignment_outputs unavailable: the exact target parameter is not represented by this reduction's symbolic transform
num_assignments <= 2 + 2 * (num_bits_first + num_bits_second) + 6 * num_bits_first * num_bits_second
num_expression_nodes unavailable: the exact target parameter is not represented by this reduction's symbolic transform
num_variables <= 1 + 2 * (num_bits_first + num_bits_second) + 6 * num_bits_first * num_bits_second
Step 2: CircuitSAT → SpinGlass/SimpleGraph/i64
num_interactions <= num_assignment_outputs + 6 * num_expression_nodes
num_spins <= num_variables + 3 * num_expression_nodes
Overall:
num_interactions unavailable: cannot compose reduction step 2 (CircuitSAT -> SpinGlass): reduction `Factoring -> SpinGlass` target field `num_spins` is missing composition inputs ["num_expression_nodes"]
num_spins unavailable: cannot compose reduction step 2 (CircuitSAT -> SpinGlass): reduction `Factoring -> SpinGlass` target field `num_spins` is missing composition inputs ["num_expression_nodes"]
--- Path 2 ---
Path (5 steps): Factoring → CircuitSAT → Satisfiability → Maximum2Satisfiability → MaxCut/SimpleGraph/i64 → SpinGlass/SimpleGraph/i64
Step 1: Factoring → CircuitSAT
num_assignment_outputs unavailable: the exact target parameter is not represented by this reduction's symbolic transform
num_assignments <= 2 + 2 * (num_bits_first + num_bits_second) + 6 * num_bits_first * num_bits_second
num_expression_nodes unavailable: the exact target parameter is not represented by this reduction's symbolic transform
num_variables <= 1 + 2 * (num_bits_first + num_bits_second) + 6 * num_bits_first * num_bits_second
Step 2: CircuitSAT → Satisfiability
num_clauses unavailable: the exact Tseitin clause count is specific to this reduction and is not a CircuitSAT parameter
num_literals unavailable: the exact target parameter is not represented by this reduction's symbolic transform
num_vars unavailable: the exact Tseitin variable count is specific to this reduction and is not a CircuitSAT parameter
Step 3: Satisfiability → Maximum2Satisfiability
num_clauses <= 10 * (num_literals + 3 * num_clauses)
num_vars <= num_vars + 2 * num_literals + 4 * num_clauses
Step 4: Maximum2Satisfiability → MaxCut/SimpleGraph/i64
num_edges <= (1 + num_vars)^2
num_vertices <= 1 + num_vars
Step 5: MaxCut/SimpleGraph/i64 → SpinGlass/SimpleGraph/i64
num_interactions = num_edges
num_spins = num_vertices
Overall:
num_interactions unavailable: reduction step 2 (CircuitSAT -> Satisfiability) has no symbolic parameter transform
num_spins unavailable: reduction step 2 (CircuitSAT -> Satisfiability) has no symbolic parameter transform
--- Path 3 ---
Path (5 steps): Factoring → CircuitSAT → Satisfiability → NAESatisfiability → MaxCut/SimpleGraph/i64 → SpinGlass/SimpleGraph/i64
Step 1: Factoring → CircuitSAT
num_assignment_outputs unavailable: the exact target parameter is not represented by this reduction's symbolic transform
num_assignments <= 2 + 2 * (num_bits_first + num_bits_second) + 6 * num_bits_first * num_bits_second
num_expression_nodes unavailable: the exact target parameter is not represented by this reduction's symbolic transform
num_variables <= 1 + 2 * (num_bits_first + num_bits_second) + 6 * num_bits_first * num_bits_second
Step 2: CircuitSAT → Satisfiability
num_clauses unavailable: the exact Tseitin clause count is specific to this reduction and is not a CircuitSAT parameter
num_literals unavailable: the exact target parameter is not represented by this reduction's symbolic transform
num_vars unavailable: the exact Tseitin variable count is specific to this reduction and is not a CircuitSAT parameter
Step 3: Satisfiability → NAESatisfiability
num_clauses = num_clauses
num_literal_pairs unavailable: the exact target parameter is not represented by this reduction's symbolic transform
num_literals = num_clauses + num_literals
num_vars = 1 + num_vars
Step 4: NAESatisfiability → MaxCut/SimpleGraph/i64
num_edges <= num_vars + -7 * num_clauses + 4 * num_literals
num_vertices <= 2 * (num_literals + num_vars + -2 * num_clauses)
Step 5: MaxCut/SimpleGraph/i64 → SpinGlass/SimpleGraph/i64
num_interactions = num_edges
num_spins = num_vertices
Overall:
num_interactions unavailable: reduction step 2 (CircuitSAT -> Satisfiability) has no symbolic parameter transform
num_spins unavailable: reduction step 2 (CircuitSAT -> Satisfiability) has no symbolic parameter transform
Parameter transforms declare exact equalities, upper bounds, or unavailable relations. A discovered route does not imply the target is cheap to solve; inspect the constructed target on representative instances.
Create
pred create MIS --graph 0-1,1-2,2-3 -o problem.json
pred create MIS/SimpleGraph/i64 --graph 0-1,1-2,2-3 --weights 2,1,3,1 -o weighted.json
pred create --example MVC/SimpleGraph/i64 --to MIS/SimpleGraph/i64 -o source.json
pred create MIS --random --num-vertices 10 --edge-prob 0.3 --seed 42 -o random.json
Flags follow the schema field names in kebab-case: universe_size becomes --universe-size. Vertices use zero-based indices and --graph is a comma-separated edge list. --example loads a canonical model fixture, or with --to the source side of a documented reduction example (--example-side target for the other side). --random generates a graph instance; save the JSON so the instance can be reproduced.
Other input structures:
pred create SAT --num-vars 3 --clauses '1,2;-1,3' -o sat.json # signed one-based literals; ';' separates clauses
pred create QUBO --matrix '1,0.5;0.5,2' -o qubo.json # ';' separates rows
pred create X3C --universe-size 6 --subsets '0,1,2;3,4,5;0,3,4' -o x3c.json
pred create Factoring --target 6 --m 2 --n 2 -o factoring.json
Inspect and evaluate
pred inspect problem.json
pred evaluate problem.json --config '[true,false,true,false]'
pred create MIS --graph 0-1,1-2,2-3 | pred evaluate - --config '[true,false,true,false]'
inspect reports the resolved variant and sizes of a problem file or reduction bundle. evaluate scores one configuration: selecting vertices 0 and 2 returns Max(2), while selecting adjacent vertices returns Max(None). Configurations follow each problem's variable domains and are not always binary. - reads from stdin.
For a problem file, JSON inspection includes parameter_values, the model's actual named instance parameters. These are separate from the parameters list of parameter names.
Reduce
pred path MIS QUBO --json -o paths.json
python3 -c 'import json; print(json.dumps(json.load(open("paths.json"))["paths"][0]))' > path.json
pred reduce problem.json --via path.json -o reduced.json
pred extract reduced.json --config '[1,0,1,0]'
The bundle contains the source instance, the target instance, and the variant-level path; keep it whole to preserve solution recovery. --via replays one route extracted from the paths envelope, whose source variant must match the input. extract maps a target-space configuration back to the source.
Solve
pred solve problem.json
pred solve problem.json --solver brute-force
pred solve reduced.json --timeout 30 --json
| Solver | Behavior |
|---|---|
ilp | Executes the exact variant’s registered fixed ILP pipeline and recovers its source solution |
brute-force | Enumerates all configurations; for tiny instances and cross-checks |
customized | Exact structure-exploiting backends for selected models; see pred solve --help |
Default dispatch tries registered customized, ILP, then brute-force capabilities in that order. pred inspect lists the capabilities available for the exact variant. Solving a bundle solves its target and maps the result back; every successful solve returns a solution. A discovered path does not by itself provide a registered solver. Evaluate the returned solution on the original instance to verify its value.
JSON and pipes
pred create MIS --graph 0-1,1-2,2-3 | pred reduce - --via path.json | pred solve - --json
pred export-graph -o reduction_graph.json
Check the exit status before consuming a result, and enable set -o pipefail in scripts. Keep type and variant with each instance; an alias alone does not identify an exact endpoint. The site publishes reduction_graph.json and problem_schemas.json from the same registry; the local export-graph describes the installed version.
Shell completions
eval "$(pred completions bash)" # ~/.bashrc
eval "$(pred completions zsh)" # ~/.zshrc
pred completions fish | source # ~/.config/fish/config.fish
Without an argument, pred completions detects the current shell.