Skip to main content

Module joint_solver

Module joint_solver 

Source
Expand description

Joint constraint solver — skeleton: deterministic component decomposition, pinned-width envelope, and typed fuel accounting.

Decomposition, width bounding, and strategy selection are cold-path setup over the constraint graph. Solve execution (feasibility propagation, exact top-two/max-marginal dynamic programming, branch-and-bound) is device-resident and lands with the solve slice; nothing in this module emits solver outputs, so no host path here can become a solving fallback.

Structs§

Component
One connected component of the constraint graph, in canonical form: variables ascending, edges normalized (low, high) and sorted, plus a deterministic elimination-order width bound.
ConstraintGraph
Undirected constraint graph over entity variables. Self-loops are meaningless for binary constraints and rejected at construction; unconnected variables still form singleton components so no variable can silently drop out of the solve.
FuelMeter
Fuel accounting for node expansions. The production counter is device-resident and read back once post-solve as bounded metadata; this meter is the typed refusal seam both sides share. Exhaustion saturates: once refused, every further charge refuses with the same literals, so no caller can slip work past the budget by retrying.

Enums§

Feasibility
Saturating feasibility count for a component: none, exactly one, or many satisfying assignments. Deliberately separate from score ambiguity — a component can be uniquely feasible with an ambiguous maximum, or plurally feasible with a unique maximum.
SolveStrategy
Solve strategy for one component, selected by the width bound against the pinned envelope: exact dynamic programming inside the envelope, exact branch-and-bound (within fuel) outside it.
SolverError
Typed solver errors. Beyond fuel the solve refuses with the exact spent/limit literals — no partial emission, no approximation, no host fallback.

Constants§

SOLVER_ABI_IDENTITY
Identity of the solver ABI and objective this module implements: deterministic component decomposition, exact top-two/max-marginal DP inside the pinned width envelope, exact branch-and-bound within device fuel, typed exhaustion beyond it. Carrier schemas and calibration artifacts bind to this identity; it changes whenever the ABI or objective changes.