Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Paolo G. Giarrusso
examples
Commits
82d08c14
Commit
82d08c14
authored
Jun 12, 2019
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expand comments
parent
b14af24e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
theories/logatom/conditional_increment/cinc.v
theories/logatom/conditional_increment/cinc.v
+6
-2
No files found.
theories/logatom/conditional_increment/cinc.v
View file @
82d08c14
...
...
@@ -188,8 +188,10 @@ Section conditional_counter.
Remember that the thread winning the CAS might be just helping. The token
is owned by the thread whose request this is.
In this state, [l_ghost_winner] serves as a token to make sure that
only the CAS winner can transition to here, and [loc_token l] serves as a
"location" token to ensure there is no ABA going on. *)
only the CAS winner can transition to here, and owning half of[l] serves as a
"location" token to ensure there is no ABA going on. Notice how [counter_inv]
owns *more than* half of its [l], which means we know that the [l] there
and here cannot be the same. *)
Definition
done_state
Q
(
l
l_ghost_winner
:
loc
)
(
γ
_t
:
gname
)
:
=
((
Q
∨
own_token
γ
_t
)
∗
l_ghost_winner
↦
-
∗
l
↦
{
1
/
2
}
-)%
I
.
...
...
@@ -210,6 +212,8 @@ Section conditional_counter.
Definition
counter_inv
γ
_b
γ
_n
f
c
:
=
(
∃
(
b
:
bool
)
(
l
:
loc
)
(
q
:
Qp
)
(
s
:
abstract_state
),
(* We own *more than* half of [l], which shows that this cannot
be the [l] of any [state] protocol in the [done] state. *)
f
↦
#
b
∗
c
↦
{
1
/
2
}
#
l
∗
l
↦
{
1
/
2
+
q
}
(
state_to_val
s
)
∗
own
γ
_b
(
●
Excl'
b
)
∗
match
s
with
...
...
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