These documents are the language. The compiler and the reference interpreter share no code; what they share is this specification, the conformance corpus, and the protocol they are compared through. When the two disagree about a program, the specification is what gets read, and sometimes amended.
Every document carries clause anchors in brackets, spelled like
[mem.region.create.3]. A diagnostic cites one, a trap cites one,
a corpus program declares which ones it conforms to, and the anchor index is
checked against the prose so a citation cannot point at a clause that was
renamed. Files are served as plain text.
The documents
- 01. Surface Grammar (36 KiB)
- Lexing, the mode stack that lets strings nest inside strings, the
expression grammar and its precedence tiers, statement and item forms, and
the ambiguity rulings. Status: normative,
grammar/1, declared at v0.1.0 and additive-only until v0.2. Anchors[gram.*]. - 02. Memory Model (30 KiB)
- Regions, ownership tiers, moves, freezing, the shared and handle edges,
provenance, and the closed list of rows that are undefined behavior with
the optimization each one licenses. The interpreter implements this
document as a dynamic machine; the compiler implements a static
approximation of it. Anchors
[mem.*]. - 03. Concurrency (20 KiB)
- Structured tasks, supervised procs, channels with region transfer,
select, the memory model's happens-before rules, and the deterministic
schedule a seed selects. Written in the shape of the Go memory model
document, with the advice in front of the formalism. Anchors
[conc.*]. - 04. ABI (4.7 KiB)
- Layout, calling convention, and the foreign boundary, differentially
fuzzed against platform C compilers. Anchors
[abi.*]. - 05. Conformance (7.7 KiB)
- What makes the rest of it testable: clause anchors, test tagging, the
closed trap vocabulary, and coverage reporting. The interpreter reads only
the specification and the corpus, and this document is part of that sealed
interface. Anchors
[conf.*]. - 06. Differential Protocol (8 KiB)
- The two-implementation contract, and the only shared artifact between
the tracks. It defines the observation record: the phase reached, the
verdict, the diagnostics as code and span with no message, and the output
digest. Diagnostic wording is deliberately excluded, because wording is a
per-implementation concern and comparing it would manufacture
disagreements. The playground can show you a record for any program you
run. Anchors
[proto.*]. - 07. Schedule Points (10 KiB)
- Where a schedule can make a decision, and the numbering a replayable
counterexample uses. Normative for shape and vocabulary, and append-only
from here. Anchors
[sched.*].
Extracted artifacts
- grammar.ebnf (9 KiB)
- The grammar, extracted from document 01 by a command and checked in CI to be in sync with the prose. The book's grammar appendix and the editor highlighting both come from this file, so there is one lineage rather than three transcriptions.
- anchors.json (13 KiB)
- The clause-anchor index: every stable anchor the documents define. Both implementations validate their citations against it.
- README.md
- The directory's own note on which sprint authored what.
Reading it against a program
The conformance corpus is the specification's working end. Each program states its own expected outcome in a header directive and lists the clauses it conforms to, and CI in the compiler repository checks the claim on both implementations. The playground loads twenty-odd of those programs with their headers intact, which is the shortest path from a clause to a program that exercises it.