Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
George Pirlea
Iris
Commits
278515b8
Commit
278515b8
authored
Jun 01, 2018
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests/ipm_paper: show goals where they were shown in the paper
parent
8fd3233e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
5 deletions
+99
-5
tests/ipm_paper.ref
tests/ipm_paper.ref
+94
-0
tests/ipm_paper.v
tests/ipm_paper.v
+5
-5
No files found.
tests/ipm_paper.ref
View file @
278515b8
1 subgoal
M : ucmraT
A : Type
P, R : iProp
Ψ : A → iProp
x : A
============================
"HP" : P
"HΨ" : Ψ x
"HR" : R
--------------------------------------∗
Ψ x ∗ P
2 subgoals
M : ucmraT
A : Type
P, R : iProp
Ψ : A → iProp
x : A
============================
"HΨ" : Ψ x
--------------------------------------∗
Ψ x
subgoal 2 is:
"HP" : P
"HR" : R
--------------------------------------∗
P
1 subgoal
M : ucmraT
A : Type
P, R : iProp
Ψ : A → iProp
x : A
============================
"HP" : P
"HR" : R
--------------------------------------∗
P
1 subgoal
M : ucmraT
A : Type
P, R : iProp
Ψ : A → iProp
============================
"HP" : P
"HΨ" : ∃ a : A, Ψ a
"HR" : R
--------------------------------------∗
∃ a : A, Ψ a ∗ P
1 subgoal
Σ : gFunctors
heapG0 : heapG Σ
counterG0 : counterG Σ
l : loc
n : nat
N : namespace
γ : gname
============================
"Hinv" : inv N (I γ l)
--------------------------------------□
"Hγf" : own γ (Frag n)
--------------------------------------∗
WP ! #l {{ v, ∃ m : nat, ⌜v = #m ∧ n ≤ m⌝ ∧ C l m }}
1 subgoal
Σ : gFunctors
heapG0 : heapG Σ
counterG0 : counterG Σ
l : loc
n : nat
N : namespace
γ : gname
c : nat
============================
"Hinv" : inv N (I γ l)
--------------------------------------□
"Hγf" : own γ (Frag n)
"Hl" : l ↦ #c
"Hγ" : own γ (Auth c)
--------------------------------------∗
▷ I γ l ∗ (∃ m : nat, ⌜#c = #m ∧ n ≤ m⌝ ∧ C l m)
tests/ipm_paper.v
View file @
278515b8
...
...
@@ -30,14 +30,14 @@ Section demo.
Proof
.
iIntros
"[HP [HΨ HR]]"
.
iDestruct
"HΨ"
as
(
x
)
"HΨ"
.
iExists
x
.
iSplitL
"HΨ"
.
iAssumption
.
iAssumption
.
iExists
x
.
Show
.
iSplitL
"HΨ"
.
Show
.
iAssumption
.
Show
.
iAssumption
.
Qed
.
(* The short version in IPM, as in the paper *)
Lemma
sep_exist_short
A
(
P
R
:
iProp
)
(
Ψ
:
A
→
iProp
)
:
P
∗
(
∃
a
,
Ψ
a
)
∗
R
⊢
∃
a
,
Ψ
a
∗
P
.
Proof
.
iIntros
"[HP [HΨ HR]]"
.
iFrame
"HP"
.
iAssumption
.
Qed
.
Proof
.
iIntros
"[HP [HΨ HR]]"
.
Show
.
iFrame
"HP"
.
iAssumption
.
Qed
.
(* An even shorter version in IPM, using the frame introduction pattern `$` *)
Lemma
sep_exist_shorter
A
(
P
R
:
iProp
)
(
Ψ
:
A
→
iProp
)
:
...
...
@@ -239,8 +239,8 @@ Section counter_proof.
{{
C
l
n
}}
read
#
l
{{
v
,
∃
m
:
nat
,
⌜
v
=
#
m
∧
n
≤
m
⌝
∧
C
l
m
}}.
Proof
.
iIntros
"!# Hl /="
.
iDestruct
"Hl"
as
(
N
γ
)
"[#Hinv Hγf]"
.
rewrite
/
read
/=.
wp_let
.
iApply
wp_inv_open
;
last
iFrame
"Hinv"
;
auto
.
iDestruct
1
as
(
c
)
"[Hl Hγ]"
.
wp_load
.
rewrite
/
read
/=.
wp_let
.
Show
.
iApply
wp_inv_open
;
last
iFrame
"Hinv"
;
auto
.
iDestruct
1
as
(
c
)
"[Hl Hγ]"
.
wp_load
.
Show
.
iDestruct
(
own_valid
γ
(
Frag
n
⋅
Auth
c
)
with
"[-]"
)
as
%
?%
auth_frag_valid
.
{
iApply
own_op
.
by
iFrame
.
}
rewrite
(
auth_frag_op
c
c
)
;
last
lia
;
iDestruct
"Hγ"
as
"[Hγ Hγf']"
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment