Many type systems include infinite types. In session type systems, which are the focus of this paper, infinite types are important because they allow the specification of communication protocols that are unbounded in time. Usually infinite session types are introduced as simple finite-state expressions $\mathsf{rec}\, X.T$ or by non-parametric equational definitions $X\doteq T$. Alternatively, some systems of label- or value-dependent session types go beyond simple recursive types. However, leaving dependent types aside, there is a much richer world of infinite session types, ranging through various forms of parametric equational definitions, all the way to arbitrary infinite types in a coinductively defined space. We study infinite session types across a spectrum of shades of grey on the way to the bright light of general infinite types. We identify four points on the spectrum, characterised by different styles of equational definitions, and show that they form a strict hierarchy by establishing bidirectional correspondences with classes of automata: finite-state, 1-counter, pushdown and 2-counter. This allows us to establish decidability and undecidability results for the problems of type formation, type equivalence and duality in each class of types. We also consider previous work on context-free session types (and extend it to higher-order) and nested session types, and locate them on our spectrum of infinite types.
翻译:许多类型系统包括无限类型。 在作为本文焦点的会话类型系统中, 无限类型是重要的, 因为它们允许指定没有时间限制的通信协议。 通常无限的会话类型被引入为简单的有限状态表达 $\ mathsfsf{rec ⁇, X.T$ 或非参数等式定义 $X\doteq T$。 或者, 一些标签或依赖值的会话类型系统超越简单的循环类型。 但是, 将依附类型搁置一边, 世界上有很多无穷无穷的会话类型, 包括不同形式的等式定义, 各种途径都可任意到可任意限制的无限类型 。 我们研究无穷的会话类型在通向普通无限类型光照亮的光线上的灰色表达方式。 我们确定频谱上的四点, 以不同的方程定义类型为特征, 并显示它们形成严格的等级, 与自动化类型的双向对应: 定式、 1- 计 、 推倒式和 2- 计式 等式 。 这使得我们可以在每类类型上确定易分级和不易排序类型。 和不易排序类型。