[Research Paper] Static JavaScript Call Graphs: A Comparative Study
Authors:
- Gabor AntalGAGabor Antal
- Peter HegedusPHPeter Hegedus
- Zoltan TothZTZoltan Toth
- Rudolf FerencRFRudolf Ferenc
- Tibor GyimothyTGTibor Gyimothy
- 1 September 2018
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 177-186
Abstract
The popularity and wide adoption of JavaScript both at the client and server side makes its code analysis more important than ever before. Most of the algorithms for vulnerability analysis, coding issue detection, or type inference rely on the call graph representation of the underlying program. Despite some obvious advantages of dynamic analysis, static algorithms should also be considered for call graph construction as they do not require extensive test beds for programs and their costly execution and tracing. In this paper, we systematically compare five widely adopted static algorithms - implemented by the npm call graph, IBM WALA, Google Closure Compiler, Approximate Call Graph, and Type Analyzer for JavaScript tools - for building JavaScript call graphs on 26 WebKit SunSpider benchmark programs and 6 real-world Node.js modules. We provide a performance analysis as well as a quantitative and qualitative evaluation of the results. We found that there was a relatively large intersection of the found call edges among the algorithms, which proved to be 100% precise. However, most of the tools found edges that were missed by all others. ACG had the highest precision followed immediately by TAJS, but ACG found significantly more call edges. As for the combination of tools, ACG and TAJS together covered 99% of the found true edges by all algorithms, while maintaining a precision as high as 98%. Only two of the tools were able to analyze up-to-date multi-file Node.js modules due to incomplete language features support. They agreed on almost 60% of the call edges, but each of them found valid edges that the other missed.Keywords
This publication has 16 references indexed in Scilit:
- TypeDevil: Dynamic Type Inconsistency Analysis for JavaScript2015
- JSAI: a static analysis platform for JavaScript2014
- Practical static analysis of JavaScript applications in the presence of frameworks and libraries2013
- Application-Only Call Graph Construction2012
- Malware classification based on call graph clusteringJournal of Computer Virology and Hacking Techniques, 2011
- Localizing Defects in Multithreaded Programs by Mining Dynamic Call GraphsLecture Notes in Computer Science, 2010
- Type Analysis for JavaScript2009
- Profiling Java applications using code hotswapping and dynamic call graph revelationACM SIGSOFT Software Engineering Notes, 2004
- An empirical study of static call graph extractorsACM Transactions on Software Engineering and Methodology, 1998
- GprofACM SIGPLAN Notices, 1982