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
54ebef8d
Commit
54ebef8d
authored
4 years ago
by
Dan Frumin
Browse files
Options
Downloads
Patches
Plain Diff
WIP alternative contextual refinement definition
parent
bbd59d64
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
Alternative definition of contextual refinement
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/typing/contextual_refinement.v
+27
-0
27 additions, 0 deletions
theories/typing/contextual_refinement.v
with
27 additions
and
0 deletions
theories/typing/contextual_refinement.v
+
27
−
0
View file @
54ebef8d
...
...
@@ -303,6 +303,33 @@ Proof.
eapply
typed_ctx_compose
;
eauto
.
Qed
.
(* Alternative formulation of contextual refinement
without restricting to contexts of the ground type *)
Definition
ctx_refines_alt
(
Γ
:
stringmap
type
)
(
e
e'
:
expr
)
(
τ
:
type
)
:
Prop
:=
∀
K
thp
σ₀
σ₁
v1
τ'
,
typed_ctx
K
Γ
τ
∅
τ'
→
rtc
erased_step
([
fill_ctx
K
e
],
σ₀
)
(
of_val
v1
::
thp
,
σ₁
)
→
∃
thp'
σ₁'
v2
,
rtc
erased_step
([
fill_ctx
K
e'
],
σ₀
)
(
of_val
v2
::
thp'
,
σ₁'
)
.
Lemma
ctx_refines_impl_alt
Γ
e1
e2
τ
:
(
Γ
⊨
e1
≤
ctx
≤
e2
:
τ
)
→
ctx_refines_alt
Γ
e1
e2
τ
.
Proof
.
intros
H
C
thp
σ0
σ1
v1
τ'
HC
Hstep
.
pose
(
C'
:=
(
CTX_AppR
(
λ
:
<>
,
#
true
)
%
E
)::
C
)
.
cut
(
∃
(
thp'
:
list
expr
)
σ₁'
,
rtc
erased_step
([
fill_ctx
C'
e2
],
σ0
)
(
of_val
#
true
::
thp'
,
σ₁'
))
.
-
unfold
C'
;
simpl
.
destruct
1
as
(
thp'
&
σ1'
&
Hstep'
)
.
exists
thp'
,
σ1'
.
admit
.
-
eapply
(
H
C'
thp
_
σ1
#
true
TBool
)
.
+
repeat
econstructor
;
eauto
.
+
repeat
econstructor
;
eauto
.
+
unfold
C'
.
simpl
.
admit
.
Admitted
.
Definition
ctx_equiv
Γ
e1
e2
τ
:=
(
Γ
⊨
e1
≤
ctx
≤
e2
:
τ
)
∧
(
Γ
⊨
e2
≤
ctx
≤
e1
:
τ
)
.
...
...
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