NLA-lib Explorer

Tools: the runnable evaluator and the cost profiler

Library · Source module

Tools: the runnable evaluator and the cost profiler

Diagnostic and compute support. Raw entry point: NLAlib.Ops.Tools.profile I W τ s ρ m, for any tree s : Stmt Op Tst (written by hand, produced by a builder, or linked by Stmt.link), any interpretation I, workspace W, tape τ, environment ρ and initial memory m. It runs the computable counted run NLAlib.Ops.Tools.execC (equal to the core's raw evalCounted by NLAlib.Ops.Tools.map_toSt_execC) and returns a NLAlib.Ops.Tools.Report: the final memory, the counts per key (operation or query, dimensions), the scratch payload-byte peak, and them the static bounds of the tree at ρ.idx (stmtCost, via NLAlib.Ops.Tools.staticAt_eq, and stmtPeak). #eval prints it. This raw entry point omits mandatory instrumentation and format validation; use profileProgram for canonical execution diagnostics.

Main results

NLAlib.Ops.Tools.profileFrame is the common case: whole buffers as operands (NLAlib.Ops.Tools.frameOf), buffers given as lists (NLAlib.Ops.Tools.memOf).

A failed raw evaluation prints FAILED with its static bounds.

Declarations