Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
irisatomic
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
FP
irisatomic
Commits
975d454b
Commit
975d454b
authored
Dec 12, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some FIXMEs.
parent
fc4ae5bc
Pipeline
#3321
failed with stage
in 1 minute and 22 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Sidebyside
Showing
4 changed files
with
17 additions
and
31 deletions
+17
31
atomic_incr.v
theories/atomic_incr.v
+4
6
flat.v
theories/flat.v
+1
2
misc.v
theories/misc.v
+1
2
treiber.v
theories/treiber.v
+11
21
No files found.
theories/atomic_incr.v
View file @
975d454b
...
...
@@ 32,14 +32,12 @@ Section incr.
iL
ö
b
as
"IH"
.
iIntros
"!# HP"
.
wp_rec
.
(
*
FIXME
:
I
should
not
have
to
apply
wp_atomic
manually
here
and
below
.
*
)
wp_bind
(
!
_
)
%
E
.
iApply
(
wp_atomic
_
∅
);
first
by
eauto
.
wp_bind
(
!
_
)
%
E
.
iMod
(
"Hvs"
with
"HP"
)
as
(
x
)
"[Hl [Hvs' _]]"
.
iModIntro
.
wp_load
.
wp_load
.
iMod
(
"Hvs'"
with
"Hl"
)
as
"HP"
.
iModIntro
.
wp_let
.
wp_bind
(
CAS
_
_
_
).
wp_op
.
iApply
(
wp_atomic
_
∅
);
first
by
eauto
.
iMod
(
"Hvs"
with
"HP"
)
as
(
x
'
)
"[Hl Hvs']"
.
iModIntro
.
iMod
(
"Hvs"
with
"HP"
)
as
(
x
'
)
"[Hl Hvs']"
.
destruct
(
decide
(
x
=
x
'
)).

subst
.
iDestruct
"Hvs'"
as
"[_ Hvs']"
.
...
...
@@ 68,7 +66,7 @@ Section user.
Lemma
incr_2_safe
:
∀
(
x
:
Z
),
(
WP
incr_2
#
x
{{
_
,
True
}}
)
%
I
.
Proof
.
iIntros
(
x
)
.
iProof
.
(
*
FIXME
:
I
did
iIntros
,
this
should
not
be
needed
.
*
)
iIntros
(
x
)
""
.
(
*
FIXME
:
I
did
iIntros
,
this
should
not
be
needed
.
*
)
rewrite
/
incr_2
/=
.
wp_lam
.
wp_alloc
l
as
"Hl"
.
...
...
theories/flat.v
View file @
975d454b
...
...
@@ 245,8 +245,7 @@ Section proof.
iDestruct
(
ev_map_witness
_
_
_
m2
with
"[Hevm Hom2]"
)
as
%?
;
first
by
iFrame
.
iDestruct
(
big_sepM_delete
_
m2
with
"HRp"
)
as
"[HRk HRp]"
=>
//.
iDestruct
"HRk"
as
(
?
)
"HRk"
.
(
*
FIXME
:
Giving
the
types
here
should
not
be
necessary
.
*
)
iDestruct
(
@
mapsto_agree
loc
val
with
"[$HRk $Hp]"
)
as
%>
.
iDestruct
(
@
mapsto_agree
with
"[$HRk $Hp]"
)
as
%>
.
iCombine
"HRk"
"Hp"
as
"Hp"
.
wp_store
.
(
*
now
close
the
invariant
*
)
iDestruct
(
m_frag_agree
'
with
"[Hx Hx2]"
)
as
"[Hx %]"
;
first
iFrame
.
...
...
theories/misc.v
View file @
975d454b
...
...
@@ 36,8 +36,7 @@ Section heap_extra.
p
↦
{
q1
}
a
∗
p
↦
{
q2
}
b
⊢
False
.
Proof
.
iIntros
(
?
)
"Hp"
.
(
*
FIXME
:
If
I
dont
give
the
types
here
,
it
loops
.
*
)
iDestruct
(
@
mapsto_valid_2
loc
val
with
"Hp"
)
as
%
H
'
.
done
.
iDestruct
(
@
mapsto_valid_2
with
"Hp"
)
as
%
H
'
.
done
.
Qed
.
End
heap_extra
.
...
...
theories/treiber.v
View file @
975d454b
...
...
@@ 63,18 +63,18 @@ Section proof.
+
iIntros
(
hd
)
"(Hxs & Hys)"
.
simpl
.
iDestruct
"Hys"
as
(
hd
'
?
)
"(Hhd & Hys')"
.
iExFalso
.
iDestruct
"Hxs"
as
(
?
)
"Hhd'"
.
(
*
FIXME
:
If
I
dont
give
the
types
here
and
below
through
this
file
,
it
loops
.
*
)
by
iDestruct
(
@
mapsto_agree
loc
val
with
"[$Hhd $Hhd']"
)
as
%?
.
(
*
FIXME
:
If
I
dont
use
the
@
here
and
below
through
this
file
,
it
loops
.
*
)
by
iDestruct
(
@
mapsto_agree
with
"[$Hhd $Hhd']"
)
as
%?
.

induction
ys
as
[

y
ys
'
IHys
'
].
+
iIntros
(
hd
)
"(Hxs & Hys)"
.
simpl
.
iExFalso
.
iDestruct
"Hxs"
as
(
?
?
)
"(Hhd & _)"
.
iDestruct
"Hys"
as
(
?
)
"Hhd'"
.
by
iDestruct
(
@
mapsto_agree
loc
val
with
"[$Hhd $Hhd']"
)
as
%?
.
by
iDestruct
(
@
mapsto_agree
with
"[$Hhd $Hhd']"
)
as
%?
.
+
iIntros
(
hd
)
"(Hxs & Hys)"
.
simpl
.
iDestruct
"Hxs"
as
(
?
?
)
"(Hhd & Hxs')"
.
iDestruct
"Hys"
as
(
?
?
)
"(Hhd' & Hys')"
.
iDestruct
(
@
mapsto_agree
loc
val
with
"[$Hhd $Hhd']"
)
as
%
[
=
Heq
].
iDestruct
(
@
mapsto_agree
with
"[$Hhd $Hhd']"
)
as
%
[
=
Heq
].
subst
.
iDestruct
(
IHxs
'
with
"[Hxs' Hys']"
)
as
"%"
;
first
by
iFrame
.
by
subst
.
Qed
.
...
...
@@ 112,19 +112,16 @@ Section proof.
Lemma
push_atomic_spec
(
s
:
loc
)
(
x
:
val
)
:
push_triple
s
x
.
Proof
.
iProof
.
rewrite
/
push_triple
/
atomic_triple
.
rewrite
/
push_triple
/
atomic_triple
.
iIntros
(
P
Q
)
"#Hvs"
.
iL
ö
b
as
"IH"
.
iIntros
"!# HP"
.
wp_rec
.
wp_let
.
wp_bind
(
!
_
)
%
E
.
(
*
FIXME
:
I
should
not
have
to
apply
wp_atomic
manually
here
and
below
.
*
)
iApply
(
wp_atomic
_
∅
);
first
by
eauto
.
iMod
(
"Hvs"
with
"HP"
)
as
([
xs
hd
])
"[[Hs Hhd] [Hvs' _]]"
.
iModIntro
.
iMod
(
"Hvs"
with
"HP"
)
as
([
xs
hd
])
"[[Hs Hhd] [Hvs' _]]"
.
wp_load
.
iMod
(
"Hvs'"
with
"[Hs Hhd]"
)
as
"HP"
;
first
by
iFrame
.
iModIntro
.
wp_let
.
wp_alloc
l
as
"Hl"
.
wp_let
.
wp_bind
(
CAS
_
_
_
)
%
E
.
iApply
(
wp_atomic
_
∅
);
first
by
eauto
.
iMod
(
"Hvs"
with
"HP"
)
as
([
xs
'
hd
'
])
"[[Hs Hhd'] Hvs']"
.
iModIntro
.
destruct
(
decide
(
hd
=
hd
'
))
as
[
>
Hneq
].
destruct
(
decide
(
hd
=
hd
'
))
as
[
>
Hneq
].
*
wp_cas_suc
.
iDestruct
"Hvs'"
as
"[_ Hvs']"
.
iMod
(
"Hvs'"
$
!
#()
with
"[]"
)
as
"HQ"
.
{
iExists
l
.
iSplitR
;
first
done
.
by
iFrame
.
}
...
...
@@ 150,15 +147,12 @@ Section proof.
Lemma
pop_atomic_spec
(
s
:
loc
)
:
pop_triple
s
.
Proof
.
iProof
.
rewrite
/
pop_triple
/
atomic_triple
.
iIntros
(
P
Q
)
"#Hvs"
.
iL
ö
b
as
"IH"
.
iIntros
"!# HP"
.
wp_rec
.
wp_bind
(
!
_
)
%
E
.
(
*
FIXME
:
I
should
not
have
to
apply
wp_atomic
manually
here
and
below
.
*
)
iApply
(
wp_atomic
_
∅
);
first
by
eauto
.
iMod
(
"Hvs"
with
"HP"
)
as
([
xs
hd
])
"[[Hs Hhd] Hvs']"
.
iModIntro
.
destruct
xs
as
[

y
'
xs
'
].
destruct
xs
as
[

y
'
xs
'
].

simpl
.
wp_load
.
iDestruct
"Hvs'"
as
"[_ Hvs']"
.
iDestruct
"Hhd"
as
(
q
)
"[Hhd Hhd']"
.
iMod
(
"Hvs'"
$
!
NONEV
with
"[Hhd]"
)
as
"HQ"
.
...
...
@@ 172,18 +166,16 @@ Section proof.
{
iFrame
.
iExists
hd
'
,
(
q
/
2
)
%
Qp
.
by
iFrame
.
}
iModIntro
.
wp_let
.
wp_load
.
wp_match
.
wp_proj
.
wp_bind
(
CAS
_
_
_
).
(
*
FIXME
:
I
should
not
have
to
apply
wp_atomic
manually
here
and
below
.
*
)
iApply
(
wp_atomic
_
∅
);
first
by
eauto
.
iMod
(
"Hvs"
with
"HP"
)
as
([
xs
hd
''
])
"[[Hs Hhd''] Hvs']"
.
iModIntro
.
destruct
(
decide
(
hd
=
hd
''
))
as
[
>
Hneq
].
destruct
(
decide
(
hd
=
hd
''
))
as
[
>
Hneq
].
+
wp_cas_suc
.
iDestruct
"Hvs'"
as
"[_ Hvs']"
.
iMod
(
"Hvs'"
$
!
(
SOMEV
y
'
)
with
"[]"
)
as
"HQ"
.
{
iRight
.
iExists
y
'
,
(
q
/
2
/
2
)
%
Qp
,
hd
'
,
xs
'
.
destruct
xs
as
[

x
'
xs
''
].

simpl
.
iDestruct
"Hhd''"
as
(
?
)
"H"
.
iExFalso
.
by
iDestruct
(
@
mapsto_agree
loc
val
with
"[$Hhd1 $H]"
)
as
%?
.
iExFalso
.
by
iDestruct
(
@
mapsto_agree
with
"[$Hhd1 $H]"
)
as
%?
.

simpl
.
iDestruct
"Hhd''"
as
(
hd
'''
?
)
"(Hhd'' & Hxs'')"
.
iDestruct
(
@
mapsto_agree
loc
val
with
"[$Hhd1 $Hhd'']"
)
as
%
[
=
].
iDestruct
(
@
mapsto_agree
with
"[$Hhd1 $Hhd'']"
)
as
%
[
=
].
subst
.
iDestruct
(
uniq_is_list
with
"[Hxs1 Hxs'']"
)
as
"%"
;
first
by
iFrame
.
subst
.
repeat
(
iSplitR
"Hxs1 Hs"
;
first
done
).
...
...
@@ 193,6 +185,4 @@ Section proof.
iMod
(
"Hvs'"
with
"[]"
)
as
"HP"
;
first
by
iFrame
.
iModIntro
.
wp_if
.
by
iApply
"IH"
.
Qed
.
End
proof
.
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