Local Open Scope pred.
Section extensions.
Context {CS: compspecs} {Espec: OracleKind}.
(* Scall *)

(* Specifications: *)
Lemma opt2list_inj: forall A (a b: option A), opt2list a = opt2list b -> a=b.
Lemma age_twin' {A B} `{HA: ageable A} `{HB: ageable B}:
forall (x: A) (y: B) (x': A),
level x = level y -> age x x' ->
exists y', level x' = level y' /\ age y y'.
Lemma later_twin' {A B} `{HA: ageable A} `{HB: ageable B}:
forall (x: A) (y: B) (x': A),
level x = level y -> laterR x x' ->
exists y', level x' = level y' /\ laterR y y'.
Lemma later_twin {A} `{ageable A}:
forall phi1 phi2 phi1',
level phi1 = level phi2 ->
laterR phi1 phi1' ->
exists phi2', level phi1' = level phi2' /\ laterR phi2 phi2'.
Lemma someP_inj:  forall A P Q, SomeP A P = SomeP A Q -> P=Q.
Fixpoint alloc_juicy_variables (ge: genv) (rho: env) (jm: juicy_mem) (vl: list (ident*type)) : env * juicy_mem :=
match vl with
| nil => (rho,jm)
| (id,ty)::vars => match JuicyMemOps.juicy_mem_alloc jm 0 (@sizeof ge ty) with
(m1,b1) => alloc_juicy_variables ge (PTree.set id (b1,ty) rho) m1 vars
end
end.