Inductive assign_locT (ce : composite_env) (ty : type) (m : mem) (b : block) (ofs : ptrofs)
: val -> mem -> list mem_event -> Prop :=
assign_locT_value : forall (v : val) (chunk : memory_chunk) (m' : mem),
access_mode ty = By_value chunk ->
Mem.storev chunk m (Vptr b ofs) v = Some m' ->
assign_locT ce ty m b ofs v m' (Write b (Ptrofs.unsigned ofs) (encode_val chunk v) ::nil)
| assign_locT_copy : forall (b' : block) (ofs' : ptrofs) (bytes : list memval) (m' : mem),
access_mode ty = By_copy ->
(@sizeof ce ty > 0 -> (alignof_blockcopy ce ty | Ptrofs.unsigned ofs')) ->
(@sizeof ce ty > 0 -> (alignof_blockcopy ce ty | Ptrofs.unsigned ofs)) ->
b' <> b \/
Ptrofs.unsigned ofs' = Ptrofs.unsigned ofs \/
Ptrofs.unsigned ofs' + @sizeof ce ty <= Ptrofs.unsigned ofs \/
Ptrofs.unsigned ofs + @sizeof ce ty <= Ptrofs.unsigned ofs' ->
Mem.loadbytes m b' (Ptrofs.unsigned ofs') (@sizeof ce ty) = Some bytes ->
Mem.storebytes m b (Ptrofs.unsigned ofs) bytes = Some m' ->
assign_locT ce ty m b ofs (Vptr b' ofs') m'
(Read b' (Ptrofs.unsigned ofs') (@sizeof ce ty) bytes ::
Write b (Ptrofs.unsigned ofs) bytes :: nil).

(* Specifications: *)
Lemma assign_locT_ax1 ce ty m b ofs v m' T (A:assign_locT ce ty m b ofs v m' T):
assign_loc ce ty m b ofs v m'.
Lemma assign_locT_ax2 ce ty m b ofs v m' (A:assign_loc ce ty m b ofs v m'):
exists T, assign_locT ce ty m b ofs v m' T.
Lemma assign_locT_fun ce ty m b ofs v m1 T1
(A1:assign_locT ce ty m b ofs v m1 T1) m2 T2 (A2:assign_locT ce ty m b ofs v m2 T2):
(m1,T1)=(m2,T2).