Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaëtan Gilbert
Iris
Commits
cc712c90
Commit
cc712c90
authored
6 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
more nits
parent
25ed5c9c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
theories/heap_lang/lib/coin_flip.v
+2
-2
2 additions, 2 deletions
theories/heap_lang/lib/coin_flip.v
theories/heap_lang/lifting.v
+1
-1
1 addition, 1 deletion
theories/heap_lang/lifting.v
theories/heap_lang/proph_map.v
+10
-9
10 additions, 9 deletions
theories/heap_lang/proph_map.v
with
13 additions
and
12 deletions
theories/heap_lang/lib/coin_flip.v
+
2
−
2
View file @
cc712c90
...
...
@@ -52,8 +52,8 @@ Section coinflip.
<<<
∃
(
b
:
bool
),
x
↦
#
0
,
RET
#
b
>>>.
Proof
.
iApply
wp_atomic_intro
.
iIntros
(
Φ
)
"AU"
.
wp_lam
.
wp_
bind
(
rand
_)
%
E
.
iA
pply
rand_spec
;
first
done
.
iIntros
(
b
)
"
!>
_"
.
wp_let
.
wp_
a
pply
rand_spec
;
first
done
.
iIntros
(
b
)
"_"
.
wp_let
.
wp_bind
(_
<-
_)
%
E
.
iMod
"AU"
as
"[Hl [_ Hclose]]"
.
iDestruct
"Hl"
as
(
v
)
"Hl"
.
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/lifting.v
+
1
−
1
View file @
cc712c90
...
...
@@ -29,7 +29,7 @@ Notation "l ↦{ q } -" := (∃ v, l ↦{q} v)%I
(
at
level
20
,
q
at
level
50
,
format
"l ↦{ q } -"
)
:
bi_scope
.
Notation
"l ↦ -"
:=
(
l
↦
{
1
}
-
)
%
I
(
at
level
20
)
:
bi_scope
.
Notation
"p ⥱ v"
:=
(
p_mapsto
p
v
)
(
at
level
20
,
format
"p ⥱ v"
)
:
bi_scope
.
Notation
"p ⥱ v"
:=
(
p
roph
_mapsto
p
v
)
(
at
level
20
,
format
"p ⥱ v"
)
:
bi_scope
.
Notation
"p ⥱ -"
:=
(
∃
v
,
p
⥱
v
)
%
I
(
at
level
20
)
:
bi_scope
.
(** The tactic [inv_head_step] performs inversion on hypotheses of the shape
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/proph_map.v
+
10
−
9
View file @
cc712c90
...
...
@@ -89,15 +89,16 @@ Section definitions.
dom
(
gset
_)
R
⊆
ps
⌝
∗
proph_map_auth
R
)
%
I
.
Definition
p_mapsto_def
(
p
:
P
)
(
v
:
option
V
)
:
iProp
Σ
:=
Definition
p
roph
_mapsto_def
(
p
:
P
)
(
v
:
option
V
)
:
iProp
Σ
:=
own
(
proph_map_name
pG
)
(
◯
{[
p
:=
Excl
(
v
:
option
$
leibnizC
V
)
]})
.
Definition
p_mapsto_aux
:
seal
(
@
p_mapsto_def
)
.
by
eexists
.
Qed
.
Definition
p_mapsto
:=
p_mapsto_aux
.(
unseal
)
.
Definition
p_mapsto_eq
:
@
p_mapsto
=
@
p_mapsto_def
:=
p_mapsto_aux
.(
seal_eq
)
.
Definition
proph_mapsto_aux
:
seal
(
@
proph_mapsto_def
)
.
by
eexists
.
Qed
.
Definition
proph_mapsto
:=
proph_mapsto_aux
.(
unseal
)
.
Definition
proph_mapsto_eq
:
@
proph_mapsto
=
@
proph_mapsto_def
:=
proph_mapsto_aux
.(
seal_eq
)
.
End
definitions
.
Local
Notation
"p ⥱ v"
:=
(
p_mapsto
p
v
)
(
at
level
20
,
format
"p ⥱ v"
)
:
bi_scope
.
Local
Notation
"p ⥱ v"
:=
(
p
roph
_mapsto
p
v
)
(
at
level
20
,
format
"p ⥱ v"
)
:
bi_scope
.
Local
Notation
"p ⥱ -"
:=
(
∃
v
,
p
⥱
v
)
%
I
(
at
level
20
)
:
bi_scope
.
Section
to_proph_map
.
...
...
@@ -148,13 +149,13 @@ Section proph_map.
(** General properties of mapsto *)
Global
Instance
p_mapsto_timeless
p
v
:
Timeless
(
p
⥱
v
)
.
Proof
.
rewrite
p_mapsto_eq
/
p_mapsto_def
.
apply
_
.
Qed
.
Proof
.
rewrite
p
roph
_mapsto_eq
/
p
roph
_mapsto_def
.
apply
_
.
Qed
.
Lemma
proph_map_alloc
R
p
v
:
p
∉
dom
(
gset
_)
R
→
proph_map_auth
R
==∗
proph_map_auth
(
<
[
p
:=
v
]
>
R
)
∗
p
⥱
v
.
Proof
.
iIntros
(
Hp
)
"HR"
.
rewrite
/
proph_map_ctx
p_mapsto_eq
/
p_mapsto_def
.
iIntros
(
Hp
)
"HR"
.
rewrite
/
proph_map_ctx
p
roph
_mapsto_eq
/
p
roph
_mapsto_def
.
iMod
(
own_update
with
"HR"
)
as
"[HR Hl]"
.
{
eapply
auth_update_alloc
,
(
alloc_singleton_local_update
_
_
(
Excl
$
(
v
:
option
(
leibnizC
_))))=>
//.
...
...
@@ -165,14 +166,14 @@ Section proph_map.
Lemma
proph_map_remove
R
p
v
:
proph_map_auth
R
-∗
p
⥱
v
==∗
proph_map_auth
(
delete
p
R
)
.
Proof
.
iIntros
"HR Hp"
.
rewrite
/
proph_map_ctx
p_mapsto_eq
/
p_mapsto_def
.
iIntros
"HR Hp"
.
rewrite
/
proph_map_ctx
p
roph
_mapsto_eq
/
p
roph
_mapsto_def
.
rewrite
/
proph_map_auth
to_proph_map_delete
.
iApply
(
own_update_2
with
"HR Hp"
)
.
apply
auth_update_dealloc
,
(
delete_singleton_local_update
_
_
_)
.
Qed
.
Lemma
proph_map_valid
R
p
v
:
proph_map_auth
R
-∗
p
⥱
v
-∗
⌜
R
!!
p
=
Some
v
⌝.
Proof
.
iIntros
"HR Hp"
.
rewrite
/
proph_map_ctx
p_mapsto_eq
/
p_mapsto_def
.
iIntros
"HR Hp"
.
rewrite
/
proph_map_ctx
p
roph
_mapsto_eq
/
p
roph
_mapsto_def
.
iDestruct
(
own_valid_2
with
"HR Hp"
)
as
%
[
HH
%
proph_map_singleton_included
_]
%
auth_valid_discrete_2
;
auto
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment