Published July 28, 2021 | Version v1
Software Open

Selectively-Amortized Resource Bounding

  • 1. University of Colorado Boulder
  • 2. University of Colorado Boulder & Amazon

Description

We consider the problem of automatically proving resource bounds. That is, we study how to prove that an integer-valued resource variable is bounded by a given program expression. Automatic resource-bound analysis has recently received significant attention because of a number of important applications (e.g., detecting performance bugs, preventing algorithmic-complexity attacks, identifying side-channel vulnerabilities), where the focus has often been on developing precise amortized reasoning techniques to infer the most exact resource usage. While such innovations remain critical, we observe that fully precise amortization is not always necessary to prove a bound of interest. And in fact, by amortizing selectively, the needed supporting invariants can be simpler, (e.g., linear instead of polynomial constraints), making the invariant inference task more feasible and predictable. We present a framework for selectively-amortized analysis that mixes worst-case and amortized reasoning via a property decomposition and a program transformation. We show that proving bounds in any such decomposition yields a sound resource bound in the original program, and we give an algorithm for selecting a reasonable decomposition.

Files

README.txt

Files (4.0 GB)

Name Size Download all
md5:e515a54c5c0b40e04d312bfe714dd502
10.1 kB Preview Download
md5:32ff53f93b6eb5fe3a243a40ee8a3508
4.0 GB Download