Static type determination for C++

  • Authors:
  • Hemant D. Pande;Barbara G. Ryder

  • Affiliations:
  • Department of Computer Science, Rutgers University, New Brunswick, NJ and Tata Research Development and Design Centre, Pune, India;Department of Computer Science, Rutgers University, New Brunswick, NJ

  • Venue:
  • CTEC'94 Proceedings of the 6th conference on USENIX Sixth C++ Technical Conference - Volume 6
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

Static type determination involves compile time calculation of the type of object a pointer may point to at a particular program point during some execution. We show that the problem of precise interprocedural type determination is NP-hard in the presence of inheritance, virtual methods and pointers. We highlight the significance of type determination in improving code efficiency and precision of other static analyses. We present a safe, approximate algorithm for C++ programs with single level pointers, using the conditional analysis technique [LR91]. We discuss the generalization of our approach to analyze programs with multiple levels of pointer dereferencing.