Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Actris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Actris
Commits
e0d15199
Commit
e0d15199
authored
4 years ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring - Moved spar to own file and renamed as par_start
parent
fd7dc61d
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/logrel/lib/par_start.v
+48
-0
48 additions, 0 deletions
theories/logrel/lib/par_start.v
theories/logrel/term_typing_rules.v
+2
-46
2 additions, 46 deletions
theories/logrel/term_typing_rules.v
with
51 additions
and
46 deletions
_CoqProject
+
1
−
0
View file @
e0d15199
...
...
@@ -36,6 +36,7 @@ theories/logrel/term_typing_judgment.v
theories/logrel/subtyping_rules.v
theories/logrel/term_typing_rules.v
theories/logrel/lib/mutex.v
theories/logrel/lib/par_start.v
theories/logrel/examples/double.v
theories/logrel/examples/pair.v
theories/logrel/examples/rec_subtyping.v
...
...
This diff is collapsed.
Click to expand it.
theories/logrel/lib/par_start.v
0 → 100644
+
48
−
0
View file @
e0d15199
From
actris
.
logrel
Require
Export
term_typing_rules
environments
.
From
actris
.
channel
Require
Import
proofmode
.
Section
properties
.
Context
`{
heapG
Σ
}
.
Context
`{
chanG
Σ
}
.
Context
`{
spawnG
Σ
}
.
Definition
par_start
:
expr
:=
(
λ
:
"e1"
"e2"
,
let
:
"c"
:=
new_chan
#
()
in
let
:
"c1"
:=
Fst
"c"
in
let
:
"c2"
:=
Snd
"c"
in
(
"e1"
"c1"
)
|||
(
"e2"
"c2"
))
%
E
.
Lemma
ltyped_par_start
Γ
S
A
B
:
⊢
Γ
⊨
par_start
:
((
chan
S
)
⊸
A
)
⊸
(
chan
(
lty_dual
S
)
⊸
B
)
⊸
A
*
B
.
Proof
.
iApply
ltyped_lam
;
[
iApply
env_split_id_l
|
]
.
iApply
ltyped_lam
;
[
iApply
env_split_id_r
|
]
.
iApply
ltyped_let
.
{
iApply
ltyped_app
;
[
iApply
ltyped_unit
|
iApply
ltyped_new_chan
]
.
}
iApply
ltyped_let
;
[
by
iApply
ltyped_fst
|
]
.
rewrite
insert_insert
.
iApply
ltyped_let
;
[
by
iApply
ltyped_snd
|
]
.
rewrite
/
binder_insert
(
insert_commute
_
"c1"
"c"
)
//
insert_insert
.
iApply
(
ltyped_par
)
.
-
iApply
env_split_right
;
last
first
.
{
rewrite
(
insert_commute
_
"c1"
"e2"
);
[
|
eauto
]
.
rewrite
(
insert_commute
_
"c"
"e2"
);
[
|
eauto
]
.
iApply
env_split_right
;
last
by
iApply
env_split_id_r
.
eauto
.
eauto
.
}
eauto
.
eauto
.
-
iApply
ltyped_app
;
by
iApply
ltyped_var
.
-
iApply
ltyped_app
;
by
iApply
ltyped_var
.
-
rewrite
insert_insert
.
rewrite
(
insert_commute
_
"c2"
"e2"
)
//
insert_insert
.
rewrite
(
insert_commute
_
"c1"
"c"
)
//
insert_insert
.
rewrite
(
insert_commute
_
"c1"
"e1"
)
//
(
insert_commute
_
"c"
"e1"
)
//
insert_insert
.
iApply
env_split_left
=>
//
;
last
first
.
iApply
env_split_left
=>
//
;
last
first
.
iApply
env_split_left
=>
//
;
last
first
.
iApply
env_split_id_l
.
eauto
.
eauto
.
eauto
.
Qed
.
End
properties
.
This diff is collapsed.
Click to expand it.
theories/logrel/term_typing_rules.v
+
2
−
46
View file @
e0d15199
...
...
@@ -6,7 +6,8 @@ From iris.bi.lib Require Import core.
From
iris
.
base_logic
.
lib
Require
Import
invariants
.
From
iris
.
heap_lang
Require
Import
metatheory
.
From
iris
.
heap_lang
.
lib
Require
Export
spawn
par
assert
.
From
actris
.
logrel
Require
Export
subtyping
term_typing_judgment
operators
session_types
.
From
actris
.
logrel
Require
Export
subtyping
term_typing_judgment
operators
session_types
.
From
actris
.
logrel
Require
Import
environments
.
From
actris
.
utils
Require
Import
switch
.
From
actris
.
channel
Require
Import
proofmode
.
...
...
@@ -468,51 +469,6 @@ Section properties.
iExists
c1
,
c2
.
iSplit
=>
//.
iFrame
"Hp1 Hp2"
.
Qed
.
Section
with_spawn
.
Context
`{
spawnG
Σ
}
.
Definition
spar
:
expr
:=
(
λ
:
"e1"
"e2"
,
let
:
"c"
:=
new_chan
#
()
in
let
:
"c1"
:=
Fst
"c"
in
let
:
"c2"
:=
Snd
"c"
in
(
"e1"
"c1"
)
|||
(
"e2"
"c2"
))
%
E
.
Lemma
ltyped_spar
Γ
S
A
B
:
⊢
Γ
⊨
spar
:
((
chan
S
)
⊸
A
)
⊸
(
chan
(
lty_dual
S
)
⊸
B
)
⊸
A
*
B
.
Proof
.
rewrite
/
spar
.
iApply
ltyped_lam
;
[
iApply
env_split_id_l
|
]
.
iApply
ltyped_lam
;
[
iApply
env_split_id_r
|
]
.
iApply
ltyped_let
.
{
iApply
ltyped_app
;
[
iApply
ltyped_unit
|
iApply
ltyped_new_chan
]
.
}
iApply
ltyped_let
;
[
by
iApply
ltyped_fst
|
]
.
rewrite
insert_insert
.
iApply
ltyped_let
;
[
by
iApply
ltyped_snd
|
]
.
rewrite
/
binder_insert
(
insert_commute
_
"c1"
"c"
)
//
insert_insert
.
iApply
(
ltyped_par
)
.
-
iApply
env_split_right
;
last
first
.
{
rewrite
(
insert_commute
_
"c1"
"e2"
);
[
|
eauto
]
.
rewrite
(
insert_commute
_
"c"
"e2"
);
[
|
eauto
]
.
iApply
env_split_right
;
last
by
iApply
env_split_id_r
.
eauto
.
eauto
.
}
eauto
.
eauto
.
-
iApply
ltyped_app
;
by
iApply
ltyped_var
.
-
iApply
ltyped_app
;
by
iApply
ltyped_var
.
-
rewrite
insert_insert
.
rewrite
(
insert_commute
_
"c2"
"e2"
)
//
insert_insert
.
rewrite
(
insert_commute
_
"c1"
"c"
)
//
insert_insert
.
rewrite
(
insert_commute
_
"c1"
"e1"
)
//
(
insert_commute
_
"c"
"e1"
)
//
insert_insert
.
iApply
env_split_left
=>
//
;
last
first
.
iApply
env_split_left
=>
//
;
last
first
.
iApply
env_split_left
=>
//
;
last
first
.
iApply
env_split_id_l
.
eauto
.
eauto
.
eauto
.
Qed
.
End
with_spawn
.
Lemma
ltyped_send
Γ
Γ'
(
x
:
string
)
e
A
S
:
Γ'
!!
x
=
Some
(
chan
(
<!!>
TY
A
;
S
))
%
lty
→
(
Γ
⊨
e
:
A
⫤
Γ'
)
-∗
...
...
This diff is collapsed.
Click to expand it.
Jonas Kastberg
@jihgfee
mentioned in commit
2dc8d5d8
·
4 years ago
mentioned in commit
2dc8d5d8
mentioned in commit 2dc8d5d8b45205bffbe870d35d89605af0dfc425
Toggle commit list
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