Lune

OOPSLA2025Top-tier venue

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 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.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Typestate via Revocable Capabilities cites Law and Order for Typestate with Borrowing
  • Stream Types cites A bunch of sessions: a propositions-as-sessions interpretation of bunched implications in channel-based concurrency
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Typestate via Revocable CapabilitiesSonglin Jia, Craig Liu, Siyuan He, Haotian Deng et al.PLDI 2026

Builds on4

  1. Connectivity graphs: a method for proving deadlock freedom based on separation logicJules Jacobs, Stephanie Balzer, Robbert KrebbersPOPL 2022 · 16 citations
  2. Stream TypesJoseph W. Cutler, Christopher Watson, Emeka Nkurumeh, Phillip Hilliard et al.PLDI 2024 · 7 citations
  3. 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
  4. Law and Order for Typestate with BorrowingHannes Saffrich, Yuki Nishida, Peter ThiemannOOPSLA 2024 · 1 citation

Related papers

  1. Label-dependent session typesPeter Thiemann, Vasco T. VasconcelosPOPL 2020 · 14 citations
  2. Verified Lock-Free Session Channels with LinkingThomas Somers, Robbert KrebbersOOPSLA 2024 · 2 citations
  3. Mechanizing Session-Types using a Structural View: Enforcing Linearity without LinearityChuta Sano, Ryan Kavanagh, Brigitte PientkaOOPSLA 2023 · 10 citations
  4. Fair termination of binary sessionsLuca Ciccone, Luca PadovaniPOPL 2022 · 8 citations
  5. From Linearity to BorrowingAndrew Wagner, Olek Gierczak, Brianna Marshall, John M. Li et al.OOPSLA 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines