Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
FP
iris-atomic
Commits
3038f1ca
Commit
3038f1ca
authored
Oct 11, 2016
by
Zhen Zhang
Browse files
Cleanups
parent
4871f85f
Changes
3
Hide whitespace changes
Inline
Side-by-side
atomic_p
air
.v
→
atomic_p
cas
.v
View file @
3038f1ca
File moved
p
air_
cas.v
→
pcas.v
View file @
3038f1ca
File moved
proof.v
deleted
100644 → 0
View file @
4871f85f
From
iris
.
program_logic
Require
Export
weakestpre
.
From
iris
.
heap_lang
Require
Export
lang
.
From
iris
.
heap_lang
.
lib
.
barrier
Require
Export
barrier
.
From
iris
.
prelude
Require
Import
functions
.
From
iris
.
algebra
Require
Import
upred_big_op
.
From
iris
.
program_logic
Require
Import
saved_prop
sts
.
From
iris
.
heap_lang
Require
Import
proofmode
.
From
flatcomb
Require
Import
protocol
flat
.
Class
flatG
Σ
:=
FlatG
{
flat_stsG
:>
stsG
Σ
sts
}
.
Definition
flat
Σ
:
gFunctors
:=
#[
sts
Σ
sts
].
Instance
subG_flat
Σ
{
Σ
}
:
subG
flat
Σ
Σ
→
flatG
Σ
.
Admitted
.
(
**
Now
we
come
to
the
Iris
part
of
the
proof
.
*
)
Section
proof
.
Context
`
{!
heapG
Σ
,
!
flatG
Σ
}
(
N
:
namespace
).
Coercion
state_to_val
(
s
:
state
)
:
val
:=
match
s
with
|
Init
=>
#
0
|
Req
=>
#
1
|
Exec
=>
#
2
|
Resp
=>
#
3
|
Ack
=>
#
4
end
.
Arguments
state_to_val
!
_
/
:
simpl
nomatch
.
Definition
flat_inv
(
l
:
loc
)
(
s
:
state
)
:
iProp
Σ
:=
(
l
↦
s
)
%
I
.
Definition
flat_ctx
(
γ
:
gname
)
(
l
:
loc
)
:
iProp
Σ
:=
(
■
(
heapN
⊥
N
)
★
heap_ctx
★
sts_ctx
γ
N
(
flat_inv
l
))
%
I
.
Definition
init
(
l
:
loc
)
:=
(
∃
γ
,
flat_ctx
γ
l
★
sts_ownS
γ
{
[
Init
]
}
∅
)
%
I
.
Definition
req
(
lo
:
val
)
P
:=
(
∃
γ
req
(
l
:
loc
),
lo
=
#
l
∧
l
↦
InjLV
req
★
P
req
★
sts_ownS
γ
{
[
Req
]
}
{
[
White
]
}
)
%
I
.
Lemma
doOp_spec
(
l
f
o
:
val
)
P
:
∀
Φ
:
val
→
iProp
Σ
,
(
*
lock
l
★
*
)
req
o
P
⊢
WP
doOp
f
o
{{
Φ
}}
.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment