Shape analysis in a functional language by using regular languages

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

  • Affiliations:
  • Univ. Complutense de Madrid, Madrid, Spain;Univ. Complutense de Madrid, Madrid, Spain;Univ. Complutense de Madrid, Madrid, Spain

  • Venue:
  • Proceedings of the 15th Symposium on Principles and Practice of Declarative Programming
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Shape analysis is concerned with the compile-time determination of the 'shape' the heap may take at runtime, meaning by this the pointer chains that may happen within, and between, the data structures built by the program. This includes detecting alias and sharing between the program variables. Functional languages facilitate somehow this task due to the absence of variable updating. Even though, sharing and aliasing are still possible. We present an abstract interpretation-based analysis computing precise information about these relations. In fact, the analyis gives an information more precise than just the existence of sharing. It informs about the paths through which this sharing takes place. This information is critical in order to get a modular analysis and not to lose precision when calling an already analysed function. The main innovation with respect to the literature is the use of regular languages to specify the possible pointer paths from a variable to its descendants. This additional information makes the analysis much more precise while still being affordable in terms of efficiency. We have implemented it and give convincing examples of its precision.