Impact of Function Pointers on the Call Graph

Abstract

Maintenance activities are made more difficult when pointers are heavily used in source code: the programmer needs to build a mental model of memory locations and of the way they are accessed by means of pointers, in order to comprehend the functionalities of the system.

Although several points-to analysis algorithms have been proposed in literature to provide information about memory locations referenced by pointers, there are no quantitative evaluations of the impact of pointers on the overall program understanding activities.

Program comprehension activities are usually supported by tools, providing suitable views of the source program. One of the most widely used code views is the Call Graph, a graph representing calls between functions in the given program. Unfortunately, when pointers, and especially function pointers, are heavily used in the code, the extracted call graph is highly inaccurate and thus of little usage, if a points-to analysis is not preliminarly performed.

In this paper we will address the problem of evaluating the impact of pointers analysis on the Call Graph. The results, obtained on a set of real world programs, provide a quantitative evaluation and show the key role of pointer analysis in Call Graph construction.

Postscript version of the paper.

Copyright notice

Copyright 1999 IEEE. Published in the Proceedings of CSMR'99, March 3-5, 1999, in Amsterdam, The Netherlands. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works, must be obtained from the IEEE. Contact: Manager, Copyrights and Permissions / IEEE Service Center / 445 Hoes Lane / P.O. Box 1331 / Piscataway, NJ 08855-1331, USA. Telephone: + Intl. 908-562-3966.