Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
ReLoC-v1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dan Frumin
ReLoC-v1
Commits
70a6b2c8
Commit
70a6b2c8
authored
May 03, 2017
by
Dan Frumin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an ElimModal instance for the relational interpretation
parent
dcf43df0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
F_mu_ref_conc/examples/counter.v
F_mu_ref_conc/examples/counter.v
+1
-6
F_mu_ref_conc/relational_properties.v
F_mu_ref_conc/relational_properties.v
+12
-7
No files found.
F_mu_ref_conc/examples/counter.v
View file @
70a6b2c8
...
...
@@ -122,7 +122,6 @@ Section CG_Counter.
iApply
(
steps_CG_increment
E
with
"Hspec Hx"
);
auto
.
}
Unshelve
.
all
:
trivial
.
Qed
.
Lemma
bin_log_related_CG_locked_increment
Γ
K
E1
E2
t
τ
x
n
l
:
nclose
specN
⊆
E1
→
...
...
@@ -337,10 +336,9 @@ Section CG_Counter.
iApply
(
bin_log_related_load_r
_
[]
with
"[Hcnt']"
);
auto
.
{
solve_ndisj
.
}
{
by
compute
.
}
iIntros
"Hcnt'"
.
iApply
fupd_logrel
.
iMod
(
"Hclose"
with
"[Hl Hcnt Hcnt']"
).
{
iNext
.
iExists
_.
by
iFrame
.
}
simpl
.
iModIntro
.
simpl
.
iPoseProof
(
bin_log_related_nat
[
TArrow
TUnit
TNat
;
TUnit
]
⊤
n
)
as
"H"
.
iFrame
"H"
.
(
*
TODO
:
iApply
does
not
work
in
this
case
*
)
-
Transparent
CG_locked_increment
.
unfold
CG_locked_increment
.
...
...
@@ -363,7 +361,6 @@ Section CG_Counter.
iInv
counterN
as
(
n
)
"[>Hl [Hcnt >Hcnt']]"
"Hclose"
.
iModIntro
.
iExists
(#
nv
n
).
iSplit
;
eauto
.
iFrame
"Hcnt"
.
iIntros
"Hcnt"
.
simpl
.
iApply
fupd_logrel
.
iMod
(
"Hclose"
with
"[Hl Hcnt Hcnt']"
).
{
iNext
.
iExists
_.
iFrame
"Hl Hcnt Hcnt'"
.
}
iApply
(
bin_log_related_rec_l
_
[]);
auto
.
iNext
.
asimpl
.
...
...
@@ -381,7 +378,6 @@ Section CG_Counter.
iApply
(
bin_log_related_CG_locked_increment
_
[]
with
"Hcnt' Hl"
);
auto
.
solve_ndisj
.
iIntros
"Hcnt' Hl"
.
iApply
fupd_logrel
.
iMod
(
"Hclose"
with
"[Hl Hcnt Hcnt']"
).
{
iNext
.
iExists
(
S
m
).
iFrame
.
}
iApply
(
bin_log_related_if_true_l
_
[]);
auto
.
...
...
@@ -391,7 +387,6 @@ Section CG_Counter.
iSplitL
;
eauto
;
last
first
.
{
iDestruct
1
as
%
Hfoo
.
injection
Hfoo
.
intro
.
by
exfalso
.
}
iIntros
"_ Hcnt"
.
simpl
.
iApply
fupd_logrel
.
iMod
(
"Hclose"
with
"[Hl Hcnt Hcnt']"
).
{
iNext
.
iExists
m
.
iFrame
.
}
iApply
(
bin_log_related_if_false_l
[]
[]);
auto
.
...
...
F_mu_ref_conc/relational_properties.v
View file @
70a6b2c8
...
...
@@ -26,6 +26,14 @@ Section properties.
iApply
(
"H"
with
"* Hs [HΓ] * Hj"
);
auto
.
Qed
.
Global
Instance
elim_modal_logrel
E1
E2
Γ
e
e
'
P
τ
:
ElimModal
(
|={
E1
,
E2
}=>
P
)
P
(
{
E1
,
E2
;
Γ
}
⊨
e
≤
log
≤
e
'
:
τ
)
(
{
E2
,
E2
;
Γ
}
⊨
e
≤
log
≤
e
'
:
τ
)
|
0.
Proof
.
iIntros
"[HP HI]"
.
iApply
fupd_logrel
.
iMod
"HP"
.
iApply
(
"HI"
with
"HP"
).
Qed
.
Lemma
bin_log_related_val
Γ
τ
e
e
'
v
v
'
(
Hclosed
:
∀
f
,
e
.[
f
]
=
e
)
(
Hclosed
'
:
∀
f
,
e
'
.[
f
]
=
e
'
)
:
...
...
@@ -355,11 +363,10 @@ Section properties.
-
∗
{
E1
,
E1
;
Γ
}
⊨
fill
K
(
Alloc
e
)
≤
log
≤
t
:
τ
.
Proof
.
iIntros
"Hlog"
.
iApply
fupd_logrel
.
pose
(
Φ
:=
(
fun
(
_
:
unit
)
w
=>
∃
l
,
⌜
w
=
LocV
l
⌝
∗
l
↦ᵢ
v
)
%
I
).
iApply
(
bin_log_related_step_atomic_l
Φ
);
auto
.
{
rewrite_closed
.
}
iMod
"Hlog"
as
"Hlog"
.
iModIntro
.
iMod
"Hlog"
.
iModIntro
.
iExists
().
iSplitR
"Hlog"
.
-
iApply
(
wp_alloc
_
_
v
);
auto
.
iNext
.
iIntros
(
l
)
"Hl"
.
...
...
@@ -387,7 +394,6 @@ Section properties.
-
∗
{
E1
,
E1
;
Γ
}
⊨
fill
K
(
Load
(
Loc
l
))
≤
log
≤
t
:
τ
.
Proof
.
iIntros
"Hlog"
.
iApply
fupd_logrel
.
pose
(
Φ
:=
(
fun
v
'
w
=>
⌜
w
=
v
'⌝
∗
l
↦ᵢ
v
'
)
%
I
).
iApply
(
bin_log_related_step_atomic_l
Φ
);
auto
.
iMod
"Hlog"
as
(
v
'
)
"[% [Hl Hlog]]"
.
iModIntro
.
...
...
@@ -423,7 +429,6 @@ Section properties.
-
∗
{
E1
,
E1
;
Γ
}
⊨
fill
K
(
Store
(
Loc
l
)
e
)
≤
log
≤
t
:
τ
.
Proof
.
iIntros
(
?
)
"Hlog"
.
iApply
fupd_logrel
.
pose
(
Φ
:=
(
fun
(
_
:
unit
)
w
=>
⌜
w
=
UnitV
⌝
∗
l
↦ᵢ
v
'
)
%
I
).
iApply
(
bin_log_related_step_atomic_l
Φ
);
auto
.
{
rewrite_closed
.
}
...
...
@@ -462,7 +467,6 @@ Section properties.
-
∗
{
E1
,
E1
;
Γ
}
⊨
fill
K
(
CAS
(
Loc
l
)
e1
e2
)
≤
log
≤
t
:
τ
.
Proof
.
iIntros
(
??
)
"Hlog"
.
iApply
fupd_logrel
.
pose
(
Φ
:=
(
fun
v
'
w
=>
(
⌜
v
'
<>
v1
⌝
-
∗
⌜
w
=
BoolV
false
⌝
∗
l
↦ᵢ
v
'
)
∗
(
⌜
v
'
=
v1
⌝
-
∗
⌜
w
=
BoolV
true
⌝
∗
l
↦ᵢ
v2
))
%
I
).
iApply
(
bin_log_related_step_atomic_l
Φ
);
auto
.
...
...
@@ -505,7 +509,6 @@ Section properties.
-
∗
{
E1
,
E1
;
Γ
}
⊨
fill
K
(
CAS
(
Loc
l
)
e1
e2
)
≤
log
≤
t
:
τ
.
Proof
.
iIntros
(
??
)
"Hlog"
.
iApply
fupd_logrel
.
pose
(
Φ
:=
(
fun
v
'
w
=>
⌜
w
=
BoolV
false
⌝
∗
l
↦ᵢ
v
'
)
%
I
).
iApply
(
bin_log_related_step_atomic_l
Φ
);
auto
.
{
rewrite_closed
.
}
...
...
@@ -546,7 +549,6 @@ Section properties.
-
∗
{
E1
,
E1
;
Γ
}
⊨
fill
K
(
CAS
(
Loc
l
)
e1
e2
)
≤
log
≤
t
:
τ
.
Proof
.
iIntros
(
??
)
"Hlog"
.
iApply
fupd_logrel
.
pose
(
Φ
:=
(
fun
(
_
:
unit
)
w
=>
⌜
w
=
BoolV
true
⌝
∗
l
↦ᵢ
v2
)
%
I
).
iApply
(
bin_log_related_step_atomic_l
Φ
);
auto
.
{
rewrite_closed
.
}
...
...
@@ -807,4 +809,7 @@ Section properties.
done
.
Qed
.
(
*
To
prevent
accidental
unfolding
by
iMod
or
other
tactics
*
)
Typeclasses
Opaque
bin_log_related
.
End
properties
.
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