Static-byte planning runtime #
Nominal binary formats of at most eight bits use cost estimates, table candidates, profile selection, and dispatch specialized to static-byte storage.
Correctness theorems live in Plan.Proof, while capability construction lives in
Plan.Construction. This runtime layer can therefore be reused without importing either module.
Cost estimate for evaluating the exact baseline directly.
This is the mandatory proved implementation in table-backed plans. The constants are calibration inputs, not semantic facts; changing them can alter a plan without changing any refinement theorem.
Instances For
Estimate a dense byte-result table from the format width and operation arity.
Table construction evaluates a certified kernel once per entry. residentBytes counts the
result bytes in the cached ByteArray; it excludes object and allocator overhead.
Instances For
Certify a binary kernel with the table cost estimate.
Instances For
Certified binary table candidate paired with the executable exact baseline.
Instances For
Certify a unary kernel with the table cost estimate.
Instances For
Certified unary table candidate paired with the executable exact baseline.
Instances For
Certify a ternary kernel with the table cost estimate.
Instances For
Certified ternary table candidate paired with a first-order executable exact baseline.
Keeping the baseline as a named proved kernel matters for formats whose balanced policy rejects a large FMA table: public execution can then specialize to that kernel without calling the generic family specification through a boxed dictionary.
Instances For
Whether the shared planner selects the exhaustive table over the exact baseline.
Static-byte portfolios contain exactly one optional table candidate. Repeating the selector's
single comparison as a Bool lets a monomorphic operation branch between two named first-order
kernels without projecting an executable closure from Certified. The cost calculation remains
identical to Backend.selectCertified, so planning reports and execution use the same choice.
Instances For
Certified table choices for the three built-in planning profiles.
Closed nominal formats provide these three bits once per operation. Their equality fields prove that the literals are exactly the result of the shared cost model. The compiler can then reduce a built-in profile to a direct kernel while a custom profile retains the general runtime comparison.
- latency : Bool
Whether the latency profile selects the table.
- balanced : Bool
Whether the balanced profile selects the table.
- throughput : Bool
Whether the throughput profile selects the table.
The stored latency choice agrees with the cost model.
The stored balanced choice agrees with the cost model.
- throughput_eq : self.throughput = tablePreferred format ExecFloat.Backend.Policy.throughput name operation
The stored throughput choice agrees with the cost model.
Instances For
The latency profile rejects a table accepted by balanced and throughput planning.
Instances For
Among the built-in profiles, only throughput selects this table.
Instances For
Choose a table from a statically recognizable profile or evaluate an application-defined policy.
Instances For
Execute the supplied binary table kernel or baseline according to the planning profile.
Instances For
Execute the supplied unary table kernel or baseline according to the planning profile.
Instances For
Execute the supplied ternary table kernel or baseline according to the planning profile.