Probabilistic Resource-Aware Session Types

11/18/2020
by   Ankush Das, et al.
0

Session types guarantee that message-passing processes adhere to predefined communication protocols. Prior work on session types has focused on deterministic languages but many message-passing systems, such as Markov chains and randomized distributed algorithms, are probabilistic. To model and analyze such systems, this article introduces probabilistic session types and explores their application in automatic expected resource analysis. Probabilistic session types describe probability distributions over messages and are a conservative extension of intuitionistic (binary) session types. To send on a probabilistic channel, processes have to utilize internal randomness from a probabilistic branching expression or external randomness from receiving on a probabilistic channel. The analysis for expected resource bounds is integrated with the type system and is a variant of automatic amortized resource analysis. It can automatically derive symbolic bounds for different cost metrics by reducing type inference to linear constraint solving. The technical contributions include the meta theory that is based on a novel nested multiverse semantics and a type-reconstruction algorithm that allows flexible mixing of different sources of randomness without burdening the programmer with type annotations. The type system has been implemented in the language PRast. Experiments demonstrate that PRast is applicable in different domains such as resource analysis of randomized distributed algorithms, verification of limiting distributions in Markov chains, and analysis of probabilistic digital contracts.

READ FULL TEXT
research
12/22/2017

Work Analysis with Resource-Aware Session Types

While there exist several successful techniques for supporting programme...
research
07/23/2020

Probabilistic Analysis of Binary Sessions

We study a probabilistic variant of binary session types that relate to ...
research
02/16/2019

Resource-Aware Session Types for Digital Contracts

Programming digital contracts comes with unique challenges, which includ...
research
12/14/2022

PSTMonitor: Monitor Synthesis from Probabilistic Session Types

We present PSTMonitor, a tool for the run-time verification of quantitat...
research
05/12/2020

Session Types with Arithmetic Refinements

Session types statically prescribe bidirectional communication protocols...
research
01/13/2020

Session Types with Arithmetic Refinements and Their Application to Work Analysis

Session types statically prescribe bidirectional communication protocols...
research
07/02/2019

Domain-Aware Session Types (Extended Version)

We develop a generalization of existing Curry-Howard interpretations of ...

Please sign up or login with your details

Forgot password? Click here to reset