A Space Consumption Analysis by Abstract Interpretation

  • Manuel Montenegro
  • Ricardo Peña
  • Clara Segura
Conference paper

DOI: 10.1007/978-3-642-15331-0_3

Volume 6324 of the book series Lecture Notes in Computer Science (LNCS)
Cite this paper as:
Montenegro M., Peña R., Segura C. (2010) A Space Consumption Analysis by Abstract Interpretation. In: van Eekelen M., Shkaravska O. (eds) Foundational and Practical Aspects of Resource Analysis. FOPARA 2009. Lecture Notes in Computer Science, vol 6324. Springer, Berlin, Heidelberg

Abstract

Safe is a first-order functional language with an implicit region-based memory system and explicit destruction of heap cells. Its static analysis for inferring regions, and a type system guaranteeing the absence of dangling pointers have been presented elsewhere.

In this paper we present a new analysis aimed at inferring upper bounds for heap and stack consumption. It is based on abstract interpretation, being the abstract domain the set of all n-ary monotonic functions from real non-negative numbers to a real non-negative result. This domain turns out to be a complete lattice under the usual \(\sqsubseteq\) relation on functions. Our interpretation is monotonic in this domain and the solution we seek is the least fixpoint of the interpretation.

We first explain the abstract domain and some correctness properties of the interpretation rules with respect to the language semantics, then present the inference algorithms for recursive functions, and finally illustrate the approach with the upper bounds obtained by our implementation for some case studies.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Manuel Montenegro
    • 1
  • Ricardo Peña
    • 1
  • Clara Segura
    • 1
  1. 1.Universidad Complutense de MadridSpain