NLAlib.Ops.Routine.Meets.call
Library · theorem
Calling a routine. A routine that meets its specification is used by framing its tree at dimensions and buffer variables that evaluate to a call satisfying the hypotheses of the judgment; the frame lists the operands in the layout of the routine. The caller learns the footprint and the postcondition, and nothing of the tree.
NLAlib.Ops.Routine.Meets.call {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) {ρ : Ops.Env} {ds : List Ops.IExp}
{ops : List Ops.Operand} {d : List ℕ} {args : List (ℕ × ℕ)} {τ : Ops.Tape K} {m : Ops.Mem K}
{xs : List (List K)} (hd : Ops.IExp.evalList ρ.idx ds = some d)
(ha : Ops.Operand.evalList ρ ops = some (R.env (R.operands d args))) (hnd : d.length = R.nd)
(hlen : args.length = R.arity) (hl : m.Live args) (hsep : R.SeparatedAt d args)
(hr : R.readAt m d (R.operands d args) = some xs) (hpre : S.pre d (τ.shift m.pos) xs)
(hroom : R.RoomAt m d (R.operands d args)) :
Ops.Writes Ops.Mode.total I τ (Ops.Stmt.frame ds ops R.body) ρ (R.footprint d (R.operands d args))
(fun m' ↦
R.Advances d m.pos m'.pos ∧
∃ ys, R.reportAt m' d (R.operands d args) = some ys ∧ S.post d (τ.shift m.pos) xs ys)
mImport NLAlib.Ops.Routine.