Skip to main content

Module pnk

Module pnk 

Source
Expand description

Pancake: the reader (pnk.rs, a scanner running no external tool) and the lifting of its /@ … @/ annotations through the pancake2viper crate (annotation.rs). pancake2viper proves the contracts against the code; the model assumes them (see demo/pingpongpan/README.md).

Contract extraction is easy for Pancake specifically: an exported function takes and returns only words and can’t see the generated C’s state, so its whole effect on the model is its return value — exactly the ensures on retval.

Modules§

annotation
Pancake contracts: pancake2viper’s annotation IR, lifted to the contract IR.

Constants§

ENTRY_POINTS
Microkit entry points the generated C defines: a Pancake export of the same name would be a second global definition in the PD’s ELF.
MAX_EXPORT_ARGS
The most parameters CakeML lets an exported function take from C.

Functions§

has_pancake_imports
true when some PD imports a .pnk file.
pancake_imports
The .pnk imports of a program, in import order: (alias, path).