Skip to content
Snippets Groups Projects
Commit d6b0cf0a authored by Ralf Jung's avatar Ralf Jung
Browse files

slightly weaken axioms so we can match Iron

parent b9ba5332
No related branches found
No related tags found
No related merge requests found
...@@ -292,8 +292,11 @@ Module linear2. Section linear2. ...@@ -292,8 +292,11 @@ Module linear2. Section linear2.
[cinv_own] but we do not need that. They would also have a name matching [cinv_own] but we do not need that. They would also have a name matching
the [mask] type, but we do not need that either.) *) the [mask] type, but we do not need that either.) *)
Context (gname : Type) (cinv : gname PROP PROP) (cinv_own : gname PROP). Context (gname : Type) (cinv : gname PROP PROP) (cinv_own : gname PROP).
(** [cinv_alloc] delays handing out the [cinv_own] token until after the
invariant has been created so that this can match Iron by picking
[cinv_own γ := fcinv_own γ 1 ∗ fcinv_cancel_own γ 1]. *)
Hypothesis cinv_alloc : E, Hypothesis cinv_alloc : E,
fupd E E ( γ, cinv_own γ ( P, P -∗ fupd E E (cinv γ P)))%I. fupd E E ( γ, P, P -∗ fupd E E (cinv γ P cinv_own γ))%I.
Hypothesis cinv_access : P γ, Hypothesis cinv_access : P γ,
cinv γ P -∗ cinv_own γ -∗ fupd M1 M0 ( P cinv_own γ ( P -∗ fupd M0 M1 emp)). cinv γ P -∗ cinv_own γ -∗ fupd M1 M0 ( P cinv_own γ ( P -∗ fupd M0 M1 emp)).
Hypothesis cinv_own_excl : E γ, Hypothesis cinv_own_excl : E γ,
...@@ -321,9 +324,9 @@ Module linear2. Section linear2. ...@@ -321,9 +324,9 @@ Module linear2. Section linear2.
Lemma leak P : P -∗ fupd M1 M1 emp. Lemma leak P : P -∗ fupd M1 M1 emp.
Proof. Proof.
iIntros "HP". iIntros "HP".
iMod cinv_alloc as (γ) "(Htok & Hmkinv)". iMod cinv_alloc as (γ) "Hmkinv".
set (INV := (P cinv_own γ P)%I). set (INV := (P cinv_own γ P)%I).
iMod ("Hmkinv" $! INV with "[HP]") as "Hinv". iMod ("Hmkinv" $! INV with "[HP]") as "(Hinv & Htok)".
{ iLeft. done. } { iLeft. done. }
iMod (cinv_access with "Hinv Htok") as "([HP|Hinv] & Htok & Hclose)"; last first. iMod (cinv_access with "Hinv Htok") as "([HP|Hinv] & Htok & Hclose)"; last first.
{ iDestruct "Hinv" as "(Htok' & ?)". { iDestruct "Hinv" as "(Htok' & ?)".
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment