Mechanizing Session-Types using a Structural View: Enforcing Linearity without Linearity
Chuta Sano, Ryan Kavanagh, Brigitte Pientka
Abstract
Session types employ a linear type system that ensures that communication channels cannot be implicitly copied or discarded. As a result, many mechanizations of these systems require modeling channel contexts and carefully ensuring that they treat channels linearly. We demonstrate a technique that localizes linearity conditions as additional predicates embedded within type judgments, which allows us to use structural typing contexts instead of linear ones. This technique is especially relevant when leveraging (weak) higher-order abstract syntax to handle channel mobility and the intricate binding structures that arise in session-typed systems.
Following this approach, we mechanize a session-typed system based on classical linear logic and its type preservation proof in the proof assistant Beluga, which uses the logical framework LF as its encoding language. We also prove adequacy for our encoding. This shows the tractability and effectiveness of our approach in modelling substructural systems such as session-typed languages.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
Builds on1
Related papers
- Verified Lock-Free Session Channels with LinkingThomas Somers, Robbert KrebbersOOPSLA 2024 · 2 citations
- Fair termination of binary sessionsLuca Ciccone, Luca PadovaniPOPL 2022 · 8 citations
- Deadlock-Free Separation Logic: Linearity Yields Progress for Dependent Higher-Order Message PassingJules Jacobs, Jonas Kastberg Hinrichsen, Robbert KrebbersPOPL 2024 · 12 citations
- Borrowing from Session TypesHannes Saffrich, Janek Spaderna, Peter Thiemann, Vasco T. VasconcelosOOPSLA 2025
- Label-dependent session typesPeter Thiemann, Vasco T. VasconcelosPOPL 2020 · 14 citations
