Affiliation:
1. Stanford University, Stanford, CA
Abstract
This paper presents the first scalable context-sensitive, inclusion-based pointer alias analysis for Java programs. Our approach to context sensitivity is to create a clone of a method for every context of interest, and run a
context-insensitive
algorithm over the expanded call graph to get
context-sensitive
results. For precision, we generate a clone for every acyclic path through a program's call graph, treating methods in a strongly connected component as a single node. Normally, this formulation is hopelessly intractable as a call graph often has 10 14 acyclic paths or more. We show that these exponential relations can be computed efficiently using binary decision diagrams (BDDs). Key to the scalability of the technique is a context numbering scheme that exposes the commonalities across contexts. We applied our algorithm to the most popular applications available on Sourceforge, and found that the largest programs, with hundreds of thousands of Java bytecodes, can be analyzed in under 20 minutes.This paper shows that pointer analysis, and many other queries and algorithms, can be described succinctly and declaratively using Datalog, a logic programming language. We have developed a system called bddbddb that automatically translates Datalog programs into highly efficient BDD implementations. We used this approach to develop a variety of context-sensitive algorithms including side effect analysis, type analysis, and escape analysis.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
149 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. When to Stop Going Down the Rabbit Hole: Taming Context-Sensitivity on the Fly;Proceedings of the 13th ACM SIGPLAN International Workshop on the State Of the Art in Program Analysis;2024-06-20
2. CFLOBDDs: Context-Free-Language Ordered Binary Decision Diagrams;ACM Transactions on Programming Languages and Systems;2024-05-02
3. Generic Sensitivity: Generics-Guided Context Sensitivity for Pointer Analysis;IEEE Transactions on Software Engineering;2024-05
4. Finding Cross-Rule Optimization Bugs in Datalog Engines;Proceedings of the ACM on Programming Languages;2024-04-29
5. A Pure Demand Operational Semantics with Applications to Program Analysis;Proceedings of the ACM on Programming Languages;2024-04-29