A simple and scalable static analysis for bound analysis and amortized complexity analysis

@inproceedings{Sinn2014ASA,
  title={A simple and scalable static analysis for bound analysis and amortized complexity analysis},
  author={Moritz Sinn and Florian Zuleger and Helmut Veith},
  booktitle={Software Engineering},
  year={2014}
}
We present the first scalable bound analysis that achieves amortized complexity analysis. In contrast to earlier work, our bound analysis is not based on general purpose reasoners such as abstract interpreters, software model checkers or computer algebra tools. Rather, we derive bounds directly from abstract program models, which we obtain from programs by comparatively simple invariant generation and symbolic execution techniques. As a result, we obtain an analysis that is more predictable and… 

Type-based amortized resource analysis with integers and arrays*

An alternative approach to resource-bound analysis for numeric and heap-manipulating programs that uses type-based amortized resource analysis, developed for a first-order ML-like language with unsigned integers and arrays.

Selectively-Amortized Resource Bounding (Extended Version)

It is observed that fully precise amortization is not always necessary to prove a bound of interest, and by amortizing selectively, the needed supporting invariants can be simpler, making the invariant inference task more feasible and predictable.

Selectively-Amortized Resource Bounding

It is observed that fully precise amortization is not always necessary to prove a bound of interest, and by amortizing selectively, the needed supporting invariants can be simpler, making the invariant inference task more feasible and predictable.

From Shapes to Amortized Complexity

This work presents a calculus for deriving the numeric changes of the shape norms, thereby generating the integer program and encapsulates the minimal information which is required from the shape analysis.

Upper and Lower Amortized Cost Bounds of Programs Expressed as Cost Relations Extended Version

A new analysis for computing upper and lower cost bounds of programs expressed as cost relations, which allows to reduce the inference of complex polynomial expressions to a set of linear problems that can be solved efficiently.

Compositional certified resource bounds

A new approach for automatically deriving worst-case resource bounds for C programs by combining ideas from amortized analysis and abstract interpretation in a unified framework to address four challenges for state-of-the-art techniques: compositionality, user interaction, generation of proof certificates, and scalability.

Analyzing Runtime and Size Complexity of Integer Programs

This work presents a modular approach to automatic complexity analysis of integer programs based on a novel alternation between finding symbolic time bounds for program parts and using these to infer bounds on the absolute values of program variables, and shows how to extend this approach to arbitrary cost measures.

Upper and Lower Amortized Cost Bounds of Programs Expressed as Cost Relations

A new analysis for computing upper and lower cost bounds of programs expressed as cost relations, which allows to reduce the inference of complex polynomial expressions to a set of linear problems that can be solved efficiently.

Resource Analysis of Complex Programs with Cost Equations

A novel static analysis able to detect dependencies between different pieces of code and hence to compute a precise upper bounds for a given program is presented.

Towards automatic resource bound analysis for OCaml

This article presents a resource analysis system for OCaml programs that automatically derives worst-case resource bounds for higher-order polymorphic programs with user-defined inductive types and preserves the expressivity and efficiency of existing AARA techniques.
...

References

SHOWING 1-10 OF 26 REFERENCES

Bound Analysis using Backward Symbolic Execution

The solution to the bound analysis problem involves an inter-procedural (goal-directed) backward analysis built on top of an SMT solver, which uses novel proof-rule based non-iterative technique to reason about updates inside loops.

On the Inference of Resource Usage Upper and Lower Bounds

A novel approach to infer upper and lower bounds from cost relations, an extended form of standard recurrence equations that can be nondeterministic, contain inexact size constraints and have multiple arguments that increase and/or decrease.

Control-flow refinement and progress invariants for bound analysis

This paper describes two techniques, control-flow refinement and progress invariants, that together enable estimation of precise bounds for procedures with nested and multi-path loops, and presents an algorithm that uses progress invariant to compute precise limits for nested loops.

Multivariate amortized resource analysis

This article presents a novel multivariate amortized resource analysis based on a type system for a simple first-order functional language with lists and trees, proves soundness, and describes automatic type inference based on linear programming.

The reachability-bound problem

The approach to solving the reachability-bound problem brings together two different techniques for reasoning about loops in an effective manner, including an abstract-interpretation based iterative technique for computing precise disjunctive invariants and a non-iterative proof-rules based technique that takes over the role of doing inductive reasoning.

Multi-dimensional Rankings, Program Termination, and Complexity Bounds of Flowchart Programs

The first contribution is to propose an efficient algorithm to compute ranking functions that can handle flowcharts of arbitrary structure, the class of candidate rankings it explores is larger, and the method, although greedy, is provably complete.

Bound Analysis of Imperative Programs with the Size-Change Abstraction

This work shows that SCA captures many of the essential ideas of previous termination and bound analysis and goes beyond in a conceptually simpler framework, which enables this tool to analyze real-world programs effectively.

On the Limits of the Classical Approach to Cost Analysis

A new approach to cost analysis is developed, based on SMT and quantifier elimination, which finds a strong relation between this approach and amortised cost analysis.

Alternating Runtime and Size Complexity Analysis of Integer Programs

A novel alternation between finding symbolic time bounds for program parts and using these to infer size bounds on program variables, which can restrict each analysis step to a small part of the program while maintaining a high level of precision is presented.

Static prediction of heap space usage for first-order functional programs

It is shown how to efficiently obtain linear a priori bounds on the heap space consumption of first-order functional programs and that integral solutions to the linear programs derived correspond to programs that can be evaluated without any operating system support for memory management.