Abstract
Call graph construction has been an important area of research within the compilers and programming languages community. However, all existing techniques focus on exhaustive analysis of all the call-sites in the program. With increasing importance of just-in-time or dynamic compilation and use of program analysis as part of the software development environments, we believe that there is a need for techniques for demand-driven construction of the call graph. We present a demand-driven call graph construction framework in this paper, focusing on the dynamic calls due to polymorphism in object-oriented languages. We use a variant of Callahan’s Program Summary Graph (PSG) and perform analysis over a set of influencing nodes. We show that our demand-driven technique has the same accuracy as the corresponding exhaustive technique. The reduction in the graph construction time depends upon the ratio of the cardinality of the set of influencing nodes to the set of all nodes.
This research was supported by NSF CAREER award ACI-9733520
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
David Bacon and Peter F. Sweeney. Fast static analysis of c++ virtual function calls. In Eleventh Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA’ 96), pages 324–341, October 1996. 125, 126
D. Callahan. The program summary graph and flow-sensitive interprocedural data flow analysis. In Proceedings of the SIGPLAN’ 88 Conference on Programming Language Design and Implementation, Atlanta, GA, June 1988. 130
Jeffrey Dean, CraigCh ambers, and David Grove. Selective specialization for object-oriented languages. In Proceedings of the ACM SIGPLAN’95 Conference on Programming Language Design and Implementation (PLDI), pages 93–102, La Jolla, California, 18–21 June 1995. SIGPLAN Notices 30(6), June 1995. 132, 133
Greg DeFouw, David Grove, and Craig Chambers. Fast interprocedural class analysis. In Proceedings of the POPL’98 Conference, 1998. 125, 126, 130
Amer Diwan, J. Elliot Moss, and K. Mckinley. Simple and effective analysis of statically typed object-oriented programs. In Eleventh Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA’ 96), pages 292–305, October 1996. 125, 126
Evelyn Duesterwald, Rajiv Gupta, and Mary Lou Soffa. Demand-driven computation of interprocedual data flow. In Conference Record of POPL’ 95: 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 37–48, San Francisco, California, January 1995. 129
Mary W. Hall and Ken Kennedy. Efficient call graph analysis. ACM Letters on Programming Languages and Systems, 1(3):227–242, September 1992. 125, 126
S. Horwitz, T. Reps, and M. Sagiv. Demand interprocedural dataflow analysis. In In SIGSOFT’ 95: Proceedings of the Third ACM SIGSOFT Symposium on the Foundations of Software Engineering, pages 104–115, 1995. 129
Susan Horwitz, Thomas Reps, and David Binkley. Interprocedural slicing using dependence graphs. ACM Transactions on Programming Languages and Systems, 12(1):26–60, January 1990. 126
E. Myers. A precise interprocedural data flow algorithm. In Conference Record of the Eighth ACM Symposium on the Principles of Programming Languages, pages 219–230, January 1981. 130
Jens Palsbergan and Patrick O’Keefe. A type system equivalent to flow analysis. In Conference Record of POPL’ 95: 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 367–378, San Francisco, California, January 1995. 125, 126
Hemant Pande and Barbara Ryder. Data-flow-based virtual function resolution. In Proceedings of the Third International Static Analysis Symposium, 1996. 125, 126
B. Ryder. Constructing the call graph of a program. IEEE Transactions on Software Engineering, SE-5(3):216–226, May 1979. 125, 126
O. Shivers. The semantics of Scheme control-flow analysis. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, volume 26, pages 190–198, New Haven, CN, June 1991. 125, 126, 137
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Agrawal, G. (2000). Demand-Driven Construction of Call Graphs. In: Watt, D.A. (eds) Compiler Construction. CC 2000. Lecture Notes in Computer Science, vol 1781. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46423-9_9
Download citation
DOI: https://doi.org/10.1007/3-540-46423-9_9
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67263-0
Online ISBN: 978-3-540-46423-5
eBook Packages: Springer Book Archive