Generic package Verada.Footprints
Verada predefined library: footprints, the cells a proof enclave's object owns, as a set of the enclave's access values. An enclave type's full view holds its footprint in a component of type Cells, which its operations keep up to date and its contracts state; the heap engine proves that each operation reads and writes only cells in its objects' footprints, so that what it does to one object leaves every other unchanged.
The prover sees a set as an array from locations to Booleans and these functions as its operations; for all P of S => ... states something of every cell of S (closure, say: every pointer a footprint's cells hold is null or in the footprint). In the program a set takes no storage: the functions are for contracts, assertions and the assignments that keep footprints, not for the program's decisions.
generic
type Location is private;Cells
type Cells is private
with Iterable => (First => First, Next => Next, Has_Element => Contains, Element => Element);Empty
function Empty return Cells;no cell
Contains
function Contains (S : Cells; P : Location) return Boolean;Add
function Add (S : Cells; P : Location) return Cells;S with P
Remove
function Remove (S : Cells; P : Location) return Cells;S without P
Union
function Union (Left, Right : Cells) return Cells;the cells of Left or Right
function "<=" (Left, Right : Cells) return Boolean;every cell of Left is in Right
Disjoint
function Disjoint (Left, Right : Cells) return Boolean;no cell is in both
First
function First (S : Cells) return Location;iteration over the cells (by the cells themselves)
Next
function Next (S : Cells; P : Location) return Location;Element
function Element (S : Cells; P : Location) return Location;