Commit e109af04 by Robbert Krebbers

### Library with list stuff, and refactor mset based on that.

parent e1b061bf
 -Q theories iris_c -arg -w -arg -notation-overridden,-redundant-canonical-projection,-several-object-files theories/lib/list.v theories/lib/mset.v theories/lib/flock.v theories/lib/locking_heap.v ... ...
 ... ... @@ -63,7 +63,7 @@ Section a_wp. Definition env_inv (env : val) : iProp Σ := (∃ (X : gset val) (σ : gmap loc lvl), is_set_mut env X is_mset env X ∗ full_locking_heap σ ∗ ([∗ map] l ↦ _ ∈ σ, ∃ v', l ↦{1/2} v') ∗ ⌜correct_locks X (locked_locs σ)⌝)%I. ... ...
 ... ... @@ -111,12 +111,12 @@ Section proofs. Qed. Lemma a_store_spec R Φ Ψ1 Ψ2 e1 e2 : awp e1 R Ψ1 -∗ awp e2 R Ψ2 -∗ AWP e1 @ R {{ Ψ1 }} -∗ AWP e2 @ R {{ Ψ2 }} -∗ ▷ (∀ v1 v2, Ψ1 v1 -∗ Ψ2 v2 -∗ ∃ (l : loc) w, ⌜ v1 = #l ⌝ ∧ l ↦C w ∗ (l ↦C[LLvl] v2 -∗ Φ v2)) -∗ awp (a_store e1 e2) R Φ. AWP e1 =ᶜ e2 @ R {{ Φ }}. Proof. iIntros "H1 H2 HΦ". awp_apply (a_wp_awp with "H1"); iIntros (v1) "H1". awp_lam. ... ... @@ -134,7 +134,7 @@ Section proofs. { unfold correct_locks in *. intros Hx. apply Hl. destruct (Hlocks _ Hx) as [l' [? Hl']]. by simplify_eq/=. } wp_let. wp_proj. wp_apply (mset_add_spec with "[\$HX]"); eauto. wp_apply (mset_add_spec with "HX"); first done. iIntros "HX". wp_seq. iDestruct (full_locking_heap_unlocked with "Hl Hσ") as %?. iMod (locking_heap_change_lock _ _ ULvl LLvl with "Hσ Hl") as "[Hσ Hl]". ... ... @@ -180,7 +180,7 @@ Section proofs. destruct (Hlocks _ Hx) as [l' [? Hl']]. by simplify_eq/=. } wp_let. wp_apply wp_assert. wp_apply (mset_member_spec #l env with "HX"). wp_apply (mset_member_spec with "HX"). iIntros "Henv /=". case_decide; first by exfalso. simpl. wp_op. iSplit; eauto. iNext. wp_seq. rewrite mapsto_eq /mapsto_def. ... ...