Faster algorithms for dynamic algebraicqueries in basic RSMs with constant treewidth

Research output: Contribution to journal/Conference contribution in journal/Contribution to newspaperJournal articleResearchpeer-review


  • Krishnendu Chatterjee, Institute of Science and Technology Austria
  • ,
  • Amir Kafshdar Goharshady, Institute of Science and Technology Austria
  • ,
  • Prateesh Goyal, Massachusetts Institute of Technology
  • ,
  • Rasmus Ibsen-Jensen, Foundation Building, University of Liverpool
  • ,
  • Andreas Pavlogiannis

Interprocedural analysis is at the heart of numerous applications in programming languages, such as alias analysis, constant propagation, and so on. Recursive state machines (RSMs) are standard models for interprocedural analysis. We consider a general framework with RSMs where the transitions are labeled from a semiring and path properties are algebraic with semiring operations. RSMs with algebraic path properties can model interprocedural dataflow analysis problems, the shortest path problem, the most probable path problem, and so on. The traditional algorithms for interprocedural analysis focus on path properties where the starting point is fixed as the entry point of a specific method. In this work, we consider possible multiple queries as required in many applications such as in alias analysis. The study of multiple queries allows us to bring in an important algorithmic distinction between the resource usage of the one-time preprocessing vs for each individual query. The second aspect we consider is that the control flow graphs for most programs have constant treewidth. Our main contributions are simple and implementable algorithms that support multiple queries for algebraic path properties for RSMs that have constant treewidth. Our theoretical results show that our algorithms have small additional one-time preprocessing but can answer subsequent queries significantly faster as compared to the current algorithmic solutions for interprocedural dataflow analysis. We have also implemented our algorithms and evaluated their performance for performing on-demand interprocedural dataflow analysis on various domains, such as for live variable analysis and reaching definitions, on a standard benchmark set. Our experimental results align with our theoretical statements and show that after a lightweight preprocessing, on-demand queries are answered much faster than the standard existing algorithmic approaches.

Original languageEnglish
Article number23
JournalACM Transactions on Programming Languages and Systems
Number of pages46
Publication statusPublished - 2019

    Research areas

  • Constant treewidth graphs, Dataflow analysis, Interprocedural analysis, Reachability and distance oracles, Reachability and shortest path

See relations at Aarhus University Citationformats

ID: 173795877