Borrowing from Session Types
Hannes Saffrich, Janek Spaderna, Peter Thiemann, Vasco T. Vasconcelos
Abstract
Session types provide a formal framework to enforce rich communication protocols, ensuring correctness properties such as type safety and deadlock freedom. However, the traditional API of functional session type systems with first-class channels often leads to problems with modularity and composability.
This paper proposes a new, alternative session type API based on borrowing, embodied in the core calculus BGV. The borrowing-based API enables building modular and composable code for session type clients without imposing clutter or undue limitations. Its basis is a novel type system, founded on ordered linear typing, for functional session types with an explicit operation for splitting ownership of channels. We establish the semantics of BGV via a type-preserving translation to PGV, a deadlock-free functional session type calculus. We establish type safety and deadlock freedom for BGV by this translation.
We also present an external version of BGV that supports use of borrow notation. We developed an algorithmic version of the type system that includes a mechanized verified translation from the external language to BGV. This part establishes decidable type checking.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 1ea5a0df-ed89-41e1-8f76-befc07af60dfCited by top-tier papers1
Ask how each one uses itBuilds on4
- Connectivity graphs: a method for proving deadlock freedom based on separation logicJules Jacobs, Stephanie Balzer, Robbert KrebbersPOPL 2022 · 16 citations
- Stream TypesJoseph W. Cutler, Christopher Watson, Emeka Nkurumeh, Phillip Hilliard et al.PLDI 2024 · 7 citations
- A bunch of sessions: a propositions-as-sessions interpretation of bunched implications in channel-based concurrencyDan Frumin, Emanuele D'Osualdo, Bas van den Heuvel, Jorge A. PérezOOPSLA 2022 · 6 citations
- Law and Order for Typestate with BorrowingHannes Saffrich, Yuki Nishida, Peter ThiemannOOPSLA 2024 · 1 citation
Related papers
- Label-dependent session typesPeter Thiemann, Vasco T. VasconcelosPOPL 2020 · 14 citations
- Verified Lock-Free Session Channels with LinkingThomas Somers, Robbert KrebbersOOPSLA 2024 · 2 citations
- Mechanizing Session-Types using a Structural View: Enforcing Linearity without LinearityChuta Sano, Ryan Kavanagh, Brigitte PientkaOOPSLA 2023 · 10 citations
- Fair termination of binary sessionsLuca Ciccone, Luca PadovaniPOPL 2022 · 8 citations
- From Linearity to BorrowingAndrew Wagner, Olek Gierczak, Brianna Marshall, John M. Li et al.OOPSLA 2025 · 1 citation
