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
William Mansky
Iris
Commits
88555828
Commit
88555828
authored
4 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
try different notation
parent
d3c31b45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/heap_lang.v
+1
-1
1 addition, 1 deletion
tests/heap_lang.v
theories/base_logic/lib/gen_inv_heap.v
+11
-11
11 additions, 11 deletions
theories/base_logic/lib/gen_inv_heap.v
theories/heap_lang/lifting.v
+2
-2
2 additions, 2 deletions
theories/heap_lang/lifting.v
with
14 additions
and
14 deletions
tests/heap_lang.v
+
1
−
1
View file @
88555828
...
@@ -207,7 +207,7 @@ Section notation_tests.
...
@@ -207,7 +207,7 @@ Section notation_tests.
Context
`{
!
heapG
Σ
,
inv_heapG
loc
val
Σ
}
.
Context
`{
!
heapG
Σ
,
inv_heapG
loc
val
Σ
}
.
(* Make sure these parse and type-check. *)
(* Make sure these parse and type-check. *)
Lemma
inv_mapsto_own_test
(
l
:
loc
)
:
⊢
l
↦
@
#
5
□
(
λ
_,
True
)
.
Abort
.
Lemma
inv_mapsto_own_test
(
l
:
loc
)
:
⊢
l
↦
_
(
λ
_,
True
)
#
5
.
Abort
.
Lemma
inv_mapsto_test
(
l
:
loc
)
:
⊢
l
↦□
(
λ
_,
True
)
.
Abort
.
Lemma
inv_mapsto_test
(
l
:
loc
)
:
⊢
l
↦□
(
λ
_,
True
)
.
Abort
.
End
notation_tests
.
End
notation_tests
.
...
...
This diff is collapsed.
Click to expand it.
theories/base_logic/lib/gen_inv_heap.v
+
11
−
11
View file @
88555828
...
@@ -68,11 +68,11 @@ Section definitions.
...
@@ -68,11 +68,11 @@ Section definitions.
End
definitions
.
End
definitions
.
Local
Notation
"l ↦□ I"
:=
(
inv_mapsto
l
I
%
stdpp
%
type
)
Local
Notation
"l
'
↦□
'
I"
:=
(
inv_mapsto
l
I
%
stdpp
%
type
)
(
at
level
20
,
format
"l ↦□ I"
)
:
bi_scope
.
(
at
level
20
,
format
"l
'
↦□
'
I"
)
:
bi_scope
.
Local
Notation
"l
↦@ v □ I
"
:=
(
inv_mapsto_own
l
v
I
%
stdpp
%
type
)
Local
Notation
"l
'↦_' I v
"
:=
(
inv_mapsto_own
l
v
I
%
stdpp
%
type
)
(
at
level
20
,
format
"l
↦@ v □
I
"
)
:
bi_scope
.
(
at
level
20
,
I
at
level
9
,
format
"l
'↦_' I
v
"
)
:
bi_scope
.
(* [inv_heap_inv] has no parameters to infer the types from, so we need to
(* [inv_heap_inv] has no parameters to infer the types from, so we need to
make them explicit. *)
make them explicit. *)
...
@@ -147,7 +147,7 @@ Section inv_heap.
...
@@ -147,7 +147,7 @@ Section inv_heap.
Qed
.
Qed
.
Lemma
inv_mapsto_own_lookup_Some
l
v
h
I
:
Lemma
inv_mapsto_own_lookup_Some
l
v
h
I
:
l
↦
@
v
□
I
-∗
own
(
inv_heap_name
gG
)
(
●
to_inv_heap
h
)
-∗
l
↦
_
I
v
-∗
own
(
inv_heap_name
gG
)
(
●
to_inv_heap
h
)
-∗
⌜
∃
I'
,
h
!!
l
=
Some
(
v
,
I'
)
∧
∀
w
,
I
w
↔
I'
w
⌝.
⌜
∃
I'
,
h
!!
l
=
Some
(
v
,
I'
)
∧
∀
w
,
I
w
↔
I'
w
⌝.
Proof
.
Proof
.
iIntros
"Hl_inv H●"
.
iIntros
"Hl_inv H●"
.
...
@@ -183,7 +183,7 @@ Section inv_heap.
...
@@ -183,7 +183,7 @@ Section inv_heap.
Global
Instance
inv_mapsto_timeless
l
I
:
Timeless
(
l
↦□
I
)
.
Global
Instance
inv_mapsto_timeless
l
I
:
Timeless
(
l
↦□
I
)
.
Proof
.
rewrite
/
inv_mapsto
.
apply
_
.
Qed
.
Proof
.
rewrite
/
inv_mapsto
.
apply
_
.
Qed
.
Global
Instance
inv_mapsto_own_timeless
l
v
I
:
Timeless
(
l
↦
@
v
□
I
)
.
Global
Instance
inv_mapsto_own_timeless
l
v
I
:
Timeless
(
l
↦
_
I
v
)
.
Proof
.
rewrite
/
inv_mapsto
.
apply
_
.
Qed
.
Proof
.
rewrite
/
inv_mapsto
.
apply
_
.
Qed
.
(** * Public lemmas *)
(** * Public lemmas *)
...
@@ -191,7 +191,7 @@ Section inv_heap.
...
@@ -191,7 +191,7 @@ Section inv_heap.
Lemma
make_inv_mapsto
l
v
I
E
:
Lemma
make_inv_mapsto
l
v
I
E
:
↑
inv_heapN
⊆
E
→
↑
inv_heapN
⊆
E
→
I
v
→
I
v
→
inv_heap_inv
L
V
-∗
l
↦
v
=
{
E
}
=∗
l
↦
@
v
□
I
.
inv_heap_inv
L
V
-∗
l
↦
v
=
{
E
}
=∗
l
↦
_
I
v
.
Proof
.
Proof
.
iIntros
(
HN
HI
)
"#Hinv Hl"
.
iIntros
(
HN
HI
)
"#Hinv Hl"
.
iMod
(
inv_acc_timeless
_
inv_heapN
with
"Hinv"
)
as
"[HP Hclose]"
;
first
done
.
iMod
(
inv_acc_timeless
_
inv_heapN
with
"Hinv"
)
as
"[HP Hclose]"
;
first
done
.
...
@@ -213,7 +213,7 @@ Section inv_heap.
...
@@ -213,7 +213,7 @@ Section inv_heap.
+
iModIntro
.
by
rewrite
/
inv_mapsto_own
to_inv_heap_singleton
.
+
iModIntro
.
by
rewrite
/
inv_mapsto_own
to_inv_heap_singleton
.
Qed
.
Qed
.
Lemma
inv_mapsto_own_inv
l
v
I
:
l
↦
@
v
□
I
-∗
l
↦□
I
.
Lemma
inv_mapsto_own_inv
l
v
I
:
l
↦
_
I
v
-∗
l
↦□
I
.
Proof
.
Proof
.
apply
own_mono
,
auth_frag_mono
.
rewrite
singleton_included
pair_included
.
apply
own_mono
,
auth_frag_mono
.
rewrite
singleton_included
pair_included
.
right
.
split
;
[
apply
:
ucmra_unit_least
|
done
]
.
right
.
split
;
[
apply
:
ucmra_unit_least
|
done
]
.
...
@@ -224,7 +224,7 @@ Section inv_heap.
...
@@ -224,7 +224,7 @@ Section inv_heap.
this before opening an atomic update that provides [inv_mapsto_own]!. *)
this before opening an atomic update that provides [inv_mapsto_own]!. *)
Lemma
inv_mapsto_own_acc_strong
E
:
Lemma
inv_mapsto_own_acc_strong
E
:
↑
inv_heapN
⊆
E
→
↑
inv_heapN
⊆
E
→
inv_heap_inv
L
V
=
{
E
,
E
∖
↑
inv_heapN
}
=∗
∀
l
v
I
,
l
↦
@
v
□
I
-∗
inv_heap_inv
L
V
=
{
E
,
E
∖
↑
inv_heapN
}
=∗
∀
l
v
I
,
l
↦
_
I
v
-∗
(
⌜
I
v
⌝
∗
l
↦
v
∗
(
∀
w
,
⌜
I
w
⌝
-∗
l
↦
w
==∗
(
⌜
I
v
⌝
∗
l
↦
v
∗
(
∀
w
,
⌜
I
w
⌝
-∗
l
↦
w
==∗
inv_mapsto_own
l
w
I
∗
|
=
{
E
∖
↑
inv_heapN
,
E
}=>
True
))
.
inv_mapsto_own
l
w
I
∗
|
=
{
E
∖
↑
inv_heapN
,
E
}=>
True
))
.
Proof
.
Proof
.
...
@@ -252,8 +252,8 @@ Section inv_heap.
...
@@ -252,8 +252,8 @@ Section inv_heap.
(** Derive a more standard accessor. *)
(** Derive a more standard accessor. *)
Lemma
inv_mapsto_own_acc
E
l
v
I
:
Lemma
inv_mapsto_own_acc
E
l
v
I
:
↑
inv_heapN
⊆
E
→
↑
inv_heapN
⊆
E
→
inv_heap_inv
L
V
-∗
l
↦
@
v
□
I
=
{
E
,
E
∖
↑
inv_heapN
}
=∗
inv_heap_inv
L
V
-∗
l
↦
_
I
v
=
{
E
,
E
∖
↑
inv_heapN
}
=∗
(
⌜
I
v
⌝
∗
l
↦
v
∗
(
∀
w
,
⌜
I
w
⌝
-∗
l
↦
w
=
{
E
∖
↑
inv_heapN
,
E
}
=∗
l
↦
@
w
□
I
))
.
(
⌜
I
v
⌝
∗
l
↦
v
∗
(
∀
w
,
⌜
I
w
⌝
-∗
l
↦
w
=
{
E
∖
↑
inv_heapN
,
E
}
=∗
l
↦
_
I
w
))
.
Proof
.
Proof
.
iIntros
(?)
"#Hinv Hl"
.
iIntros
(?)
"#Hinv Hl"
.
iMod
(
inv_mapsto_own_acc_strong
with
"Hinv"
)
as
"Hacc"
;
first
done
.
iMod
(
inv_mapsto_own_acc_strong
with
"Hinv"
)
as
"Hacc"
;
first
done
.
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/lifting.v
+
2
−
2
View file @
88555828
...
@@ -33,8 +33,8 @@ Notation "l ↦ -" := (l ↦{1} -)%I (at level 20) : bi_scope.
...
@@ -33,8 +33,8 @@ Notation "l ↦ -" := (l ↦{1} -)%I (at level 20) : bi_scope.
Notation
"l ↦□ I"
:=
(
inv_mapsto
(
L
:=
loc
)
(
V
:=
val
)
l
I
%
stdpp
%
type
)
Notation
"l ↦□ I"
:=
(
inv_mapsto
(
L
:=
loc
)
(
V
:=
val
)
l
I
%
stdpp
%
type
)
(
at
level
20
,
format
"l ↦□ I"
)
:
bi_scope
.
(
at
level
20
,
format
"l ↦□ I"
)
:
bi_scope
.
Notation
"l ↦
@ v □ I
"
:=
(
inv_mapsto_own
(
L
:=
loc
)
(
V
:=
val
)
l
v
I
%
stdpp
%
type
)
Notation
"l ↦
_ I v
"
:=
(
inv_mapsto_own
(
L
:=
loc
)
(
V
:=
val
)
l
v
I
%
stdpp
%
type
)
(
at
level
20
,
format
"l ↦
@ v □ I
"
)
:
bi_scope
.
(
at
level
20
,
I
at
level
9
,
format
"l ↦
_ I v
"
)
:
bi_scope
.
(** The tactic [inv_head_step] performs inversion on hypotheses of the shape
(** The tactic [inv_head_step] performs inversion on hypotheses of the shape
[head_step]. The tactic will discharge head-reductions starting from values, and
[head_step]. The tactic will discharge head-reductions starting from values, and
...
...
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