Require Export Maps.
Definition assign_loc_Effect (ty:type) (b: block) (ofs: int) v : (block -> Z -> bool)  :=
match access_mode ty with
By_value chunk => fun b' z' => eq_block b b'
&& zle (Int.unsigned ofs) z'
&& zlt z' ((Int.unsigned ofs) + Z.of_nat (length (encode_val chunk v)))
| By_copy => fun b' z' => eq_block b' b
&& zle (Int.unsigned ofs) z'
&& zlt z' ((Int.unsigned ofs) + (sizeof ty))
| _ => fun b' z' => false
end.

(* Specifications: *)
Lemma assign_loc_Effect_Sound: forall a m loc ofs v m'
(AL: assign_loc (typeof a) m loc ofs v m'),
Mem.unchanged_on (fun b z => assign_loc_Effect (typeof a)
loc ofs v b z = false) m m'.
Lemma alloc_variables_unchanged_on:
forall P args env m e m' (H:alloc_variables env m args e m'),
Mem.unchanged_on P m m'.
Lemma alloc_variables_freshblocks: forall vars E m e m1
(AL: alloc_variables E m vars e m1)
id b t (Hid: e!id = Some (b,t)),
E!id = Some (b,t) \/ ~Mem.valid_block m b.
Lemma assign_loc_forward: forall ty m b ofs v m1
(A: assign_loc ty m b ofs v m1),
mem_forward m m1.