Set-based analysis of ML programs
LFP '94 Proceedings of the 1994 ACM conference on LISP and functional programming
Catching bugs in the web of program invariants
PLDI '96 Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation
A demand-driven set-based analysis
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Set constraints with intersection
Information and Computation - Special issue: LICS'97
Set constraints with projections
Journal of the ACM (JACM)
Hi-index | 0.00 |
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.