Canonical Structure exn_eqType := EqType exn exn_eqMixin.
(* Answer type *)
Inductive ans (A : Type) : Type := Val of A | Exn of exn.
Arguments Exn [A].
Notation pre := (Pred heap).
Notation post A := (ans A -> heap -> heap -> Prop).
Definition spec B := pre * post B : Type.
(********************************)
(* Definition of the Hoare type *)
(********************************)
Definition defed (P : Pred heap) : Pred heap :=
fun i => i \In P /\ def i.
Notation ideald P := (ideal (defed P)).
Section BasePrograms.
Variables (A : Type) (P : Pred heap).

Lemma singleP i : i \In defed P -> this i <== defed P.
Definition st_leq e1 e2 := model e1 <== model e2.