Expand description
Pancake contracts: pancake2viper’s annotation IR, lifted to the contract IR.
The pancake2viper crate parses each /@ … @/ annotation — the same
parser the verifier runs, at the revision Cargo.toml and
nix/pancake2viper.nix share. This module is foreign::c::acsl’s
counterpart for Viper: the ir::Expr of each requires/ensures
becomes a Term of crate::foreign::contract.
The subset matches C’s: integer and boolean literals, parameters,
retval, old(…), + - * / %, the signed comparisons (<+ and friends
are unsigned), ==/!=, ! && || and c ? a : b. Permissions,
quantifiers, the heap, implication, calls, bit operators and shifts are
rejected by name. Any other annotation (trusted, an invariant) is the
verifier’s and is not read.
Functions§
- from_
foreign - The contract of a Pancake function from its
requires/ensuresannotations; any other annotation is the verifier’s and is not read.constsare the.fisconstants a clause may name besides the parameters.