Expand description
The plan compiler (spec 002, 3.9).
Phases run in order and stop at the first refusal: (a) parse and bound, (b) structure, (c) resolve operators, calibrations and sources, (d) graph, (e) types, (e2) grades (plan 3 only, spec 032 3.9), (f) bind backends, fallbacks and calibration artifacts, (g) budget, (h) policy, (i) emit. Within a phase, steps are judged in declaration order, then policy items in declaration order.
Structs§
- Compiled
- A plan with everything evaluation needs.
- Refusal
- A typed compilation refusal naming its subject and requirement.
- Shortfall
Enums§
- Category
- Refusal categories (spec 002, 3.9.5).
- Load
Error - Why
Compiled::load_checkedrefused a plan (spec 004, 3.3.2). - Shortfall
Reason - Why one candidate backend cannot serve a step.
Constants§
- COMPILER
- The compiler identity recorded in every plan.
Functions§
- compile
- Compile a definition against supplied backend descriptors and calibration
artifacts, with no execution policy (
execution: none). Pure: no I/O, no clock. - compile_
bytes - Parse a definition document and compile it.
- compile_
with - Compile with a runtime execution policy (spec 003, 3.2.3). The policy is
validated after every step is bound and embedded in the plan, so it is
part of the
PlanId. - compile_
with_ sources - Compile with context source descriptors beside backend descriptors and calibrations (spec 032, 3.3.4), and optionally an execution policy. A version 1 definition ignores supplied sources, as an unbound backend descriptor changes nothing.
- compile_
with_ templates - Compile generation with supplied prompt documents, alongside ordinary dependencies.