Constructing call graphs of Scala programs

Karim Ali, Marianna Rapoport, Ondřej Lhoták, Julian Dolby, Frank Tip

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

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.

Original languageEnglish (US)
Title of host publicationECOOP 2014 - Object-Oriented Programming
Subtitle of host publication28th European Conference, Proceedings
PublisherSpringer Verlag
Pages54-79
Number of pages26
ISBN (Print)9783662442012
DOIs
StatePublished - 2014
Event28th European Conference on Object-Oriented Programming, ECOOP 2014 - Uppsala, Sweden
Duration: Jul 28 2014Aug 1 2014

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume8586 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference28th European Conference on Object-Oriented Programming, ECOOP 2014
Country/TerritorySweden
CityUppsala
Period7/28/148/1/14

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'Constructing call graphs of Scala programs'. Together they form a unique fingerprint.

Cite this