CFDL

Specification

The normative definition of CFDL: the grammar, the expression environment, the compiler's obligations, the diagnostic register, the pack interface, and the two JSON schemas the toolchain reads and writes.

These pages exist so that a second implementation could be written from them, and so that anything consuming CFDL's output has a contract to hold it to. They describe behaviour that most people modelling a deal never need to think about.

If you are building a model, you want Reference instead. It covers the same ground at the altitude of the work — what a thing does, when you would reach for it, and how to get a particular result.

What is here

Language specificationTypes, declarations, evaluation, and the rules a compiler must enforce
GrammarThe EBNF
Expression environmentEvery binding and builtin available to an expression
Compiler specificationDeterminism, canonical ordering, and stable identity
DiagnosticsThe complete code register, with severities
Pack interfaceHow a domain pack extends the language
IR schemaThe compiled intermediate representation
Results schemaThe run output document

The two JSON schemas are also served directly, for validation in your own tooling: IR · Results · Grammar.

Stability

The schemas carry their own version field, and a run records the engine version that produced it. Where a specification page and the engine disagree, the engine is the defect — these documents are normative.