SlideShare a Scribd company logo
1 of 26
Download to read offline
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

What's hot

Mathematical blog #2
Mathematical blog #2Mathematical blog #2
Mathematical blog #2Steven Pauly
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceasimnawaz54
 
Introduction to the lambda calculus
Introduction to the lambda calculusIntroduction to the lambda calculus
Introduction to the lambda calculusJack Fox
 
Predicates and quantifiers presentation topics
Predicates  and quantifiers  presentation topicsPredicates  and quantifiers  presentation topics
Predicates and quantifiers presentation topicsR.h. Himel
 
Formal methods 5 - Pi calculus
Formal methods   5 - Pi calculusFormal methods   5 - Pi calculus
Formal methods 5 - Pi calculusVlad Patryshev
 
04 greedyalgorithmsii 2x2
04 greedyalgorithmsii 2x204 greedyalgorithmsii 2x2
04 greedyalgorithmsii 2x2MuradAmn
 
Formal methods 4 - Z notation
Formal methods   4 - Z notationFormal methods   4 - Z notation
Formal methods 4 - Z notationVlad Patryshev
 
Lecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceLecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceasimnawaz54
 
A Comparative Study of Two-Sample t-Test Under Fuzzy Environments Using Trape...
A Comparative Study of Two-Sample t-Test Under Fuzzy Environments Using Trape...A Comparative Study of Two-Sample t-Test Under Fuzzy Environments Using Trape...
A Comparative Study of Two-Sample t-Test Under Fuzzy Environments Using Trape...inventionjournals
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiersblaircomp2003
 
The Chasm at Depth Four, and Tensor Rank : Old results, new insights
The Chasm at Depth Four, and Tensor Rank : Old results, new insightsThe Chasm at Depth Four, and Tensor Rank : Old results, new insights
The Chasm at Depth Four, and Tensor Rank : Old results, new insightscseiitgn
 

What's hot (20)

Lecture26
Lecture26Lecture26
Lecture26
 
Mathematical blog #2
Mathematical blog #2Mathematical blog #2
Mathematical blog #2
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
 
Introduction to the lambda calculus
Introduction to the lambda calculusIntroduction to the lambda calculus
Introduction to the lambda calculus
 
Predicates and quantifiers presentation topics
Predicates  and quantifiers  presentation topicsPredicates  and quantifiers  presentation topics
Predicates and quantifiers presentation topics
 
PAC Learning
PAC LearningPAC Learning
PAC Learning
 
Formal methods 5 - Pi calculus
Formal methods   5 - Pi calculusFormal methods   5 - Pi calculus
Formal methods 5 - Pi calculus
 
Signal Processing Assignment Help
Signal Processing Assignment HelpSignal Processing Assignment Help
Signal Processing Assignment Help
 
04 greedyalgorithmsii 2x2
04 greedyalgorithmsii 2x204 greedyalgorithmsii 2x2
04 greedyalgorithmsii 2x2
 
Digital Signal Processing Assignment Help
Digital Signal Processing Assignment HelpDigital Signal Processing Assignment Help
Digital Signal Processing Assignment Help
 
Chemistry Assignment Help
Chemistry Assignment Help Chemistry Assignment Help
Chemistry Assignment Help
 
Assignment 2 daa
Assignment 2 daaAssignment 2 daa
Assignment 2 daa
 
Formal methods 4 - Z notation
Formal methods   4 - Z notationFormal methods   4 - Z notation
Formal methods 4 - Z notation
 
Lecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceLecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inference
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
A Comparative Study of Two-Sample t-Test Under Fuzzy Environments Using Trape...
A Comparative Study of Two-Sample t-Test Under Fuzzy Environments Using Trape...A Comparative Study of Two-Sample t-Test Under Fuzzy Environments Using Trape...
A Comparative Study of Two-Sample t-Test Under Fuzzy Environments Using Trape...
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiers
 
5th Semester Electronic and Communication Engineering (2013-June) Question Pa...
5th Semester Electronic and Communication Engineering (2013-June) Question Pa...5th Semester Electronic and Communication Engineering (2013-June) Question Pa...
5th Semester Electronic and Communication Engineering (2013-June) Question Pa...
 
The Chasm at Depth Four, and Tensor Rank : Old results, new insights
The Chasm at Depth Four, and Tensor Rank : Old results, new insightsThe Chasm at Depth Four, and Tensor Rank : Old results, new insights
The Chasm at Depth Four, and Tensor Rank : Old results, new insights
 
01.01 vector spaces
01.01 vector spaces01.01 vector spaces
01.01 vector spaces
 

Viewers also liked

Viewers also liked (18)

Overview of iso 9001
Overview of iso 9001Overview of iso 9001
Overview of iso 9001
 
Algoritmo y Diagrama de Flujo
Algoritmo y Diagrama de FlujoAlgoritmo y Diagrama de Flujo
Algoritmo y Diagrama de Flujo
 
Sea Rotmann “Helping the Behaviour Changers – or how to create systemic chang...
Sea Rotmann “Helping the Behaviour Changers – or how to create systemic chang...Sea Rotmann “Helping the Behaviour Changers – or how to create systemic chang...
Sea Rotmann “Helping the Behaviour Changers – or how to create systemic chang...
 
Diana morales
Diana morales Diana morales
Diana morales
 
Tema 1 procesos psicológicos basicos
Tema 1 procesos psicológicos basicosTema 1 procesos psicológicos basicos
Tema 1 procesos psicológicos basicos
 
Tecnologías analógicas química franco heriberto
Tecnologías analógicas química franco heribertoTecnologías analógicas química franco heriberto
Tecnologías analógicas química franco heriberto
 
Tour
TourTour
Tour
 
Uxia blanco las tecnologías de la información y de la comunicación
Uxia blanco   las tecnologías de la información y de la comunicaciónUxia blanco   las tecnologías de la información y de la comunicación
Uxia blanco las tecnologías de la información y de la comunicación
 
Kiec
Kiec Kiec
Kiec
 
CONASUPO
CONASUPOCONASUPO
CONASUPO
 
Scott Willis "Creating Cosy Homes."
Scott Willis "Creating Cosy Homes."Scott Willis "Creating Cosy Homes."
Scott Willis "Creating Cosy Homes."
 
Ijetr021117
Ijetr021117Ijetr021117
Ijetr021117
 
Dental technology as a platform
Dental technology as a platformDental technology as a platform
Dental technology as a platform
 
CRIB Board of Advisors
CRIB Board of AdvisorsCRIB Board of Advisors
CRIB Board of Advisors
 
Viv 5.11
Viv 5.11Viv 5.11
Viv 5.11
 
Economics of digital goods
Economics of digital goodsEconomics of digital goods
Economics of digital goods
 
Katrina's Resume
Katrina's ResumeKatrina's Resume
Katrina's Resume
 
El hardware del ordenador
El hardware del ordenadorEl hardware del ordenador
El hardware del ordenador
 

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

Better Late Than Never: A Fully Abstract Semantics for Classical Processes
Better Late Than Never: A Fully Abstract Semantics for Classical ProcessesBetter Late Than Never: A Fully Abstract Semantics for Classical Processes
Better Late Than Never: A Fully Abstract Semantics for Classical ProcessesMarco Peressotti
 
Type header file in c++ and its function
Type header file in c++ and its functionType header file in c++ and its function
Type header file in c++ and its functionFrankie Jones
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.pptTejasAditya2
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introductionyashirraza123
 
Lecture7 channel capacity
Lecture7   channel capacityLecture7   channel capacity
Lecture7 channel capacityFrank Katta
 
"That scripting language called Prolog"
"That scripting language called Prolog""That scripting language called Prolog"
"That scripting language called Prolog"Sergei Winitzki
 
RedisConf18 - CRDTs and Redis - From sequential to concurrent executions
RedisConf18 - CRDTs and Redis - From sequential to concurrent executionsRedisConf18 - CRDTs and Redis - From sequential to concurrent executions
RedisConf18 - CRDTs and Redis - From sequential to concurrent executionsRedis Labs
 
アーベル論理でセッション型
アーベル論理でセッション型アーベル論理でセッション型
アーベル論理でセッション型Yoichi Hirai
 
Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System - Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System - Michael Soltys
 
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness TheoremsA Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness TheoremsLawrence Paulson
 
Cs6503 theory of computation november december 2015 be cse anna university q...
Cs6503 theory of computation november december 2015  be cse anna university q...Cs6503 theory of computation november december 2015  be cse anna university q...
Cs6503 theory of computation november december 2015 be cse anna university q...appasami
 
Hashing Part Two: Static Perfect Hashing
Hashing Part Two: Static Perfect HashingHashing Part Two: Static Perfect Hashing
Hashing Part Two: Static Perfect HashingBenjamin Sach
 
Python Programming Homework Help.pptx
Python Programming Homework Help.pptxPython Programming Homework Help.pptx
Python Programming Homework Help.pptxPython Homework Help
 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionEelco Visser
 
Q-Metrics in Theory and Practice
Q-Metrics in Theory and PracticeQ-Metrics in Theory and Practice
Q-Metrics in Theory and PracticeMagdi Mohamed
 
Q-Metrics in Theory And Practice
Q-Metrics in Theory And PracticeQ-Metrics in Theory And Practice
Q-Metrics in Theory And Practiceguest3550292
 

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

Better Late Than Never: A Fully Abstract Semantics for Classical Processes
Better Late Than Never: A Fully Abstract Semantics for Classical ProcessesBetter Late Than Never: A Fully Abstract Semantics for Classical Processes
Better Late Than Never: A Fully Abstract Semantics for Classical Processes
 
Type header file in c++ and its function
Type header file in c++ and its functionType header file in c++ and its function
Type header file in c++ and its function
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introduction
 
H-MLQ
H-MLQH-MLQ
H-MLQ
 
Lecture7 channel capacity
Lecture7   channel capacityLecture7   channel capacity
Lecture7 channel capacity
 
"That scripting language called Prolog"
"That scripting language called Prolog""That scripting language called Prolog"
"That scripting language called Prolog"
 
APAL2032
APAL2032APAL2032
APAL2032
 
RedisConf18 - CRDTs and Redis - From sequential to concurrent executions
RedisConf18 - CRDTs and Redis - From sequential to concurrent executionsRedisConf18 - CRDTs and Redis - From sequential to concurrent executions
RedisConf18 - CRDTs and Redis - From sequential to concurrent executions
 
アーベル論理でセッション型
アーベル論理でセッション型アーベル論理でセッション型
アーベル論理でセッション型
 
Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System - Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System -
 
AI_Lecture_34.ppt
AI_Lecture_34.pptAI_Lecture_34.ppt
AI_Lecture_34.ppt
 
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness TheoremsA Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
 
Discrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order LogicDiscrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order Logic
 
Cs6503 theory of computation november december 2015 be cse anna university q...
Cs6503 theory of computation november december 2015  be cse anna university q...Cs6503 theory of computation november december 2015  be cse anna university q...
Cs6503 theory of computation november december 2015 be cse anna university q...
 
Hashing Part Two: Static Perfect Hashing
Hashing Part Two: Static Perfect HashingHashing Part Two: Static Perfect Hashing
Hashing Part Two: Static Perfect Hashing
 
Python Programming Homework Help.pptx
Python Programming Homework Help.pptxPython Programming Homework Help.pptx
Python Programming Homework Help.pptx
 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint Resolution
 
Q-Metrics in Theory and Practice
Q-Metrics in Theory and PracticeQ-Metrics in Theory and Practice
Q-Metrics in Theory and Practice
 
Q-Metrics in Theory And Practice
Q-Metrics in Theory And PracticeQ-Metrics in Theory And Practice
Q-Metrics in Theory And Practice
 

More from Hans Hyttel

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

More from Hans Hyttel (13)

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

Recently uploaded

All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfnehabiju2046
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)Jshifa
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett SquareIsiahStephanRadaza
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡anilsa9823
 
Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physicsvishikhakeshava1
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 

Recently uploaded (20)

All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdf
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett Square
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
 
Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physics
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 

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