Linear type theory for asynchronous session types

  • Authors:
  • Simon j. Gay;Vasco t. Vasconcelos

  • Affiliations:
  • Department of computing science, university of glasgow, glasgow g12 8qq, uk (e-mail: simon@dcs.gla.ac.uk);Departamento de informática, faculdade de ciências, universidade de lisboa, 1749-016 lisboa, portugal (e-mail: vv@di.fc.ul.pt)

  • Venue:
  • Journal of Functional Programming
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Session types support a type-theoretic formulation of structured patterns of communication, so that the communication behaviour of agents in a distributed system can be verified by static typechecking. Applications include network protocols, business processes and operating system services. In this paper we define a multithreaded functional language with session types, which unifies, simplifies and extends previous work. There are four main contributions. First is an operational semantics with buffered channels, instead of the synchronous communication of previous work. Second, we prove that the session type of a channel gives an upper bound on the necessary size of the buffer. Third, session types are manipulated by means of the standard structures of a linear type theory, rather than by means of new forms of typing judgement. Fourth, a notion of subtyping, including the standard subtyping relation for session types (imported into the functional setting), and a novel form of subtyping between standard and linear function types, which allows the typechecker to handle linear types conveniently. Our new approach significantly simplifies session types in the functional setting, clarifies their essential features and provides a secure foundation for language developments such as polymorphism and object-orientation.