The eager abstract-call rule (EasyCrypt's eager proc/eager call) #
The instantiation layer of the eager calculus: for a procedure-with-holes A
and two hole-instantiations, the whole procedure is eager for a block S
provided each hole is (hhole) and A's own operations swap with the lifted
block (SwapLoc). This is the calculus-level rule whose soundness is a
once-and-for-all induction over the adversary's syntax — the analogue of
EasyCrypt's trusted eager proc rule (justified by induction in the
metatheory); client derivations only ever apply it.
SwapLoc SL A— locality: every operation ofAoutside the holes swaps with the lifted blockSL(self-transferBy). ForSL := convertLthis is definitionally the RO development'sLoc, so the existing footprint discharge (confinedP_loc) applies unchanged.eager_body— the induction overStmtWithHoles, threading theeagerRrules (eagerR_pure/eagerR_seq/eagerR_while) over the statement structure.procWrap_block_in/procWrap_block_out— the block slides through the procedure wrapper (zoom globalL Sinside ↔Soutside), generalizing theconvert-specific wrapper lemmas.eager_call— the assembled rule at the level ofprocedureDenotation.
Locality #
Swap-locality: every operation of A outside the holes swaps with the
block SL (self-transferBy). For a hole, this is the surrounding read
(get p) and write (set x) — the hole call itself is not required to
swap (it is handled by the per-hole hypothesis).
Equations
- One or more equations did not get rendered due to their size.
- GaudisCrypt.SwapLoc SL GaudisCrypt.StmtWithHoles.skip = True
- GaudisCrypt.SwapLoc SL (s1.seq s2) = (GaudisCrypt.SwapLoc SL s1 ∧ GaudisCrypt.SwapLoc SL s2)
- GaudisCrypt.SwapLoc SL (GaudisCrypt.StmtWithHoles.while c t) = (SL.transferBy (GaudisCrypt.ProgramDenotation.get c) (GaudisCrypt.ProgramDenotation.get c) ∧ GaudisCrypt.SwapLoc SL t)
Instances For
A self-transferBy fact is a (diagonal) self-eager judgment.
The body induction (EC's eager proc) #
Eager body induction: an arbitrary syntactic body A is eager for the
block SL across two hole-instantiations, given swap-locality of its own
operations and a per-hole eager hypothesis. The eagerR rules are threaded
over the statement structure.
The block slides through the procedure wrapper #
The lifted block slides in: S before the wrapper = zoom globalL S
before the body, inside the wrapper. Structural.
ProgramDenotation.get rv reads rv and threads the state through unchanged.
From the return-value swap: reading rv commutes with the lifted block
(clean form).
Reading rv is invariant under the block changing the global component.
The block slides out: S after the wrapper = the lifted block after the
body, inside the wrapper. Consumes hret (the return value swaps with the
block, so reading it commutes with the block changing the globals).
The assembled rule #
Procedure wrapper for the eager judgment: a body-level eager judgment
(block zoom globalL S) lifts to a state-level eager judgment (block S)
of the whole procedure denotations, provided the return value swaps with
the lifted block.
EC's eager call on an abstract procedure (equality invariants): the
whole procedure is eager for S across two hole-instantiations, given
swap-locality of its own operations, a swapping return read, and the
per-hole eager hypothesis.
EC's eager call: a (closed) call site is eager, given a proven
procedure-level eager specification and swap-stability of the surrounding
argument read and result write.
EC's eager call with an invariant: the equality-level call rule
strengthened by a framing self-coupling of the lazy call site.
EC's eager proc I on an abstract procedure: the equality-level
abstract-call rule strengthened to an invariant P, given a framing
self-coupling of the lazy composite under P — the packaged form of EC's
per-oracle fl ~ fl / s ~ s : I ==> I side conditions (which discharge it
via the standard relational body machinery).