Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
116
Issues
116
List
Boards
Labels
Service Desk
Milestones
Merge Requests
23
Merge Requests
23
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Iris
Commits
c7f02a6d
Commit
c7f02a6d
authored
Oct 31, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add notation l ↦{q} -.
parent
06571377
Pipeline
#2924
passed with stage
in 9 minutes and 57 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
heap_lang/heap.v
heap_lang/heap.v
+16
-0
No files found.
heap_lang/heap.v
View file @
c7f02a6d
...
...
@@ -39,6 +39,10 @@ Notation "l ↦{ q } v" := (heap_mapsto l q v)
(
at
level
20
,
q
at
level
50
,
format
"l ↦{ q } v"
)
:
uPred_scope
.
Notation
"l ↦ v"
:
=
(
heap_mapsto
l
1
v
)
(
at
level
20
)
:
uPred_scope
.
Notation
"l ↦{ q } -"
:
=
(
∃
v
,
l
↦
{
q
}
v
)%
I
(
at
level
20
,
q
at
level
50
,
format
"l ↦{ q } -"
)
:
uPred_scope
.
Notation
"l ↦ -"
:
=
(
l
↦
{
1
}
-)%
I
(
at
level
20
)
:
uPred_scope
.
Section
heap
.
Context
{
Σ
:
gFunctors
}.
Implicit
Types
P
Q
:
iProp
Σ
.
...
...
@@ -103,6 +107,18 @@ Section heap.
l
↦
{
q
/
2
}
v1
★
l
↦
{
q
/
2
}
v2
⊢
v1
=
v2
∧
l
↦
{
q
}
v1
.
Proof
.
by
rewrite
heap_mapsto_op_half
.
Qed
.
Lemma
heap_ex_mapsto_op
l
q1
q2
:
l
↦
{
q1
}
-
★
l
↦
{
q2
}
-
⊣
⊢
l
↦
{
q1
+
q2
}
-.
Proof
.
iSplit
.
-
iIntros
"[H1 H2]"
.
iDestruct
"H1"
as
(
v1
)
"H1"
.
iDestruct
"H2"
as
(
v2
)
"H2"
.
iDestruct
(
heap_mapsto_op_1
with
"[$H1 $H2]"
)
as
"[% ?]"
;
subst
;
eauto
.
-
iDestruct
1
as
(
v
)
"H"
.
rewrite
-
heap_mapsto_op_eq
.
iDestruct
"H"
as
"[H1 H2]"
;
iSplitL
"H1"
;
eauto
.
Qed
.
Lemma
heap_ex_mapsto_op_half
l
q
:
l
↦
{
q
/
2
}
-
★
l
↦
{
q
/
2
}
-
⊣
⊢
l
↦
{
q
}
-.
Proof
.
by
rewrite
heap_ex_mapsto_op
Qp_div_2
.
Qed
.
(** Weakest precondition *)
Lemma
wp_alloc
E
e
v
:
to_val
e
=
Some
v
→
nclose
heapN
⊆
E
→
...
...
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