Type-based call graph construction algorithms for scala

Karim Ali, Marianna Rapoport, Ondrej Lhotak, Julian Dolby, Frank Tip

Research output: Contribution to journalArticlepeer-review


Call graphs have many applications in software engineering. For example, they serve as the basis for code navigation features in integrated development environments and are at the foundation of static analyses performed in verification tools. While many call graph construction algorithms have been presented in the literature, we are not aware of any that handle Scala features such as traits and abstract type members. Applying existing algorithms to the JVM bytecodes generated by the Scala compiler produces very imprecise results because type information is lost during compilation. We adapt existing type-based call graph construction algorithms to Scala and present a formalization based on Featherweight Scala. An experimental evaluation shows that our most precise algorithm generates call graphs with 1.1-3.7 times fewer nodes and 1.5-17.3 times fewer edges than a bytecode-based RTA analysis.

Original languageEnglish (US)
Article number9
JournalACM Transactions on Software Engineering and Methodology
Issue number1
StatePublished - Nov 2015


  • Call graphs
  • Scala
  • Static analysis

ASJC Scopus subject areas

  • Software


Dive into the research topics of 'Type-based call graph construction algorithms for scala'. Together they form a unique fingerprint.

Cite this