Debug Output
Dbg ::= 'dbg' '(' (DbgArg (',' DbgArg)*)? ')' ';'
DbgArg ::= text_literal | Expr
dbg prints its arguments in order, then a newline. A text literal is
printable ASCII between double quotes, with the escapes \\, \", \n
and \t. Any other argument is an expression of an integer type, or a
bool, which prints as true or false.
evt tally: {
dbg("round ", rounds);
rounds = io.tally(rounds);
}
dbg is a statement, so it is valid only in an event body: not in a
proc body, a guard or an expression. It is for debugging only. The model
leaves it out, so no argument may call a function: removing the dbg must
not change what the event does.
Put a dbg in an event that does other work, as above. An event that only
prints does nothing in the model, and fic warns about it in every mode,
--check included.
Each line starts with the name of the protection domain that printed it,
then : , so dbg("round ", rounds); in ping prints ping: round 3.
An integer prints in decimal at its full width, a signed one with its
sign: -1 prints -1, and every uint64 prints in full; a bool
prints true or false. fic’s runtime, filib, which every protection
domain links, writes each byte as it comes, so lines from protection
domains running at once can interleave on the shared console.
All output is the .fi’s. By convention, imported C and Pancake use
neither Microkit nor seL4 directly: no microkit.h or sel4/… include,
no microkit_… or seL4_… call, no @microkit_… FFI, in the import or
in the C linked beside it (a header’s source, a Pancake file’s FFI shims).
A channel operation or a print there would be invisible to the model, so
what fire verify proves would not be about the system that runs. fic
does not check this yet.