Commit 752493b6 authored by Dan Frumin's avatar Dan Frumin

Better log. atomic spec. for weak increment

parent b97a8212
...@@ -319,13 +319,13 @@ Section refinement. ...@@ -319,13 +319,13 @@ Section refinement.
cf wkIncr specification from (da Rocha Pinto, Dinsdale-Young, Gardner) cf wkIncr specification from (da Rocha Pinto, Dinsdale-Young, Gardner)
Parameter type: nat Parameter type: nat
Precondition: λn, x ↦ᵢ n Precondition: λn, x ↦ᵢ n
Postcondition λ_, n, x ↦ᵢ n Postcondition λ_, n, x ↦ᵢ (n+1)
*) *)
Lemma wkincr_atomic_l R1 R2 Δ Γ E K x t τ : Lemma wkincr_atomic_l R1 R2 Δ Γ E K x t τ :
R2 - R2 -
(|={,E}=> n : nat, x ↦ᵢ #n R1 n (|={,E}=> n : nat, x ↦ᵢ #n R1 n
(( n : nat, x ↦ᵢ #n R1 n) ={E,}= True) (x ↦ᵢ #n R1 n ={E,}= True)
( m, ( n : nat, x ↦ᵢ #n) R1 m - R2 - (( n : nat, x ↦ᵢ #(n + 1)) R1 n - R2 -
{E;Δ;Γ} fill K Unit log t : τ)) {E;Δ;Γ} fill K Unit log t : τ))
- ({Δ;Γ} fill K (wkincr #x) log t : τ). - ({Δ;Γ} fill K (wkincr #x) log t : τ).
Proof. Proof.
...@@ -337,7 +337,7 @@ Section refinement. ...@@ -337,7 +337,7 @@ Section refinement.
iMod "H" as (n) "[Hx [HR1 [Hrev _]]]". iModIntro. iMod "H" as (n) "[Hx [HR1 [Hrev _]]]". iModIntro.
iExists _; iFrame. iNext. iIntros "Hx". iExists _; iFrame. iNext. iIntros "Hx".
iMod ("Hrev" with "[HR1 Hx]") as "_"; simpl. iMod ("Hrev" with "[HR1 Hx]") as "_"; simpl.
{ iExists _. iFrame. } { iFrame. }
rel_op_l. rel_op_l.
rel_store_l_atomic. rel_store_l_atomic.
iMod "H2" as (m) "[Hx [HR1 [_ Hmod]]]". iModIntro. iMod "H2" as (m) "[Hx [HR1 [_ Hmod]]]". iModIntro.
...@@ -364,15 +364,15 @@ Section refinement. ...@@ -364,15 +364,15 @@ Section refinement.
openI. openI.
iModIntro. iExists _; iFrame. iModIntro. iExists _; iFrame.
rewrite {1}/R. iSplitR "Hcl". rewrite {1}/R. iSplitR "Hcl".
{ iExists _,_; by iFrame. } clear o n b. { iExists _,_; by iFrame. }
iSplit. iSplit.
- iDestruct 1 as (o) "[Hlo HR]". - iIntros "[Hlo HR]".
unfold R. iDestruct "HR" as (n b) "HR". unfold R. iDestruct "HR" as (n' b') "HR".
iApply "Hcl". iApply "Hcl".
iNext. iExists _,_,_; by iFrame. iNext. iExists _,_,_; by iFrame.
- iIntros (?) "[Hlo HR] _". - iIntros "[Hlo HR] _".
iDestruct "Hlo" as (o) "Hlo". iDestruct "Hlo" as (o') "Hlo".
unfold R. iDestruct "HR" as (n b) "(Hln & Hissued & Hl' & Hticket)". unfold R. iDestruct "HR" as (n' b') "(Hln & Hissued & Hl' & Hticket)".
rel_apply_r (bin_log_related_release_r with "Hl'"). rel_apply_r (bin_log_related_release_r with "Hl'").
{ solve_ndisj. } { solve_ndisj. }
iIntros "Hl'". iIntros "Hl'".
......
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