Dsxir. Program
(dsxir v0.1.0)
Copy Markdown
Runtime state container for a user program.
Carries a reference to the user module, a per-predictor State map, and an
open metadata map populated by optimizers. Flows explicitly through forward/2
and Dsxir.Module.Runtime.call/4 — never held as ambient state.
Summary
Functions
Fetch the per-predictor State slot, raising if name is unknown.
Build a fresh program for user_module. Raises
Dsxir.Errors.Invalid.Module when the module is not a Dsxir.Module.
Build a program with explicit predictor names (used internally by load).
Replace the State for name in prog, returning the updated program.
Types
@type t() :: %Dsxir.Program{ metadata: map(), module: module(), predictors: %{required(atom()) => Dsxir.Program.State.t()} }
Functions
@spec get_state(t(), atom()) :: Dsxir.Program.State.t()
Fetch the per-predictor State slot, raising if name is unknown.
Build a fresh program for user_module. Raises
Dsxir.Errors.Invalid.Module when the module is not a Dsxir.Module.
Build a program with explicit predictor names (used internally by load).
@spec put_state(t(), atom(), Dsxir.Program.State.t()) :: t()
Replace the State for name in prog, returning the updated program.