Context Sensitivity without Contexts: A Cut-Shortcut Approach to Fast and Precise Pointer Analysis
Wenjie Ma, Shengyuan Yang, Tian Tan, Xiaoxing Ma, Chang Xu, Yue Li
Abstract
Over the past decades, context sensitivity has been considered as one of the most effective ideas for improving the precision of pointer analysis for Java. Different from the extremely fast context-insensitivity approach, context sensitivity requires every program method to be analyzed under different contexts for separating the static abstractions of different dynamic instantiations of the method's variables and heap objects, and thus reducing spurious object flows introduced by method calls. However, despite great precision benefits, as each method is equivalently cloned and analyzed under each context, context sensitivity brings heavy efficiency costs. Recently, numerous selective context-sensitive approaches have been put forth for scaling pointer analysis to large and complex Java programs by applying contexts only to the selected methods while analyzing the remaining ones context-insensitively; however, because the selective approaches do not fundamentally alter the primary methodology of context sensitivity (and do not thus remove its efficiency bottleneck), they produce much improved but still limited results.
In this work, we present a fundamentally different approach called Cut-Shortcut for fast and precise pointer analysis for Java. Its insight is simple: the main effect of cloning methods under different contexts is to filter spurious object flows that have been merged inside a callee method; from the view of a typical pointer flow graph (PFG), such effect can be simulated by cutting off (Cut) the edges that introduce precision loss to certain pointers and adding Shortcut edges directly from source pointers to the target ones circumventing the method on PFG. As a result, we can achieve the effect of context sensitivity without contexts. We identify three general program patterns and develop algorithms based on them to safely cut off and add shortcut edges on PFG, formalize them and formally prove the soundness. To comprehensively validate Cut-Shortcut's effectiveness, we implement two versions of Cut-Shortcut for two state-of-the-art pointer analysis frameworks for Java, one in Datalog for the declarative Doop and the other in Java for the imperative Tai-e, and we consider all the large and complex programs used in recent literatures that meet the experimental requirements. The evaluation results are extremely promising: Cut-Shortcut is even able to run faster than context insensitivity for most evaluated programs while obtaining high precision that is comparable to context sensitivity (if scalable) in both frameworks. This is for the first time that we have been able to achieve such a good efficiency and precision trade-off for those hard-to-analyze programs, and we hope Cut-Shortcut could offer new perspectives for developing more effective pointer analysis for Java in the future.
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 fd1e85cd-a711-4031-b20d-127fc229f887Cited by top-tier papers14
- Scaling Type-Based Points-to Analysis with SaturationChristian Wimmer, Codrut Stancu, David Kozak, Thomas WürthingerPLDI 2024 · 12 citations
- Pointer Analysis for Database-Backed ApplicationsYufei Liang, Teng Zhang, Ganlin Li, Tian Tan et al.PLDI 2025 · 5 citations
- Bridge the Islands: Pointer Analysis for Microservice SystemsTeng Zhang, Yufei Liang, Ganlin Li, Tian Tan et al.ISSTA 2025 · 2 citations
- Is Call Graph Pruning Really Effective?: An Empirical Re-evaluationMohammad Rafieian, Vlad Birsan, Kunal Katiyar, Dylan Zhong et al.ICSE 2026 · 1 citation
- TIPS: Tracking Integer-Pointer Value Flows for C++ Member Function PointersChangwei Zou, Dongjie He, Yulei Sui, Jingling XueFSE 2024 · 1 citation
Builds on6
- Static analysis of Java enterprise applications: frameworks and caches, the elephants in the roomAnastasios Antoniadis, Nikos Filippakis, Paddy Krishnan, Raghavendra Ramesh et al.PLDI 2020 · 41 citations
- Making pointer analysis more precise by unleashing the power of selective context sensitivityTian Tan, Yue Li, Xiaoxing Ma, Chang Xu et al.OOPSLA 2021 · 39 citations
- Fast graph simplification for interleaved Dyck-reachabilityYuanbo Li, Qirun Zhang, Thomas W. RepsPLDI 2020 · 30 citations
- Learning graph-based heuristics for pointer analysis without handcrafting application-specific featuresMinseok Jeon, Myungho Lee, Hakjoo OhOOPSLA 2020 · 29 citations
- Canary: practical static detection of inter-thread value-flow bugsYuandao Cai, Peisen Yao, Charles ZhangPLDI 2021 · 25 citations
Related papers
- Towards a Theoretically-Backed and Practical Framework for Selective Object-Sensitive Pointer AnalysisChaoyue Zhang, Longlong Lu, Yifei Lu, Minxue Pan et al.OOPSLA 2025
- Return of CFA: call-site sensitivity can be superior to object sensitivity even for object-oriented programsMinseok Jeon, Hakjoo OhPOPL 2022 · 15 citations
- Module-Aware Context Sensitive Pointer AnalysisHaofeng Li, Chenghang Shi, Jie Lu, Lian Li et al.ICSE 2025 · 1 citation
- SHARP: fast incremental context-sensitive pointer analysis for JavaBozhen Liu, Jeff HuangOOPSLA 2022 · 21 citations
- Hybrid Inlining: A Framework for Compositional and Context-Sensitive Static AnalysisJiangchao Liu, Jierui Liu, Peng Di, Diyu Wu et al.ISSTA 2023 · 3 citations
