Backward steps through a frame and an allocation
Library · Source module
Backward steps through a frame and an allocation
A program calls a fixed implementation through a frame: its dimensions and buffer views are evaluated in the caller's environment, and the body runs in the frame environment. A backward step proved for the body in its own frame environment is a backward step of the framed call, provided the views are live in every memory of the precondition. This is the backward-step form of NLAlib.Ops.Writes.in_frame; without it a composed proof unfolds every framed body by hand.
Scratch allocation is the same: the body runs on the caller's store extended by fresh handles after its length L, and the allocation removes them at the end. A backward step of the body, for each L, from the memories obtained by allocating after a precondition memory of length L, is a backward step of the allocation, provided the postcondition only reads below the caller's handles (it survives replacing the handles from L on).
Main results
* NLAlib.Ops.BackwardStep.in_frame: a backward step of a body is one of its framed call. * NLAlib.Ops.BackwardStep.allocs: a backward step of a body is one of its scratch allocation.