Fowler, S. , Lindley, S., Morris, J. G. and Decova, S. (2019) Exceptional asynchronous session types: session types without tiers. Proceedings of the ACM on Programming Languages, 3(POPL), 28. (doi: 10.1145/3290341)
|
Text
223075.pdf - Published Version Available under License Creative Commons Attribution. 488kB |
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.
Item Type: | Articles |
---|---|
Additional Information: | This work was supported by EPSRC grants EP/L01503X/1 (EPSRC CDT in Pervasive Parallelism) and EP/K034413/1 (From Data Types to Session TypesÐA Basis for Concurrency and Distribution), and an LFCS internship. |
Status: | Published |
Refereed: | Yes |
Glasgow Author(s) Enlighten ID: | Fowler, Dr Simon |
Authors: | Fowler, S., Lindley, S., Morris, J. G., and Decova, S. |
College/School: | College of Science and Engineering > School of Computing Science |
Journal Name: | Proceedings of the ACM on Programming Languages |
Publisher: | ACM |
ISSN: | 2475-1421 |
ISSN (Online): | 2475-1421 |
Published Online: | 02 January 2019 |
Copyright Holders: | Copyright © 2019 The Authors |
First Published: | First published in Proceedings of the ACM on Programming Languages 3(POPL): 28 |
Publisher Policy: | Reproduced under a Creative Commons License |
University Staff: Request a correction | Enlighten Editors: Update this record