Core Concepts
This paper presents three algorithms for checking subtyping of binary session types, along with their complexity analyses. The first algorithm is based on an inductive tree search, the second is an optimized version of the first, and the third is a new quadratic algorithm based on graph search using the concept of X Y Z W-simulation.
Abstract
The paper focuses on the problem of subtyping for synchronous binary session types, which is an important concept in type-safe concurrent programming. It provides the following key insights:
Analysis of the original inductive algorithm from Gay and Hole's paper, showing that it has worst-case exponential complexity.
Proposal of an optimized version of the inductive algorithm, which also has exponential complexity but with better bounds than the original.
Introduction of a new quadratic algorithm based on representing session types as labeled transition systems and checking for an X Y Z W-simulation relation, which can decide subtyping in quadratic time.
The paper starts by providing the necessary preliminaries on session types and subtyping. It then analyzes the complexity of the original inductive algorithm, showing that it can be exponential in the size of the input types. An optimized version of this algorithm is then presented, which improves the complexity but is still exponential.
The key contribution is the new quadratic algorithm, which represents session types as labeled transition systems and checks for a simulation-like relation to decide subtyping. This algorithm is shown to have quadratic time complexity, a significant improvement over the exponential algorithms.
The paper also includes examples demonstrating the application of the algorithms and discusses related work on subtyping for session types and other type systems.