Advertisement

Data-flow-based virtual function resolution

  • Hemant D. Pande
  • Barbara G. Ryder
Contributed Papers
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1145)

Abstract

Determining the type of an object to which a receiver may point at a virtual call site is crucial for compile time virtual function resolution in C++ programs. We show the close interdependence of type determination and pointer-induced aliasing in C++ and present the first data-flow-based algorithm to solve these problems simultaneously. Our polynomial-time approximation method incorporates information about program flow. Initial experiences with our prototype implementation have shown our technique to be more effective than others that use only inheritance hierarchy information. We present initial empirical results demonstrating the precision of our approach and state the intrinsic difficulty (i.e., NP-hardness) of the type determination problem for programming languages with general-purpose pointers and dynamic binding.

Keywords

Type Determination Program Point Dynamic Binding Call Site Exit Node 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [CG94]
    B. Calder and D. Grunwald. Reducing indirect function call overhead in C++ programs. In Conference Record of the Twenty-first Annual ACM Symposium on Principles of Programming Languages, pages 397–408, January 1994.Google Scholar
  2. [CGZ95]
    B. Calder, D. Grunwald, and B. Zorn. Quantifying behavioural differences between C and C++ programs. Journal of Programming Languages, 2:313–351, 1995.Google Scholar
  3. [LR91]
    W. Landi and B. G. Ryder. Pointer-induced aliasing: A problem classification. In Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, pages 93–103, January 1991.Google Scholar
  4. [LR92]
    W. Landi and B. G. Ryder. A safe approximation algorithm for interprocedural pointer aliasing. In Proceedings of the SIGPLAN '92 Conference on Programming Language Design and Implementation, pages 235–248, June 1992.Google Scholar
  5. [Pan96]
    H. Pande. Compile Time Analysis of C and C ++ Systems. PhD thesis, Rutgers University, May 1996.Google Scholar
  6. [PR94a]
    H. Pande and B. G. Ryder. Static type determination for C++. In Proceedings of the Sixth USENIX C ++ Technical Conference, pages 85–97, April 1994.Google Scholar
  7. [PR94b]
    H. D. Pande and B. G. Ryder. Static type determination and aliasing for C++. Laboratory for Computer Science Research Technical Report LCSRTR-236, Rutgers University, December 1994.Google Scholar
  8. [RHS95]
    T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In Conference Record of the Twenty-second Annual ACM Symposium on Principles of Programming Languages, pages 49–61, January 1995.Google Scholar
  9. [SP81]
    M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In S. Muchnick and N. Jones, editors, Program Flow Analysis: Theory and Applications, pages 189–234. Prentice Hall, 1981.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Hemant D. Pande
    • 1
  • Barbara G. Ryder
    • 2
  1. 1.TRDDCPuneIndia
  2. 2.Department of Computer ScienceRutgers UniversityPiscatawayUSA

Personalised recommendations