Font Size: a A A

Set-based program analysis

Posted on:1993-01-19Degree:Ph.DType:Thesis
University:Carnegie Mellon UniversityCandidate:Heintze, Nevin CharlesFull Text:PDF
GTID:2478390014496081Subject:Computer Science
Abstract/Summary:
The central component of standard approaches to compile-time program analysis is an abstract domain for approximating program values. Importantly, the domain must be chosen so that an iterative fixed point computation over the domain terminates. This requirement represents a substantial restriction on the accuracy of the analysis. Furthermore, it leads to complex and often chaotic behavior.;We present an alternative approach to program analysis, called set based analysis. A key feature of set based analysis is that reasoning about a program's run-time behavior is reduced to reasoning about constraints on sets of program values. Set based analysis incorporates just a single notion of approximation: all dependencies arising from the treatment of program variables are ignored. The main advantage of set based analysis is improved accuracy, due to the absence of an abstract domain. Additionally, the use of a very simple and uniform notion of approximation leads to program analysis that is easier to understand and less sensitive to minor program modifications.;The core part of this thesis presents an algorithm for set based analysis. Importantly, the standard iterative fixed point algorithms used in the program analysis literature can not be used for set based analysis (they do not terminate). We therefore employ a fundamentally different technique, based on the use of constraints on sets of values. Using these constraints, we develop algorithms for the analysis of logic, imperative and functional languages (the underlying program values in each case are data structures). A prototype implementation is described. Although a straightforward implementation of the set constraint algorithm leads to very poor performance, very substantial improvements have been obtained using appropriate representation schemes and minimization techniques. This prototype provides strong evidence that practical analysis based on set based techniques is within reach.;An underlying philosophy of set based analysis is the separation of the definition of program approximations from algorithmic considerations. This is reflected in the use of constraints to define program approximation, and set constraint algorithms to compute it. The constraints used form a flexible and declarative intermediate language for defining and reasoning about program approximations.
Keywords/Search Tags:Program, Set based analysis, Constraints, Domain
Related items