MobilityReadingGroup

π-calculus, Session Types research at Imperial College

Effects as sessions, sessions as effects
Dominic ORCHARD , Nobuko YOSHIDA
43th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2016) p. 568 - 581

Effect and session type systems are two expressive behavioural type systems. The former is usually developed in the context of the lambda- calculus and its variants, the latter for the pi-calculus. In this paper we explore their relative expressive power. Firstly, we give an embedding from PCF, augmented with a parameterised effect system, into a session-typed pi-calculus (session calculus), showing that session types are powerful enough to express effects. Secondly, we give a reverse embedding, from the session calculus back into PCF, by instantiating PCF with concurrency primitives and its effect system with a session-like effect algebra; effect systems are powerful enough to express sessions. The embedding of session types into an effect system is leveraged to give a new implementation of session types in Haskell, via an effect system encoding. The correctness of this implementation follows from the second embedding result. We also discuss various extensions to our embeddings.

@inproceedings{OY2016,
  author = {Dominic Orchard and Nobuko Yoshida},
  title = {{Effects as sessions, sessions as effects}},
  pages = {568--581},
  publisher = {ACM},
  year = 2016
}
@inproceedings{OY2016,
  author = {Dominic Orchard and Nobuko Yoshida},
  title = {{Effects as sessions, sessions as effects}},
  booktitle = {43th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages},
  pages = {568--581},
  publisher = {ACM},
  doi = "10.1145/2837614.2837634",
  year = 2016
}