Hint Resolve
val_obs_add val_obs_addl val_obs_offset_ptr valid_val_incr val_obs_incr val_obsC_correct
val_obs_load_result val_obs_hiword val_obs_loword
val_obs_longofwords val_obs_load_result val_obs_ext
val_obs_sign_ext val_obs_longofintu val_obs_longofint val_obs_singleoffloat val_obs_floatofsingle
val_obs_intoffloat val_obs_floatofint val_obs_intofsingle
val_obs_singleofint val_obs_longoffloat val_obs_floatoflong val_obs_longofsingle val_obs_singleoflong
val_obs_neg val_obs_negl val_obs_mul val_obs_mull val_obs_mulhs val_obs_mulhu val_obs_mullhs val_obs_mullhu
val_obs_and val_obs_sub val_obs_andl val_obs_subl
val_obs_or val_obs_xor val_obs_orl val_obs_xorl val_obs_notint val_obs_notl
val_obs_shl val_obs_shr val_obs_shru
val_obs_shll val_obs_shrl val_obs_shrlu
val_obs_ror val_obs_suboverflow val_obs_negative
val_obs_rorl val_obs_subloverflow val_obs_negativel
val_obs_addf val_obs_addfs val_obs_mulf
val_obs_mulfs val_obs_negf val_obs_negfs
val_obs_absf val_obs_absfs val_obs_subf
val_obs_subfs val_obs_divf val_obs_divfs
val_obs_divu_id val_obs_modu_id
val_obs_divs_id val_obs_mods_id
val_obs_divlu_id val_obs_modlu_id
val_obs_divls_id val_obs_modls_id val_obs_of_bool : val_renamings.
End ValObsEq.
(** ** Renamings between memories *)
Module MemObsEq.
(* A compcert injection would not work because it allows permissions to go up *)
(* Moreover, we require that undefined values are matched by the target memory, unlike compcert injections. Although the latter is not neccessary and in retrospect may be a limiting factor. For example we would be able to reuse this development for our final erasure if we allowed undefined values to become more defined. *)
(** Weak injection between memories *)
Record weak_mem_obs_eq (f : memren) (mc mf : mem) :=
{
domain_invalid: forall b, ~(Mem.valid_block mc b) -> f b = None;
domain_valid: forall b, Mem.valid_block mc b -> exists b', f b = Some b';
codomain_valid: forall b1 b2, f b1 = Some b2 -> Mem.valid_block mf b2;
injective: forall b1 b1' b2, f b1 = Some b2 ->
f b1' = Some b2 ->
b1 = b1';
perm_obs_weak :
forall b1 b2 ofs (Hrenaming: f b1 = Some b2),
Mem.perm_order''
(permission_at mc b1 ofs Cur)
(permission_at mf b2 ofs Cur)}.
(** Strong injection between memories *)
Record strong_mem_obs_eq (f : memren) (mc mf : mem) :=
{ perm_obs_strong :
forall b1 b2 ofs (Hrenaming: f b1 = Some b2),
permission_at mf b2 ofs Cur =
(permission_at mc b1 ofs Cur);
val_obs_eq :
forall b1 b2 ofs (Hrenaming: f b1 = Some b2)
(Hperm: Mem.perm mc b1 ofs Cur Readable),
memval_obs_eq f (Maps.ZMap.get ofs mc.(Mem.mem_contents)#b1)
(Maps.ZMap.get ofs mf.(Mem.mem_contents)#b2)}.
(** Renaming between memories *)
Record mem_obs_eq (f : memren) (mc mf : mem) :=
{ weak_obs_eq : weak_mem_obs_eq f mc mf;
strong_obs_eq : strong_mem_obs_eq f mc mf }.

Lemma weak_obs_eq_domain_ren:
forall f m m',
weak_mem_obs_eq f m m' ->
domain_memren f m.