Work Analysis with Resource-Aware Session Types

12/22/2017
by   Ankush Das, et al.
0

While there exist several successful techniques for supporting programmers in deriving static resource bounds for sequential code, analyzing the resource usage of message-passing concurrent processes poses additional challenges. To meet these challenges, this article presents an analysis for statically deriving worst-case bounds on the total work performed by message-passing processes. To decompose interacting processes into components that can be analyzed in isolation, the analysis is based on novel resource-aware session types, which describe protocols and resource contracts for inter-process communication. A key innovation is that both messages and processes carry potential to share and amortize cost while communicating. To symbolically express resource usage in a setting without static data structures and intrinsic sizes, resource contracts describe bounds that are functions of interactions between processes. Resource-aware session types combine standard binary session types and type-based amortized resource analysis in a linear type system. This type system is formulated for a core session-type calculus of the language SILL and proved sound with respect to a multiset-based operational cost semantics that tracks the total number of messages that are exchanged in a system. The effectiveness of the analysis is demonstrated by analyzing standard examples from amortized analysis and the literature on session types and by a comparative performance analysis of different concurrent programs implementing the same interface.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/18/2020

Probabilistic Resource-Aware Session Types

Session types guarantee that message-passing processes adhere to predefi...
research
02/16/2019

Resource-Aware Session Types for Digital Contracts

Programming digital contracts comes with unique challenges, which includ...
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
10/01/2018

Comparing Type Systems for Deadlock-Freedom

Communication-centric software systems exhibit non trivial forms of conc...
research
01/13/2020

Session Types with Arithmetic Refinements and Their Application to Work Analysis

Session types statically prescribe bidirectional communication protocols...
research
10/09/2020

CAMP: Cost-Aware Multiparty Session Protocols

This paper presents CAMP, a new static performance analysis framework fo...

Please sign up or login with your details

Forgot password? Click here to reset