Table of Contents
Fetching ...

Three Subtyping Algorithms for Binary Session Types and their Complexity Analyses

Thien Udomsrirungruang, Nobuko Yoshida

TL;DR

The paper addresses the computational challenge of subtyping for synchronous binary session types by analyzing three algorithms: the original inductive Gay2005 method, a memoized optimization, and a new quadratic graph-based approach using XYZW-simulation. It shows that bottom-up and top-down subterm bounds are linear, leading to precise complexity results: the original is bounded by $O(n^{n^3})$ with a matching exponential lower bound, the memoized variant improves to $2^{O(n^2)}$ yet remains exponential, and the quadratic LTS-based approach achieves $O(n^2)$ via a $ ext{XYZW}$-simulation on a linear-size type LTS. This work also connects with prior results on automata-based and model-checking techniques, providing a unified, scalable framework for subtyping checks in binary session types. The methods have practical implications for type checkers and the design of session-type systems, and they offer a blueprint for extending to related session-type regimes.

Abstract

Session types are a type discipline for describing and specifying communication behaviours of concurrent processes. Session subtyping, firstly introduced by Gay and Hole, is widely used for enlarging typability of session programs. This paper gives the complexity analysis of three algorithms for subtyping of synchronous binary session types. First, we analyse the complexity of the algorithm from the original paper, which is based on an inductive tree search. We then introduce its optimised version, which improves the complexity, but is still exponential against the size of the two types. Finally, we propose a new quadratic algorithm based on a graph search using the concept of XYZW-simulation, recently introduced by Silva et al.

Three Subtyping Algorithms for Binary Session Types and their Complexity Analyses

TL;DR

The paper addresses the computational challenge of subtyping for synchronous binary session types by analyzing three algorithms: the original inductive Gay2005 method, a memoized optimization, and a new quadratic graph-based approach using XYZW-simulation. It shows that bottom-up and top-down subterm bounds are linear, leading to precise complexity results: the original is bounded by with a matching exponential lower bound, the memoized variant improves to yet remains exponential, and the quadratic LTS-based approach achieves via a -simulation on a linear-size type LTS. This work also connects with prior results on automata-based and model-checking techniques, providing a unified, scalable framework for subtyping checks in binary session types. The methods have practical implications for type checkers and the design of session-type systems, and they offer a blueprint for extending to related session-type regimes.

Abstract

Session types are a type discipline for describing and specifying communication behaviours of concurrent processes. Session subtyping, firstly introduced by Gay and Hole, is widely used for enlarging typability of session programs. This paper gives the complexity analysis of three algorithms for subtyping of synchronous binary session types. First, we analyse the complexity of the algorithm from the original paper, which is based on an inductive tree search. We then introduce its optimised version, which improves the complexity, but is still exponential against the size of the two types. Finally, we propose a new quadratic algorithm based on a graph search using the concept of XYZW-simulation, recently introduced by Silva et al.
Paper Structure (9 sections, 15 theorems, 8 equations, 4 figures, 1 table)

This paper contains 9 sections, 15 theorems, 8 equations, 4 figures, 1 table.

Key Result

Lemma 3.1

$|\text{Sub}(T)| \leq |T|$.

Figures (4)

  • Figure 1: Algorithmic rules for subtyping, taken from Gay2005.
  • Figure 2: A memoized subtyping algorithm.
  • Figure 3: Rules for the type LTS.
  • Figure 4: Graph for $(T^\mathsf{interface}_2, T^\mathsf{interface}_3)$.

Theorems & Definitions (44)

  • Definition 2.1: Session Types
  • Definition 2.2: Unfolding
  • Definition 2.3: Coinductive subtyping
  • Definition 2.4: Coinductive equality
  • Example 2.5: Interface
  • Definition 2.6: Size
  • Definition 2.7: Bottom-up subterms
  • Definition 2.8: Top-down subterms
  • Lemma 3.1
  • proof
  • ...and 34 more