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
C
c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
c
Commits
1d0a5447
Commit
1d0a5447
authored
Apr 27, 2018
by
Dan Frumin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of admits
parent
05073110
Changes
2
Hide whitespace changes
Inline
Sidebyside
Showing
2 changed files
with
30 additions
and
6 deletions
+30
6
theories/c_translation/translation.v
theories/c_translation/translation.v
+4
4
theories/lib/locking_heap.v
theories/lib/locking_heap.v
+26
2
No files found.
theories/c_translation/translation.v
View file @
1d0a5447
...
...
@@ 105,16 +105,16 @@ Section proofs.
iAssert
(
⌜σ
!!
l
=
None
⌝
)%
I
with
"[Hl Hls]"
as
%
Hl
.
{
remember
(
σ
!!
l
)
as
σ
l
.
destruct
σ
l
;
simplify_eq
;
eauto
.
iExFalso
.
rewrite
(
big_sepM_lookup
_
σ
l
_
)
;
last
eauto
.
iDestruct
"Hls"
as
(
v'
)
"Hl'"
.
admit
.
(* iDestruct (mapsto_valid_2 with "[Hl] [Hl']") as "Hfoo". *)
}
iDestruct
"Hls"
as
(
v'
)
"Hl'"
.
by
iDestruct
(
mapsto_valid_2
l
with
"Hl Hl'"
)
as
%[].
}
iDestruct
"Hl"
as
"[Hl Hl']"
.
iMod
(
locking_heap_alloc
σ
l
ULvl
v
with
"Hl' Hσ"
)
as
"[Hσ Hl']"
;
eauto
.
wp_apply
(
release_cancel_spec
with
"[$Hfl $Hlkd $HR Hσ Hls Hl HX]"
).
{
iExists
X
,(<[
l
:
=
ULvl
]>
σ
).
iFrame
.
iSplit
.

rewrite
big_sepM_insert
;
eauto
.
iFrame
.
eauto
.

iPureIntro
.
admit
.
(* TODO: need a lemma for corrrect locks *)

iPureIntro
.
by
rewrite
locked_locs_alloc_unlocked
.
}
iIntros
"Hunfl"
.
wp_seq
.
iFrame
.
by
iApply
"HΦ"
.
Admitt
ed
.
Q
ed
.
End
proofs
.
theories/lib/locking_heap.v
View file @
1d0a5447
...
...
@@ 115,8 +115,32 @@ Section properties.
right
.
intros
?.
rewrite
lookup_insert
=>?.
simplify_eq
/=.
naive_solver
.

rewrite
lookup_delete_ne
;
last
done
.
admit
.
Admitted
.
remember
(
σ
!!
j
)
as
σ
j
.
symmetry
in
Heq
σ
j
.
destruct
σ
j
as
[[]].
+
transitivity
(
Some
LLvl
)
;
[
symmetry
]
;
apply
map_filter_lookup_Some
;
try
naive_solver
.
rewrite
lookup_insert_ne
;
naive_solver
.
+
transitivity
(@
None
level
)
;
[
symmetry
]
;
apply
map_filter_lookup_None
;
right
;
try
naive_solver
.
rewrite
lookup_insert_ne
;
naive_solver
.
+
transitivity
(@
None
level
)
;
[
symmetry
]
;
apply
map_filter_lookup_None
;
right
;
try
naive_solver
.
rewrite
lookup_insert_ne
;
naive_solver
.
Qed
.
Lemma
locked_locs_alloc_unlocked
σ
l
:
σ
!!
l
=
None
→
locked_locs
(<[
l
:
=
ULvl
]>
σ
)
=
locked_locs
σ
.
Proof
.
intros
Hl
.
rewrite
/
locked_locs
.
f_equal
.
apply
map_eq
=>
j
.
destruct
(
decide
(
l
=
j
))
as
[>?].

transitivity
(@
None
level
)
;
[
symmetry
]
;
apply
map_filter_lookup_None
;
[
right

by
left
].
+
rewrite
lookup_insert
.
naive_solver
.

remember
(
σ
!!
j
)
as
σ
j
.
symmetry
in
Heq
σ
j
.
destruct
σ
j
as
[[]].
+
transitivity
(
Some
LLvl
)
;
[
symmetry
]
;
apply
map_filter_lookup_Some
;
try
naive_solver
.
rewrite
lookup_insert_ne
;
naive_solver
.
+
transitivity
(@
None
level
)
;
[
symmetry
]
;
apply
map_filter_lookup_None
;
right
;
try
naive_solver
.
rewrite
lookup_insert_ne
;
naive_solver
.
+
transitivity
(@
None
level
)
;
[
symmetry
]
;
apply
map_filter_lookup_None
;
right
;
try
naive_solver
.
rewrite
lookup_insert_ne
;
naive_solver
.
Qed
.
Lemma
heap_singleton_included
(
σ
:
gmap
loc
level
)
l
x
:
{[
l
:
=
Excl
x
]}
≼
(
to_locking_heap
σ
)
→
σ
!!
l
=
Some
x
.
...
...
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