29 research outputs found
Work Analysis with Resource-Aware Session Types
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.Comment: 25 pages, 2 pages of references, 11 pages of appendix, Accepted at
LICS 201
Polynomial Time and Dependent Types
We combine dependent types with linear type systems that soundly and
completely capture polynomial time computation. We explore two systems for
capturing polynomial time: one system that disallows construction of iterable
data, and one, based on the LFPL system of Martin Hofmann, that controls
construction via a payment method. Both of these are extended to full dependent
types via Quantitative Type Theory, allowing for arbitrary computation in types
alongside guaranteed polynomial time computation in terms. We prove the
soundness of the systems using a realisability technique due to Dal Lago and
Hofmann.
Our long-term goal is to combine the extensional reasoning of type theory
with intensional reasoning about the resources intrinsically consumed by
programs. This paper is a step along this path, which we hope will lead both to
practical systems for reasoning about programs' resource usage, and to
theoretical use as a form of synthetic computational complexity theory
Automated Amortised Resource Analysis for Term Rewrite Systems
Based on earlier work on amortised resource analysis, we establish a novel automated amortised resource analysis for term rewrite systems. The method is presented in an inference system akin to a type system and gives rise to polynomial bounds on the innermost runtime complexity of the analysed term rewrite system. Our analysis does not restrict the input rewrite system in any way. This facilitates integration in a general framework for resource analysis of programs. In particular, we have implemented the method and integrated it into our tool TCT.(VLID)2581042Accepted versio
Bounded Expectations: Resource Analysis for Probabilistic Programs
This paper presents a new static analysis for deriving upper bounds on the
expected resource consumption of probabilistic programs. The analysis is fully
automatic and derives symbolic bounds that are multivariate polynomials of the
inputs. The new technique combines manual state-of-the-art reasoning techniques
for probabilistic programs with an effective method for automatic
resource-bound analysis of deterministic programs. It can be seen as both, an
extension of automatic amortized resource analysis (AARA) to probabilistic
programs and an automation of manual reasoning for probabilistic programs that
is based on weakest preconditions. As a result, bound inference can be reduced
to off-the-shelf LP solving in many cases and automatically-derived bounds can
be interactively extended with standard program logics if the automation fails.
Building on existing work, the soundness of the analysis is proved with respect
to an operational semantics that is based on Markov decision processes. The
effectiveness of the technique is demonstrated with a prototype implementation
that is used to automatically analyze 39 challenging probabilistic programs and
randomized algorithms. Experimental results indicate that the derived constant
factors in the bounds are very precise and even optimal for many programs