Proceedings of the ACM on Programming Languages · 2019 · 54 citations · 22 references
ComputingComputer ScienceComputer SystemsAuthenticationFormal MethodsProgramming LanguagesSession AuthenticationType CheckingType SystemsChannelsSession Types
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.
22
Multiparty Asynchronous Session Types
Kohei Honda, Nobuko Yoshida, Marco Carbone · Journal of the ACM · 2016 · 287 citations · Full text
Nicholas D. Matsakis, Felix S. Klock · 2014 · 278 citations
Gordon Plotkin, Matija Pretnar · Logical Methods in Computer Science · 2013 · 141 citations · Full text
Computing, Computer Science, Algebra +14
Philip Wadler · Journal of Functional Programming · 2014 · 138 citations · Full text