Three Subtyping Algorithms for Binary Session Types and their Complexity Analyses (full version)
Thien Udomsrirungruang, Nobuko Yoshida
TL;DR
Addressing subtyping for synchronous binary session types, the paper analyzes three algorithms and introduces a quadratic, $XYZW$-simulation-based approach. It shows the original Gay2005 inductive algorithm runs in $O(n^{n^3})$ time, while a memoized variant reduces to $2^{O(n^2)}$, and the new quadratic algorithm achieves $O(n^2)$ time through a graph-based reachability check on a type LTS. The quadratic method encodes types as a labeled transition system and reduces subtyping to a $XYZW$-simulation, providing a provably efficient solution. The work contextualizes these results with respect to prior automata-based and modal-calculus approaches and outlines potential applicability to broader session-type systems.
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 $\mathcal{XYZW}$-simulation, recently introduced by Silva et al.
