Mechanically Translating Iterative Dataflow Analysis to Algebraic Program Analysis
Chenyu Zhou, Jingbo Wang, Chao Wang
Abstract
We propose a method for mechanically translating iterative dataflow analysis (IDA) algorithms to algebraic program analysis (APA) algorithms capable of computing exactly the same set of dataflow facts. The method is useful because while most of the dataflow analysis algorithms used in practice are expressed as iterative procedures, APA provides an alternative and inherently-compositional approach to solving dataflow problems, thus making it well suited for certain applications (e.g., incremental analysis of a program that goes through frequent code changes, or amortizing the cost of answering a large number of dataflow queries for the same program). However, manually crafting an APA algorithm not only is labor intensive and error prone but also can lead to suboptimal performance. Our method overcomes the limitation by providing a mechanical translation that guarantees to be correct by construction. Our method handles a broad class of dataflow analysis problems -the only requirements are that (1) the set of dataflow facts is finite and (2) the dataflow functions distribute over the confluence operation (e.g., set union). They include classical dataflow problems whose IDA algorithms can be expressed using Gen/Kill sets, such as reaching definitions, live variables, and available expressions. They also include non Gen/Kill problems such as copy constant propagation, truly-live variables, and possibly-initialized variables. Our experimental evaluation shows that the translated APA algorithms are not only simpler and easier to understand, but also significantly faster than manually-designed APA algorithms, especially for incremental program analysis.
• Software and its engineering → Software verification and validation.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2c358772-40c5-49e2-b6f9-0f85a576cccbBuilds on7
- Incremental whole-program analysis in Datalog with latticesTamás Szabó, Sebastian Erdweg, Gábor BergmannPLDI 2021 · 39 citations
- Templates and recurrences: better togetherJason Breck, John Cyphert, Zachary Kincaid, Thomas W. RepsPLDI 2020 · 30 citations
- Synthesizing abstract transformersPankaj Kumar Kalita, Sujit Kumar Muduli, Loris D'Antoni, Thomas W. Reps et al.OOPSLA 2022 · 21 citations
- Termination analysis without the tearsShaowei Zhu, Zachary KincaidPLDI 2021 · 16 citations
- Exploiting the Sparseness of Control-Flow and Call Graphs for Efficient and On-Demand Algebraic Program AnalysisGiovanna Kobus Conrado, Amir Kafshdar Goharshady, Kerim Kochekov, Yun Chen Tsai et al.OOPSLA 2023 · 12 citations
Related papers
- An Incremental Algorithm for Algebraic Program AnalysisChenyu Zhou, Yuzhou Fang, Jingbo Wang, Chao WangPOPL 2025 · 2 citations
- IncIDFA: An Efficient and Generic Algorithm for Incremental Iterative Dataflow AnalysisAman Nougrahiya, V. Krishna NandivadaOOPSLA 2025 · 4 citations
- Incremental Program Analysis in the Wild: An Empirical Study on Real-World Program ChangesXizao Wang, Xiangrong Bin, Lanxin Huang, Shangqing Liu et al.ASE 2025
- SSA Translation Is an Abstract InterpretationMatthieu LemerrePOPL 2023 · 7 citations
- Automatic and efficient variability-aware lifting of functional programsRamy Shahin, Marsha ChechikOOPSLA 2020 · 18 citations
