TY - GEN
T1 - Constructing call graphs of Scala programs
AU - Ali, Karim
AU - Rapoport, Marianna
AU - Lhoták, Ondřej
AU - Dolby, Julian
AU - Tip, Frank
PY - 2014
Y1 - 2014
N2 - As Scala gains popularity, there is growing interest in programming tools for it. Such tools often require call graphs. However, call graph construction algorithms in the literature do not handle Scala features, such as traits and abstract type members. Applying existing call graph construction algorithms to the JVM bytecodes generated by the Scala compiler produces very imprecise results due to type information being lost during compilation. We adapt existing call graph construction algorithms, Name-Based Resolution (RA) and Rapid Type Analysis (RTA), for Scala, and present a formalization based on Featherweight Scala. We evaluate our algorithms on a collection of Scala programs. Our results show that careful handling of complex Scala constructs greatly helps precision and that our most precise analysis generates call graphs with 1.1-3.7 times fewer nodes and 1.5-18.7 times fewer edges than a bytecode-based RTA analysis.
AB - As Scala gains popularity, there is growing interest in programming tools for it. Such tools often require call graphs. However, call graph construction algorithms in the literature do not handle Scala features, such as traits and abstract type members. Applying existing call graph construction algorithms to the JVM bytecodes generated by the Scala compiler produces very imprecise results due to type information being lost during compilation. We adapt existing call graph construction algorithms, Name-Based Resolution (RA) and Rapid Type Analysis (RTA), for Scala, and present a formalization based on Featherweight Scala. We evaluate our algorithms on a collection of Scala programs. Our results show that careful handling of complex Scala constructs greatly helps precision and that our most precise analysis generates call graphs with 1.1-3.7 times fewer nodes and 1.5-18.7 times fewer edges than a bytecode-based RTA analysis.
UR - http://www.scopus.com/inward/record.url?scp=84905397852&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84905397852&partnerID=8YFLogxK
U2 - 10.1007/978-3-662-44202-9_3
DO - 10.1007/978-3-662-44202-9_3
M3 - Conference contribution
AN - SCOPUS:84905397852
SN - 9783662442012
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 54
EP - 79
BT - ECOOP 2014 - Object-Oriented Programming
PB - Springer Verlag
T2 - 28th European Conference on Object-Oriented Programming, ECOOP 2014
Y2 - 28 July 2014 through 1 August 2014
ER -