This page is a usability-focused digest of the compiler spec for model authors and SDK integrators.
Use this page for
- Understanding compiler stage responsibilities
- Knowing deterministic guarantees and ordering rules
- Finding the validation/diagnostic sections quickly
Compiler flow at a glance
- Load and normalize files
- Lex and parse with spans
- Resolve imports and symbols
- Validate structure/types/schedules
- Lower normalized AST into deterministic IR
- Emit canonical IR JSON
Determinism guarantees
- Same sources + pack version + compiler version must emit deterministic IR.
- Arrays in IR are canonically ordered (entities/contracts/streams/etc).
- Deterministic IDs are derived from stable keys.
Related reference
- Diagnostics — the error code guide
- IR schema — canonical ordering and shape
- Pack interface — lowering rules
- Language spec — validation rules