Rast: A Language for Resource-Aware Session Types

12/24/2020
by   Ankush Das, et al.
0

Traditional session types prescribe bidirectional communication protocols for concurrent computations, where well-typed programs are guaranteed to adhere to the protocols. However, simple session types cannot capture properties beyond the basic type of the exchanged messages. In response, recent work has extended session types with refinements from linear arithmetic, capturing intrinsic attributes of processes and data. These refinements then play a central role in describing sequential and parallel complexity bounds on session-typed programs. The Rast language provides an open-source implementation of session-typed concurrent programs extended with arithmetic refinements as well as ergometric and temporal types to capture work and span of program execution. To further support generic programming, Rast also enhances arithmetically refined session types with recently developed nested parametric polymorphism. Type checking relies on Cooper's algorithm for quantifier elimination in Presburger arithmetic with a few significant optimizations, and a heuristic extension to nonlinear constraints. Rast furthermore includes a reconstruction engine so that most program constructs pertaining the layers of refinements and resources are inserted automatically. We provide a variety of examples to demonstrate the expressivity of the language.

READ FULL TEXT

page 1

page 2

page 3

page 4

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
04/17/2018

Parallel Complexity Analysis with Temporal Session Types

We study the problem of parametric parallel complexity analysis of concu...
research
09/03/2023

Worst-Case Input Generation for Concurrent Programs under Non-Monotone Resource Metrics

Worst-case input generation aims to automatically generate inputs that e...
research
03/28/2021

Subtyping on Nested Polymorphic Session Types

The importance of subtyping to enable a wider range of well-typed progra...
research
12/02/2021

Types and Terms Translated: Unrestricted Resources in Encoding Functions as Processes (Extended Version)

Type-preserving translations are effective rigorous tools in the study o...
research
02/16/2019

Resource-Aware Session Types for Digital Contracts

Programming digital contracts comes with unique challenges, which includ...

Please sign up or login with your details

Forgot password? Click here to reset