Lune

PLDI2025Top-tier venue

Probabilistic Refinement Session Types

Qiancheng Fu, Ankush Das, Marco Gaboardi

Abstract

Session types provide a formal type system to define and verify communication protocols between message-passing processes. In order to analyze randomized systems, recent works have extended session types with probabilistic type constructors. Unfortunately, all the proposed extensions only support constant probabilities which limits their applicability to real-world systems. Our work addresses this limitation by introducing probabilistic refinement session types which enable symbolic reasoning for concurrent probabilistic systems in a core calculus we call PReST. The type system is carefully designed to be a conservative extension of refinement session types and supports both probabilistic and regular choice type operators. We also implement PReST in a prototype which we use for validating probabilistic concurrent programs. The added expressive power leads to significant challenges, in both the meta theory and implementation of PReST, particularly with type checking: it requires reconstructing intermediate types for channels when type checking probabilistic branching expressions. The theory handles this by semantically quantifying refinement variables in probabilistic typing rules, a deviation from standard refinement type systems. The implementation relies on a bi-directional type checker that uses an SMT solver to reconstruct the intermediate types minimizing annotation overhead and increasing usability. To guarantee that probabilistic processes are almost-surely terminating, we integrate cost analysis into our type system to obtain expected upper bounds on recursion depth. We evaluate PReST on a wide variety of benchmarks from 4 categories: (i) randomized distributed protocols such as Itai and Rodeh’s leader election, bounded retransmission, etc., (ii) parametric Markov chains such as random walks, (iii) probabilistic analysis of concurrent data structures such as queues, and (iv) distributions obtained by composing uniform distributions using operators like max and sum. Our experiments show that the PReST type checker scales to large programs with sophisticated probabilistic distributions.

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.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Automated Expected Amortised Cost Analysis of Probabilistic Data Structures cites A modular cost analysis for probabilistic programs
  • Tachis: Higher-Order Separation Logic with Credits for Expected Costs cites Aiming low is harder: induction for lower bounds in probabilistic program verification
  • Tachis: Higher-Order Separation Logic with Credits for Expected Costs cites Automated Expected Amortised Cost Analysis of Probabilistic Data Structures
  • Tachis: Higher-Order Separation Logic with Credits for Expected Costs cites A modular cost analysis for probabilistic programs
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on5

  1. Aiming low is harder: induction for lower bounds in probabilistic program verificationMarcel Hark, Benjamin Lucien Kaminski, Jürgen Giesl, Joost-Pieter KatoenPOPL 2020 · 47 citations
  2. A modular cost analysis for probabilistic programsMartin Avanzini, Georg Moser, Michael SchaperOOPSLA 2020 · 41 citations
  3. Automated Expected Amortised Cost Analysis of Probabilistic Data StructuresLorenz Leutgeb, Georg Moser, Florian ZulegerCAV 2022 · 19 citations
  4. Probabilistic Resource-Aware Session TypesAnkush Das, Di Wang, Jan HoffmannPOPL 2023 · 11 citations
  5. Tachis: Higher-Order Separation Logic with Credits for Expected CostsPhilipp G. Haselwarter, Kwing Hei Li, Markus de Medeiros, Simon Oddershede Gregersen et al.OOPSLA 2024 · 5 citations

Related papers

  1. Verified Lock-Free Session Channels with LinkingThomas Somers, Robbert KrebbersOOPSLA 2024 · 2 citations
  2. Top-Down or Bottom-Up? Complexity Analyses of Synchronous Multiparty Session TypesThien Udomsrirungruang, Nobuko YoshidaPOPL 2025 · 7 citations
  3. Mixtris: Mechanised Higher-Order Separation Logic for Mixed Choice Multiparty Message PassingJonas Kastberg Hinrichsen, Iwan Quémerais, Lars BirkedalOOPSLA 2026
  4. Statically verified refinements for multiparty protocolsFangyi Zhou, Francisco Ferreira, Raymond Hu, Rumyana Neykova et al.OOPSLA 2020 · 38 citations
  5. Mixed Choice in Asynchronous Multiparty Session TypesLaura Bocchi, Raymond Hu, Adriana Laura Voinea, Simon ThompsonOOPSLA 2026
Dusk over the sea between two cliffs drawn in fine vertical lines