Expand description
DSFB-Debug: grammar evaluation — paper §5.5.
Maps the per-(window, signal) SignTuple σ(k) = (‖r‖, ṙ, r̈)
to one of three GrammarState symbols:
- Admissible — within envelope; drift inward or bounded
- Boundary — approaching envelope with sustained outward drift (early-warning state)
- Violation — exited envelope (structural fault / actionable incident)
The decision is a pure function of σ(k) and the operator-supplied
grammar thresholds (drift_threshold, slew_threshold,
envelope_radius). The downstream policy.rs applies hysteresis
(n_confirm windows) before producing the operator-facing
confirmed_grammar_state.
The grammar is the load-bearing structural-detectability mechanism (paper Law 1): a trajectory that drifts persistently outward is more detectable — and more interpretively significant — than one that oscillates at larger amplitude within admissible bounds.
Functions§
- evaluate_
raw_ grammar - Evaluate raw grammar state from sign tuple and envelope parameters.
- hysteresis_
confirm - Apply hysteresis confirmation: raw state must persist for n_confirm consecutive windows before being committed.