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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
tlsomers
Actris
Commits
6a6f8375
Commit
6a6f8375
authored
4 years ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
Added operation typing rules
parent
deee9548
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/logrel/term_typing_rules.v
+26
-1
26 additions, 1 deletion
theories/logrel/term_typing_rules.v
with
26 additions
and
1 deletion
theories/logrel/term_typing_rules.v
+
26
−
1
View file @
6a6f8375
...
...
@@ -6,7 +6,7 @@ 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
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
.
...
...
@@ -63,6 +63,31 @@ Section properties.
Lemma
ltyped_int
Γ
(
i
:
Z
)
:
⊢
Γ
⊨
#
i
:
lty_int
.
Proof
.
iIntros
"!>"
(
vs
)
"HΓ /="
.
iApply
wp_value
.
eauto
.
Qed
.
(** Operations *)
Lemma
ltyped_un_op
Γ1
Γ2
op
e
A
B
:
LTyUnOp
op
A
B
→
(
Γ1
⊨
e
:
A
⫤
Γ2
)
-∗
Γ1
⊨
UnOp
op
e
:
B
⫤
Γ2
.
Proof
.
iIntros
(
Hop
)
"#He !>"
.
iIntros
(
vs
)
"HΓ1"
=>
/=.
wp_apply
(
wp_wand
with
"(He [HΓ1 //])"
)
.
iIntros
(
v1
)
"[HA HΓ2]"
.
iDestruct
(
Hop
with
"HA"
)
as
(
w
Heval
)
"HB"
.
wp_unop
.
iFrame
.
Qed
.
Lemma
ltyped_bin_op
Γ1
Γ2
Γ3
op
e1
e2
A1
A2
B
:
LTyBinOp
op
A1
A2
B
→
(
Γ1
⊨
e2
:
A2
⫤
Γ2
)
-∗
(
Γ2
⊨
e1
:
A1
⫤
Γ3
)
-∗
Γ1
⊨
BinOp
op
e1
e2
:
B
⫤
Γ3
.
Proof
.
iIntros
(
Hop
)
"#He2 #He1 !>"
.
iIntros
(
vs
)
"HΓ1"
=>
/=.
wp_apply
(
wp_wand
with
"(He2 [HΓ1 //])"
)
.
iIntros
(
v2
)
"[HA2 HΓ2]"
.
wp_apply
(
wp_wand
with
"(He1 [HΓ2 //])"
)
.
iIntros
(
v1
)
"[HA1 HΓ3]"
.
iDestruct
(
Hop
with
"HA1 HA2"
)
as
(
w
Heval
)
"HB"
.
wp_binop
.
iFrame
.
Qed
.
(** Arrow properties *)
Lemma
ltyped_app
Γ1
Γ2
Γ3
e1
e2
A1
A2
:
(
Γ2
⊨
e1
:
A1
⊸
A2
⫤
Γ3
)
-∗
(
Γ1
⊨
e2
:
A1
⫤
Γ2
)
-∗
...
...
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