Resource Usage Analysis and Its Application to Resource Certification

Resource usage is one of the most important characteristics of programs. Automatically generated information about resource usage can be used in multiple ways, both during program development and deployment. In this paper we discuss and present examples on how such information is obtained in COSTA, a state of the art static analysis system. COSTA obtains safe symbolic upper bounds on the resource usage of a large class of general-purpose programs written in a mainstream programming language such as Java (bytecode). We also discuss the application of resource-usage information for code certification, whereby code not guaranteed to run within certain user-specified bounds is rejected.

[1]  Greg J. Michaelson,et al.  Hume: A Domain-Specific Language for Real-Time Embedded Systems , 2003, GPCE.

[2]  Sumit Gulwani,et al.  An Abstract Domain for Analyzing Heap-Manipulating Low-Level Software , 2007, CAV.

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

[4]  George C. Necula,et al.  Proof-Carrying Code , 2011, Encyclopedia of Cryptography and Security.

[5]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[6]  Shengchao Qin,et al.  Analysing memory resource bounds for low-level programs , 2008, ISMM '08.

[7]  David A. Schmidt,et al.  The Essence of Computation , 2002 .

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

[9]  Maribel Fernández,et al.  Curry-Style Types for Nominal Terms , 2006, TYPES.

[10]  Fausto Spoto,et al.  Julia: A Generic Static Analyser for the Java Bytecode , 2005 .

[11]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[12]  Fausto Spoto,et al.  Class analyses as abstract interpretations of trace semantics , 2003, TOPL.

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

[14]  Andy King,et al.  Inferring Argument Size Relationships with CLP(R) , 1996, LOPSTR.

[15]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

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

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

[18]  John Longley Interpreting Localized Computational Effects Using Operators of Higher Type , 2008, CiE.

[19]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[20]  Sumit Gulwani,et al.  SPEED: precise and efficient static estimation of program computational complexity , 2009, POPL '09.

[21]  Gian Luigi Ferrari,et al.  Types and Effects for Resource Usage Analysis , 2007, FoSSaCS.

[22]  Alan Bundy,et al.  Logic Program Synthesis via Proof Planning , 1992, LOPSTR.

[23]  Fausto Spoto,et al.  Detecting Non-cyclicity by Abstract Compilation into Boolean Functions , 2006, VMCAI.

[24]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[25]  Mário Florido,et al.  Using Intersection Types for Cost-Analysis of Higher-Order Polymorphic Functional Programs , 2006, TYPES.

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

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

[28]  Jacques Cohen,et al.  Automating program analysis , 1988, JACM.

[29]  Werner Kluge,et al.  Implementation of Functional Languages , 1996, Lecture Notes in Computer Science.

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

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

[32]  Amr Sabry,et al.  Proving the correctness of reactive systems using sized types , 1996, POPL '96.

[33]  Ian Stark,et al.  Free-Algebra Models for the pi-Calculus , 2005, FoSSaCS.

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

[35]  Laurie Hendren,et al.  Soot---a java optimization framework , 1999 .

[36]  Henning Wunderlich,et al.  Certifying Polynomial Time and Linear/Polynomial Space for Imperative Programs , 2006, SIAM J. Comput..

[37]  Benedikt Löwe,et al.  New Computational Paradigms , 2005 .

[38]  Ian J. Hayes,et al.  FM 2005: Formal Methods, International Symposium of Formal Methods Europe, Newcastle, UK, July 18-22, 2005, Proceedings , 2005, FM.

[39]  Sergio Yovine,et al.  Parametric prediction of heap memory requirements , 2008, ISMM '08.

[40]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[41]  Jean-Yves Marion,et al.  Resource control of object-oriented programs , 2007, ArXiv.

[42]  Martin Hofmann,et al.  Static prediction of heap space usage for first-order functional programs , 2003, POPL '03.

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

[44]  Sumit Gulwani,et al.  A Numerical Abstract Domain Based on Expression Abstraction and Max Operator with Application in Timing Analysis , 2008, CAV.

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

[46]  Valentin F. Turchin,et al.  The concept of a supercompiler , 1986, TOPL.

[47]  Neil D. Jones,et al.  Linear, Polynomial or Exponential? Complexity Inference in Polynomial Time , 2008, CiE.

[48]  Elvira Albert,et al.  Termination Analysis of Java Bytecode , 2008, FMOODS.

[49]  Bernd Becker,et al.  Automatic Identification of Timing Anomalies for Cycle-Accurate Worst-Case Execution Time Analysis , 2006, 2006 IEEE Design and Diagnostics of Electronic Circuits and systems.

[50]  David Cachera,et al.  Certified Memory Usage Analysis , 2005, FM.

[51]  Alan Bundy,et al.  Constructing Induction Rules for Deductive Synthesis Proofs , 2006, CLASE.

[52]  Siau-Cheng Khoo,et al.  Program transformation by solving recurrences , 2006, PEPM '06.

[53]  Peter Müller,et al.  Formal Translation of Bytecode into BoogiePL , 2007, Electron. Notes Theor. Comput. Sci..

[54]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

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

[56]  S. Holmström,et al.  A composition approach to time analysis of first order lazy functional programs , 1989, FPCA.

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

[58]  Kevin Hammond,et al.  Inferring Cost Equations for Recursive, Polymorphic and Higher-Order Functional Programs , 2003, IFL.

[59]  E. Albert,et al.  Dealing with Numeric Fields in Termination Analysis of Java-like Languages ⋆ , 2008 .

[60]  Stefano Secci,et al.  Pair-Sharing Analysis of Object-Oriented Programs , 2005, SAS.

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

[62]  Neil D. Jones,et al.  The Flow of Data and the Complexity of Algorithms , 2005, CiE.

[63]  Eelco Visser,et al.  Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation , 2007 .

[64]  Manuel V. Hermenegildo,et al.  Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor) , 2005, Sci. Comput. Program..

[65]  Elvira Albert,et al.  Live heap space analysis for languages with garbage collection , 2009, ISMM '09.

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

[67]  Mads Rosendahl Simple Driving Techniques , 2002, The Essence of Computation.

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

[69]  Manuel V. Hermenegildo,et al.  Abstraction-Carrying Code: a Model for Mobile Code Safety , 2008, New Generation Computing.

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