Introduction
This is the reference for Fiducia, the source language consumed by the
fic compiler. A Fiducia source tree
describes a seL4 Microkit system: its
memory regions, protection domains, channels, the per-PD program logic, and
the communication / computation events those programs orchestrate.
Fiducia has two layers. The orchestration layer is written in Fiducia
itself: it says which channel events occur in a protection domain and in what
order, and fic generates the event loop and every Microkit call from it.
The computation layer is foreign code (C or Pancake) that the
orchestration calls from computation events; it holds the data flow.
Orchestration communicates; foreign functions compute. The two meet at a
narrow boundary that the compiler checks and the verifier reads.
The reference is organised after the Rust Reference: each chapter pairs a formal grammar production with the prose semantics that surround it, then expands per syntactic feature with focused subsections and short examples. Where the surface syntax is still in flight, the chapter calls out the incomplete forms with a π§ marker so the reference stays honest about what the parser actually accepts today.
Source surfaces
A Fiducia project is one directory holding the files the compiler reads together:
- System description (
.fis) β the static topology: the data layer (structandconstitems), memory regions, protection domains, channels, the system composition. One per project; it is the project. - Program implementations (
.fi) β per-PD orchestration: imports of foreign C / Pancake files, memory mappings, program variable declarations,evtdeclarations, andprocdefinitions. One per protection domain. - Foreign implementations (
.c,.h,.pnk) β the code a.fiimports. Not Fiducia source, but its signatures and contracts are read.
The .fis and the .fi files are linked by name. Each protection domain
p declared in the .fis is implemented by p.fi beside it: a PD without
that file is an error at its declaration, and so is a PD declared twice; a
.fi that no PD names is a warning and is never read. Within a program, a
Mapping refers to a MemoryRegion declared in the .fis; a channel
reference in a process expression resolves against the .fis channel
declarations; a computation event referenced by name from a process is
declared in the same .fi with evt. The Project
Layout chapter gives the full rules.
What the compiler does with a project
fic reads the sources, resolves every name, types the result and runs the
checks, then lowers each protection domainβs orchestration once into a
control-flow graph that every backend reads. From that graph it produces:
- a bootable Microkit image: generated C per protection domain, built with the foreign code and assembled with the generated system description; and
- a system model for UPPAAL, in which each protection domain is one template and each foreign functionβs contract stands for its body, so that queries about the whole system (deadlock freedom, ordering, reachability) can be model-checked.
Parsing, name resolution, typing, tail recursion and entry-point binding
run for every output; fic --check runs every check. Running the model checker
and the code verifiers, and building and launching the image, are covered by
the manual; this reference
covers the language those tools read.
π§ Type checking and well-formedness checking are not yet complete: the chapters on well-formedness and information flow state exactly what is checked today.
How this reference is organised
The chapters follow the project, outside in.
Foundations
- Notation β the BNF dialect the productions use.
- Lexical Structure and Types β tokens, and the types shared by both source surfaces.
System (.fis) items
- Project Layout β which files make a project and how a PD finds its program.
- Data Layer, Memory
Regions, Protection
Domains and
Channels β what the
.fisdeclares.
Program (.fi) items
- Imports and Mappings, Boot
Initialisation and Variable
Declarations β what a
.fibrings in and declares before its events and processes. - Event Declarations β
evtdeclarations for computation events, plus the inline channel and IRQ events used on the left of a process prefix. - Debug Output β
dbg,ficβs own output. - Process Definitions β
procdefinitions for CSP-style processes composed from events, guards, choices, and sequential composition.
Expressions and semantics
- Expressions β the expression language available to carriers, guards, and send payloads.
- Entry Points β how the platform reaches a
process, through
@bind.
Foreign functions
- Foreign Functions β what an import exposes and how calls are checked.
- Contracts β the
requires/ensuressubsetficreads, and what the model assumes of it. - Generated Headers β the layout
ficgenerates for the data layer, shared with the foreign code.
Checks
- Well-Formedness β the rules a system must satisfy before it is accepted, with the messages for each.
- Information Flow β the
High/Lowlattice over regions and mappings.
Where a chapter does not settle a point, the inline /// doc comments in
src/parser/ and src/tast/ are the reference for it.
Conventions
- Production blocks use the BNF dialect documented in Notation β the same conventions as the Rust Reference.
- Examples render in
textblocks; Fiducia is not Rust, andtextkeeps mdBookβs syntax-highlight neutral. - Keywords and identifiers are written with backticks in prose (
evt,eth.send_frame) and as bare tokens inside grammar productions. - An em-dash (β) separates parenthetical asides, matching the existing module-doc style.
- Cross-references to the parser source use repository-relative paths
(
src/parser/event.rs); cross-references to other chapters use plain Markdown links (e.g. Event Declarations).