(** ** Sufficient and necessary conditions for the initial memory to exist. *)
(** Alignment properties *)
Definition init_data_alignment (i: init_data) : Z :=
match i with
| Init_int8 n => 1
| Init_int16 n => 2
| Init_int32 n => 4
| Init_int64 n => 8
| Init_float32 n => 4
| Init_float64 n => 4
| Init_addrof symb ofs => if Archi.ptr64 then 8 else 4
| Init_space n => 1
end.
Fixpoint init_data_list_aligned (p: Z) (il: list init_data) {struct il} : Prop :=
match il with
| nil => True
| i1 :: il => (init_data_alignment i1 | p) /\ init_data_list_aligned (p + init_data_size i1) il
end.
Section INITMEM_INVERSION.
Variable ge: t.

(* Specifications: *)
Lemma store_init_data_aligned:
forall m b p i m',
store_init_data ge m b p i = Some m' ->
(init_data_alignment i | p).
Lemma store_init_data_list_aligned:
forall b il m p m',
store_init_data_list ge m b p il = Some m' ->
init_data_list_aligned p il.
Lemma store_init_data_list_free_idents:
forall b i o il m p m',
store_init_data_list ge m b p il = Some m' ->
In (Init_addrof i o) il ->
exists b', find_symbol ge i = Some b'.