Granular regions: EasyCrypt's glob M as a lens region #
EasyCrypt's memory is a set of whole variables, and glob M is the set of variables M touches.
Here the grains of the variable granularity (variableGranularity) are the variables' slots, and
the granular cover of a module's footprint (Footprint.IsSubGranular.granularCover) is its
glob: the slots it touches, whole. A cover is a lens region
(GranularFootprint.footprint_fromLens),
so a run that stays out of it leaves its content unchanged
(ProgramDenotation.preserves_touched_of_fromLens) — which footprint-disjointness alone does not
give (CounterExamples/FramingNeedsReset.lean). An EasyCrypt-like module has one
(Footprint.FinitelySupported.isSubGranular), and a restriction against a variable carries over
to the cover (Footprint.IsSubGranular.granularCover_le_compl). Evaluation:
notes/SHA3/GlobGranularity.md.
A run confined to R keeps the content of a lens-derived region Q outside R.
A sub-granular footprint outside a grain has its whole granular cover outside it.
EasyCrypt's memory: the grains are the slots of the variables (of nontrivial types).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Finitely many variables cover a sub-granular footprint.
EasyCrypt's glob of a footprint: the slots of the variables it touches, whole (its
granular cover under variableGranularity); ⊤ for a footprint that no finitely many variables
cover (conservative: nothing is outside it). A restriction {-Y} between abstract modules is
FVP.fvP X ≤ (FVP.fvP Y).glob ᶜ (exception E7).
Equations
- F.glob = if h : F.IsSubGranular then h.granularCover.footprint else ⊤
Instances For
A footprint lies within its glob.
Below a footprint, below its glob.
Restrictions between abstract modules are symmetric (EasyCrypt's {-D}: no common
variable): if F (finitely supported) stays outside glob G, then G stays outside
glob F.
The glob of a finitely supported footprint is a lens region.
A finitely supported footprint outside a variable has its glob outside it.
The one-sided frame: a run confined to R, which stays out of the glob of a finitely
supported F, keeps F's content (EC's call{1} of an abstract procedure, against
={glob A}).
Calls with a frame #
What every outcome of the left marginal satisfies, every coupled pair satisfies on the left.
A procedure confined to R leaves a variable X outside R alone.
Calls of the same procedure on both sides, with a frame (EC's call (_: true) where the
postcondition also uses a variable the callee cannot touch): prhlStmt_seq_call_refl, the
postcondition needed only for globals that keep the value of X, a variable outside the callee's
footprint.