Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ReLoC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
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
ReLoC
Commits
f0560c61
Commit
f0560c61
authored
6 years ago
by
Dan Frumin
Browse files
Options
Downloads
Patches
Plain Diff
Soundness proof for the logical relation for F_mu_ref_conc
parent
0c77ba26
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
_CoqProject
+1
-0
1 addition, 0 deletions
_CoqProject
theories/typing/contextual_refinement.v
+2
-0
2 additions, 0 deletions
theories/typing/contextual_refinement.v
theories/typing/soundness.v
+67
-0
67 additions, 0 deletions
theories/typing/soundness.v
with
70 additions
and
0 deletions
_CoqProject
+
1
−
0
View file @
f0560c61
...
@@ -15,6 +15,7 @@ theories/typing/types.v
...
@@ -15,6 +15,7 @@ theories/typing/types.v
theories/typing/interp.v
theories/typing/interp.v
theories/typing/fundamental.v
theories/typing/fundamental.v
theories/typing/contextual_refinement.v
theories/typing/contextual_refinement.v
theories/typing/soundness.v
theories/tests/tp_tests.v
theories/tests/tp_tests.v
theories/tests/proofmode_tests.v
theories/tests/proofmode_tests.v
This diff is collapsed.
Click to expand it.
theories/typing/contextual_refinement.v
+
2
−
0
View file @
f0560c61
(* ReLoC -- Relational logic for fine-grained concurrency *)
(** Notion of contextual refinement & proof that it is a precongruence wrt the logical relation *)
From
iris
.
heap_lang
Require
Export
lang
.
From
iris
.
heap_lang
Require
Export
lang
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
proofmode
Require
Import
tactics
.
From
reloc
.
typing
Require
Export
types
interp
fundamental
.
From
reloc
.
typing
Require
Export
types
interp
fundamental
.
...
...
This diff is collapsed.
Click to expand it.
theories/typing/soundness.v
0 → 100644
+
67
−
0
View file @
f0560c61
(* ReLoC -- Relational logic for fine-grained concurrency *)
(** Logical relation is sound w.r.t. the contextual refinement. *)
From
iris
.
proofmode
Require
Import
tactics
.
From
reloc
.
logic
Require
Export
adequacy
.
From
reloc
.
typing
Require
Export
contextual_refinement
.
Lemma
logrel_adequate
Σ
`{
relocPreG
Σ
}
e
e'
τ
(
σ
:
state
)
:
(
∀
`{
relocG
Σ
}
Δ
,
{
⊤
;
Δ
;
∅
}
⊨
e
≤
log
≤
e'
:
τ
)
→
adequate
NotStuck
e
σ
(
λ
v
_,
∃
thp'
h
v'
,
rtc
erased_step
([
e'
],
σ
)
(
of_val
v'
::
thp'
,
h
)
∧
(
ObsType
τ
→
v
=
v'
))
.
Proof
.
intros
Hlog
.
set
(
A
:=
λ
(
HΣ
:
relocG
Σ
),
interp
τ
[])
.
eapply
(
refines_adequate
Σ
A
);
last
first
.
-
intros
HΣ
.
specialize
(
Hlog
HΣ
[])
.
revert
Hlog
.
unfold
A
,
bin_log_related
.
by
rewrite
fmap_empty
.
-
intros
HΣ
v
v'
.
unfold
A
.
iIntros
"Hvv"
.
unfold
ObsType
.
cbn
.
iIntros
(
Hτ
)
.
by
iApply
(
eq_type_sound
with
"Hvv"
)
.
Qed
.
Theorem
logrel_typesafety
Σ
`{
relocPreG
Σ
}
e
e'
τ
thp
σ
σ'
:
(
∀
`{
relocG
Σ
}
Δ
,
{
⊤
;
Δ
;
∅
}
⊨
e
≤
log
≤
e
:
τ
)
→
rtc
erased_step
([
e
],
σ
)
(
thp
,
σ'
)
→
e'
∈
thp
→
is_Some
(
to_val
e'
)
∨
reducible
e'
σ'
.
Proof
.
intros
Hlog
??
.
cut
(
adequate
NotStuck
e
σ
(
λ
v
_,
∃
thp'
h
v'
,
rtc
erased_step
([
e
],
σ
)
(
of_val
v'
::
thp'
,
h
)
∧
(
ObsType
τ
→
v
=
v'
)));
first
(
intros
[_
?];
eauto
)
.
eapply
logrel_adequate
;
eauto
.
Qed
.
Theorem
F_mu_ref_conc_typesfety
e
e'
τ
σ
thp
σ'
:
∅
⊢
ₜ
e
:
τ
→
rtc
erased_step
([
e
],
σ
)
(
thp
,
σ'
)
→
e'
∈
thp
→
is_Some
(
to_val
e'
)
∨
reducible
e'
σ'
.
Proof
.
intros
.
eapply
(
logrel_typesafety
relocΣ
);
eauto
.
intros
.
by
apply
binary_fundamental
.
Qed
.
Lemma
logrel_simul
Σ
`{
relocPreG
Σ
}
e
e'
τ
v
thp
hp
σ
:
(
∀
`{
relocG
Σ
}
Δ
,
{
⊤
;
Δ
;
∅
}
⊨
e
≤
log
≤
e'
:
τ
)
→
rtc
erased_step
([
e
],
σ
)
(
of_val
v
::
thp
,
hp
)
→
(
∃
thp'
hp'
v'
,
rtc
erased_step
([
e'
],
σ
)
(
of_val
v'
::
thp'
,
hp'
)
∧
(
ObsType
τ
→
v
=
v'
))
.
Proof
.
intros
Hlog
Hsteps
.
cut
(
adequate
NotStuck
e
σ
(
λ
v
_,
∃
thp'
h
v'
,
rtc
erased_step
([
e'
],
σ
)
(
of_val
v'
::
thp'
,
h
)
∧
(
ObsType
τ
→
v
=
v'
)))
.
{
destruct
1
;
naive_solver
.
}
eapply
logrel_adequate
;
eauto
.
Qed
.
Lemma
logrel_ctxequiv
Σ
`{
relocPreG
Σ
}
Γ
e
e'
τ
:
(
∀
`{
relocG
Σ
}
Δ
,
{
⊤
;
Δ
;
Γ
}
⊨
e
≤
log
≤
e'
:
τ
)
→
Γ
⊨
e
≤
ctx
≤
e'
:
τ
.
Proof
.
intros
Hlog
K
thp
σ₀
σ₁
v
τ'
?
Htyped
Hstep
.
cut
(
∃
thp'
hp'
v'
,
rtc
erased_step
([
fill_ctx
K
e'
],
σ₀
)
(
of_val
v'
::
thp'
,
hp'
)
∧
(
ObsType
τ'
→
v
=
v'
))
.
{
naive_solver
.
}
eapply
(
logrel_simul
Σ
);
last
by
apply
Hstep
.
iIntros
(?
?)
.
iApply
(
bin_log_related_under_typed_ctx
with
"[]"
);
eauto
.
iAlways
.
iIntros
(?)
.
iApply
Hlog
.
Qed
.
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