Session Types with Arithmetic Refinements and Their Application to Work Analysis

01/13/2020
by   Ankush Das, et al.
0

Session types statically prescribe bidirectional communication protocols for message-passing processes and are in a Curry-Howard correspondence with linear logic propositions. However, simple session types cannot specify properties beyond the type of exchanged messages. In this paper we extend the type system by using index refinements from linear arithmetic capturing intrinsic attributes of data structures and algorithms so that we can express and verify amortized cost of programs using ergometric types. We show that, despite the decidability of Presburger arithmetic, type equality and therefore also type checking are now undecidable, which stands in contrast to analogous dependent refinement type systems from functional languages. We also present a practical incomplete algorithm for type equality and an algorithm for type checking which is complete relative to an oracle for type equality. Process expressions in this explicit language are rather verbose, so we also introduce an implicit form and a sound and complete algorithm for reconstructing explicit programs, borrowing ideas from the proof-theoretic technique of focusing. We conclude by illustrating our systems and algorithms with a variety of examples that have been verified in our implementation.

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
12/24/2020

Rast: A Language for Resource-Aware Session Types

Traditional session types prescribe bidirectional communication protocol...
research
10/13/2020

Nested Session Types

Session types statically describe communication protocols between concur...
research
12/22/2017

Work Analysis with Resource-Aware Session Types

While there exist several successful techniques for supporting programme...
research
01/24/2018

Depending on Session-Typed Processes

This work proposes a dependent type theory that combines functions and s...
research
07/02/2018

Shallow Types for Insightful Programs: Grace is Optional, Performance is Not

Languages with explicit dynamic type checking are increasing in populari...
research
11/18/2020

Probabilistic Resource-Aware Session Types

Session types guarantee that message-passing processes adhere to predefi...

Please sign up or login with your details

Forgot password? Click here to reset