Subtyping on Nested Polymorphic Session Types

03/28/2021
by   Ankush Das, et al.
0

The importance of subtyping to enable a wider range of well-typed programs is undeniable. However, the interaction between subtyping, recursion, and polymorphism is not completely understood yet. In this work, we explore subtyping in a system of nested, recursive, and polymorphic types with a coinductive interpretation, and we prove that this problem is undecidable. Our results will be broadly applicable, but to keep our study grounded in a concrete setting, we work with an extension of session types with explicit polymorphism, parametric type constructors, and nested types. We prove that subtyping is undecidable even for the fragment with only internal choices and nested unary recursive type constructors. Despite this negative result, we present a subtyping algorithm for our system and prove its soundness. We minimize the impact of the inescapable incompleteness by enabling the programmer to seed the algorithm with subtyping declarations (that are validated by the algorithm). We have implemented the proposed algorithm in Rast and it showed to be efficient in various example programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/13/2020

Nested Session Types

Session types statically describe communication protocols between concur...
research
01/13/2021

Parametricity for Nested Types and GADTs

This paper considers parametricity and its consequent free theorems for ...
research
12/24/2020

Rast: A Language for Resource-Aware Session Types

Traditional session types prescribe bidirectional communication protocol...
research
01/20/2022

The Different Shades of Infinite Session Types

Many type systems include infinite types. In session type systems, which...
research
07/31/2018

Multiparty Dependent Session Types (Extended Abstract)

Programs are more distributed and concurrent today than ever before, and...
research
07/02/2022

LibNDT: Towards a Formal Library on Spreadable Properties over Linked Nested Datatypes

Nested datatypes have been widely studied in the past 25 years, both the...
research
09/06/2022

On the Expressiveness of Mixed Choice Sessions

Session types provide a flexible programming style for structuring inter...

Please sign up or login with your details

Forgot password? Click here to reset