Open Access
SPEED: Precise and Efficient Static Estimation of Program Computational Complexity (Full Version)
Sumit Gulwani,Krishna Kumar Mehra,Trishul Chilimbi +2 more
- 01 Jan 2009
TL;DR: In this paper, the authors present a proof methodology based on multiple counter instrumentation (each counter can be initialized and incremented at potentially multiple program locations) that allows a given linear invariant generation tool to compute linear bounds individually on these counter variables.
read more
Abstract: This paper describes an inter-procedural technique for computing symbolic bounds on the number of statements a procedure executes in terms of its scalar inputs and user-defined quantitative functions of input data-structures. Such computational complexity bounds for even simple programs are usually disjunctive, non-linear, and involve numerical properties of heaps. We address the challenges of generating these bounds using two novel ideas. We introduce a proof methodology based on multiple counter instrumentation (each counter can be initialized and incremented at potentially multiple program locations) that allows a given linear invariant generation tool to compute linear bounds individually on these counter variables. The bounds on these counters are then composed together to generate total bounds that are non-linear and disjunctive. We also give an algorithm for automating this proof methodology. Our algorithm generates complexity bounds that are usually precise not only in terms of the computational complexity, but also in terms of the constant factors. Next, we introduce the notion of user-defined quantitative functions that can be associated with abstract data-structures, e.g., length of a list, height of a tree, etc. We show how to compute bounds in terms of these quantitative functions using a linear invariant generation tool that has support for handling uninterpreted functions. We show application of this methodology to commonly used data-structures (namely lists, list of lists, trees, bit-vectors) using examples from Microsoft product code. We observe that a few quantitative functions for each data-structure are usually sufficient to allow generation of symbolic complexity bounds of a variety of loops that iterate over these data-structures, and that it is straightforward to define these quantitative functions. The combination of these techniques enables generation of precise computational complexity bounds for real-world examples (drawn from Microsoft product code and C++ STL library code) for some of which it is non-trivial to even prove termination. Such automatically generated bounds are very useful for early detection of egregious performance problems in large modular codebases that are constantly being changed by multiple developers who make heavy use of code written by others without a good understanding of their implementation complexity. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. POPL’09, January 18–24, 2009, Savannah, Georgia, USA. Copyright c © 2009 ACM 978-1-60558-379-2/09/01. . . $5.00.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Understanding and detecting real-world performance bugs
Guoliang Jin,Linhai Song,Xiaoming Shi,Joel Scherpelz,Shan Lu +4 more
- 11 Jun 2012
TL;DR: In this paper, the authors conduct a comprehensive study of 110 real-world performance bugs that are randomly sampled from five representative software suites (Apache, Chrome, GCC, Mozilla, and MySQL).
Compositional certified resource bounds
Quentin Carbonneaux,Jan Hoffmann,Zhong Shao +2 more
- 03 Jun 2015
TL;DR: 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.
Decomposition instead of self-composition for proving the absence of timing channels
Timos Antonopoulos,Paul Gazzillo,Michael Hicks,Eric Koskinen,Tachio Terauchi,Shiyi Wei +5 more
- 14 Jun 2017
TL;DR: A novel approach to proving the absence of timing channels by partitioning the program's execution traces in such a way that each partition component is checked for timing attack resilience by a time complexity analysis and that per-component resilience implies the resilience of the whole program.
120
•Journal Article
Programs with lists are counter automata
TL;DR: In this paper, a new automated approach for checking safety and termination of one-selector linked data structures is proposed, based on using counter automata as accurate abstract models: control states correspond to abstract heap graphs where list segments without sharing are collapsed, and counters are used to keep track of the number of elements in these segments.
120
Resource aware ML
Jan Hoffmann,Klaus Aehlig,Martin Hofmann +2 more
- 07 Jul 2012
TL;DR: This tool paper describes Resource Aware ML (RAML), a functional programming language that implements a novel multivariate amortized resource analysis that automatically computes polynomial resource bounds for first-order functional programs.
References
The worst-case execution-time problem—overview of methods and survey of tools
Reinhard Wilhelm,Jakob Engblom,Andreas Ermedahl,Niklas Holsti,Stephan Thesing,David Whalley,Guillem Bernat,Christian Ferdinand,Reinhold Heckmann,Tulika Mitra,Frank Mueller,Isabelle Puaut,Peter Puschner,Jan Staschulat,Per Stenström +14 more
TL;DR: Different approaches to the determination of upper bounds on execution times are described and several commercially available tools1 and research prototypes are surveyed.
Termination proofs for systems code
Byron Cook,Andreas Podelski,Andrey Rybalchenko +2 more
- 11 Jun 2006
TL;DR: A new program termination prover is described that performs a path-sensitive and context-sensitive program analysis and provides capacity for large program fragments together with support for programming language features such as arbitrarily nested loops, pointers, function-pointers, side-effects, etc.
426
Resource bound certification
Karl Crary,Stephnie Weirich +1 more
- 05 Jan 2000
TL;DR: This work presents a decidable type system capable of specifying and certifying bounds on resource consumption, and provides a fully automatic compiler generating certified executables from source-level programs.
Automatic Derivation of Loop Bounds and Infeasible Paths for WCET Analysis Using Abstract Execution
Jan Gustafsson,Andreas Ermedahl,Christer Sandberg,Björn Lisper +3 more
- 05 Dec 2006
TL;DR: This paper presents a method for deriving abstract execution, which can automatically calculate loop bounds, bounds for including nested loops, as well as many types of infeasible paths, and shows that it can calculate WCET estimates automatically, without any user annotations, for a range of benchmark programs.
Related Papers (5)
Jan Maluszy¿ski
- 01 Jan 1997
Ravichandhran Madhavan,Viktor Kuncak +1 more
- 18 Jul 2014
Lee Naish
- 01 Jan 1997
Mark N. Wegman
- 01 Jan 1981