Nested Session Types

被引:2
|
作者
Das, Ankush [1 ,3 ]
DeYoung, Henry [1 ]
Mordido, Andreia [2 ]
Pfenning, Frank [1 ]
机构
[1] Carnegie Mellon Univ, 5000 Forbes Ave, Pittsburgh, PA 15213 USA
[2] Univ Lisbon, Fac Ciencias, LASIGE, Lisbon, Portugal
[3] Amazon, 20450 Stevens Creek Blvd, Cupertino, CA 95014 USA
来源
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS | 2022年 / 44卷 / 03期
基金
美国国家科学基金会;
关键词
Nested types; polymorphism; type equality; DECIDABILITY;
D O I
10.1145/3539656
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Session types statically describe communication protocols between concurrent message-passing processes. Unfortunately, parametric polymorphism even in its restricted prenex form is not fully understood in the context of session types. In this article, we present the metatheory of session types extended with prenex polymorphism and, as a result, nested recursive datatypes. Remarkably, we prove that type equality is decidable by exhibiting a reduction to trace equivalence of deterministic first-order grammars. Recognizing the high theoretical complexity of the latter, we also propose a novel type equality algorithm and prove its soundness. We observe that the algorithm is surprisingly efficient and, despite its incompleteness, sufficient for all our examples. We have implemented our ideas by extending the Rast programming language with nested session types. We conclude with several examples illustrating the expressivity of our enhanced type system.
引用
收藏
页数:45
相关论文
共 50 条
  • [21] Session types for functional multithreading
    Vasconcelos, V
    Ravara, A
    Gay, S
    CONCUR 2004 - CONCURRENCY THEORY, PROCEEDINGS, 2004, 3170 : 497 - 511
  • [22] On session types and polynomial time
    Dal Lago, Ugo
    Di Giamberardino, Paolo
    MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2016, 26 (08) : 1433 - 1458
  • [23] Structuring Communication with Session Types
    Honda, Kohei
    Hu, Raymond
    Neykova, Rumyana
    Chen, Tzu-Chun
    Demangeon, Romain
    Denielou, Pierre-Malo
    Yoshida, Nobuko
    CONCURRENT OBJECTS AND BEYOND: PAPERS DEDICATED TO AKINORI YONEZAWA ON THE OCCASION OF HIS 65TH BIRTHDAY, 2014, 8665 : 105 - 127
  • [24] Characteristic Formulae for Session Types
    Lange, Julien
    Yoshida, Nobuko
    TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS (TACAS 2016), 2016, 9636 : 833 - 850
  • [25] Session Types and Distributed Computing
    Honda, Kohei
    AUTOMATA, LANGUAGES, AND PROGRAMMING, ICALP 2012, PT II, 2012, 7392 : 23 - 23
  • [26] MODULAR SESSION TYPES FOR OBJECTS
    Gay, Simon J.
    Gesbert, Nils
    Ravara, Antonio
    Vasconcelos, Vasco T.
    LOGICAL METHODS IN COMPUTER SCIENCE, 2015, 11 (04)
  • [27] Exceptional Asynchronous Session Types
    Fowler, Simon
    Lindley, Sam
    Morris, J. Garrett
    Decova, Sara
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL):
  • [28] Synchronous Multiparty Session Types
    Bejleri, Andi
    Yoshida, Nobuko
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2009, 241 : 3 - 33
  • [29] Linearly Refined Session Types
    Baltazar, Pedro
    Mostrous, Dimitris
    Vasconcelos, Vasco T.
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2012, (101): : 38 - 49
  • [30] Session types for orchestration charts
    Fantechi, Alessandro
    Najm, Elie
    COORDINATION MODELS AND LANGUAGES, PROCEEDINGS, 2008, 5052 : 117 - +