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
ffa555fa
Commit
ffa555fa
authored
4 years ago
by
Dan Frumin
Browse files
Options
Downloads
Patches
Plain Diff
A bit of cleanup
parent
01c96d5f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
Alternative definition of contextual refinement
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/typing/contextual_refinement.v
+10
-23
10 additions, 23 deletions
theories/typing/contextual_refinement.v
theories/typing/types.v
+1
-1
1 addition, 1 deletion
theories/typing/types.v
with
11 additions
and
24 deletions
theories/typing/contextual_refinement.v
+
10
−
23
View file @
ffa555fa
...
...
@@ -239,7 +239,7 @@ Inductive typed_ctx: ctx → stringmap type → type → stringmap type → type
typed_ctx
(
k
::
K
)
Γ1
τ1
Γ3
τ3
.
(* Observable types are, at the moment, exactly the types which support equality. *)
Definition
ObsType
:
type
→
Prop
:=
EqType
.
Definition
ObsType
:
type
→
Prop
:=
λ
τ
,
EqType
τ
∧
UnboxedType
τ
.
Definition
ctx_refines
(
Γ
:
stringmap
type
)
(
e
e'
:
expr
)
(
τ
:
type
)
:
Prop
:=
∀
K
thp
σ₀
σ₁
v
τ'
,
...
...
@@ -311,20 +311,6 @@ Definition ctx_refines_alt (Γ : stringmap type)
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 erased_step_ectx (e e' : expr) tp' σ σ' K : *)
(* erased_step ([e], σ) (e' :: tp', σ') → *)
(* erased_step ([fill K e], σ) (fill K e' :: tp', σ'). *)
(* Proof. *)
(* intros [κ Hst]. inversion Hst; simplify_eq/=. *)
(* symmetry in H. apply app_singleton in H. *)
(* assert (t1 = [] ∧ e1 = e ∧ t2 = []) as (->&->&->). *)
(* { naive_solver. } *)
(* assert (e2 = e' ∧ tp' = efs) as [-> ->]. *)
(* { naive_solver. } *)
(* eapply fill_prim_step in H1. simpl in H1. *)
(* econstructor. eapply step_atomic with (t1 := []); eauto. *)
(* Qed. *)
(* Helper lemmas *)
Lemma
erased_step_ectx
(
e
e'
:
expr
)
tp
tp'
σ
σ'
K
:
erased_step
(
e
::
tp
,
σ
)
(
e'
::
tp'
,
σ'
)
→
...
...
@@ -340,14 +326,6 @@ Proof.
+
rewrite
app_comm_cons
.
reflexivity
.
Qed
.
Local
Definition
ffill
(
K
:
list
ectx_item
)
:
(
list
expr
*
state
)
→
(
list
expr
*
state
)
:=
fun
x
=>
match
x
with
|
(
e
::
tp
,
σ
)
=>
(
fill
K
e
::
tp
,
σ
)
|
([],
σ
)
=>
([],
σ
)
end
.
Lemma
erased_step_nonempty
(
tp
:
list
expr
)
σ
tp'
σ'
:
erased_step
(
tp
,
σ
)
(
tp'
,
σ'
)
→
tp'
≠
[]
.
Proof
.
...
...
@@ -366,6 +344,14 @@ Proof.
intros
?
?
%
erased_step_nonempty
.
naive_solver
.
Qed
.
Local
Definition
ffill
(
K
:
list
ectx_item
)
:
(
list
expr
*
state
)
→
(
list
expr
*
state
)
:=
fun
x
=>
match
x
with
|
(
e
::
tp
,
σ
)
=>
(
fill
K
e
::
tp
,
σ
)
|
([],
σ
)
=>
([],
σ
)
end
.
Lemma
rtc_erased_step_ectx
(
e
e'
:
expr
)
tp
tp'
σ
σ'
K
:
rtc
erased_step
(
e
::
tp
,
σ
)
(
e'
::
tp'
,
σ'
)
→
rtc
erased_step
(
fill
K
e
::
tp
,
σ
)
(
fill
K
e'
::
tp'
,
σ'
)
.
...
...
@@ -434,6 +420,7 @@ Proof.
fold
ρ1
ρ2
.
intros
Hρ
.
change
σ1
with
ρ1
.
2
.
eapply
nice_ctx_lemma
;
eauto
.
Qed
.
(*/Helper lemmas*)
Lemma
ctx_refines_impl_alt
Γ
e1
e2
τ
:
(
Γ
⊨
e1
≤
ctx
≤
e2
:
τ
)
→
...
...
This diff is collapsed.
Click to expand it.
theories/typing/types.v
+
1
−
1
View file @
ffa555fa
...
...
@@ -18,7 +18,7 @@ Inductive type :=
|
TExists
:
{
bind
1
of
type
}
→
type
|
TRef
:
type
→
type
.
(**
Which types
support equality test
ing
*)
(**
Types which
support
direct
equality test
(which coincides with ctx equiv)
*)
Inductive
EqType
:
type
→
Prop
:=
|
EqTUnit
:
EqType
TUnit
|
EqTNat
:
EqType
TNat
...
...
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