Hostname: page-component-89b8bd64d-4ws75 Total loading time: 0 Render date: 2026-05-07T15:34:34.890Z Has data issue: false hasContentIssue false

Two decades of automatic amortized resource analysis

Published online by Cambridge University Press:  16 March 2022

Jan Hoffmann*
Affiliation:
Carnegie Mellon University, Pittsburgh, PA 15213, USA
Steffen Jost
Affiliation:
Independent Scholar, Darmstadt, Germany
*
*Corresponding author. Email: jhoffmann@cmu.edu
Rights & Permissions [Opens in a new window]

Abstract

This article gives an overview of automatic amortized resource analysis (AARA), a technique for inferring symbolic resource bounds for programs at compile time. AARA has been introduced by Hofmann and Jost in 2003 as a type system for deriving linear worst-case bounds on the heap-space consumption of first-order functional programs with eager evaluation strategy. Since then AARA has been the subject of dozens of research articles, which extended the analysis to different resource metrics, other evaluation strategies, non-linear bounds, and additional language features. All these works preserved the defining characteristics of the original paper: local inference rules, which reduce bound inference to numeric (usually linear) optimization; a soundness proof with respect to an operational cost semantics; and the support of amortized analysis with the potential method.

Information

Type
Special Issue: In Homage to Martin Hofmann
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2022. Published by Cambridge University Press
Figure 0

Table 1. Overview body of work

Figure 1

Figure 1. A simple functional language.

Figure 2

Figure 2. Potential associated with value v of annotated type A. Note that value v exists at runtime only, while the annotated type A exists at compile time only.

Figure 3

Figure 3. Derivation of a tight bound on the number of ticks for a for loop. The parameters $K>0$ and $T>0$ denote concrete but arbitrary constants.