Examples of ordered monads in program verification #
We define the following ordered monads:
- The monotone continuation monad
MonoCont
, defined asWPure
in the paper. - Extensions thereof via layering on (ordered) monad transformers.
Equations
Instances For
Equations
Everything is rfl
for this instance since the attached property is a Prop
.
Equations
Equations
Equations
Instances For
Equations
The quotient of the state monad, where the preorder on σ → Prop
is given pointwise,
induced by the preorder (p ≤ q) ↔ (p → q)
on Prop
.
Equations
- MonoStateContProp σ = MonoCont (σ → Prop)
Instances For
Dijkstra monad for free via monad transformers #
Equations
- effectObserve m α = (m α → (m α → Prop) → Prop)
Instances For
Hoare triple will have the form {P} prog {Q}
, where P Q : m α → Prop
and prog : m α
,
defined as P prog → effectObserve prog Q
.