Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project Layout

A Fiducia project is one directory. The compiler is given that directory and reads these files from it:

datadiode/
    datadiode.fis     the system: one per project
    eth_outer.fi      the program of protection domain eth_outer
    dd.fi             the program of protection domain dd
    eth_inner.fi      the program of protection domain eth_inner
    fire.toml         read by fire, not by fic

The .fis

The directory holds exactly one .fis; it is the project. Its name is free, and a directory with none, or with two, is an error. Everything the system declares (the data layer, regions, protection domains, channels and the System composition) is in it.

The .fi files

Each protection domain p is implemented by p.fi, in the same directory as the .fis: the file name is the binding, and nothing inside either file names the other. The directory is read for .fi files, not searched below:

  • A protection domain with no p.fi is an error at its declaration in the .fis, and so is a protection domain declared twice.
  • A .fi that no protection domain names is a warning, and the file is never parsed.
  • A .fi in a subdirectory is not seen.

Imports

An import path is relative to the project directory, not to the .fi that writes it, so import "include/eth.h" as eth; reads datadiode/include/eth.h from any program in the project. The extension picks the reader: .c and .h are C, .pnk is Pancake.

Generated files

Compiling writes under the project directory, and nothing outside it unless -o says so:

PathWritten byHolds
include/gen/types.hfic, --check includedthe data layer as C: structs with _Static_assert layout checks, constants
include/gen/types.pnkthe same, when a program imports Pancakethe same constants for Pancake
include/gen/mem.hthe same, when a program imports Cthe memory routines of a PD’s runtime, with their contracts
build/--emit=c, fire buildthe generated C (build/gen/), the image and the UPPAAL model
<dir>.xta, <dir>.dotfic --emit=xta, --emit=dotthe UPPAAL model and the topology graph, named after the project directory <dir>

Both are generated on every run and are not to be edited or committed. fire clean removes build/ and include/gen/, and include/ if that leaves it empty; sources are never touched.

fire adds fire.toml beside the sources and hand-written query files spec/*.q for verification. Their contents, and the commands, are in the user manual.