Lune

PLDI2023顶会

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

摘要

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 14 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Making pointer analysis more precise by unleashing the power of selective context sensitivity 引用了 Learning graph-based heuristics for pointer analysis without handcrafting application-specific features
  • Is Call Graph Pruning Really Effective?: An Empirical Re-evaluation 引用了 Making pointer analysis more precise by unleashing the power of selective context sensitivity
  • Is Call Graph Pruning Really Effective?: An Empirical Re-evaluation 引用了 Learning graph-based heuristics for pointer analysis without handcrafting application-specific features
  • Pointer Analysis for Database-Backed Applications 引用了 Making pointer analysis more precise by unleashing the power of selective context sensitivity
  • Pointer Analysis for Database-Backed Applications 引用了 Static analysis of Java enterprise applications: frameworks and caches, the elephants in the room
  • Bridge the Islands: Pointer Analysis for Microservice Systems 引用了 Making pointer analysis more precise by unleashing the power of selective context sensitivity
  • Bridge the Islands: Pointer Analysis for Microservice Systems 引用了 Static analysis of Java enterprise applications: frameworks and caches, the elephants in the room
  • TIPS: Tracking Integer-Pointer Value Flows for C++ Member Function Pointers 引用了 Canary: practical static detection of inter-thread value-flow bugs
  • Scaling Type-Based Points-to Analysis with Saturation 引用了 Static analysis of Java enterprise applications: frameworks and caches, the elephants in the room
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper14

  1. Scaling Type-Based Points-to Analysis with SaturationChristian Wimmer, Codrut Stancu, David Kozak, Thomas WürthingerPLDI 2024 · 12 次引用
  2. Pointer Analysis for Database-Backed ApplicationsYufei Liang, Teng Zhang, Ganlin Li, Tian Tan 等PLDI 2025 · 5 次引用
  3. Bridge the Islands: Pointer Analysis for Microservice SystemsTeng Zhang, Yufei Liang, Ganlin Li, Tian Tan 等ISSTA 2025 · 2 次引用
  4. Is Call Graph Pruning Really Effective?: An Empirical Re-evaluationMohammad Rafieian, Vlad Birsan, Kunal Katiyar, Dylan Zhong 等ICSE 2026 · 1 次引用
  5. TIPS: Tracking Integer-Pointer Value Flows for C++ Member Function PointersChangwei Zou, Dongjie He, Yulei Sui, Jingling XueFSE 2024 · 1 次引用

它引用的 Paper6

  1. Static analysis of Java enterprise applications: frameworks and caches, the elephants in the roomAnastasios Antoniadis, Nikos Filippakis, Paddy Krishnan, Raghavendra Ramesh 等PLDI 2020 · 41 次引用
  2. Making pointer analysis more precise by unleashing the power of selective context sensitivityTian Tan, Yue Li, Xiaoxing Ma, Chang Xu 等OOPSLA 2021 · 39 次引用
  3. Fast graph simplification for interleaved Dyck-reachabilityYuanbo Li, Qirun Zhang, Thomas W. RepsPLDI 2020 · 30 次引用
  4. Learning graph-based heuristics for pointer analysis without handcrafting application-specific featuresMinseok Jeon, Myungho Lee, Hakjoo OhOOPSLA 2020 · 29 次引用
  5. Canary: practical static detection of inter-thread value-flow bugsYuandao Cai, Peisen Yao, Charles ZhangPLDI 2021 · 25 次引用

相关 Paper

  1. Towards a Theoretically-Backed and Practical Framework for Selective Object-Sensitive Pointer AnalysisChaoyue Zhang, Longlong Lu, Yifei Lu, Minxue Pan 等OOPSLA 2025
  2. Return of CFA: call-site sensitivity can be superior to object sensitivity even for object-oriented programsMinseok Jeon, Hakjoo OhPOPL 2022 · 15 次引用
  3. Module-Aware Context Sensitive Pointer AnalysisHaofeng Li, Chenghang Shi, Jie Lu, Lian Li 等ICSE 2025 · 1 次引用
  4. SHARP: fast incremental context-sensitive pointer analysis for JavaBozhen Liu, Jeff HuangOOPSLA 2022 · 21 次引用
  5. Generic sensitivity: customizing context-sensitive pointer analysis for genericsHaofeng Li, Jie Lu, Haining Meng, Liqing Cao 等FSE 2022 · 6 次引用
黄昏的海面,两侧是细线勾勒的悬崖