obsReplay, the ReplayM observation #
replayRun: runs aReplayMprogram from a config and a state; its run lemmas (replayRun_pure,replayRun_bind,replayRun_emit_state,replayRun_choose, ...).interruptOff,RunBridge: a run with the stop hook against the same run without it.obsReplay:ReplayMas anInterpObsinstance.
Further run lemmas, the RunBridge lemmas and whole-run replay soundness
(runInterp_sound_replay) are in InterpreterObsProps.lean.
Run a ReplayM computation under the configuration cfg from the state st, returning its
outcome and final state.
Equations
- Imperative.replayRun x cfg st = (ReaderT.run x cfg).run.run st
Instances For
replayRun of read >>= f runs f on the run's config.
replayRun of get >>= f runs f on the current state.
replayRun of modify g >>= f runs f from the updated state g st.
replayRun of pure x succeeds with x and leaves the state unchanged.
replayRun of throw r fails with r and leaves the state unchanged.
replayRun of x >>= g: continue with g on success, stop with the error otherwise.
emit records the event in every outcome, whatever interruptOn says.
A successful choose in ReplayM passed the value checks and left the trace unchanged.
cfg with the stop hook disabled (interruptOn := fun _ => none), so emit is record-only.
Equations
- Imperative.interruptOff cfg = { oracleConfig := cfg.oracleConfig }
Instances For
Relates the run of x under cfg to its run with the stop hook disabled
(interruptOff cfg): the trace recorded under cfg is a suffix of the trace recorded
with the hook off, and a run under cfg that succeeds coincides with the hook-off run.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The replay observation: ReplayM's reader config, state, run projection and recorded trace.
@[expose]d so its fields unfold in statements outside this module.
Equations
- One or more equations did not get rendered due to their size.