Skip to content

Commit

Permalink
complete impl1
Browse files Browse the repository at this point in the history
  • Loading branch information
hei411 committed Sep 27, 2024
1 parent 140171c commit 7d7d463
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions theories/coneris/examples/random_counter/impl1.v
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,19 @@ Section impl1.
{{{ (n':nat), RET #n'; Q n'
}}}.
Proof.
Admitted.
(* iIntros (Hsubset Φ) "(#Hinv & #Hvs & HP) HΦ". *)
(* rewrite /read_counter1. *)
(* wp_pure. *)
(* iInv N as ">(%ε & %m & %l & %z & H1 & H2 & H3 & H4 & -> & H5 & H6)" "Hclose". *)
(* wp_load. *)
(* iMod ("Hvs" with "[$]") as "[H6 HQ]". *)
(* iMod ("Hclose" with "[$H1 $H2 $H3 $H4 $H5 $H6]"); first done. *)
(* iApply ("HΦ" with "[$]"). *)
(* Qed. *)

iIntros (Hsubset Φ) "([#Hinv #Hinv'] & Hvs) HΦ".
rewrite /read_counter1.
wp_pure.
iInv "Hinv'" as ">( %l & %z & -> & H5 & H6)" "Hclose".
wp_load.
iMod (fupd_mask_subseteq (E ∖ ↑N)) as "Hclose'".
{ apply difference_mono_l.
by apply nclose_subseteq'. }
iMod ("Hvs" with "[$]") as "[? HQ]".
iMod "Hclose'" as "_".
iMod ("Hclose" with "[-HQ HΦ]"); first by iFrame.
iApply ("HΦ" with "[$]").
Qed.

End impl1.

Expand Down

0 comments on commit 7d7d463

Please sign in to comment.