skip to main content
10.1145/2001420.2001440acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article

Demand-driven context-sensitive alias analysis for Java

Published: 17 July 2011 Publication History

Abstract

Software tools for program understanding, transformation, verification, and testing often require an efficient yet highly-precise alias analysis. Typically this is done by computing points-to information, from which alias queries can be answered. This paper presents a novel context-sensitive, demand-driven alias analysis for Java that achieves efficiency by answering alias queries directly, instead of relying on an underlying points-to analysis. The analysis is formulated as a context-free-language (CFL) reachability problem over a language that models calling context sensitivity, and over another language that models field sensitivity (i.e., flow of reference values through fields of heap objects).
To improve analysis scalability, we propose to compute procedural reachability summaries online, during the CFL-reachability computation. This cannot be done indiscriminately, as the benefits of using the summary information do not necessarily outweigh the cost of computing it. Our approach selects for summarization only a subset of heavily-used methods (i.e., methods having a large number of incoming edges in the static call graph). We have performed a variety of studies on the proposed analysis. The experimental results show that, within the same time budget, the precision of the analysis is higher than that of a state-of-the-art highly-precise points-to analysis. In addition, the use of method summaries can lead to significant improvements in analysis performance.

References

[1]
R. Chatterjee, B. G. Ryder, and W. Landi. Relevant context inference. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 133--146, 1999.
[2]
S. Guyer and C. Lin. Client-driven pointer analysis. In Static Analysis Symposium, pages 214--236, 2003.
[3]
N. Heintze and O. Tardieu. Demand-driven pointer analysis. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 24--34, 2001.
[4]
M. Hind. Pointer analysis: Haven't we solved this problem yet? In ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 54--61, 2001.
[5]
S. Horwitz, T. Reps, and M. Sagiv. Demand interprocedural dataflow analysis. In ACM SIGSOFT International Symposium on the Foundations of Software Engineering, pages 104--115, 1995.
[6]
J. Kodumal and A. Aiken. The set constraint/CFL reachability connection in practice. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 207--218, 2004.
[7]
J. Kodumal and A. Aiken. Regularly annotated set constraints. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 331--341, 2007.
[8]
O. Lhoták. Program Analysis using Binary Decision Diagrams. PhD thesis, McGill University, 2006.
[9]
O. Lhoták and L. Hendren. Scaling Java points-to analysis using Spark. In International Conference on Compiler Construction, pages 153--169, 2003.
[10]
O. Lhoták and L. Hendren. Context-sensitive points-to analysis: Is it worth it? In International Conference on Compiler Construction, pages 47--64, 2006.
[11]
Y. Liu and A. Milanova. Static analysis for inference of explicit information flow. In ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 50--56, 2008.
[12]
D. Melski and T. Reps. Interconvertibility of a class of set constraints and context-free-language reachability. Theoretical Computer Science, 248:29--98, 2000.
[13]
A. Milanova, A. Rountev, and B. G. Ryder. Parameterized object sensitivity for points-to analysis for Java. ACM Transactions on Software Engineering and Methodology, 14(1):1--41, 2005.
[14]
Paddle Framework, www.sable.mcgill.ca/paddle.
[15]
J. Rehof and M. Fähndrich. Type-based flow analysis: From polymorphic subtyping to CFL-reachability. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 54--66, 2001.
[16]
T. Reps. Solving demand versions of interprocedural analysis problems. In International Conference on Compiler Construction, pages 389--403, 1994.
[17]
T. Reps. Shape analysis as a generalized path problem. In ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 1--11, 1995.
[18]
T. Reps. Program analysis via graph reachability. Information and Software Technology, 40(11--12):701--726, 1998.
[19]
T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 49--61, 1995.
[20]
T. Reps, S. Horwitz, M. Sagiv, and G. Rosay. Speeding up slicing. In ACM SIGSOFT International Symposium on the Foundations of Software Engineering, pages 11--20, 1994.
[21]
A. Rountev, S. Kagan, and T. Marlowe. Interprocedural dataflow analysis in the presence of large libraries. In International Conference on Compiler Construction, pages 2--16, 2006.
[22]
A. Rountev and B. G. Ryder. Points-to and side-effect analyses for programs built with precompiled libraries. In International Conference on Compiler Construction, pages 20--36, 2001.
[23]
A. Rountev, M. Sharp, and G. Xu. IDE dataflow analysis in the presence of large object-oriented libraries. In International Conference on Compiler Construction, pages 53--68, 2008.
[24]
B. G. Ryder. Dimensions of precision in reference analysis of object-oriented programming languages. In International Conference on Compiler Construction, pages 126--137, 2003.
[25]
Y. Smaragdakis, M. Bravenboer, and O. Lhotak. Pick your contexts well: understanding object-sensitivity. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 17--30, 2011.
[26]
M. Sridharan and R. Bodik. Refinement-based context-sensitive points-to analysis for Java. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 387--400, 2006.
[27]
M. Sridharan, D. Gopan, L. Shan, and R. Bodik. Demand-driven points-to analysis for Java. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 59--76, 2005.
[28]
R. Vallée-Rai, E. Gagnon, L. Hendren, P. Lam, P. Pominville, and V. Sundaresan. Optimizing Java bytecode using the Soot framework: Is it feasible? In International Conference on Compiler Construction, pages 18--34, 2000.
[29]
J. Whaley and M. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 131--144, 2004.
[30]
J. Whaley and M. Rinard. Compositional pointer and escape analysis for Java programs. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 187--206, 1999.
[31]
R. Wilson and M. Lam. Efficient context-sensitive pointer analysis for C programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 1--12, 1995.
[32]
G. Xu, A. Rountev, and M. Sridharan. Scaling CFL-reachability-based points-to analysis using context-sensitive must-not-alias analysis. In European Conference on Object-Oriented Programming, pages 98--122, 2009.
[33]
X. Zheng and R. Rugina. Demand-driven alias analysis for C. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 197--208, 2008.

Cited By

View all
  • (2024)SPATA: Effective OS Bug Detection with Summary-Based, Alias-Aware, and Path-Sensitive Typestate AnalysisACM Transactions on Computer Systems10.1145/369525042:3-4(1-40)Online publication date: 6-Sep-2024
  • (2024)Falcon: A Fused Approach to Path-Sensitive Sparse Data Dependence AnalysisProceedings of the ACM on Programming Languages10.1145/36564008:PLDI(567-592)Online publication date: 20-Jun-2024
  • (2024)A Better Approximation for Interleaved Dyck ReachabilityProceedings of the 13th ACM SIGPLAN International Workshop on the State Of the Art in Program Analysis10.1145/3652588.3663318(18-25)Online publication date: 20-Jun-2024
  • Show More Cited By

Index Terms

  1. Demand-driven context-sensitive alias analysis for Java

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      ISSTA '11: Proceedings of the 2011 International Symposium on Software Testing and Analysis
      July 2011
      394 pages
      ISBN:9781450305624
      DOI:10.1145/2001420
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Sponsors

      In-Cooperation

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 17 July 2011

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. alias analysis
      2. context sensitivity
      3. demand-driven

      Qualifiers

      • Research-article

      Funding Sources

      Conference

      ISSTA '11
      Sponsor:

      Acceptance Rates

      Overall Acceptance Rate 58 of 213 submissions, 27%

      Upcoming Conference

      ISSTA '25

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)52
      • Downloads (Last 6 weeks)8
      Reflects downloads up to 26 Dec 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)SPATA: Effective OS Bug Detection with Summary-Based, Alias-Aware, and Path-Sensitive Typestate AnalysisACM Transactions on Computer Systems10.1145/369525042:3-4(1-40)Online publication date: 6-Sep-2024
      • (2024)Falcon: A Fused Approach to Path-Sensitive Sparse Data Dependence AnalysisProceedings of the ACM on Programming Languages10.1145/36564008:PLDI(567-592)Online publication date: 20-Jun-2024
      • (2024)A Better Approximation for Interleaved Dyck ReachabilityProceedings of the 13th ACM SIGPLAN International Workshop on the State Of the Art in Program Analysis10.1145/3652588.3663318(18-25)Online publication date: 20-Jun-2024
      • (2024)Evaluating the Effectiveness of Deep Learning Models for Foundational Program Analysis TasksProceedings of the ACM on Programming Languages10.1145/36498298:OOPSLA1(500-528)Online publication date: 29-Apr-2024
      • (2024) Octopus: Scaling Value-Flow Analysis via Parallel Collection of Realizable Path ConditionsACM Transactions on Software Engineering and Methodology10.1145/363274333:3(1-33)Online publication date: 24-Jan-2024
      • (2024)Pearl: A Multi-Derivation Approach to Efficient CFL-Reachability SolvingIEEE Transactions on Software Engineering10.1109/TSE.2024.343768450:9(2379-2397)Online publication date: Sep-2024
      • (2023)A Container-Usage-Pattern-Based Context Debloating Approach for Object-Sensitive Pointer AnalysisProceedings of the ACM on Programming Languages10.1145/36228327:OOPSLA2(971-1000)Online publication date: 16-Oct-2023
      • (2023)Detecting Vulnerabilities in Linux-Based Embedded Firmware with SSE-Based On-Demand Alias AnalysisProceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3597926.3598062(360-372)Online publication date: 12-Jul-2023
      • (2023)Recursive State Machine Guided Graph Folding for Context-Free Language ReachabilityProceedings of the ACM on Programming Languages10.1145/35912337:PLDI(318-342)Online publication date: 6-Jun-2023
      • (2023)CFL/Dyck ReachabilityACM SIGLOG News10.1145/3583660.35836649:4(5-25)Online publication date: 6-Feb-2023
      • Show More Cited By

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media