(** Compatibility between a compilation environment and an address-taken set. *)

Definition compat_cenv (atk: VSet.t) (cenv: compilenv) : Prop :=
  forall id, VSet.In id atk -> VSet.In id cenv -> False.

(* Specifications: *)
Lemma compat_cenv_for: forall f, compat_cenv (addr_taken_stmt f.(fn_body)) (cenv_for f).
Lemma compat_cenv_union_l: forall atk1 atk2 cenv, compat_cenv (VSet.union atk1 atk2) cenv -> compat_cenv atk1 cenv.
Lemma compat_cenv_union_r: forall atk1 atk2 cenv, compat_cenv (VSet.union atk1 atk2) cenv -> compat_cenv atk2 cenv.
Lemma compat_cenv_empty: forall cenv, compat_cenv VSet.empty cenv.
Lemma alloc_variables_nextblock: forall ge e m vars e' m', alloc_variables ge e m vars e' m' -> Ple (Mem.nextblock m) (Mem.nextblock m').
Lemma alloc_variables_load: forall e m vars e' m', alloc_variables ge e m vars e' m' -> forall chunk b ofs v, Mem.load chunk m b ofs = Some v -> Mem.load chunk m' b ofs = Some v.
Lemma sizeof_by_value: forall ty chunk, access_mode ty = By_value chunk -> size_chunk chunk <= sizeof ge ty.
Lemma alloc_variables_initial_value: forall e m vars e' m', alloc_variables ge e m vars e' m' -> env_initial_value e m -> env_initial_value e' m'.