Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lambda-rust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Service Desk
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
lambda-rust
Commits
c3400619
There was a problem fetching the pipeline summary.
Commit
c3400619
authored
7 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
explaing CasStuckS
parent
61edcac5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/lang/lang.v
+11
-0
11 additions, 0 deletions
theories/lang/lang.v
with
11 additions
and
0 deletions
theories/lang/lang.v
+
11
−
0
View file @
c3400619
...
...
@@ -308,6 +308,17 @@ Inductive head_step : expr → state → expr → state → list expr → Prop :
head_step
(
CAS
(
Lit
$
LitLoc
l
)
e1
e2
)
σ
(
Lit
$
lit_of_bool
true
)
(
<
[
l
:=(
RSt
0
,
LitV
lit2
)]
>
σ
)
[]
(* A succeeding CAS has to detect concurrent non-atomic read accesses, and
trigger UB if there is one. In lambdaRust, succeeding and failing CAS are
not mutually exclusive, so it could happen that a CAS can both fail (and
hence not be stuck) but also succeed (and hence be racing with a concurrent
non-atomic read). In that case, we have to explicitly reduce to a stuck
state; due to the possibility of failing CAS, we cannot rely on the current
state being stuck like we could in a language where failing and succeeding
CAS are mutually exclusive.
If there is a concurrent non-atomic write, the CAS itself is stuck: All it's
reductions are blocked. *)
|
CasStuckS
l
n
e1
lit1
e2
lit2
litl
σ
:
to_val
e1
=
Some
$
LitV
lit1
→
to_val
e2
=
Some
$
LitV
lit2
→
σ
!!
l
=
Some
(
RSt
n
,
LitV
litl
)
→
0
<
n
→
...
...
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