Session Types with Arithmetic Refinements and Their Application to Work Analysis

Ankush Das, Frank Pfenning
1/13/2020
cs.PLcs.LO

No confident code implementation found for this paper.

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{das2020session,
  title  = {Session Types with Arithmetic Refinements and Their Application to Work Analysis},
  author = {Ankush Das and Frank Pfenning},
  year   = {2020},
  eprint = {2001.04439},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2001.04439}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2001.04439.svg)](https://codeofpaper.com/paper/2001.04439)

Discussion