Exceptional Asynchronous Session Types

被引:36
|
作者
Fowler, Simon [1 ]
Lindley, Sam [1 ]
Morris, J. Garrett [2 ]
Decova, Sara [1 ]
机构
[1] Univ Edinburgh, Edinburgh, Midlothian, Scotland
[2] Univ Kansas, Lawrence, KS 66045 USA
基金
英国工程与自然科学研究理事会;
关键词
session types; asynchrony; exceptions; web programming;
D O I
10.1145/3290341
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:29
相关论文
共 50 条
  • [41] Structuring Communication with Session Types
    Honda, Kohei
    Hu, Raymond
    Neykova, Rumyana
    Chen, Tzu-Chun
    Demangeon, Romain
    Denielou, Pierre-Malo
    Yoshida, Nobuko
    [J]. CONCURRENT OBJECTS AND BEYOND: PAPERS DEDICATED TO AKINORI YONEZAWA ON THE OCCASION OF HIS 65TH BIRTHDAY, 2014, 8665 : 105 - 127
  • [42] Session Types and Distributed Computing
    Honda, Kohei
    [J]. AUTOMATA, LANGUAGES, AND PROGRAMMING, ICALP 2012, PT II, 2012, 7392 : 23 - 23
  • [43] On session types and polynomial time
    Dal Lago, Ugo
    Di Giamberardino, Paolo
    [J]. MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2016, 26 (08) : 1433 - 1458
  • [44] Characteristic Formulae for Session Types
    Lange, Julien
    Yoshida, Nobuko
    [J]. TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS (TACAS 2016), 2016, 9636 : 833 - 850
  • [45] Linearly Refined Session Types
    Baltazar, Pedro
    Mostrous, Dimitris
    Vasconcelos, Vasco T.
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2012, (101): : 38 - 49
  • [46] Session types for orchestration charts
    Fantechi, Alessandro
    Najm, Elie
    [J]. COORDINATION MODELS AND LANGUAGES, PROCEEDINGS, 2008, 5052 : 117 - +
  • [47] Synchronous Multiparty Session Types
    Bejleri, Andi
    Yoshida, Nobuko
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2009, 241 : 3 - 33
  • [48] Session types for functional multithreading
    Vasconcelos, V
    Ravara, A
    Gay, S
    [J]. CONCUR 2004 - CONCURRENCY THEORY, PROCEEDINGS, 2004, 3170 : 497 - 511
  • [49] Parameterised Multiparty Session Types
    Yoshida, Nobuko
    Denielou, Pierre-Malo
    Bejleri, Andi
    Hu, Raymond
    [J]. FOUNDATIONS OF SOFTWARE SCIENCE AND COMPUTATIONAL STRUCTURES, PROCEEDINGS, 2010, 6014 : 128 - 145
  • [50] Dynamic Multirole Session Types
    Denielou, Pierre-Malo
    Yoshida, Nobuko
    [J]. POPL 11: PROCEEDINGS OF THE 38TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2011, : 435 - 446