EasyCrypt's one-sided call of a lossless procedure: call{1} H, call{2} H #
prhlStmt_seq_call_left_lossless -- `x <- M(e)` at the end of the left side only
prhlStmt_seq_call_right_lossless -- the mirror
EC's call{1} (H : islossless M) drops a call at the end of one side: the call terminates (H),
and the postcondition must hold whatever the call returns and does to M's globals — EC's
forall r (gM : glob M), Q. Here what the postcondition may rely on staying put is a frame
Fr g g' between the globals before and after the call, which every run of M keeps:
- a lens
XoutsideM's footprint keeps its value (Module.Proc.frame_lens); - the
globof a finitely supportedGthatMstays out of keeps its content (Module.Proc.frame_glob: EC's={glob A}against an abstractA); - frames combine (
Module.Proc.frame_and), andTrueis one (Module.Proc.frame_true).
The tactic:
equiv_call{1} H -- EC's `call{1} H`, no frame
equiv_call{1} H / x₁, …, glob A -- with the frame `x₁`, …, `glob A`
H : islossless M may have holes (_, EC's call{1} (S_ll RO _)): they are goals after the
judgment's. The frame's side conditions — lenses outside M's footprint, M outside glob A,
A finitely supported — are shown by fp_disjoint and fp_finite.
A frame against an arbitrary footprint would not be sound
(CounterExamples/FramingNeedsReset.lean).
Fr is a frame of M: every run of M from globals g ends in globals g' with
Fr g g'.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A lens outside M's footprint is a frame of M.
The glob of a finitely supported G that M stays out of is a frame of M.
A region of variables (X.footprint, X their Lens.pair: EC's glob C of a concrete
module) outside M is a frame of M.
The frame x₁, …, glob A as a proof of M.Frame _: a lens, or the glob of a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
EC's call{i} H: see the module docstring.
Equations
- One or more equations did not get rendered due to their size.