Examples of ordered monads in program verification #
We define the following ordered monads:
- The monotone continuation monad
MonoCont, defined asWPurein the paper. - Extensions thereof via layering on (ordered) monad transformers.
Everything is rfl for this instance since the attached property is a Prop.
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
Instances For
Dijkstra monad for free via monad transformers #
Hoare triple will have the form {P} prog {Q}, where P Q : m α → Prop and prog : m α,
defined as P prog → effectObserve prog Q.