Exception analysis and points-to analysis
Authors:
Open Access
- 19 July 2009
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1-12
Abstract
Exception analysis and points-to analysis are typically done in complete separation. Past algorithms for precise exception analysis (e.g., pairing throw clauses with catch statements) use pre-computed points-to information. Past points-to analyses either unsoundly ignore exceptions, or conservatively compute a crude approximation of exception throwing (e.g., considering an exception throw as an assignment to a global variable, accessible from any catch clause). We show that this separation results in significant slowdowns or vast imprecision. The two kinds of analyses are interdependent: neither can be performed accurately without the other. The interdependency leads us to propose a joint handling for performance and precision. We show that our exception analysis is expressible highly elegantly in a declarative form, and can apply to points-to analyses of varying precision. In fact, our specification of exception analysis is "fully precise", as it models closely the Java exception handling semantics. The necessary approximation is provided only through whichever abstractions are used for contexts and objects in the base points-to analysis. Our combined approach achieves similar precision relative to exceptions (exception-catch links) as the best past precise exception analysis, with a runtime of seconds instead of tens of minutes. At the same time, our analysis achieves much higher precision of points-to information (an average of half as many values for each reachable variable for most of the DaCapo benchmarks) than points-to analyses that treat exceptions conservatively, all at a fraction of the execution time.Keywords
This publication has 20 references indexed in Scilit:
- Evaluating the benefits of context-sensitive points-to analysis using a BDD-based implementationACM Transactions on Software Engineering and Methodology, 2008
- codeQuest: Scalable Source Code Queries with Datalog2006
- Using Datalog with Binary Decision Diagrams for Program Analysis2005
- Cloning-based context-sensitive pointer alias analysis using binary decision diagrams2004
- An uncaught exception analysis for JavaJournal of Systems and Software, 2004
- Static analysis to support the evolution of exception structure in object-oriented systemsACM Transactions on Software Engineering and Methodology, 2003
- Complexity of points-to analysis of Java in the presence of exceptionsIEEE Transactions on Software Engineering, 2001
- Analysis and testing of programs with exception handling constructsIEEE Transactions on Software Engineering, 2000
- Type-based analysis of uncaught exceptionsACM Transactions on Programming Languages and Systems, 2000
- Efficient and precise modeling of exceptions for the analysis of Java programsACM SIGSOFT Software Engineering Notes, 1999