Skip to main content

Module lambda_runtime

Module lambda_runtime 

Source
Expand description

AXON Runtime — Lambda Data (ΛD) Apply (Fase 15.c — Rust mirror).

Runtime types and helpers for the lambda apply X to Y flow-body statement. Mirror of axon/runtime/lambda_runtime.py — same semantics, same Theorem 5.1 guard, same JSON shape so cross-stack parity tests can compare byte-for-byte.

ψ = ⟨T, V, E⟩ where: T : String — Ontology V : serde_json::Value — Bound value (string-typed in Rust runner) E : LambdaTensor — Epistemic tensor ⟨c, τ_start, τ_end, ρ, δ⟩

Vocabulary follows the ΛD formalism: δ ∈ {raw, derived, inferred, aggregated, transformed}

Theorem 5.1 (Epistemic Degradation) is enforced at runtime by enforce_theorem_5_1, mirroring the compile-time guard in axon-frontend::type_checker::check_lambda_data. Defends against IR-JSON tampering between compile and execute.

Structs§

EpistemicDegradationError
Theorem 5.1 violation — raised by enforce_theorem_5_1 when a spec snapshot reaches the dispatcher with c=1.0 + non-raw derivation, out-of-range certainty, or unknown derivation.
LambdaApplyPayload
Spec snapshot carried through the CompiledStep payload — verbatim copy of the IR lambda declaration so the runtime never needs the IR. Same shape as the Python BaseBackend._compile_lambda_apply_step metadata (so cross-stack parity is structural not just byte-level).
LambdaPsi
ψ = ⟨T, V, E⟩ — the epistemic state vector produced by lambda apply.
LambdaTensor
E = ⟨c, τ_start, τ_end, ρ, δ⟩ — the epistemic tensor.
SpecSnapshot

Constants§

VALID_DERIVATIONS
Mirror of axon-frontend::type_checker::VALID_DERIVATIONS and the Python runtime’s VALID_DERIVATIONS. Drift is detected by the cross-stack parity golden in axon-rs/tests/parity/.

Functions§

build_psi
Construct ψ from a spec snapshot and a resolved target value (here represented as a JSON value to keep the Rust runner uniform with the string-typed ExecContext).
enforce_theorem_5_1
Runtime mirror of the Epistemic Degradation Theorem compile-time check. Defends against IR-JSON tampering: a tampered IR could carry a lambda_data_apply whose snapshot violates the theorem the front-end rejected. This guard catches that at apply time, before the bad envelope propagates downstream.