Native executions and semantic realizations #
A backend chooses concrete states and native execution evidence. Realizations assert existence of executions and correctness of every supplied terminating execution, independently of cost. For nondeterministic backends existence is not demonic termination.
Main definitions #
Execution: one native operation with typed answer and execution evidence.Executes: sequential adaptive execution, retaining native evidence in order.Realization: representation simulation and existence without resource assumptions.
Main results #
Realization.run: admissible clients have correct executions.Realization.correct_client: every supplied client execution has the specified result.executes_bind_iff: sequential execution splits exactly at the intermediate state.
A backend chooses its own execution evidence, independently of a resource measure.
Instances For
Clients collect native execution evidence in call order; no costs occur in this semantics.
- pure {D : Spec} {C τ : Type x} {α : Type y} {exec : Execution D C τ} (a : α) (c : C) : Executes exec (PFunctor.FreeM.pure a) c a c []
- call {D : Spec} {C τ : Type x} {α : Type y} {exec : Execution D C τ} {o : D.Op} {k : D.signature.B o → D.signature.FreeM α} {c : C} {a : D.Result o} {c' : C} {trace : τ} {b : α} {c'' : C} {traces : List τ} : exec c o a c' trace → Executes exec (k a) c' b c'' traces → Executes exec (PFunctor.FreeM.liftBind o k) c b c'' (trace :: traces)
Instances For
Functional correctness and existence of executions, without a resource claim. For nondeterministic backends this is not a demonic termination assertion.
The relation between mathematical states and concrete backend states.
Instances For
From related states, a client whose history is admissible has a native execution that returns the specified result and ends in a state related to the specified final state.
From related states, every native execution of a client whose history is admissible returns the specified result and ends in a state related to the specified final state.