Abstract
AbstractProving bounds on the resource consumption of a program by statically analyzing its source code is an important and well-studied problem. Automatic approaches for numeric programs with side effects usually apply abstract interpretation-based invariant generation to derive bounds on loops and recursion depths of function calls. This article presents an alternative approach to resource-bound analysis for numeric and heap-manipulating programs that uses type-based amortized resource analysis. As a first step towards the analysis of imperative code, the technique is developed for a first-order ML-like language with unsigned integers and arrays. The analysis automatically derives bounds that are multivariate polynomials in the numbers and the lengths of the arrays in the input. Experiments with example programs demonstrate two main advantages of amortized analysis over current abstract interpretation–based techniques. For one thing, amortized analysis can handle programs with non-linear intermediate values like f((n + m)2). For another thing, amortized analysis is compositional and works naturally for compound programs like f(g(x)).
Publisher
Cambridge University Press (CUP)
Cited by
9 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Quantum Weakest Preconditions for Reasoning about Expected Runtimes of Quantum Programs;Proceedings of the 37th Annual ACM/IEEE Symposium on Logic in Computer Science;2022-08-02
2. Type-based analysis of logarithmic amortised complexity;Mathematical Structures in Computer Science;2021-10-19
3. Inferring Expected Runtimes of Probabilistic Integer Programs Using Expected Sizes;Tools and Algorithms for the Construction and Analysis of Systems;2021
4. Inferring Lower Runtime Bounds for Integer Programs;ACM Transactions on Programming Languages and Systems;2020-09-30
5. Exponential Automatic Amortized Resource Analysis;Lecture Notes in Computer Science;2020