Set-based analysis of ML programs

  • Authors:
  • Nevin Heintze

  • Affiliations:
  • School of Computer Science, Carnegie Mellon University, 5000 Forbes Ave., Pittsburgh, PA

  • Venue:
  • LFP '94 Proceedings of the 1994 ACM conference on LISP and functional programming
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

Reasoning about program variables as sets of “values” leads to a simple, accurate and intuitively appealing notion of program approximation. This paper presents approach for the compile-time analysis of ML programs. To develop the core ideas of the analysis, we consider a simple untyped call-by-value functional language. Starting with an operational semantics for the language, we develop an approximate “set-based” operational semantics, which formalizes the intuition of treating program variables as sets. The key result of the paper is an O(n3) algorithm for computing the set based approximation of a program. We then extend this analysis in a natural way to deal with arrays, arithmetic, exceptions and continuations. We briefly describe our experience with an implementation of this analysis for ML programs.