Binary session types for ψ-calculi
APLAS 2016
Hanoi, Vietnam,November 2016
Hans H¨uttel
Department of Computer Science
Aalborg University
Selma Lagerl¨ofs Vej 300
Denmark
23 November 2016
1 / 45
What are binary session types?
A type discipline for communicating processes with channels due to
Honda, Kubo and Vasconcelos.
The type of a channel describes the values that can be
transmitted along it. Different kinds of values can be
transmitted on the same channel at different times.
A channel has two endpoints.
The type of a channel describes the protocol followed by the
endpoints.
Hans H¨uttel
Binary session types for ψ-calculi 2
What are binary session types?
(νc : S)(ac.c(x).cx = 3
P1
| a(y).y17.y(x).P(x)
P2
)
The channel c has two endpoints, c+ and c−. In P1 c+ follows the
protocol T:
c+
:?Int.!Bool.end
In P2 c− follows the dual protocol T
c−
:!Int.?Bool.end
c has type S = (T, T). The endpoint types are dual; we say that
c is balanced.
Hans H¨uttel
Binary session types for ψ-calculi 3
What are binary session types?
Honda, Kubo and Vasconcelos added the notions of branching and
selection to the π-calculus.
a lk.Q
selection
| a {l1 : P1, . . . , lk : Pk, . . . ln : Pn}
branching
→ Q | Pk
The type of an endpoint used for selection:
{l1, T1, . . . , ln : Tn}
The type of an endpoint used for branching:
&{l1, T1, . . . , ln : Tn}
The type of a branching/selection name a is (T, T).
Hans H¨uttel
Binary session types for ψ-calculi 4
Adding types and type environments
We define addition of types by
(T1, T2) = T1 + T2.
This corresponds to joining/separating endpoints.
A type environment Γ is a function Γ : Names → Types. We
define
(Γ1 + Γ2)(x) =



T1 + T2 if Γ1(x) = T1, Γ2(x) = T2
T1 if Γ1(x) = T1, Γ2(x) undefined
T2 if Γ2(x) = T2, Γ1(x) undefined
Hans H¨uttel
Binary session types for ψ-calculi 5
Typing parallel composition by environment splitting
The rule
Γ1 P1 Γ2 P2
Γ1 + Γ2 P1 | P2
separates the end points of each channel.
Hans H¨uttel
Binary session types for ψ-calculi 6
A type rule for output
Γ, c : T2 P Γ x : T1
Γ, c :!T1.T2 cx.P
Hans H¨uttel
Binary session types for ψ-calculi 7
Usual properties of binary session type systems
Theorem (Fidelity)
If Γ P, if all types in Γ and P are balanced and P
τ
−→ P then
Γ P where all types in Γ and P are balanced and
If c was used in the τ-step, then if Γ(c) = T, then Γ (c) = T
where T is the “remains” of T
Hans H¨uttel
Binary session types for ψ-calculi 8
A plethora of binary session type systems
Type systems for progress (Vieira and Vasconcelos)
Type systems for refinement types (Baltazar, Mostrous and
Vasconcelos)
Type systems with subtyping (Gay and Hole)
. . .
Hans H¨uttel
Binary session types for ψ-calculi 9
A generic type system
The goal of this work is to present a generic type system such that
Known binary session type systems can be represented as
instances of the generic system
A general fidelity theorem holds such that fidelity holds for
every instance of the generic system
So whenever we see a new type system in the future, all we need
to do is to show that it is an instance of the generic system.
Hans H¨uttel
Binary session types for ψ-calculi 10
A generic process calculus framework: ψ-calculi
Bengtson, Johansson, Parrow and Victor introduce ψ-calculi as a
common generalization of many π-like process calculi.
In a psi-calculus, any term can be used as a channel. Here is a
ψ-calculus with numbers.
5 83 .84(x).84 x = 3 | 5(y).y + 1 17 .y(x).P(x)
Hans H¨uttel
Binary session types for ψ-calculi 11
Terms, assertions and conditions
Processes use a syntax similar to that of π-calculus and also make
use of
T data terms M, N
C conditions ϕ
A assertions Ψ
These are different for each instance.
Hans H¨uttel
Binary session types for ψ-calculi 12
The role of assertions
Assertions can be used to represent e.g.
Active substitutions
(νx)(P | [x := M])
Name fusions
P | [a = b]
Assertions are composed using an operator called ⊗ and compared
using the equivalence relation .
Hans H¨uttel
Binary session types for ψ-calculi 13
Processes in ψ-calculi
Every process calculus that is a ψ-calculus has the same syntax.
P ::=
M(λx)N.P input with pattern (λx)N
MN.P output
P1 | P2 parallel composition
(νx : T)P restriction
∗ P replication
case ϕ1 : P1, . . . , ϕk : Pk conditional
M l.P1 selection
M {l1 : P1, . . . , lk : Pk} branching
(|Ψ|) assertion
Hans H¨uttel
Binary session types for ψ-calculi 14
ψ-calculi: Semantics
Bengtson et al. give a labelled semantics of ψ-calculi. Transitions
are of the form
Ψ P
α
−→ P
Ψ is a global assertion. Think of it as the knowledge external to
the process P.
Hans H¨uttel
Binary session types for ψ-calculi 15
Session channels in the generic system
In a psi-calculus, any term can be used as a channel.
5 83 .84(x).84 x = 3 | 5(y).y + 1 17 .y + 3(x).P(x)
How can we set up new session channels?
We introduce names that are session constructors. Applying a
session constructor to a term gives us a session channel.
(5@c d, 83 .d@84(x).d@84 x = 3 |
c@5(s, y).s@(y + 1) 17 .s@(y + 3)(x).P(x))
Hans H¨uttel
Binary session types for ψ-calculi 16
Types in the generic type system
Types have an addition operator defined.
Types have transitions that describe the protocol steps
followed by a channel:
T1
!T2
−−→ T3 T4
?T5
−−→ T6
T1
T2
−−−→ T3 T4
T5
−−−→ T6
Hans H¨uttel
Binary session types for ψ-calculi 17
How to define an instance of the type system
Define the types
The set of types
Define how to add types T1 + T2
Define transitions for types
Define the missing type rules
Type rules for terms: Γ, Ψ M : T
Type rules for assertions: Γ, Ψ Ψ
Type rules for conditions: Γ, Ψ ϕ
Hans H¨uttel
Binary session types for ψ-calculi 18
Typing processes
Typings can depend on
The types of names; these are recorded in Γ
Global knowledge (e.g. identities on names); this is recorded
in an assertion Ψ
The type judgements for processes have the form
Γ, Ψ P
Hans H¨uttel
Binary session types for ψ-calculi 19
An example rule from the generic system
(Out)
Γ1, Ψ1 min M : T1@c T1
!,T2
−−→ T3
Γ2, Ψ2 min N : T2 Γ3 + c : T3, Ψ3 P
Γ1 + Γ2 + Γ3, Ψ1 Ψ2 Ψ3 MN.P
Hans H¨uttel
Binary session types for ψ-calculi 20
Fidelity, generalized
Definition
We write Γ, Ψ bal P if all types in Γ and in P are balanced.
Definition
Let α be an action. We let Γ ↑ α denote the type environment
where the session type for the names used in α have progressed.
Hans H¨uttel
Binary session types for ψ-calculi 21
Fidelity, generalized
Theorem
Suppose we have Ψ0 P
τ
−→ P , that Γ, Ψ bal P and Ψ ≤ Ψ0.
Then for some Ψ ≤ Ψ we have Γ ↑ τ, Ψ bal P .
Hans H¨uttel
Binary session types for ψ-calculi 22
Progress
A type system due to Vieira and Vasconcelos that guarantees
progress in the π-calculus. Type judgments are of the form
Γ, P
where is a well-founded order on names. The key insight is to
represent these as assertions.
Here, the representation of the type system makes use of
psi-assertions to play the part of well-founded orders.
Hans H¨uttel
Binary session types for ψ-calculi 23
Other type systems that are instances of our generic
system
A type system for refinement types (Baltazar, Mostrous and
Vasconcelos)
A type system with subtyping (Gay and Hole)
. . .
Hans H¨uttel
Binary session types for ψ-calculi 24
Conclusions
A generic type system for binary session types in the
psi-calculus setting.
A general fidelity result
Known type systems can be represented as instances of the
generic system.
Hans H¨uttel
Binary session types for ψ-calculi 25
Further work
There is no general theorem that tells us what it means to
type-safe for instances. Can we find a way to improve on this?
Our generic type system can capture both liveness and safety
properties!
Can we handle notions of duality other than the standard
one? (Cf. Bernardi et al.)
Hans H¨uttel
Binary session types for ψ-calculi 26

More Related Content

PPTX
Computer Science Assignment Help
PPTX
Algorithm Assignment Help
PPTX
Lambda Calculus
DOCX
Automata theory introduction
PDF
A Theory of the Learnable; PAC Learning
PDF
"PAC Learning - a discussion on the original paper by Valiant" presentation @...
PDF
Lambda Calculus by Dustin Mulcahey
PPTX
Lambda calculus
Computer Science Assignment Help
Algorithm Assignment Help
Lambda Calculus
Automata theory introduction
A Theory of the Learnable; PAC Learning
"PAC Learning - a discussion on the original paper by Valiant" presentation @...
Lambda Calculus by Dustin Mulcahey
Lambda calculus

What's hot (20)

DOCX
Mathematical blog #2
PDF
Lecture 2 predicates quantifiers and rules of inference
PPTX
Introduction to the lambda calculus
PPTX
Predicates and quantifiers presentation topics
PDF
PAC Learning
PPTX
Formal methods 5 - Pi calculus
PPTX
Signal Processing Assignment Help
PDF
04 greedyalgorithmsii 2x2
PPTX
Digital Signal Processing Assignment Help
PPTX
Chemistry Assignment Help
PDF
Assignment 2 daa
PDF
Formal methods 4 - Z notation
PDF
Lecture 3 qualtifed rules of inference
PDF
Automata theory
PDF
A Comparative Study of Two-Sample t-Test Under Fuzzy Environments Using Trape...
PPT
Predicates and Quantifiers
PDF
5th Semester Electronic and Communication Engineering (2013-June) Question Pa...
PDF
The Chasm at Depth Four, and Tensor Rank : Old results, new insights
PDF
01.01 vector spaces
Mathematical blog #2
Lecture 2 predicates quantifiers and rules of inference
Introduction to the lambda calculus
Predicates and quantifiers presentation topics
PAC Learning
Formal methods 5 - Pi calculus
Signal Processing Assignment Help
04 greedyalgorithmsii 2x2
Digital Signal Processing Assignment Help
Chemistry Assignment Help
Assignment 2 daa
Formal methods 4 - Z notation
Lecture 3 qualtifed rules of inference
Automata theory
A Comparative Study of Two-Sample t-Test Under Fuzzy Environments Using Trape...
Predicates and Quantifiers
5th Semester Electronic and Communication Engineering (2013-June) Question Pa...
The Chasm at Depth Four, and Tensor Rank : Old results, new insights
01.01 vector spaces
Ad

Viewers also liked (18)

PPTX
Overview of iso 9001
PPSX
Algoritmo y Diagrama de Flujo
PDF
Sea Rotmann “Helping the Behaviour Changers – or how to create systemic chang...
DOCX
Diana morales
PDF
Tema 1 procesos psicológicos basicos
PPTX
Tecnologías analógicas química franco heriberto
PPTX
Tour
DOC
Uxia blanco las tecnologías de la información y de la comunicación
PPTX
PPTX
CONASUPO
PDF
Scott Willis "Creating Cosy Homes."
PPTX
Dental technology as a platform
PDF
CRIB Board of Advisors
PDF
Viv 5.11
PPTX
Economics of digital goods
DOCX
Katrina's Resume
ODP
El hardware del ordenador
Overview of iso 9001
Algoritmo y Diagrama de Flujo
Sea Rotmann “Helping the Behaviour Changers – or how to create systemic chang...
Diana morales
Tema 1 procesos psicológicos basicos
Tecnologías analógicas química franco heriberto
Tour
Uxia blanco las tecnologías de la información y de la comunicación
CONASUPO
Scott Willis "Creating Cosy Homes."
Dental technology as a platform
CRIB Board of Advisors
Viv 5.11
Economics of digital goods
Katrina's Resume
El hardware del ordenador
Ad

Similar to Binary Session Types for Psi-Calculi (APLAS 2016) (20)

PDF
Better Late Than Never: A Fully Abstract Semantics for Classical Processes
DOCX
Type header file in c++ and its function
PPT
1606751772-ds-lecture-6.ppt
PPTX
Discreate structure presentation introduction
PDF
PDF
Lecture7 channel capacity
PDF
"That scripting language called Prolog"
PDF
APAL2032
PDF
RedisConf18 - CRDTs and Redis - From sequential to concurrent executions
PDF
アーベル論理でセッション型
PPTX
python introductions2 to basics programmin.pptx
PDF
Boolean Programs and Quantified Propositional Proof System -
PDF
Proof techniques and quantifiers : lecture 3
PPT
AI_Lecture_34.ppt
PDF
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
PPT
haskell5.ppt is a marketing document lol
PDF
hashing in algorithm sharif university iran
PPT
Discrete Math Lecture 02: First Order Logic
PDF
Cs6503 theory of computation november december 2015 be cse anna university q...
PDF
Information Theory Mike Brookes E4.40, ISE4.51, SO20.pdf
Better Late Than Never: A Fully Abstract Semantics for Classical Processes
Type header file in c++ and its function
1606751772-ds-lecture-6.ppt
Discreate structure presentation introduction
Lecture7 channel capacity
"That scripting language called Prolog"
APAL2032
RedisConf18 - CRDTs and Redis - From sequential to concurrent executions
アーベル論理でセッション型
python introductions2 to basics programmin.pptx
Boolean Programs and Quantified Propositional Proof System -
Proof techniques and quantifiers : lecture 3
AI_Lecture_34.ppt
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
haskell5.ppt is a marketing document lol
hashing in algorithm sharif university iran
Discrete Math Lecture 02: First Order Logic
Cs6503 theory of computation november december 2015 be cse anna university q...
Information Theory Mike Brookes E4.40, ISE4.51, SO20.pdf

More from Hans Hyttel (13)

PDF
Noget om møder
PDF
Secrecy and Authenticity Properties of the Lightning Network Protocol
PDF
Om ligestilling
PPTX
Overvågning – kort foredrag ved Akademisk Salon 6. april 2017
PDF
Undervisningens dag 2016
PDF
CHER 2015 – If PBL is the answer, then what is the problem?
PDF
Den skæve kønsfordeling på datalogiuddannelserne
PDF
UNF-foredrag om Turing-prisen
PDF
Anders og Louises præsentation til stormødet den 16. september 2014
PDF
Causeri til matematikdag
PDF
Presentation 20 august 2014 (departmental meeting)
PDF
Icwl2014 foredrag
PDF
Nej til Egholm-motorvejen fordi...
Noget om møder
Secrecy and Authenticity Properties of the Lightning Network Protocol
Om ligestilling
Overvågning – kort foredrag ved Akademisk Salon 6. april 2017
Undervisningens dag 2016
CHER 2015 – If PBL is the answer, then what is the problem?
Den skæve kønsfordeling på datalogiuddannelserne
UNF-foredrag om Turing-prisen
Anders og Louises præsentation til stormødet den 16. september 2014
Causeri til matematikdag
Presentation 20 august 2014 (departmental meeting)
Icwl2014 foredrag
Nej til Egholm-motorvejen fordi...

Recently uploaded (20)

PDF
CHAPTER 3 Cell Structures and Their Functions Lecture Outline.pdf
PDF
CHAPTER 2 The Chemical Basis of Life Lecture Outline.pdf
PDF
S2 SOIL BY TR. OKION.pdf based on the new lower secondary curriculum
PPTX
Probability.pptx pearl lecture first year
PDF
Science Form five needed shit SCIENEce so
PDF
Packaging materials of fruits and vegetables
PDF
Warm, water-depleted rocky exoplanets with surfaceionic liquids: A proposed c...
PPTX
POULTRY PRODUCTION AND MANAGEMENTNNN.pptx
PPTX
Presentation1 INTRODUCTION TO ENZYMES.pptx
PPT
Computional quantum chemistry study .ppt
PPTX
TORCH INFECTIONS in pregnancy with toxoplasma
PDF
Assessment of environmental effects of quarrying in Kitengela subcountyof Kaj...
PPT
Biochemestry- PPT ON Protein,Nitrogenous constituents of Urine, Blood, their ...
PDF
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
PPTX
BODY FLUIDS AND CIRCULATION class 11 .pptx
PDF
GROUP 2 ORIGINAL PPT. pdf Hhfiwhwifhww0ojuwoadwsfjofjwsofjw
PPT
THE CELL THEORY AND ITS FUNDAMENTALS AND USE
PDF
Social preventive and pharmacy. Pdf
PPTX
GREEN FIELDS SCHOOL PPT ON HOLIDAY HOMEWORK
PPTX
Hypertension_Training_materials_English_2024[1] (1).pptx
CHAPTER 3 Cell Structures and Their Functions Lecture Outline.pdf
CHAPTER 2 The Chemical Basis of Life Lecture Outline.pdf
S2 SOIL BY TR. OKION.pdf based on the new lower secondary curriculum
Probability.pptx pearl lecture first year
Science Form five needed shit SCIENEce so
Packaging materials of fruits and vegetables
Warm, water-depleted rocky exoplanets with surfaceionic liquids: A proposed c...
POULTRY PRODUCTION AND MANAGEMENTNNN.pptx
Presentation1 INTRODUCTION TO ENZYMES.pptx
Computional quantum chemistry study .ppt
TORCH INFECTIONS in pregnancy with toxoplasma
Assessment of environmental effects of quarrying in Kitengela subcountyof Kaj...
Biochemestry- PPT ON Protein,Nitrogenous constituents of Urine, Blood, their ...
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
BODY FLUIDS AND CIRCULATION class 11 .pptx
GROUP 2 ORIGINAL PPT. pdf Hhfiwhwifhww0ojuwoadwsfjofjwsofjw
THE CELL THEORY AND ITS FUNDAMENTALS AND USE
Social preventive and pharmacy. Pdf
GREEN FIELDS SCHOOL PPT ON HOLIDAY HOMEWORK
Hypertension_Training_materials_English_2024[1] (1).pptx

Binary Session Types for Psi-Calculi (APLAS 2016)

  • 1. Binary session types for ψ-calculi APLAS 2016 Hanoi, Vietnam,November 2016 Hans H¨uttel Department of Computer Science Aalborg University Selma Lagerl¨ofs Vej 300 Denmark 23 November 2016 1 / 45
  • 2. What are binary session types? A type discipline for communicating processes with channels due to Honda, Kubo and Vasconcelos. The type of a channel describes the values that can be transmitted along it. Different kinds of values can be transmitted on the same channel at different times. A channel has two endpoints. The type of a channel describes the protocol followed by the endpoints. Hans H¨uttel Binary session types for ψ-calculi 2
  • 3. What are binary session types? (νc : S)(ac.c(x).cx = 3 P1 | a(y).y17.y(x).P(x) P2 ) The channel c has two endpoints, c+ and c−. In P1 c+ follows the protocol T: c+ :?Int.!Bool.end In P2 c− follows the dual protocol T c− :!Int.?Bool.end c has type S = (T, T). The endpoint types are dual; we say that c is balanced. Hans H¨uttel Binary session types for ψ-calculi 3
  • 4. What are binary session types? Honda, Kubo and Vasconcelos added the notions of branching and selection to the π-calculus. a lk.Q selection | a {l1 : P1, . . . , lk : Pk, . . . ln : Pn} branching → Q | Pk The type of an endpoint used for selection: {l1, T1, . . . , ln : Tn} The type of an endpoint used for branching: &{l1, T1, . . . , ln : Tn} The type of a branching/selection name a is (T, T). Hans H¨uttel Binary session types for ψ-calculi 4
  • 5. Adding types and type environments We define addition of types by (T1, T2) = T1 + T2. This corresponds to joining/separating endpoints. A type environment Γ is a function Γ : Names → Types. We define (Γ1 + Γ2)(x) =    T1 + T2 if Γ1(x) = T1, Γ2(x) = T2 T1 if Γ1(x) = T1, Γ2(x) undefined T2 if Γ2(x) = T2, Γ1(x) undefined Hans H¨uttel Binary session types for ψ-calculi 5
  • 6. Typing parallel composition by environment splitting The rule Γ1 P1 Γ2 P2 Γ1 + Γ2 P1 | P2 separates the end points of each channel. Hans H¨uttel Binary session types for ψ-calculi 6
  • 7. A type rule for output Γ, c : T2 P Γ x : T1 Γ, c :!T1.T2 cx.P Hans H¨uttel Binary session types for ψ-calculi 7
  • 8. Usual properties of binary session type systems Theorem (Fidelity) If Γ P, if all types in Γ and P are balanced and P τ −→ P then Γ P where all types in Γ and P are balanced and If c was used in the τ-step, then if Γ(c) = T, then Γ (c) = T where T is the “remains” of T Hans H¨uttel Binary session types for ψ-calculi 8
  • 9. A plethora of binary session type systems Type systems for progress (Vieira and Vasconcelos) Type systems for refinement types (Baltazar, Mostrous and Vasconcelos) Type systems with subtyping (Gay and Hole) . . . Hans H¨uttel Binary session types for ψ-calculi 9
  • 10. A generic type system The goal of this work is to present a generic type system such that Known binary session type systems can be represented as instances of the generic system A general fidelity theorem holds such that fidelity holds for every instance of the generic system So whenever we see a new type system in the future, all we need to do is to show that it is an instance of the generic system. Hans H¨uttel Binary session types for ψ-calculi 10
  • 11. A generic process calculus framework: ψ-calculi Bengtson, Johansson, Parrow and Victor introduce ψ-calculi as a common generalization of many π-like process calculi. In a psi-calculus, any term can be used as a channel. Here is a ψ-calculus with numbers. 5 83 .84(x).84 x = 3 | 5(y).y + 1 17 .y(x).P(x) Hans H¨uttel Binary session types for ψ-calculi 11
  • 12. Terms, assertions and conditions Processes use a syntax similar to that of π-calculus and also make use of T data terms M, N C conditions ϕ A assertions Ψ These are different for each instance. Hans H¨uttel Binary session types for ψ-calculi 12
  • 13. The role of assertions Assertions can be used to represent e.g. Active substitutions (νx)(P | [x := M]) Name fusions P | [a = b] Assertions are composed using an operator called ⊗ and compared using the equivalence relation . Hans H¨uttel Binary session types for ψ-calculi 13
  • 14. Processes in ψ-calculi Every process calculus that is a ψ-calculus has the same syntax. P ::= M(λx)N.P input with pattern (λx)N MN.P output P1 | P2 parallel composition (νx : T)P restriction ∗ P replication case ϕ1 : P1, . . . , ϕk : Pk conditional M l.P1 selection M {l1 : P1, . . . , lk : Pk} branching (|Ψ|) assertion Hans H¨uttel Binary session types for ψ-calculi 14
  • 15. ψ-calculi: Semantics Bengtson et al. give a labelled semantics of ψ-calculi. Transitions are of the form Ψ P α −→ P Ψ is a global assertion. Think of it as the knowledge external to the process P. Hans H¨uttel Binary session types for ψ-calculi 15
  • 16. Session channels in the generic system In a psi-calculus, any term can be used as a channel. 5 83 .84(x).84 x = 3 | 5(y).y + 1 17 .y + 3(x).P(x) How can we set up new session channels? We introduce names that are session constructors. Applying a session constructor to a term gives us a session channel. (5@c d, 83 .d@84(x).d@84 x = 3 | c@5(s, y).s@(y + 1) 17 .s@(y + 3)(x).P(x)) Hans H¨uttel Binary session types for ψ-calculi 16
  • 17. Types in the generic type system Types have an addition operator defined. Types have transitions that describe the protocol steps followed by a channel: T1 !T2 −−→ T3 T4 ?T5 −−→ T6 T1 T2 −−−→ T3 T4 T5 −−−→ T6 Hans H¨uttel Binary session types for ψ-calculi 17
  • 18. How to define an instance of the type system Define the types The set of types Define how to add types T1 + T2 Define transitions for types Define the missing type rules Type rules for terms: Γ, Ψ M : T Type rules for assertions: Γ, Ψ Ψ Type rules for conditions: Γ, Ψ ϕ Hans H¨uttel Binary session types for ψ-calculi 18
  • 19. Typing processes Typings can depend on The types of names; these are recorded in Γ Global knowledge (e.g. identities on names); this is recorded in an assertion Ψ The type judgements for processes have the form Γ, Ψ P Hans H¨uttel Binary session types for ψ-calculi 19
  • 20. An example rule from the generic system (Out) Γ1, Ψ1 min M : T1@c T1 !,T2 −−→ T3 Γ2, Ψ2 min N : T2 Γ3 + c : T3, Ψ3 P Γ1 + Γ2 + Γ3, Ψ1 Ψ2 Ψ3 MN.P Hans H¨uttel Binary session types for ψ-calculi 20
  • 21. Fidelity, generalized Definition We write Γ, Ψ bal P if all types in Γ and in P are balanced. Definition Let α be an action. We let Γ ↑ α denote the type environment where the session type for the names used in α have progressed. Hans H¨uttel Binary session types for ψ-calculi 21
  • 22. Fidelity, generalized Theorem Suppose we have Ψ0 P τ −→ P , that Γ, Ψ bal P and Ψ ≤ Ψ0. Then for some Ψ ≤ Ψ we have Γ ↑ τ, Ψ bal P . Hans H¨uttel Binary session types for ψ-calculi 22
  • 23. Progress A type system due to Vieira and Vasconcelos that guarantees progress in the π-calculus. Type judgments are of the form Γ, P where is a well-founded order on names. The key insight is to represent these as assertions. Here, the representation of the type system makes use of psi-assertions to play the part of well-founded orders. Hans H¨uttel Binary session types for ψ-calculi 23
  • 24. Other type systems that are instances of our generic system A type system for refinement types (Baltazar, Mostrous and Vasconcelos) A type system with subtyping (Gay and Hole) . . . Hans H¨uttel Binary session types for ψ-calculi 24
  • 25. Conclusions A generic type system for binary session types in the psi-calculus setting. A general fidelity result Known type systems can be represented as instances of the generic system. Hans H¨uttel Binary session types for ψ-calculi 25
  • 26. Further work There is no general theorem that tells us what it means to type-safe for instances. Can we find a way to improve on this? Our generic type system can capture both liveness and safety properties! Can we handle notions of duality other than the standard one? (Cf. Bernardi et al.) Hans H¨uttel Binary session types for ψ-calculi 26