Loading...
Thumbnail Image
Publication

Exceptional Asynchronous Session Types: Session Types without Tiers

Fowler, Simon
Lindley, Sam
Morris, J. Garrett
Decova, Sara
Citations
Altmetric:
Abstract
Session types statically guarantee that communication complies with a protocol. However, most accounts of session typing do not account for failure, which means they are of limited use in real applicationsÐespecially distributed applicationsÐwhere failure is pervasive. We present the first formal integration of asynchronous session types with exception handling in a functional programming language. We define a core calculus which satisfies preservation and progress properties, is deadlock free, confluent, and terminating. We provide the first implementation of session types with exception handling for a fully-fledged functional programming language, by extending the Links web programming language; our implementation draws on existing work on effect handlers. We illustrate our approach through a running example of two-factor authentication, and a larger example of a session-based chat application where communication occurs over session-typed channels and disconnections are handled gracefully.
Description
Date
2019
Journal Title
Journal ISSN
Volume Title
Publisher
Association for Computing Machinery
Research Projects
Organizational Units
Journal Issue
Keywords
Session types, Asynchrony, Exceptions, Web programming
Citation
Simon Fowler, Sam Lindley, J. Garrett Morris, and Sára Decova. 2019. Exceptional Asynchronous Session Types: Session Types without Tiers. Proc. ACM Program. Lang. 3, POPL, Article 28 (January 2019), 29 pages. https://doi.org/10.1145/3290341
Embedded videos