Skip to content

Commit f873eae

Browse files
committed
add wp_load_shared for HeapLang
1 parent 54018a7 commit f873eae

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
opam update
2323
opam pin coq 8.19.1 --confirm-level=yes
2424
opam pin coq-iris 4.2.0 --confirm-level=yes
25+
opam pin coq-iris-heap-lang 4.2.0 --confirm-level=yes
2526
2627
- name: Run check
2728
run: |

_CoqProject

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ src/examples/seqs.v
4545
src/examples/main.v
4646
src/examples/fractional.v
4747
src/examples/counting.v
48+
src/examples/heap_lang_wp_load_shared.v
4849

4950
-arg -w -arg -argument-scope-delimiter
5051
-arg -w -arg -notation-overridden
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From iris.prelude Require Import options.
2+
From iris.program_logic Require Export weakestpre.
3+
From iris.heap_lang Require Export lang proofmode notation.
4+
5+
Require Import guarding.guard.
6+
Require Import guarding.tactics.
7+
8+
(* Derivation for Heap-Read-Shared law for HeapLang. *)
9+
10+
Section HeapLangWpLoadShared.
11+
12+
Context `{!heapGS Σ}.
13+
14+
Lemma wp_load_shared s E F l dq v G : (F ⊆ E) →
15+
{{{ G ∗ (G &&{F}&&> l ↦{dq} v) }}} Load (Val $ LitV $ LitLoc l) @ s; E {{{ RET v; G }}}.
16+
Proof.
17+
intros Hfe.
18+
iIntros (Φ) "[G #g] HΦ".
19+
leaf_open "g" with "G" as "[Hpt Hback]". { set_solver. }
20+
wp_load.
21+
iMod ("Hback" with "Hpt") as "G".
22+
iModIntro. iApply "HΦ". iFrame "G".
23+
Qed.
24+
25+
End HeapLangWpLoadShared.

0 commit comments

Comments
 (0)