NLA-lib Explorer

NLAlib.Ops.Tools.profileProgram_work

Library · theorem

Reported work is the canonical full-count work.

NLAlib.Ops.Tools.profileProgram_work {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) :
  (Ops.Tools.profileProgram p I R formats τ d m).work =
    Option.map (fun st ↦ R.work st.cost) (Ops.exec p I R formats τ d m)

Full source on GitHub

Import NLAlib.Ops.Tools.Program.