Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Iris
examples
Commits
26b60a28
Commit
26b60a28
authored
6 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
bump Iris
parent
4b943421
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
opam
+1
-1
1 addition, 1 deletion
opam
theories/flat.v
+8
-8
8 additions, 8 deletions
theories/flat.v
theories/peritem.v
+1
-1
1 addition, 1 deletion
theories/peritem.v
theories/simple_sync.v
+4
-4
4 additions, 4 deletions
theories/simple_sync.v
theories/treiber.v
+3
-3
3 additions, 3 deletions
theories/treiber.v
with
17 additions
and
17 deletions
opam
+
1
−
1
View file @
26b60a28
...
...
@@ -9,5 +9,5 @@ build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris_atomic"]
depends: [
"coq-iris" { (= "dev.2018-
07-13.2.af5611c8
") | (= "dev") }
"coq-iris" { (= "dev.2018-
10-31.4.4a1eb8a3
") | (= "dev") }
]
This diff is collapsed.
Click to expand it.
theories/flat.v
+
8
−
8
View file @
26b60a28
...
...
@@ -107,7 +107,7 @@ Section proof.
{{{
p
ts
,
RET
#
p
;
installed_recp
ts
x
Q
∗
inv
N
(
p_inv
R
γm
γr
ts
p
)
}}}
.
Proof
.
iIntros
(
Φ
)
"(#? & HP & Hf) HΦ"
.
wp_
seq
.
wp_let
.
wp_let
.
wp_alloc
p
as
"Hl"
.
wp_
lam
.
wp_pures
.
wp_alloc
p
as
"Hl"
.
iApply
fupd_wp
.
iMod
(
own_alloc
(
Excl
()))
as
(
γ1
)
"Ho1"
;
first
done
.
iMod
(
own_alloc
(
Excl
()))
as
(
γ3
)
"Ho3"
;
first
done
.
...
...
@@ -151,10 +151,10 @@ Section proof.
by
apply
pair_l_frac_op'
.
}
wp_load
.
iMod
(
"Hclose"
with
"[-Hf' Ho1 Hx2 HoQ HR HΦ Hpx]"
)
.
{
iNext
.
iFrame
.
iFrame
"#"
.
iRight
.
iRight
.
iLeft
.
iExists
f
,
x
.
iFrame
.
}
iModIntro
.
wp_match
.
wp_p
roj
.
wp_proj
.
iModIntro
.
wp_match
.
wp_p
ures
.
wp_bind
(
f
_)
.
iApply
wp_wand_r
.
iSplitL
"Hpx Hf' HR"
.
{
iApply
"Hf'"
.
iFrame
.
}
iIntros
(
v
)
"[HR HQ]"
.
iIntros
(
v
)
"[HR HQ]"
.
wp_pures
.
iInv
N
as
"Hx"
"Hclose"
.
iDestruct
"Hx"
as
"[Hp | [Hp | [Hp | Hp]]]"
;
subst
.
*
iDestruct
"Hp"
as
(?)
"(_ & >Ho1' & _)"
.
...
...
@@ -215,7 +215,7 @@ Section proof.
is_lock
N
γlk
lk
(
own
γr
(
Excl
())
∗
R
)
∗
Φ
#
()
⊢
WP
try_srv
lk
#
s
{{
Φ
}}
.
Proof
.
iIntros
"(#? & #? & HΦ)"
.
wp_
seq
.
wp_
let
.
iIntros
"(#? & #? & HΦ)"
.
wp_
lam
.
wp_
pures
.
wp_bind
(
try_acquire
_)
.
iApply
(
try_acquire_spec
with
"[]"
);
first
done
.
iNext
.
iIntros
([]);
last
by
(
iIntros
;
wp_if
)
.
iIntros
"[Hlocked [Ho2 HR]]"
.
...
...
@@ -271,16 +271,16 @@ Section proof.
Proof
.
iIntros
(
R
Φ
)
"HR HΦ"
.
iMod
(
own_alloc
(
Excl
()))
as
(
γr
)
"Ho2"
;
first
done
.
wp_
seq
.
wp_bind
(
newlock
_)
.
wp_
lam
.
wp_bind
(
newlock
_)
.
iApply
(
newlock_spec
_
(
own
γr
(
Excl
())
∗
R
)
%
I
with
"[$Ho2 $HR]"
)=>
//.
iNext
.
iIntros
(
lk
γlk
)
"#Hlk"
.
wp_let
.
wp_bind
(
new_stack
_)
.
iApply
(
new_bag_spec
N
(
p_inv'
R
γm
γr
))=>
//.
iNext
.
iIntros
(
s
)
"#Hss"
.
wp_
let
.
iApply
"HΦ"
.
rewrite
/
synced
.
iAlways
.
iIntros
(
f
)
.
wp_
let
.
iAlways
.
wp_
pures
.
iApply
"HΦ"
.
rewrite
/
synced
.
iAlways
.
iIntros
(
f
)
.
wp_
pures
.
iAlways
.
iIntros
(
P
Q
x
)
"#Hf"
.
iIntros
"!# Hp"
.
wp_
let
.
wp_bind
(
install
_
_
_)
.
iIntros
"!# Hp"
.
wp_
pures
.
wp_bind
(
install
_
_
_)
.
iApply
(
install_spec
R
P
Q
f
x
γm
γr
s
with
"[-]"
)=>
//.
{
iFrame
.
iFrame
"#"
.
}
iNext
.
iIntros
(
p
[[[[
γx
γ1
]
γ3
]
γ4
]
γq
])
"[(Ho3 & Hx & HoQ) #?]"
.
...
...
This diff is collapsed.
Click to expand it.
theories/peritem.v
+
1
−
1
View file @
26b60a28
...
...
@@ -47,7 +47,7 @@ Section proofs.
{{{
True
}}}
new_stack
#
()
{{{
s
,
RET
#
s
;
bag_inv
s
}}}
.
Proof
.
iIntros
(
Φ
)
"_ HΦ"
.
iApply
wp_fupd
.
wp_
seq
.
wp_bind
(
ref
NONE
)
%
E
.
wp_alloc
l
as
"Hl"
.
wp_
lam
.
wp_bind
(
ref
NONE
)
%
E
.
wp_alloc
l
as
"Hl"
.
wp_alloc
s
as
"Hs"
.
iAssert
((
∃
xs
,
is_bag_R
N
R
xs
s
))
%
I
with
"[-HΦ]"
as
"Hxs"
.
{
iFrame
.
iExists
[],
l
.
...
...
This diff is collapsed.
Click to expand it.
theories/simple_sync.v
+
4
−
4
View file @
26b60a28
...
...
@@ -22,12 +22,12 @@ Section syncer.
Lemma
mk_sync_spec
:
mk_syncer_spec
mk_sync
.
Proof
.
iIntros
(
R
Φ
)
"HR HΦ"
.
wp_
seq
.
wp_bind
(
newlock
_)
.
wp_
lam
.
wp_bind
(
newlock
_)
.
iApply
(
newlock_spec
N
R
with
"[HR]"
);
first
done
.
iNext
.
iIntros
(
lk
γ
)
"#Hl"
.
wp_
let
.
iApply
"HΦ"
.
iIntros
"!#"
.
iIntros
(
f
)
.
wp_
let
.
iAlways
.
iIntros
(
lk
γ
)
"#Hl"
.
wp_
pures
.
iApply
"HΦ"
.
iIntros
"!#"
.
iIntros
(
f
)
.
wp_
pures
.
iAlways
.
iIntros
(
P
Q
x
)
"#Hf !# HP"
.
wp_
let
.
wp_bind
(
acquire
_)
.
wp_
pures
.
wp_bind
(
acquire
_)
.
iApply
(
acquire_spec
with
"Hl"
)
.
iNext
.
iIntros
"[Hlocked R]"
.
wp_seq
.
wp_bind
(
f
_)
.
iSpecialize
(
"Hf"
with
"[R HP]"
);
first
by
iFrame
.
...
...
This diff is collapsed.
Click to expand it.
theories/treiber.v
+
3
−
3
View file @
26b60a28
...
...
@@ -91,7 +91,7 @@ Section proof.
∀
(
Φ
:
val
→
iProp
Σ
),
(
∀
s
,
is_stack
s
[]
-∗
Φ
#
s
)
⊢
WP
new_stack
#
()
{{
Φ
}}
.
Proof
.
iIntros
(
Φ
)
"HΦ"
.
wp_
seq
.
iIntros
(
Φ
)
"HΦ"
.
wp_
lam
.
wp_bind
(
ref
NONE
)
%
E
.
wp_alloc
l
as
"Hl"
.
wp_alloc
l'
as
"Hl'"
.
iApply
"HΦ"
.
rewrite
/
is_stack
.
iExists
l
.
...
...
@@ -144,7 +144,7 @@ Section proof.
iDestruct
"Hhd"
as
(
q
)
"[Hhd Hhd']"
.
iMod
(
"Hvs'"
with
"[-Hhd]"
)
as
"HQ"
.
{
iFrame
.
eauto
.
}
iModIntro
.
wp_let
.
wp_load
.
wp_
match
.
iModIntro
.
wp_let
.
wp_load
.
wp_
pures
.
eauto
.
-
simpl
.
iDestruct
"Hhd"
as
(
hd'
q
)
"([[Hhd1 Hhd2] Hhd'] & Hxs')"
.
iDestruct
(
dup_is_list
with
"[Hxs']"
)
as
"[Hxs1 Hxs2]"
;
first
by
iFrame
.
...
...
@@ -166,7 +166,7 @@ Section proof.
iDestruct
(
uniq_is_list
with
"[Hxs1 Hxs'']"
)
as
"%"
;
first
by
iFrame
.
subst
.
repeat
(
iSplitR
"Hxs1 Hs"
;
first
done
)
.
iFrame
.
}
iModIntro
.
wp_if
.
wp_p
roj
.
eauto
.
iModIntro
.
wp_if
.
wp_p
ures
.
eauto
.
+
wp_cas_fail
.
iDestruct
"Hvs'"
as
"[Hvs' _]"
.
iMod
(
"Hvs'"
with
"[-]"
)
as
"HP"
;
first
by
iFrame
.
iModIntro
.
wp_if
.
by
iApply
"IH"
.
...
...
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