A study of bisimulation theory for session types

Bisimulation theory is a co-inductive tool used as a tractable method for studying equivalence relations in process calculi. This dissertation studies bisimulation theory for session types. We define the Asynchronous Session π-calculus (ASP for short), which is a session type calculus with queue configurations acting as a communication medium at each session endpoint The semantics for ASP offer fine-grained communication that enjoys the non-blocking property of asynchrony and the order-preserving property of session types. The ASP typing system is shown to be sound to guarantee type safety in the presence of subtyping. A typed labelled transition system gives rise to a bisimilarity which is sound and complete with respect to typed reduction-closed congruence. The bisimilarity theory of ASP highlights the determinacy and confluence properties of session types. Event-driven programming is one of the major paradigms that utilise the asynchronous nature of distributed systems, where events are recognised as the presence of messages and their typed information in the communication medium. To justify the design choices made, we develop a superset of ASP, called the Eventful Session π-calculus (ESP for short), equipped with the minimal session primitives for an expressive event-driven computational model. The eventful session type system introduces the session set type, which is a collection of session types used to type a set of possible events. The ESP typing system maintains its consistency with respect to the ASP session typing system up-to a subtyping relation for session set types. The straightforward extension from ASP to ESP offers behavioural transparency, making the bisimilarity theory for the ASP a special case for the ESP theory – the bisimilarity relation coincides with typed reduction-closed congruence and determinacy and confluence properties are shown to hold for session transitions. Many studies regarding event-driven computation have identified the selector or its equivalent, the polling operator, as the key construct for describing an event-driven framework. The selector is defined as a higher level construct in ESP and it is used to implement the core event handling routine called the event loop. Following the empirical study by Lauer and Needham, we define a session-based transformation from a multi-threaded server to an event loop server. Confluence theory proves that the transformation is typeand semantics-preserving. In the last part of the dissertation we extend the behavioural theory to multiparty session types, both in the synchronous and the asynchronous cases. For each case, we examine two different typed labelled transition systems. In the first case we examine a standard labelled transition system with respect to the local session typing of processes. In the second case a choreography specification governs the behaviour of a multiparty session process and its observer. Each labelled transition system defines a bisimilarity relation, which coincides with the corresponding reduction-closed congruence.

[1]  Robin Milner,et al.  Communication and concurrency , 1989, PHI Series in computer science.

[2]  Mario Tokoro,et al.  An Object Calculus for Asynchronous Communication , 1991, ECOOP.

[3]  Martin Odersky,et al.  An Overview of the Scala Programming Language , 2004 .

[4]  Nobuko Yoshida,et al.  Dynamic multirole session types , 2011, POPL '11.

[5]  Nobuko Yoshida,et al.  On Reduction-Based Process Semantics , 1995, Theor. Comput. Sci..

[6]  Kohei Honda,et al.  An Interaction-based Language and its Typing System , 1994, PARLE.

[7]  Nobuko Yoshida,et al.  A uniform type structure for secure information flow , 2002, POPL '02.

[8]  David E. Culler,et al.  SEDA: an architecture for well-conditioned, scalable internet services , 2001, SOSP.

[9]  Nobuko Yoshida,et al.  Parameterised Multiparty Session Types , 2010, Log. Methods Comput. Sci..

[10]  Davide Sangiorgi,et al.  On the origins of bisimulation and coinduction , 2009, TOPL.

[11]  Vasco Thudichum Vasconcelos,et al.  Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication , 1998, SecReT@ICALP.

[12]  John R. Douceur,et al.  Cooperative Task Management without Manual Stack Management or, Event-driven Programming is Not the Opposite of Threaded Programming , 2002 .

[13]  Gavin Lowe,et al.  Extending CSP with Tests for Availability , 2009, CPA.

[14]  Roger M. Needham,et al.  On the duality of operating system structures , 1979, OPSR.

[15]  João Costa Seco,et al.  The Conversation Calculus: A Model of Service-Oriented Computation , 2008, ESOP.

[16]  Eddie Kohler,et al.  Making Events Less Slippery with eel , 2005, HotOS.

[17]  Matthew Hennessy,et al.  A Testing Theory for a Higher-Order Cryptographic Language - (Extended Abstract) , 2011, ESOP.

[18]  Robin Milner,et al.  The Polyadic π-Calculus: a Tutorial , 1993 .

[19]  Simon J. Gay,et al.  Subtyping for session types in the pi calculus , 2005, Acta Informatica.

[20]  Benjamin C. Pierce,et al.  Linearity and the pi-calculus , 1999, TOPL.

[21]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[22]  Davide Sangiorgi,et al.  Typing and subtyping for mobile processes , 1993, [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science.

[23]  Gul A. Agha,et al.  ACTORS - a model of concurrent computation in distributed systems , 1985, MIT Press series in artificial intelligence.

[24]  Vasco Thudichum Vasconcelos,et al.  Linear type theory for asynchronous session types , 2009, Journal of Functional Programming.

[25]  Peter Druschel,et al.  Better operating system features for faster network servers , 1998, PERV.

[26]  Nobuko Yoshida,et al.  Two Session Typing Systems for Higher-Order Mobile Processes , 2007, TLCA.

[27]  John K. Ousterhout,et al.  Why Threads Are A Bad Idea , 2013 .

[28]  Roberto Gorrieri,et al.  On confluence in the pi-calculus , 1997 .

[29]  Nobuko Yoshida,et al.  Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication , 2007, Electron. Notes Theor. Comput. Sci..

[30]  Robin Milner,et al.  A Calculus of Mobile Processes, II , 1992, Inf. Comput..

[31]  Kohei Honda,et al.  Types for Dyadic Interaction , 1993, CONCUR.

[32]  Gérard Boudol,et al.  Asynchrony and the Pi-calculus , 1992 .

[33]  Gilles Barthe,et al.  Proceedings of the 20th European conference on Programming languages and systems: part of the joint European conferences on theory and practice of software , 2011, ESOP 2011.

[34]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[35]  ROBIN MILNER,et al.  Edinburgh Research Explorer A Calculus of Mobile Processes, I , 2003 .

[36]  George C. Necula,et al.  Capriccio: scalable threads for internet services , 2003, SOSP '03.

[37]  Nobuko Yoshida,et al.  Type-Safe Eventful Sessions in Java , 2010, ECOOP.

[38]  Sophia Drossopoulou,et al.  Session Types for Object-Oriented Languages , 2006, ECOOP.

[39]  Nobuko Yoshida,et al.  Session-Based Communication Optimisation for Higher-Order Mobile Processes , 2009, TLCA.

[40]  Martín Abadi,et al.  Dynamic typing in polymorphic languages , 1995, Journal of Functional Programming.

[41]  Martin Odersky,et al.  Scala Actors: Unifying thread-based and event-based programming , 2009, Theor. Comput. Sci..

[42]  Anna Philippou,et al.  On Confluence in the pi-Calculus , 1997, ICALP.

[43]  Martín Abadi,et al.  Dynamic typing in a statically-typed language , 1989, POPL '89.

[44]  Matthew Hennessy,et al.  A distributed Pi-calculus , 2007 .

[45]  Robin Milner,et al.  A Calculus of Communicating Systems , 1980, Lecture Notes in Computer Science.

[46]  Nobuko Yoshida,et al.  Session-Based Distributed Programming in Java , 2008, ECOOP.

[47]  David Park,et al.  Concurrency and Automata on Infinite Sequences , 1981, Theoretical Computer Science.

[48]  Bernardo Toninho,et al.  Linear Logical Relations for Session-Based Concurrency , 2012, ESOP.

[49]  Hugo Torres Vieira,et al.  Conversation types , 2009, Theor. Comput. Sci..

[50]  Luca Padovani,et al.  Foundations of session types , 2009, PPDP '09.

[51]  Davide Sangiorgi,et al.  The Pi-Calculus - a theory of mobile processes , 2001 .

[52]  Roberto Gorrieri,et al.  Comparing three semantics for Linda-like languages , 2000, Theor. Comput. Sci..

[53]  Mariangiola Dezani-Ciancaglini,et al.  Asynchronous Session Types and Progress for Object Oriented Languages , 2007, FMOODS.

[54]  Davide Sangiorgi,et al.  Expressing mobility in process algebras : first-order and higher-order paradigms , 1993 .

[55]  Frank Pfenning,et al.  Session Types as Intuitionistic Linear Propositions , 2010, CONCUR.

[56]  Philip Wadler Propositions as sessions , 2012, ICFP '12.

[57]  Patrick Th. Eugster,et al.  EventJava: An Extension of Java for Event Correlation , 2009, ECOOP.

[58]  Frank D. Valencia,et al.  On the Asynchronous Nature of the Asynchronous pi-Calculus , 2008, Concurrency, Graphs and Models.

[59]  Maxwell N. Krohn,et al.  Building Secure High-Performance Web Services with OKWS , 2004, USENIX Annual Technical Conference, General Track.

[60]  Carl Hewitt,et al.  A Universal Modular ACTOR Formalism for Artificial Intelligence , 1973, IJCAI.

[61]  Nobuko Yoshida,et al.  Multiparty Session Types Meet Communicating Automata , 2012, ESOP.

[62]  Romain Demangeon,et al.  Full Abstraction in a Subtyped pi-Calculus with Linear Types , 2011, CONCUR.

[63]  Davide Sangiorgi,et al.  On Bisimulations for the Asynchronous pi-Calculus , 1996, Theor. Comput. Sci..

[64]  William D. Clinger,et al.  Foundations of Actor Semantics , 1981 .

[65]  Claes Wikström,et al.  Concurrent programming in ERLANG (2nd ed.) , 1996 .

[66]  Davide Sangiorgi,et al.  Environmental Bisimulations for Higher-Order Languages , 2007, 22nd Annual IEEE Symposium on Logic in Computer Science (LICS 2007).

[67]  Peng Li,et al.  Combining events and threads for scalable network services implementation and evaluation of monadic, application-level concurrency primitives , 2007, PLDI '07.

[68]  Luca Padovani,et al.  Contracts for Mobile Processes , 2009, CONCUR.

[69]  Davide Sangiorgi,et al.  Session types revisited , 2012, PPDP.

[70]  Julian Rathke,et al.  Typed behavioural equivalences for processes in the presence of subtyping , 2004, Math. Struct. Comput. Sci..

[71]  Eric A. Brewer,et al.  USENIX Association Proceedings of HotOS IX : The 9 th Workshop on Hot Topics in Operating Systems , 2003 .