Indirection-Bounded Call Graph Analysis

Madhurima Chakraborty*, Aakash Gnanakumar*, Manu Sridharan*, Anders Møller*

*Corresponding author for this work

Research output: Contribution to book/anthology/report/proceedingArticle in proceedingsResearchpeer-review

Abstract

Call graphs play a crucial role in analyzing the structure and behavior of programs. For JavaScript and other dynamically typed programming languages, static call graph analysis relies on approximating the possible flow of functions and objects, and producing usable call graphs for large, real-world programs remains challenging. In this paper, we propose a simple but effective technique that addresses performance issues encountered in call graph generation. We observe via a dynamic analysis that typical JavaScript program code exhibits small levels of indirection of object pointers and higher-order functions. We demonstrate that a widely used analysis algorithm, wave propagation, closely follows the levels of indirections, so that call edges discovered early are more likely to be true positives. By bounding the number of indirections covered by this analysis, in many cases it can find most true-positive call edges in less time. We also show that indirection-bounded analysis can similarly be incorporated into the field-based call graph analysis algorithm ACG. We have experimentally evaluated the modified wave propagation algorithm on 25 large Node.jsbased JavaScript programs. Indirection-bounded analysis on average yields close to a 2X speed-up with only 5% reduction in recall and almost identical precision relative to the baseline analysis, using dynamically generated call graphs for the recall and precision measurements. To demonstrate the robustness of the approach, we also evaluated the modified ACG algorithm on 10 web-based and 4 mobile-based medium sized benchmarks, with similar results.

Original languageEnglish
Title of host publication38th European Conference on Object-Oriented Programming, ECOOP 2024
EditorsJonathan Aldrich, Guido Salvaneschi
PublisherDagstuhl Publishing
Publication dateSept 2024
Article number3
ISBN (Electronic)9783959773416
DOIs
Publication statusPublished - Sept 2024
Event38th European Conference on Object-Oriented Programming, ECOOP 2024 - Vienna, Austria
Duration: 16 Sept 202420 Sept 2024

Conference

Conference38th European Conference on Object-Oriented Programming, ECOOP 2024
Country/TerritoryAustria
CityVienna
Period16/09/202420/09/2024
SeriesLeibniz International Proceedings in Informatics, LIPIcs
Volume313
ISSN1868-8969

Keywords

  • call graphs
  • JavaScript
  • points-to analysis

Fingerprint

Dive into the research topics of 'Indirection-Bounded Call Graph Analysis'. Together they form a unique fingerprint.

Cite this