Fixpoint init_datalist2pred' {cs: compspecs}
(Delta: tycontext) (gv: globals) (dl: list init_data)  (sh: share) (ofs: Z) (v: val) : mpred :=
match dl with
| d::dl' => init_data2pred' Delta gv d sh (offset_val ofs v)
* init_datalist2pred' Delta gv dl' sh (ofs + init_data_size d) v
| nil => emp
end.

(* Specifications: *)
Lemma halfprocess_globvar_star:
forall {cs: compspecs} {Espec: OracleKind} Delta gz P Q R (i: ident)
gv gvs SF c Post,
(var_types Delta) ! i = None ->
(glob_types Delta) ! i = Some (gvar_info gv) ->
(complete_legal_cosu_type (gvar_info gv) && is_aligned cenv_cs ha_env_cs la_env_cs (gvar_info gv) 0)%bool = true ->
gvar_volatile gv = false ->
init_data_list_size (gvar_init gv) <= sizeof (gvar_info gv) <=
Ptrofs.max_unsigned ->
semax Delta (PROPx P (LOCALx (gvars gz :: Q)
(SEPx (init_datalist2pred' Delta gz (gvar_init gv) (readonly2share (gvar_readonly gv)) 0 (gz i)
::R)))
* globvars2pred gz gvs * SF)
c Post ->
semax Delta (PROPx P (LOCALx (gvars gz :: Q) (SEPx R))
* globvars2pred gz ((i,gv)::gvs) * SF)
c Post.
Lemma map_instantiate:
forall {A B} (f: A -> B) (x: A) (y: list B) z,
y = map f z ->  f x :: y = map f (x :: z).
Lemma main_pre_ext_start:
forall {Espec : OracleKind} prog u gv ora,
main_pre_ext prog ora u gv = (PROP() LOCAL(gvars gv) SEP(has_ext ora))%assert * globvars2pred gv (prog_vars prog).
Lemma process_globvar_space:
forall {cs: compspecs} {Espec: OracleKind} Delta P Q R (i: ident)
gz gv gvs SF c Post t,
gvar_info gv = t ->
(var_types Delta) ! i = None ->
(glob_types Delta) ! i = Some t ->
(complete_legal_cosu_type (gvar_info gv) && is_aligned cenv_cs ha_env_cs la_env_cs (gvar_info gv) 0)%bool = true ->
gvar_volatile gv = false ->
gvar_init gv = (Init_space (sizeof t)::nil) ->
sizeof t <= Ptrofs.max_unsigned ->
semax Delta (PROPx P (LOCALx (gvars gz::Q) (SEPx (data_at_  (readonly2share (gvar_readonly gv)) t (gz i) :: R)))
* globvars2pred gz gvs * SF)
c Post ->
semax Delta (PROPx P (LOCALx (gvars gz::Q) (SEPx R))
* globvars2pred gz ((i,gv)::gvs) * SF)
c Post.