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
79a8f92f
Commit
79a8f92f
authored
Jul 14, 2017
by
Dan Frumin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate out the `counter_read_refinement` proof.
parent
08817aea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
20 deletions
+28
-20
F_mu_ref_conc/examples/counter.v
F_mu_ref_conc/examples/counter.v
+28
-20
No files found.
F_mu_ref_conc/examples/counter.v
View file @
79a8f92f
...
...
@@ -380,6 +380,31 @@ Section CG_Counter.
iApply
bin_log_related_unit
.
Qed
.
Lemma
counter_read_refinement
l
cnt
cnt
'
Γ
:
inv
counterN
(
counter_inv
l
cnt
cnt
'
)
-
∗
Γ
⊨
counter_read
#
cnt
≤
log
≤
counter_read
#
cnt
'
:
TArrow
TUnit
TNat
.
Proof
.
iIntros
"#Hinv"
.
Transparent
counter_read
.
unfold
counter_read
.
unlock
.
iApply
(
bin_log_related_rec_r
_
_
_
[]);
auto
.
simpl
.
iApply
(
bin_log_related_rec_l
_
_
[]);
auto
.
simpl
.
iNext
.
iApply
bin_log_related_rec
;
simpl
.
iAlways
.
cbn
.
iApply
(
bin_log_related_load_l
_
_
_
[]).
iInv
counterN
as
(
n
)
"[>Hl [Hcnt >Hcnt']]"
"Hclose"
.
iModIntro
.
iExists
(#
nv
n
).
iFrame
"Hcnt"
.
iIntros
"Hcnt"
.
simpl
.
iApply
(
bin_log_related_load_r
_
[]
with
"[Hcnt']"
);
auto
.
{
solve_ndisj
.
}
iIntros
"Hcnt'"
.
iMod
(
"Hclose"
with
"[Hl Hcnt Hcnt']"
).
{
iNext
.
iExists
_.
by
iFrame
.
}
simpl
.
iApply
(
bin_log_related_val
);
auto
.
intros
.
simpl
.
eauto
.
Qed
.
Lemma
FG_CG_counter_refinement
:
∅
⊨
FG_counter
≤
log
≤
CG_counter
:
TProd
(
TArrow
TUnit
TUnit
)
(
TArrow
TUnit
TNat
).
Proof
.
...
...
@@ -413,26 +438,9 @@ Section CG_Counter.
iApply
(
bin_log_related_rec_r
_
_
_
[]);
auto
.
rewrite
/=
!
Closed_subst_id
/=
.
iApply
(
bin_log_related_pair
_
with
"[]"
);
last
first
.
-
Transparent
counter_read
.
unfold
counter_read
.
unlock
.
iApply
(
bin_log_related_rec_r
_
_
_
[]);
auto
.
simpl
.
iApply
(
bin_log_related_rec_l
_
_
[]);
auto
.
simpl
.
iNext
.
iApply
bin_log_related_rec
;
simpl
.
iAlways
.
cbn
.
iApply
(
bin_log_related_load_l
_
_
_
[]).
iInv
counterN
as
(
n
)
"[>Hl [Hcnt >Hcnt']]"
"Hclose"
.
iModIntro
.
iExists
(#
nv
n
).
iFrame
"Hcnt"
.
iIntros
"Hcnt"
.
simpl
.
iApply
(
bin_log_related_load_r
_
[]
with
"[Hcnt']"
);
auto
.
{
solve_ndisj
.
}
iIntros
"Hcnt'"
.
iMod
(
"Hclose"
with
"[Hl Hcnt Hcnt']"
).
{
iNext
.
iExists
_.
by
iFrame
.
}
simpl
.
iApply
(
bin_log_related_val
);
auto
.
intros
.
simpl
.
eauto
.
-
iApply
(
FG_CG_increment_refinement
with
"Hinv"
).
iApply
(
bin_log_related_pair
_
with
"[]"
).
-
iApply
(
FG_CG_increment_refinement
with
"Hinv"
).
-
iApply
(
counter_read_refinement
with
"Hinv"
).
Qed
.
End
CG_Counter
.
...
...
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