Selectively-Amortized Resource Bounding (Extended Version)

08/18/2021
by   Tianhan Lu, et al.
0

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, 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/02/2022

Differential Cost Analysis with Simultaneous Potentials and Anti-potentials

We present a novel approach to differential cost analysis that, given a ...
research
11/24/2017

Bounded Expectations: Resource Analysis for Probabilistic Programs

This paper presents a new static analysis for deriving upper bounds on t...
research
06/29/2020

Liquid Resource Types

This article presents liquid resource types, a technique for automatical...
research
10/30/2020

Typable Fragments of Polynomial Automatic Amortized Resource Analysis

Being a fully automated technique for resource analysis, automatic amort...
research
01/05/2018

Verifying and Synthesizing Constant-Resource Implementations with Types

We propose a novel type system for verifying that programs correctly imp...
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
11/14/2018

Bounded ACh Unification

We consider the problem of unification modulo an equational theory ACh, ...

Please sign up or login with your details

Forgot password? Click here to reset