ACM SIGPLAN Notices · 2008 · 22 citations · 16 references
ComputingComputer ScienceFormal MethodsProgramming LanguagesSyntaxData TypesType CheckingType SystemsClient-server CommunicationClient-server SynchronizationPolymorphic TypesSession TypesType ClassesType Polymorphism
We describe an implementation of session types in Haskell. Session types statically enforce that client-server communication proceeds according to protocols. They have been added to several concurrent calculi, but few implementations of session types are available. Our embedding takes advantage of Haskell where appropriate, but we rely on no exotic features. Thus our approach translates with minimal modification to other polymorphic, typed languages such as ML and Java. Our implementation works with existing Haskell concurrency mechanisms, handles multiple communication channels and recursive session types, and infers protocols automatically. While our implementation uses unsafe operations in Haskell, it does not violate Haskell's safety guarantees. We formalize this claim in a concurrent calculus with unsafe communication primitives over which we layer our implementation of session types, and we prove that the session types layer is safe. In particular, it enforces that channel-based communication follows consistent protocols.
16
A Syntactic Approach to Type Soundness
Andy Wright, Matthias Felleisen · Information and Computation · 1994 · 1.1K citations
Composable memory transactions
Tim Harris, Simon Marlow, Simon Peyton-Jones et al. · 2005 · 716 citations
Ivan E. Sutherland, Gary W. Hodgman · Communications of the ACM · 1974 · 569 citations · Full text
Enforcing high-level protocols in low-level software
Robert DeLine, Manuel Fähndrich · 2001 · 487 citations
Simon Peyton Jones, Andrew D. Gordon, Sigbjørn Finne · 1996 · 378 citations