Abstract
Generation of efficient code for object-oriented programs requires knowledge of object lifetimes and method bindings. For object-oriented languages that have automatic storage management and dynamic look-up of methods, the compiler must obtain such knowledge by performing static analysis of the source code. We present an analysis algorithm which discovers the potential classes of each object in an object-oriented program as well as a safe approximation of their lifetimes. These results are obtained using abstract domains that approximate memory configurations and interprocedural call patterns of the program. We present several alternatives for these abstract domains that permit a trade-off between accuracy and complexity of the overall analysis.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques and Tools. Addison-Wesley, 1986.
C. D. Chambers. The Design and Implementation of the Self Compiler, an Optimizing Compiler for Object-Oriented Languages. Ph. D. Thesis, Stanford University, 1992.
D. R. Chase, M. Wegman, and F. K. Zadeck. Analysis of Pointers and Structures. In SIGPLAN'90 Conf. on Programming Language Design and Implementation, 1990.
P. Cousot and R. Cousot. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Program by Construction or Approximation of Fixpoints. In Conf. Rec. of the 4th ACM Symp. on Principles of Programming Languages, 1977.
A. Goldberg and G. Robson. Smalltalk-80 — The Language and its Implementation. Addison-Wesley, 1983.
L. Harrison. The Interprocedural Analysis and Automatic Parallelization of Scheme Programs. Technical Report CSRD Rpt. 860, University of Illinois, Urbana, Ill., 1989.
A. V. Hense. Type Inference for O'small. Technischer Bericht A 06/91, Universität des Saarlandes, 1991.
R. N. Horspool and J. Vitek. Static Analysis of PostScript. In Proceeding of the International Conference on Computer Languages, 1992.
P. Hudak. A Semantic Model of Reference Counting and its Abstraction. In Abstract Interpretation of Declarative Languages. Ellis Horwood, 1987.
R. E. Johnson. Type-checking Smalltalk. In OOPSLA '86 Conf. Proc., 1986.
J. Palsberg and M. I. Schwartzbach. Object-Oriented Type Inference. In OOPSLA'91 Conf. Proc., 1991.
M. Sharir and A. Pnueli. Two Approaches to Interprocedural Data Flow Analysis. In S. S. Munchnick and N. D. Jones, editors, Program Flow Analysis: Theory and Applications. Prentice-Hall, 1981.
N. Suzuki. Inferring Types in Smalltalk. In Conf. Rec. of the 8th ACM Symp. on Principles of Programming Languages, 1981.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Vitek, J., Horspool, R.N., Uhl, J.S. (1992). Compile-time analysis of object-oriented programs. In: Kastens, U., Pfahler, P. (eds) Compiler Construction. CC 1992. Lecture Notes in Computer Science, vol 641. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55984-1_22
Download citation
DOI: https://doi.org/10.1007/3-540-55984-1_22
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55984-9
Online ISBN: 978-3-540-47335-0
eBook Packages: Springer Book Archive