Faster Algorithms for Dynamic Algebraic Queries in Basic RSMs with Constant Treewidth



Chatterjee, Krishnendu, Goharshady, Amir Kafshdar, Goyal, Prateesh, Ibsen-Jensen, Rasmus and Pavlogiannis, Andreas
(2019) Faster Algorithms for Dynamic Algebraic Queries in Basic RSMs with Constant Treewidth. ACM Transactions on Programming Languages and Systems, 41 (4). pp. 1-46.

[img] Text
toplas-2019-a.pdf - Author Accepted Manuscript

Download (668kB) | Preview

Abstract

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.

Item Type: Article
Uncontrolled Keywords: Interprocedural analysis, constant treewidth graphs, dataflow analysis, reachability and shortest path, reachability and distance oracles
Depositing User: Symplectic Admin
Date Deposited: 28 Apr 2020 10:26
Last Modified: 18 Jan 2023 23:54
DOI: 10.1145/3363525
Related URLs:
URI: https://livrepository.liverpool.ac.uk/id/eprint/3084304