Commit 5644d68f authored by Robbert Krebbers's avatar Robbert Krebbers

mem_force no longer flattens the entire subobject for "unsigned char"

addresses.

The operation "mem_force Γ m a" used to apply the identify function to
pricisely the object "a", even in case "a" is an "unsigned char" address
refering to an individual byte. This caused the ctree substructure of the
entire subobject to disappear and had the undesired effect that:

  mem_force Γ a m ⊑{Γ,true@Γm} m

failed to hold (i.e. unused reads cannot be removed).
parent fdcc90dd
......@@ -473,6 +473,8 @@ Proof.
intros. assert (i = length l1 + (i - length l1)) as Hi by lia.
rewrite Hi at 1. by apply alter_app_r.
Qed.
Lemma list_alter_id f l i : ( x, f x = x) alter f i l = l.
Proof. intros ?. revert i. induction l; intros [|?]; f_equal'; auto. Qed.
Lemma list_alter_ext f g l k i :
( x, l !! i = Some x f x = g x) l = k alter f i l = alter g i k.
Proof. intros H ->. revert i H. induction k; intros [|?] ?; f_equal'; auto. Qed.
......
......@@ -21,6 +21,7 @@ Proof.
end; abstract congruence.
Defined.
Instance Nempty {A} : Empty (Nmap A) := NMap None .
Global Opaque Nempty.
Instance Nlookup {A} : Lookup N A (Nmap A) := λ i t,
match i with
| N0 => Nmap_0 t
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment