Cost Relation Systems: A Language-Independent Target Language for Cost Analysis

Cost analysis aims at obtaining information about the execution cost of programs. This paper studies cost relation systems (CRSs): the sets of recursive equations used in cost analysis in order to capture the execution cost of programs in terms of the size of their input arguments. We investigate the notion of CRS from a general perspective which is independent of the particular cost analysis framework. Our main contributions are: we provide a formal definition of execution cost and of CRS which is not tied to a particular programming language; we present the notion of sound CRS, i.e., which correctly approximates the cost of the corresponding program; we identify the differences with recurrence relation systems, its possible applications and the new challenges that they bring about. Our general framework is illustrated by instantiating it to cost analysis of Java bytecode, Haskell, and Prolog.

[1]  Jean-Pierre Jouannaud,et al.  Automatic Complexity Analysis for Programs Extracted from Coq Proof , 2006, Electron. Notes Theor. Comput. Sci..

[2]  Elvira Albert,et al.  Automatic Inference of Upper Bounds for Recurrence Relations in Cost Analysis , 2008, SAS.

[3]  Elvira Albert,et al.  Removing useless variables in cost analysis of Java bytecode , 2008, SAC '08.

[4]  Saumya K. Debray,et al.  Cost analysis of logic programs , 1993, TOPL.

[5]  George C. Necula,et al.  Enforcing Resource Bounds via Static Verification of Dynamic Checks , 2005, ESOP.

[6]  Philip Wadler,et al.  Strictness analysis aids time analysis , 1988, POPL '88.

[7]  Ralph Benzinger,et al.  Automated higher-order complexity analysis , 2004, Theor. Comput. Sci..

[8]  Daniel Le Métayer,et al.  ACE: an automatic complexity evaluator , 1988, TOPL.

[9]  Elvira Albert,et al.  Heap space analysis for java bytecode , 2007, ISMM '07.

[10]  Ben Wegbreit,et al.  Mechanical program analysis , 1975, CACM.

[11]  G. Barthe,et al.  Mobile Resource Guarantees for Smart Devices , 2005 .

[12]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[13]  Elvira Albert,et al.  Cost Analysis of Java Bytecode , 2007, ESOP.

[14]  Saumya K. Debray,et al.  Automatic Complexity Analysis of Logic Programs , 1991, ICLP.

[15]  Etsuro Moriya,et al.  A Theoretical Study of the Time Analysis of Programs , 1979, International Symposium on Mathematical Foundations of Computer Science.

[16]  David Sands A Na Ve Time Analysis and Its Theory of Cost Equivalence {draft Submitted for Publication{ , 1995 .

[17]  Karl Crary,et al.  Resource bound certification , 2000, POPL '00.

[18]  Mads Rosendahl,et al.  Automatic complexity analysis , 1989, FPCA.

[19]  Roberto Bagnara,et al.  PURRS: Towards Computer Algebra Support for Fully Automatic Worst-Case Complexity Analysis , 2005, ArXiv.

[20]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[21]  Jorge A. Navas,et al.  User-Definable Resource Bounds Analysis for Logic Programs , 2007, ICLP.

[22]  Étienne Payet,et al.  Path-Length Analysis for Object-Oriented Programs , 2006 .