English

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.

Keywords

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}
}
R2 v1 2026-07-01T03:32:54.508Z