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 条
  • [41] Structuring communication with session types
    Honda, Kohei
    Hu, Raymond
    Neykova, Rumyana
    Chen, Tzu-Chun
    Demangeon, Romain
    Deníelou, Pierre-Malo
    Deníelou, Pierre-Malo
    Yoshida, Nobuko
    Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2014, 8665 : 105 - 127
  • [42] A Decade of Dependent Session Types
    Toninho, Bernardo
    Caires, Luis
    Pfenning, Frank
    PROCEEDINGS OF THE 23RD INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING, PPDP 2021, 2021,
  • [43] Dynamic Multirole Session Types
    Denielou, Pierre-Malo
    Yoshida, Nobuko
    ACM SIGPLAN NOTICES, 2011, 46 (01) : 435 - 446
  • [44] Multiparty Asynchronous Session Types
    Honda, Kohei
    Yoshida, Nobuko
    Carbone, Marco
    JOURNAL OF THE ACM, 2016, 63 (01)
  • [45] Polarized Substructural Session Types
    Pfenning, Frank
    Griffith, Dennis
    FOUNDATIONS OF SOFTWARE SCIENCE AND COMPUTATION STRUCTURES (FOSSACS 2015), 2015, 9034 : 3 - 22
  • [46] The pairing of contracts and session types
    Laneve, Cosimo
    Padovani, Luca
    CONCURRENCY, GRAPHS AND MODELS: ESSAYS DEDICATED TO UGO MONTANARI ON THE OCCASION OF HIS 65TH BIRTHDAY, 2008, 5065 : 681 - +
  • [47] PARAMETERISED MULTIPARTY SESSION TYPES
    Denielou, Pierre-Malo
    Yoshida, Nobuko
    Bejleri, Andi
    Hu, Raymond
    LOGICAL METHODS IN COMPUTER SCIENCE, 2012, 8 (04)
  • [48] Recursive Session Types Revisited
    Dardha, Ornela
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2014, (162): : 27 - 34
  • [49] On projecting processes into session types
    Padovani, Luca
    MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2012, 22 (02) : 237 - 289
  • [50] Embedding Session Types in HML
    Bocchi, Laura
    Demangeon, Romain
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2013, (137): : 53 - 62