Skip to content

The Specification

This is language 1.0-rc.4, with Cost Model 0.

The Spec states every rule of the language once, in its final form. Chapter 0 says how to read it. The ADRs hold the reasons, and the tour is an informative introduction.

  1. Introduction and conventions
  2. Lexical structure
  3. Grammar
  4. Values
  5. Expressions and statements
  6. Handlers, messages and scheduling
  7. Errors and limits
  8. Libraries and the Standard Library, with the stdlib Libraries’ source in stdlib/
  9. The Abstract Machine and the Cost Model
  10. Embedding, with the interface declarations talk.go and talk.ts
  11. Save and restore
  12. The Trace and conformance, with the display form
  13. Sessions and tooling, including Session observation and declaration documentation

Recovery Offers and two-phase catch search are specified in chapter 4, with the machine and costs in chapter 8, saved dispatch state in chapter 10 and choice/entry records in chapter 11. ADR 0060 records the decision.

Store watch and unwatch are specified in chapter 7, with the Grant release hook and router in chapter 9, checkpoints in chapter 10, conformance scenarios in chapter 11 and Session driving in chapter 12. ADR 0061 records the design. Both Cores and Session Hosts implement the contract, and its Operation and Error Data Files are active.

The metering contract specifies synchronous chunks and queued asynchronous Fuel authorization, with SQLite step charging. ADR 0082 records the choices; the specification handoff names staged executable catalogues and implementation acceptance.

The object element contract specifies computed-name and positional Host Object references and counting. ADR 0100 records the design. The handoff tracks each Core’s support.

Before editing grammar, instructions or catalogues, use the change-impact guide to identify generators, Core/tooling coverage requirements and delivery boundaries.

File Holds Shown in
version.toml The language version 0
grammar.ebnf The grammar’s productions 1, 2
grammar.toml Reserved Words, contextual keywords, the FOLLOW set, precedence, modifiers, two-token decisions and syntax error codes 2
diagnostics.toml The load-time diagnostic codes 2
envelope.toml Fields envelope messages, Report tags, ordered fields, item kinds and negotiated features Binary Request and Pump
unicode.toml The Unicode version and the hash of each UCD file used 1
units.toml The Unit Catalogue 3
errors.toml The error-code catalogue, with template messages 6
limits.toml The limits, the default limit profile and the conformance minimums 6
machine.toml The Abstract Machine’s instruction set 8
costs.toml The Cost Model 8
host-errors.toml The Host error catalogue 9
save-format.toml The save format: its header, sections, records and unions 10
stdlib.toml The Built-ins, the stdlib Libraries’ exports, the text encodings bytes decodes, and the Standard Capabilities’ Operations 7
corpus.toml The Trace’s records and their keys, and the keys of case.toml 11
trace.ebnf The grammars of the display form, the Trace’s lines, Value Encoding case files and Session Transcripts 11, 12
session.toml The Session Commands 12

Each has a schema in data/schema/, except grammar.ebnf, which the generator checks against grammar.toml, and trace.ebnf, whose productions it checks are each defined once and used. Run bun install, then bun run spec:gen after editing a Data File or GLOSSARY.md, bun run grammar:check after changing the grammar, and bun run machine:check after changing the lowering or machine.toml.