Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Strictly declarative specification of sophisticated points-to analyses

Published: 25 October 2009 Publication History

Abstract

We present the DOOP framework for points-to analysis of Java programs. DOOP builds on the idea of specifying pointer analysis algorithms declaratively, using Datalog: a logic-based language for defining (recursive) relations. We carry the declarative approach further than past work by describing the full end-to-end analysis in Datalog and optimizing aggressively using a novel technique specifically targeting highly recursive Datalog programs.
As a result, DOOP achieves several benefits, including full order-of-magnitude improvements in runtime. We compare DOOP with Lhotak and Hendren's PADDLE, which defines the state of the art for context-sensitive analyses. For the exact same logical points-to definitions (and, consequently, identical precision) DOOP is more than 15x faster than PADDLE for a 1-call-site sensitive analysis of the DaCapo benchmarks, with lower but still substantial speedups for other important analyses. Additionally, DOOP scales to very precise analyses that are impossible with PADDLE and Whaley et al.'s bddbddb, directly addressing open problems in past literature. Finally, our implementation is modular and can be easily configured to analyses with a wide range of characteristics, largely due to its declarativeness.

References

[1]
W. C. Benton and C. N. Fischer. Interactive, scalable, declarative program analysis: from prototype to implementation. In PPDP '07: Proc. of the 9th ACM SIGPLAN int. conf. on Principles and practice of declarative programming, pages 13--24, New York, NY, USA, 2007. ACM.
[2]
M. Berndl, O. Lhotak, F. Qian, L. J. Hendren, and N. Umanee. Points-to analysis using bdds. In PLDI, pages 103--114. ACM, 2003.
[3]
M. Bravenboer and Y. Smaragdakis. Exception analysis and points-to analysis: Better together. In L. Dillon, editor, ISSTA '09: Proceedings of the 2009 International Symposium on Software Testing and Analysis, New York, NY, USA, July 2009. To appear.
[4]
S. Dawson, C. R. Ramakrishnan, and D. S. Warren. Practical program analysis using general purpose logic programming systems--a case study. In PLDI '96: Proc. of the ACM SIGPLAN 1996 conf. on Programming language design and implementation, pages 117--126, New York, NY, USA, 1996. ACM.
[5]
S. K. Debray. Unfold/fold transformations and loop optimization of logic programs. In PLDI '88: Proc. of the ACM SIGPLAN 1988 conf. on Programming Language design and Implementation, pages 297--307, New York, NY, USA, 1988. ACM.
[6]
M. Eichberg, S. Kloppenburg, K. Klose, and M. Mezini. Defining and continuous checking of structural program dependencies. In ICSE '08: Proc. of the 30th int. conf. on Software engineering, pages 391--400, New York, NY, USA, 2008. ACM
[7]
S. J. Fink. T.J. Watson libraries for analysis (WALA). http://wala.sourceforge.net.
[8]
A. Gupta, I. S. Mumick, and V. S. Subrahmanian. Maintaining views incrementally. In SIGMOD '93: Proc. of the 1993 ACM SIGMOD int. conf. on Management of data, pages 157--166, New York, NY, USA, 1993. ACM.
[9]
E. Hajiyev, M. Verbaere, and O. de Moor. Codequest: Scalable source code queries with datalog. In Proc. European Conf. on Object-Oriented Programming (ECOOP), pages 2--27. Spinger, 2006.
[10]
B. Hardekopf and C. Lin. The ant and the grasshopper: fast and accurate pointer analysis for millions of lines of code. In PLDI'07: Proc. ACM SIGPLAN conf. on Programming Language Design and Implementation, pages 290--299, New York, NY, USA, 2007. ACM.
[11]
B. Hardekopf and C. Lin. Semi-sparse flow-sensitive pointer analysis. In POPL '09: Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 226--238, New York, NY, USA, 2009. ACM.
[12]
N. Heintze and O. Tardieu. Demand-driven pointer analysis. In PLDI '01: Proc. of the ACM SIGPLAN 2001 conf. on Programming language design and implementation, pages 24--34, New York, NY, USA, 2001. ACM.
[13]
M. S. Lam, J. Whaley, V. B. Livshits, M. C. Martin, D. Avots, M. Carbin, and C. Unkel. Context-sensitive program analysis as database queries. In PODS '05: Proc. of the twenty-fourth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pages 1--12, New York, NY, USA, 2005. ACM.
[14]
C. Lattner, A. Lenharth, and V. Adve. Making context-sensitive points-to analysis with heap cloning practical for the real world. SIGPLAN Not., 42(6):278--289, 2007.
[15]
O. Lhotak. Program Analysis using Binary Decision Diagrams. PhD thesis, McGill University, Jan. 2006.
[16]
O. Lhotak and L. Hendren. Scaling Java points-to analysis using Spark. In G. Hedin, editor, Compiler Construction, 12th Int. Conf., volume 2622 of LNCS, pages 153--169, Warsaw, Poland, April 2003. Springer.
[17]
O. Lhotak and L. Hendren. Jedd: a bdd-based relational extension of java. In PLDI '04: Proc. of the ACM SIGPLAN 2004 conf. on Programming language design and implementation, pages 158--169, New York, NY, USA, 2004. ACM.
[18]
O. Lhotak and L. Hendren. Evaluating the benefits of context-sensitive points-to analysis using a BDD-based implementation. ACM Trans. Softw. Eng. Methodol., 18(1):1--53, 2008.
[19]
B. Livshits, J. Whaley, and M. S. Lam. Reflection analysis for Java. In K. Yi, editor, Proceedings of the 3rd Asian Symposium on Programming Languages and Systems, volume 3780. Springer-Verlag, Nov. 2005.
[20]
A. Milanova, A. Rountev, and B. G. Ryder. Parameterized object sensitivity for points-to analysis for java. ACM Trans. Softw. Eng. Methodol., 14(1):1--41, 2005.
[21]
M. Naik, A. Aiken, and J. Whaley. Effective static race detection for java. In Proceedings of the 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'06), pages 308--319, 2006.
[22]
E. M. Nystrom, H.-S. Kim, and W. mei W. Hwu. Importance of heap specialization in pointer analysis. In PASTE '04: Proc. of the 5th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering, pages 43--48, New York, NY, USA, 2004. ACM.
[23]
T. Reps. Demand interprocedural program analysis using logic databases. In R. Ramakrishnan, editor, Applications of Logic Databases, pages 163--196. Kluwer Academic Publishers, 1994.
[24]
T. W. Reps. Solving demand versions of interprocedural analysis problems. In CC '94: Proc. of the 5th Int. Conf. on Compiler Construction, pages 389--403, London, UK, 1994. Springer-Verlag.
[25]
D. Saha and C. R. Ramakrishnan. Incremental and demand-driven points-to analysis using logic programming. In PPDP '05: Proc. of the 7th ACM SIGPLAN int. conf. on Principles and practice of declarative programming, pages 117--128, New York, NY, USA, 2005. ACM.
[26]
M. Sridharan and R. Bodik. Refinement-based context-sensitive points-to analysis for java. In PLDI '06: Proc. of the 2006 ACM SIGPLAN conf. on Programming language design and implementation, pages 387--400, New York, NY, USA, 2006. ACM.
[27]
M. Sridharan, D. Gopan, L. Shan, and R. Bodć1k. Demand-driven points-to analysis for java. In OOPSLA '05: Proc. of the 20th annual ACM SIGPLAN conf. on Object oriented programming, systems, languages, and applications, pages 59--76, New York, NY, USA, 2005. ACM.
[28]
J. Whaley, D. Avots, M. Carbin, and M. S. Lam. Using datalog with binary decision diagrams for program analysis. In K. Yi, editor, APLAS, volume 3780 of Lecture Notes in Computer Science, pages 97--118. Springer, 2005.
[29]
J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In PLDI '04: Proc. of the ACM SIGPLAN 2004 conf. on Programming language design and implementation, pages 131--144, New York, NY, USA, 2004. ACM.
[30]
G. Xu and A. Rountev. Merging equivalent contexts for scalable heap-cloning-based context-sensitive points-to analysis. In ISSTA '08: Proc. of the 2008 int. symposium on Software testing and analysis, pages 225--236, New York, NY, USA, 2008. ACM.
[31]
X. Zheng and R. Rugina. Demand-driven alias analysis for c. In POPL '08: Proc. of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 197--208, New York, NY, USA, 2008. ACM.

Cited By

View all
  • (2024)Making Formulog Fast: An Argument for Unconventional Datalog EvaluationProceedings of the ACM on Programming Languages10.1145/36897548:OOPSLA2(1219-1248)Online publication date: 8-Oct-2024
  • (2024)Flan: An Expressive and Efficient Datalog Compiler for Program AnalysisProceedings of the ACM on Programming Languages10.1145/36329288:POPL(2577-2609)Online publication date: 5-Jan-2024
  • (2024)On-the-Fly Static Analysis via Dynamic Bidirected Dyck ReachabilityProceedings of the ACM on Programming Languages10.1145/36328848:POPL(1239-1268)Online publication date: 5-Jan-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 44, Issue 10
OOPSLA '09
October 2009
554 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/1639949
Issue’s Table of Contents
  • cover image ACM Conferences
    OOPSLA '09: Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
    October 2009
    590 pages
    ISBN:9781605587660
    DOI:10.1145/1640089
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 25 October 2009
Published in SIGPLAN Volume 44, Issue 10

Check for updates

Author Tags

  1. DOOP
  2. bdds
  3. datalog
  4. declarative
  5. points-to analysis

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)132
  • Downloads (Last 6 weeks)16
Reflects downloads up to 04 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Making Formulog Fast: An Argument for Unconventional Datalog EvaluationProceedings of the ACM on Programming Languages10.1145/36897548:OOPSLA2(1219-1248)Online publication date: 8-Oct-2024
  • (2024)Flan: An Expressive and Efficient Datalog Compiler for Program AnalysisProceedings of the ACM on Programming Languages10.1145/36329288:POPL(2577-2609)Online publication date: 5-Jan-2024
  • (2024)On-the-Fly Static Analysis via Dynamic Bidirected Dyck ReachabilityProceedings of the ACM on Programming Languages10.1145/36328848:POPL(1239-1268)Online publication date: 5-Jan-2024
  • (2024)Towards Inter-Service Data Flow Analysis of Serverless Applications2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER60148.2024.00072(654-658)Online publication date: 12-Mar-2024
  • (2024)SerdeSniffer: Enhancing Java Deserialization Vulnerability Detection with Function SummariesComputer Security – ESORICS 202410.1007/978-3-031-70896-1_9(174-193)Online publication date: 6-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)Program Repair Guided by Datalog-Defined Static AnalysisProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616363(1216-1228)Online publication date: 30-Nov-2023
  • (2023)ECSTATIC: Automatic Configuration-Aware Testing and Debugging of Static Analysis ToolsProceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3597926.3604918(1479-1482)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)From SMT to ASP: Solver-Based Approaches to Solving Datalog Synthesis-as-Rule-Selection ProblemsProceedings of the ACM on Programming Languages10.1145/35712007:POPL(185-217)Online publication date: 11-Jan-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