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 条
  • [1] Nested Session Types
    Das, Ankush
    DeYoung, Henry
    Mordido, Andreia
    Pfenning, Frank
    PROGRAMMING LANGUAGES AND SYSTEMS, ESOP 2021, 2021, 12648 : 178 - 206
  • [2] Nested Protocols in Session Types
    Demangeon, Romain
    Honda, Kohei
    CONCUR 2012 - CONCURRENCY THEORY, 2012, 7454 : 272 - 286
  • [3] Session Types = Intersection Types
    Padovani, Luca
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2011, (45): : 71 - 89
  • [4] Session Types as Generic Process Types
    Gay, Simon
    Gesbert, Nils
    Ravara, Antonio
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2014, (160): : 94 - 110
  • [5] An implementation of session types
    Neubauer, M
    Thiemann, P
    PRACTICAL ASPECTS OF DECLARATIVE LANGUAGES, 2004, 3057 : 56 - 70
  • [6] Session Types for Broadcasting
    Kouzapas, Dimitrios
    Gutkovas, Ramunas
    Gay, Simon J.
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2014, (155): : 25 - 31
  • [7] TIMED SESSION TYPES
    Bartoletti, Massimo
    Cimoli, Tiziana
    Murgia, Maurizio
    LOGICAL METHODS IN COMPUTER SCIENCE, 2017, 13 (04)
  • [8] Foundations of Session Types
    Castagna, Giuseppe
    Dezani-Ciancaglini, Mariangiola
    Giachino, Elena
    Padovani, Luca
    PPDP'09: PROCEEDINGS OF THE 11TH INTERNATIONAL ACM SIGPLAN SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING, 2009, : 219 - 230
  • [9] Objects and session types
    Dezani-Ciancaglini, Mariangiola
    Drossopoulou, Sophia
    Mostrous, Dimitris
    Yoshida, Nobuko
    INFORMATION AND COMPUTATION, 2009, 207 (05) : 595 - 641
  • [10] Soft Session Types
    Dal Lago, Ugo
    Di Giamberardino, Paolo
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2011, (64): : 59 - 73