arrow
Return

Borrowing from Session Types

delete2025-10-01
delete0
PRE
AI
H
Hannes Saffrich *
J
Janek Spaderna
P
Peter Thiemann
V
Vasco T. Vasconcelos
DOI:10.1145/3763173delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
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.
Keywords:
Concurrent programming
session types
ordered types
A Synthetic Reconstruction of Multiparty Session Types
err2026-01-01
err0
PREAI
errCastro-Perez, David; Ferreira, Francisco; Jongmans, Sung-Shik
errShare
errSave
Mixed Choice in Asynchronous Multiparty Session Types
err2026-04-01
err0
PREAI
errBocchi, Laura; Hu, Raymond; Voinea, Adriana Laura; Thompson, Simon
errShare
errSave
Foundations of Session Types and Behavioural Contracts
err2016-04-05
err148
errOAAI
errHuttel, Hans; Lanese, Ivan; Vasconcelos, Vasco T.; Caires, Luis; Carbone, Marco; Denielou, Pierre-Malo; Mostrous, Dimitris; Padovani, Luca; Ravara, Antonio; Tuosto, Emilio; Vieira, Hugo Torres; Zavattaro, Gianluigi
errShare
errSave
Fully-Automatic Type Inference for Borrows with Lifetimes
err2026-04-01
err0
PREAI
errBrandon, William; Driscoll, Benjamin; Dai, Frank; Ragan-Kelley, Jonathan; Milano, Mae; Aiken, Alex
errShare
errSave
From Linearity to Borrowing
err2025-10-01
err1
PREAI
errWagner, Andrew; Gierczak, Olek; Marshall, Brianna; Li, John M.; Ahmed, Amal
errShare
errSave

Journal

P
Proceedings of the ACM on Programming Languages-PACMPL
IF:
2.8
Papers:
308
Citations:
4.7K

Organization

U
Universidade de Lisboa
Scholars:
735
Papers: 340
Citations: 1.8W
U
University of Freiburg
Scholars:
1.7K
Papers: 570
Citations: 1.9W
Cited Papers

Cited Papers

The Logic of Bunched Implications
err2014-01-15
err0
PREAI
errPeter W. O'Hearn; David J. Pym
errShare
errSave
An Implementation of Session Types
err2004-01-01
err0
PREAI
errNeubauer,Matthias; Thiemann,Peter
errShare
errSave
Ownership Types: A Survey
err2013-01-01
err0
PREAI
errClarke,Dave; Östlund,Johan; Sergey,Ilya; Wrigstad,Tobias
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
researcher View more