Expand description
The front end: a project parsed (parse), resolved (resolve) and
typed (front_end), printing the progress lines. Contracts
(contracts), information flow and WF2 run only for the targets that
need them.
The .fis is the project. parse_sources finds it (the one read of
the directory), parses it, binds each protection domain to its .fi
(<name>.fi beside the .fis), and parses those in PD order; a .fi
no PD names is never opened. The parser decides nothing about an
imported file: its kind follows from its extension, which
check_imports rejects or accepts as the program is bound.
Functions§
- check_
imports - Check a program’s imports are of files fic can read, by their
extension (
ForeignKind::of): the one place that rejects one.textis the program’s source, for the diagnostics. - contracts
- Every called foreign function’s contract, lifted from its notation, with the call sites checked against them.
- data_
layer - Build
ast’s data layer, printing its warnings: the environment holding it (rast::build_data) and the same typed (tast::build_data), what the system and the programs are built on. - front_
end - Run the passes in order on the data layer:
resolve, typing (every program on the typed system), then the process bodies’ shape checks. - parse
- Parse a Fiducia directory and load what its programs import:
parse_sources, itsdata_layerbuilt and its headers written, then the imports read, withincludesafter the project’s own include path. Returns the AST, the imports and the data layer. - parse_
sources - Parse a project: the
.fis, then each protection domain’s.fi, in PD order, each file read once. - resolve
- Build the resolved AST on the data layer,
envandtenvtyped: the system (resolved and typed), the programs, then the vaddrs, each stage’s faults reported before the next. Returns it and the system typed, for typing the programs.