Interprocedural side-effect analysis for incomplete object-oriented software modules
ABSTRACT We introduce a new approach to computing interprocedural modification side effects for part of an object-oriented program (e.g., components, libraries or client modules). Our approach consists of first performing a whole-program points-to analysis to such an incomplete program and then applying a so-called mutability analysis (MA) to determine which objects in the program are mutable by unknown code and which references and call sites in the program are complete (since their points-to sets and target methods are statically resolvable). Based on these results, we present a new MA-based interprocedural side-effect analysis for computing the modification side-effects for an incomplete program. Our experimental results show that our mutability analysis enables a variety of pure methods to be detected, yielding the purity information useful in program understanding and debugging. In addition, our MA-based side-effect analysis enables more redundant loads to be removed than a recent TBAA-based PRE algorithm guided by type-based alias analysis (TBAA). Our approach is simple since it is flow-insensitive and achieves these improvements at small costs.
- SourceAvailable from: psu.edu[show abstract] [hide abstract]
ABSTRACT: The elimination of redundant computations and the moving of invariant computations out of loops are often done separately, with invariants moved outward loop by loop. We propose to do both at once and to move each expression directly to the entrance of the outermost loop in which it is invariant. This is done by solving a more general problem, i.e. the elimination of computations performed twice on a given execution path. Such computations are termed partially redundant. Moreover, the algorithm does not require any graphical information or restrictions on the shape of the program graph. Testing this algorithm has shown that its execution cost is nearly linear with the size of the program, and that it leads to a smaller optimizer that requires less execution time.Commun. ACM. 01/1979; 22:96-103.
Conference Proceeding: Adapting side effects analysis for modular program model checking.[show abstract] [hide abstract]
ABSTRACT: There is a widely held belief that whole program analysis is intractable for large complex software systems, and there can be little doubt that this is true for program analyses based on model checking. Model checking selected program components that comprise a cohesive unit, however, can be an effective way of uncovering subtle coding errors, especially for components of multi-threaded programs. In this setting, one of the chief problems is how to safely approximate the behavior of the rest of the application as it relates to the unit being analyzed.Non-unit application components are collectively referred to as the environment. In this paper, we describe how analyses can be adapted to support generation of summaries of environment behavior that can be reified into Java code using special modeling primitives. The resulting abstract models of the environment can be combined with the code of the unit and then model checked against unit properties. We present our analysis framework, illustrate its flexibility in generating several types of models, and present experience that provides evidence of the scalability of the approach.Proceedings of the 11th ACM SIGSOFT Symposium on Foundations of Software Engineering 2003 held jointly with 9th European Software Engineering Conference, ESEC/FSE 2003, Helsinki, Finland, September 1-5, 2003; 01/2003
- [show abstract] [hide abstract]
ABSTRACT: Pointer traversals pose significant overhead to the execution of object-oriented programs, since every access to an object's state requires a pointer dereference. Eliminating redundant pointer traversals reduces both instructions executed as well as redundant memory accesses to relieve pressure on the memory subsystem. We describe an approach to elimination of redundant access expressions that combines partial redundancy elimination (PRE) with type-based alias analysis (TBAA). To explore the potential of this approach we have implemented an optimization framework for Java class files incorporating TBAA-based PRE over pointer access expressions. The framework is implemented as a class-file-to-class-file transformer; optimized classes can then be run in any standard Java execution environment. Our experiments demonstrate improvements in the execution of optimized code for several Java benchmarks running in diverse execution environments: the standard interpreted JDK virtual machine, a virtual machine using ‘just-in-time’ compilation, and native binaries compiled off-line (‘way-ahead-of-time’). Overall, however, our experience is of mixed success with the optimizations, mainly because of the isolation between our optimizer and the underlying execution environments which prevents more effective cooperation between them. We isolate the impact of access path PRE using TBAA, and demonstrate that Java's requirement of precise exceptions can noticeably impact code-motion optimizations like PRE. Copyright © 2001 John Wiley & Sons, Ltd.Software Practice and Experience 04/2001; 31(6):577 - 600. · 1.01 Impact Factor