Skip to main content
CFDL

Specification

The normative definition of CFDL: the grammar, the expression environment, the compiler's obligations, the diagnostic register, the pack interface, and the three 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 behavior that most people modeling 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 results document

The three JSON schemas are also served directly, for validation in your own tooling: IR · Results · Run configuration, which the run-config reference restates · 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.