Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gaurav Parthasarathy
examples_rdcss_old
Commits
3fcca3f2
Commit
3fcca3f2
authored
Aug 28, 2016
by
Zhen Zhang
Browse files
add protocol
parent
bb3e892a
Changes
2
Hide whitespace changes
Inline
Side-by-side
_CoqProject
View file @
3fcca3f2
...
...
@@ -5,3 +5,4 @@ pair_cas.v
flat.v
sync_stack.v
treiber_stack.v
protocol.v
protocol.v
0 → 100644
View file @
3fcca3f2
From
iris
.
algebra
Require
Export
sts
.
From
iris
.
program_logic
Require
Import
ghost_ownership
.
From
iris
.
prelude
Require
Export
gmap
.
Inductive
state
:
=
|
Init
|
Req
|
Exec
|
Resp
|
Ack
.
Inductive
token
:
=
White
|
Black
|
Lock
.
Global
Instance
stateT_inhabited
:
Inhabited
state
:
=
populate
Init
.
Inductive
prim_step
:
relation
state
:
=
|
Initialize
:
prim_step
Init
Req
|
Execute
:
prim_step
Req
Exec
|
Respond
:
prim_step
Exec
Resp
|
Acknowledge
:
prim_step
Resp
Ack
.
Definition
tok
(
s
:
state
)
:
set
token
:
=
match
s
with
|
Init
|
Ack
=>
{[
Black
;
White
]}
|
Req
|
Resp
=>
{[
White
]}
|
Exec
=>
{[
Lock
]}
end
.
Global
Arguments
tok
!
_
/.
Canonical
Structure
sts
:
=
sts
.
STS
prim_step
tok
.
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