Set Based Analysis of Arithmetic

  • Authors:
  • Nevin Heintze

  • Affiliations:
  • -

  • Venue:
  • Set Based Analysis of Arithmetic
  • Year:
  • 1993

Quantified Score

Hi-index 0.00

Visualization

Abstract

Set based analysis is an approach to compile-time program analysis that is based on a simple approximation: all dependencies between variables are ignored. In effect, program variables are treated as sets of values. Thus far, set based analysis techniques have focussed on data-constructor languages. The main reason for this is algorithmic: the equality for data-constructor values is structural (that is, two values f(v1, ..., vn) and f''(v1'', ..., vn'') are equal if and only if f and f'' are identical constructors and vi = vi'', i = 1..n). This has important implications for how sets of such values can be represented during the computation of a set based analysis. In contrast, the equality theory of arithmetic is much richer. Two terms with very different structure can be equal. Correspondingly, the manipulation and representation of sets of arithmetic values is significantly more complex. In this paper we extend the ideas of set based analysis to arithmetic expression in such a way that the analysis yields descriptions of how arithmetic values are computed. Importantly, this extended analysis yields useful information about the arithmetic components of a program while maintaining the efficiency of the basic set constraint approach. We show how this information can be exploited during compilation with two examples involving array bounds elimination. While this work is carried out in the context of the ML, the techniques developed appear to be applicable to other languages.