(*Lenb: moved alloc_juicy_variables, juicy_mem_alloc_core, and 
  alloc_juicy_variables_e here from to veric/juicy_mem_ops.v*)

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.

(* Specifications: *)
Lemma juicy_mem_alloc_core: forall jm lo hi jm' b, JuicyMemOps.juicy_mem_alloc jm lo hi = (jm', b) -> core (m_phi jm) = core (m_phi jm').
Lemma alloc_juicy_variables_e: forall ge rho jm vl rho' jm', alloc_juicy_variables ge rho jm vl = (rho', jm') -> Clight.alloc_variables ge rho (m_dry jm) vl rho' (m_dry jm') /\ level jm = level jm' /\ core (m_phi jm) = core (m_phi jm').
Lemma alloc_juicy_variables_match_venv: forall ge jm vl ve' jm', alloc_juicy_variables ge empty_env jm vl = (ve',jm') -> match_venv (make_venv ve') vl.
Lemma build_call_temp_env: forall f vl, length (fn_params f) = length vl -> exists te, bind_parameter_temps (fn_params f) vl (create_undef_temps (fn_temps f)) = Some te.
Lemma resource_decay_funassert: forall G rho b w w', necR (core w) (core w') -> resource_decay b w w' -> app_pred (funassert G rho) w -> app_pred (funassert G rho) w'.