Exploiting the Sparseness of Control-Flow and Call Graphs for Efficient and On-Demand Algebraic Program Analysis
Giovanna Kobus Conrado, Amir Kafshdar Goharshady, Kerim Kochekov, Yun Chen Tsai, Ahmed Khaled Zaher
摘要
Algebraic Program Analysis (APA) is a ubiquitous framework that has been employed as a unifying model for various problems in data-flow analysis, termination analysis, invariant generation, predicate abstraction and a wide variety of other standard static analysis tasks. APA models program summaries as elements of a regular algebra . Suppose that a summary inAis assigned to every transition of the program and that we aim to compute the effect of running the program starting at linesand ending at linet. APA first computes a regular expression capturing all program paths of interest. In case of intraprocedural analysis, models all paths fromstot, whereas in the interprocedural case it models all interprocedurally-valid paths, i.e. paths that go back to the right caller function when a callee returns. This regular expression is then interpreted over the algebra to obtain the desired result. Suppose the program hasnlines of code and each evaluation of an operation in the regular algebra takesO(k) time. It is well-known that a single APA query, or a set of queries with the same starting points, can be answered inO(n· α(n) ·k), where α is the inverse Ackermann function. In this work, we consider an on-demand setting for APA: the program is given in the input and can be preprocessed. The analysis has to then answer a large number of on-line queries, each providing a pair (s,t) of program lines which are the start and end point of the query, respectively. The goal is to avoid the significant cost of running a fresh APA instance for each query. Our main contribution is a series of algorithms that, after a lightweight preprocessing ofO(n· lgn·k), answer each query inO(k) time. In other words, our preprocessing has almost the same asymptotic complexity as a single APA query, except for a sub-logarithmic factor, and then every future query is answered instantly, i.e. by a constant number of operations in the algebra. We achieve this remarkable speedup by relying on certain structural sparsity properties of control-flow and call graphs (CFGs and CGs). Specifically, we exploit the fact that control-flow graphs of real-world programs have a tree-like structure and bounded treewidth and nesting depth and that their call graphs have small treedepth in comparison to the size of the program. Finally, we provide experimental results demonstrating the effectiveness and efficiency of our approach and showing that it beats the runtime of classical APA by several orders of magnitude.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper5
- Fast and Optimal Extraction for Sparse Equality GraphsAmir Kafshdar Goharshady, Chun Kit Lam, Lionel ParreauxOOPSLA 2024 · 被引用 11 次
- The Bounded Pathwidth of Control-Flow GraphsGiovanna Kobus Conrado, Amir Kafshdar Goharshady, Chun Kit LamOOPSLA 2023 · 被引用 9 次
- Boosting the Performance of Alias-Aware IFDS Analysis with CFL-Based Environment TransformersHaofeng Li, Chenghang Shi, Jie Lu, Lian Li 等OOPSLA 2024 · 被引用 6 次
- An Incremental Algorithm for Algebraic Program AnalysisChenyu Zhou, Yuzhou Fang, Jingbo Wang, Chao WangPOPL 2025 · 被引用 2 次
- Mechanically Translating Iterative Dataflow Analysis to Algebraic Program AnalysisChenyu Zhou, Jingbo Wang, Chao WangOOPSLA 2026
它引用的顶会 Paper2
相关 Paper
- Faster Chaitin-like Register Allocation via Grammatical Decompositions of Control-Flow GraphsXuran Cai, Amir Kafshdar Goharshady, S. Hitarth, Chun Kit LamASPLOS 2025 · 被引用 2 次
- On-the-Fly Static Analysis via Dynamic Bidirected Dyck ReachabilityShankaranarayanan Krishna, Aniket Lal, Andreas Pavlogiannis, Omkar TuppePOPL 2024 · 被引用 7 次
- Indexing the extended Dyck-CFL reachability for context-sensitive program analysisQingkai Shi, Yongchao Wang, Peisen Yao, Charles ZhangOOPSLA 2022 · 被引用 11 次
- The fine-grained and parallel complexity of andersen's pointer analysisAnders Alnor Mathiasen, Andreas PavlogiannisPOPL 2021 · 被引用 22 次
- Multi-stage On-Demand Program Slicing for Modular Analysis of Multi-threaded ProgramsJiawei Yang, Xiao Cheng, Jiawei Wang, Xiapu Luo 等ISSTA 2026
