End Allocation.
Section BlockAllocation.
Variables (A : Type) (v : A) (n : nat).
Definition allocb_s : spec ptr :=
(fun i => def i : Prop,
fun y i m => exists r, y = Val r /\ m = i :+ updi r (nseq n v)).
Definition allocb_sp (p : ideald allocb_s.1) y m :=
exists i, i \In id_val p /\ y = Val (fresh i) /\
m = i :+ updi (fresh i) (nseq n v).

(* Specifications: *)
Lemma allocb_coherent : coherent allocb_sp.
Lemma allocb_dstrict : def_strict allocb_sp.
Lemma allocb_has_spec : allocb_sp \In has_spec allocb_s.
Lemma dealloc_dstrict : def_strict dealloc_sp.
Lemma dealloc_has_spec : dealloc_sp \In has_spec dealloc_s.