A space consumption analysis by abstract interpretation

  • Authors:
  • Manuel Montenegro;Ricardo Peña;Clara Segura

  • Affiliations:
  • Universidad Complutense de Madrid, Spain;Universidad Complutense de Madrid, Spain;Universidad Complutense de Madrid, Spain

  • Venue:
  • FOPARA'09 Proceedings of the First international conference on Foundational and practical aspects of resource analysis
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

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 ⊆ 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.