Deadlock-free Context-free Session Types
Programming Languages
2026-02-24 v3
Abstract
We tackle the problem of statically ensuring that message-passing programs never run into deadlocks. We focus on concurrent functional programs governed by context-free session types, which can express rich tree-like structures not expressible in standard session types. We propose a new type system based on context-free session types: it enforces both protocol conformance and deadlock freedom, also for programs implementing cyclic communication topologies with recursion and polymorphism. We show how the priority-based approach to deadlock freedom can be extended to this expressive setting. We prove that well-typed concurrent programs respect their protocols and never deadlock.
Cite
@article{arxiv.2506.20356,
title = {Deadlock-free Context-free Session Types},
author = {Andreia Mordido and Jorge A. Pérez},
journal= {arXiv preprint arXiv:2506.20356},
year = {2026}
}