Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Dan Frumin
ReLoC-v1
Commits
752493b6
Commit
752493b6
authored
Mar 29, 2018
by
Dan Frumin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better log. atomic spec. for weak increment
parent
b97a8212
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
theories/examples/ticket_lock.v
theories/examples/ticket_lock.v
+10
-10
No files found.
theories/examples/ticket_lock.v
View file @
752493b6
...
...
@@ -319,13 +319,13 @@ Section refinement.
cf
wkIncr
specification
from
(
da
Rocha
Pinto
,
Dinsdale
-
Young
,
Gardner
)
Parameter
type
:
nat
Precondition:
λ
n
,
x
↦ᵢ
n
Postcondition
λ
_
,
∃
n
,
x
↦ᵢ
n
Postcondition
λ
_
,
∃
n
,
x
↦ᵢ
(
n
+
1
)
*
)
Lemma
wkincr_atomic_l
R1
R2
Δ
Γ
E
K
x
t
τ
:
R2
-
∗
□
(
|={
⊤
,
E
}=>
∃
n
:
nat
,
x
↦ᵢ
#
n
∗
R1
n
∗
(
(
∃
n
:
nat
,
x
↦ᵢ
#
n
∗
R1
n
)
={
E
,
⊤
}=
∗
True
)
∧
(
∀
m
,
(
∃
n
:
nat
,
x
↦ᵢ
#
n
)
∗
R1
m
-
∗
R2
-
∗
(
x
↦ᵢ
#
n
∗
R1
n
={
E
,
⊤
}=
∗
True
)
∧
((
∃
n
:
nat
,
x
↦ᵢ
#
(
n
+
1
)
)
∗
R1
n
-
∗
R2
-
∗
{
E
;
Δ
;
Γ
}
⊨
fill
K
Unit
≤
log
≤
t
:
τ
))
-
∗
(
{
Δ
;
Γ
}
⊨
fill
K
(
wkincr
#
x
)
≤
log
≤
t
:
τ
).
Proof
.
...
...
@@ -337,7 +337,7 @@ Section refinement.
iMod
"H"
as
(
n
)
"[Hx [HR1 [Hrev _]]]"
.
iModIntro
.
iExists
_
;
iFrame
.
iNext
.
iIntros
"Hx"
.
iMod
(
"Hrev"
with
"[HR1 Hx]"
)
as
"_"
;
simpl
.
{
iExists
_.
iFrame
.
}
{
iFrame
.
}
rel_op_l
.
rel_store_l_atomic
.
iMod
"H2"
as
(
m
)
"[Hx [HR1 [_ Hmod]]]"
.
iModIntro
.
...
...
@@ -364,15 +364,15 @@ Section refinement.
openI
.
iModIntro
.
iExists
_
;
iFrame
.
rewrite
{
1
}/
R
.
iSplitR
"Hcl"
.
{
iExists
_
,
_
;
by
iFrame
.
}
clear
o
n
b
.
{
iExists
_
,
_
;
by
iFrame
.
}
iSplit
.
-
i
Destruct
1
as
(
o
)
"[Hlo HR]"
.
unfold
R
.
iDestruct
"HR"
as
(
n
b
)
"HR"
.
-
i
Intros
"[Hlo HR]"
.
unfold
R
.
iDestruct
"HR"
as
(
n
'
b
'
)
"HR"
.
iApply
"Hcl"
.
iNext
.
iExists
_
,
_
,
_
;
by
iFrame
.
-
iIntros
(
?
)
"[Hlo HR] _"
.
iDestruct
"Hlo"
as
(
o
)
"Hlo"
.
unfold
R
.
iDestruct
"HR"
as
(
n
b
)
"(Hln & Hissued & Hl' & Hticket)"
.
-
iIntros
"[Hlo HR] _"
.
iDestruct
"Hlo"
as
(
o
'
)
"Hlo"
.
unfold
R
.
iDestruct
"HR"
as
(
n
'
b
'
)
"(Hln & Hissued & Hl' & Hticket)"
.
rel_apply_r
(
bin_log_related_release_r
with
"Hl'"
).
{
solve_ndisj
.
}
iIntros
"Hl'"
.
...
...
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