15
IRUS Total
Downloads
  Altmetric

Session Types in Haskell: Updating Message Passing for the 21st Century

File Description SizeFormat 
session-types-in-haskell.pdfAccepted version439.73 kBAdobe PDFView/Open
Title: Session Types in Haskell: Updating Message Passing for the 21st Century
Authors: Sackman, M
Eisenbach, S
Item Type: Report
Abstract: Session Types allow plans of conversation between two concurrent processes to be treated as types. Type checking then ensures that communication between processes is safe: i.e. it obeys the protocol specified by the session type. Thus Session Types offer a means to establish conformance to protocols in both distributed applications and multi-threaded programming. We incorporate Session Types into Haskell as a tool for concurrent programming. Our implementation, which is a standard Haskell library, presents a monadic API to the programmer. Using the library looks and feels very much like normal monadic computation and thus there is a shallow learning curve for the Haskell programmer. Our implementation lifts the invariants and properties of Session Types into Haskells rich type system. This allows our implementation to statically verify the use of the communication primitives provided without an additional type checker, preprocessor or modification to the compiler. Our implementation supports multiple concurrent communication channels, individual processes can interleave actions across any number of open channels, and channels themselves can be sent and received. New channels can be created between pre-existing processes as well as to newly created processes. Communication is asynchronous and fully polymorphic. To our knowledge, no other implementation of Session Types is available in any language which matches our library in terms of functionality and supported features. We describe the key aspects of our implementation and demonstrate, through a running example, its usage and flexibility.
Issue Date: 31-Jul-2008
URI: http://hdl.handle.net/10044/1/5918
Publisher Link: http://pubs.doc.ic.ac.uk/session-types-in-haskell/
DOI: https://doi.org/10.25561/5918
Copyright Statement: © 2008 Imperial College, Department of Computing
Appears in Collections:Distributed Software Engineering
Computing