Abstract
Abstract interpretation provides a foundational framework for approximating program semantics by interpreting code through abstract domains using semantic functions over ordered sets along a program’s control flow graph (CFG). To facilitate fixpoint computation in abstract interpretation, weak topological ordering (WTO) is an effective strategy for handling loops, as it identifies strategic control points in the CFG where widening and narrowing operations should be applied. However, existing abstract interpreters still face challenges when extending WTO computation in the presence of recursive programs. Computing a precise whole-program WTO requires full context-sensitive analysis which is not scalable for large programs, while context-insensitive analysis introduces spurious cycles that compromise precision. Current approaches either ignore recursion (resulting in unsoundness) or rely on conservative approximations, sacrificing precision by adopting the greatest elements of abstract domains and applying widening at function boundaries without subsequent narrowing refinements. These can lead to undesired results for downstream tasks, such as bug detection.
To address the above limitations, we present RecTopo, a new technique to boost the efficiency of precise abstract interpretation in the presence of recursive programs through interprocedural weak topological ordering (IWTO). Rather than pursuing an expensive whole-program WTO analysis, RecTopo employs an on-demand approach that strategically decomposes programs at recursion boundaries and constructs targeted IWTOs for each recursive component. RecTopo dissects and analyzes (nested) recursions through interleaved widening and narrowing operations. This approach enables precise control over interpretation ordering within recursive structures while eliminating spurious recursions through systematic correlation of control flow and call graphs.
We implemented RecTopo and evaluated its effectiveness using an assertion-based checking client focused on buffer overflow detection, comparing it against three popular open-source abstract interpreters (IKOS, Clam, CSA). The experiments on 8312 programs from the NIST dataset demonstrate that, on average, RecTopo is 31.99% more precise and achieves a 17.49% higher recall rate compared to three other tools. Moreover, RecTopo exhibits an average precision improvement of 46.51% and a higher recall rate of 32.98% compared to our baselines across ten large open-source projects. Further ablation studies reveal that IWTO reduces spurious widening operations compared to whole-program WTO, resulting in a 12.83% reduction in analysis time.
| Original language | English |
|---|---|
| Title of host publication | 39th European Conference on Object-Oriented Programming (ECOOP 2025) |
| Editors | Jonathan Aldrich, Alexandra Silva |
| Place of Publication | Germany |
| Publisher | Dagstuhl Publishing |
| Pages | 1-31 |
| Number of pages | 31 |
| ISBN (Electronic) | 9783959773737 |
| DOIs | |
| Publication status | Published - Jun 2025 |
| Externally published | Yes |
| Event | 39th European Conference on Object-Oriented Programming, ECOOP 2025 - Bergen, Norway Duration: 30 Jun 2025 → 2 Jul 2025 |
Publication series
| Name | LIPIcs - Leibniz International Proceedings in Informatics |
|---|---|
| Publisher | Dagstuhl Publishing |
| Volume | 333 |
| ISSN (Electronic) | 1868-8969 |
Conference
| Conference | 39th European Conference on Object-Oriented Programming, ECOOP 2025 |
|---|---|
| Country/Territory | Norway |
| City | Bergen |
| Period | 30/06/25 → 2/07/25 |
Bibliographical note
Copyright the Author(s). Version archived for private and non-commercial use with the permission of the author/s and according to publisher conditions. For further rights please contact the publisher.Keywords
- Abstract interpretation
- recursion
- weak topological ordering