NLA-lib Explorer

NLAlib.Ops.exec_of_evalCounted

Library · theorem

Successful raw accounting of a well-typed tree gives the canonical resource result.

NLAlib.Ops.exec_of_evalCounted {Op Tst K : Type} {r b : ℕ} {p : Ops.Program Op Tst r b}
  {I : Ops.Interp Op Tst K} {R : Ops.ResourceModel Op Tst} {formats : Fin b → Ops.StorageFormat}
  {τ : Ops.Tape K} {d : Fin r → ℕ} {m : Ops.Mem K} {st : Ops.St (Op ⊕ Ops.Bookkeeping) Tst K}
  (ht : p.wellTyped R formats = true) (hlen : List.length m.store = b)
  (h :
    Ops.evalCounted I.instrument (Ops.instrumentWorkspace R.workspace) τ p.body.instrument
        (Ops.Program.environment d) (Ops.St.init m) =
      some st) :
  Ops.exec p I R formats τ d m = some (st.reserveQueries R)

Full source on GitHub

Import NLAlib.Ops.Exec.