Commit 8d58786a authored by Zhen Zhang's avatar Zhen Zhang

Fix README and last bits of f_cons

parent 2b21312d
...@@ -6,8 +6,4 @@ Atomicity related verification based on Iris logic. ...@@ -6,8 +6,4 @@ Atomicity related verification based on Iris logic.
Build Build
-------- --------
1. `git clone` this repo Please make sure Iris dependency version is same as noted in `IRIS_VERSION`
2. `git submodule update --init` to fetch corresponding Iris library as a submodule
3. `cd iris-coq; make; make install` to install Iris library (system globally). Or you can use `make userinstall` to install user globally.
4. `cd ..; make` to compile this repo
...@@ -28,7 +28,7 @@ Section atomic_sync. ...@@ -28,7 +28,7 @@ Section atomic_sync.
(f x) (P x) (fun _ => Q x))%I. (f x) (P x) (fun _ => Q x))%I.
Definition sync (mk_syncer: val) : val := Definition sync (mk_syncer: val) : val :=
λ: "f_cons" "f_seq" "l", λ: "f_seq" "l",
let: "s" := mk_syncer #() in let: "s" := mk_syncer #() in
"s" ("f_seq" "l"). "s" ("f_seq" "l").
...@@ -51,12 +51,12 @@ Section atomic_sync. ...@@ -51,12 +51,12 @@ Section atomic_sync.
heapN N heapN N
heap_ctx R ( s, (is_syncer R s) - Φ s) WP mk_syncer #() {{ Φ }}. heap_ctx R ( s, (is_syncer R s) - Φ s) WP mk_syncer #() {{ Φ }}.
Lemma atomic_spec (mk_syncer f_cons f_seq l: val) (ϕ: val A iProp Σ) α β Ei: Lemma atomic_spec (mk_syncer f_seq l: val) (ϕ: val A iProp Σ) α β Ei:
(g0: A), (g0: A),
heapN N seq_spec f_seq ϕ α β heapN N seq_spec f_seq ϕ α β
mk_syncer_spec mk_syncer mk_syncer_spec mk_syncer
heap_ctx ϕ l g0 heap_ctx ϕ l g0
WP (sync mk_syncer) f_cons f_seq l {{ f, γ, gHalf γ g0 x, atomic_triple' α β Ei f x γ }}. WP (sync mk_syncer) f_seq l {{ f, γ, gHalf γ g0 x, atomic_triple' α β Ei f x γ }}.
Proof. Proof.
iIntros (g0 HN Hseq Hsync) "[#Hh Hϕ]". iIntros (g0 HN Hseq Hsync) "[#Hh Hϕ]".
iVs (own_alloc (((1 / 2)%Qp, DecAgree g0) ((1 / 2)%Qp, DecAgree g0))) as (γ) "[Hg1 Hg2]". iVs (own_alloc (((1 / 2)%Qp, DecAgree g0) ((1 / 2)%Qp, DecAgree g0))) as (γ) "[Hg1 Hg2]".
......
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