NLAlib.Ops.Routine.Meets.close
Library · theorem
A routine that meets its specification, run as a program. From a memory in which the supplied buffers are live, hold the blocks read and have room for the blocks written, the program of the routine terminates, changes only the written buffers, advances the tape as declared and leaves reported blocks satisfying the postcondition.
NLAlib.Ops.Routine.Meets.close {Op Tst K : Type} {R : Ops.Routine Op Tst} {I : Ops.Interp Op Tst K}
{S : Ops.Routine.Spec K} (h : R.Meets I S) {r b : ℕ} (hshape : R.nd = r ∧ R.ports.length = b)
(hfit : R.bindsFit b = true) (hflat : R.flat = true) (hcontig : R.contiguous = true)
(d : Fin r → ℕ) (τ : Ops.Tape K) (m : Ops.Mem K) (xs : List (List K)) (hl : m.Live (Ops.slots b))
(hr : m.readBlocks (R.readArgs (Ops.slots b)) (R.readLens (List.ofFn d)) = some xs)
(hpre : S.pre (List.ofFn d) (τ.shift m.pos) xs)
(hroom : m.Room (R.writeArgs (Ops.slots b)) (R.writeLens (List.ofFn d))) :
Ops.Writes Ops.Mode.total I τ (R.close r b).body (Ops.Program.environment d)
(Ops.Fp.blocks (R.writeArgs (Ops.slots b)) (R.writeLens (List.ofFn d)))
(fun m' ↦
R.Advances (List.ofFn d) m.pos m'.pos ∧
∃ ys,
m'.readBlocks (R.outArgs (Ops.slots b)) (R.outLens (List.ofFn d)) = some ys ∧
S.post (List.ofFn d) (τ.shift m.pos) xs ys)
mImport NLAlib.Ops.Routine.