Specialized 3-Valued Logic Shape Analysis Using Structure-Based Refinement and Loose Embedding
We consider a shape analysis framework based on 3-valued logic, and explore ways for improving its performance and scalability by means of reducing algorithmic overhead and restraining abstract state set inflation. First we propose a new approach to implementing a fast 3-valued logic analyzer, which replaces a general-purpose abstract heap refinement mechanism—accounting for most of the time spent by the reference implementation—with tailored structure-based refinement. We apply our framework to analyze a set of small Java programs manipulating singly- and doubly-linked lists, obtaining results that are comparable to those of the reference implementation, with a process 40-85 times faster and 2-11 times less memory consuming. We then propose a new definition for partial ordering of abstract heap descriptors (embedding), that trims abstract states representing “special cases” in the presence of a state representing a “general case”. This extension deflates sets of abstract states by a combinatorial factor, resulting in 45-55% less structures for the same set of benchmarks. Despite its induced algorithmic overhead per operation, this modification further cuts the analysis time by 17-50%. We argue that improving on these two axes together yields a promise for greater applicability of specialized shape analysis to real-life programs.
KeywordsReference Implementation Unary Predicate Strict Partial Order Summary Node Concrete Node
Unable to display preview. Download preview PDF.
- 1.Arnold, G.: Lightweight specialized 3-valued logic shape analyzer. Technical Report UCB/EECS-2006-59, EECS Department, University of California, Berkeley (May 2006), available at: http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-59.html
- 2.Arnold, G., Manevich, R., Sagiv, M., Shaham, R.: Intersecting heap abstractions with applications to compile-time memory management. Technical Report TR-2005-04-135520, Tel-Aviv University (April 2005), available at: http://www.cs.tau.ac.il/~rumster/TR-2005-04-135520.pdf
- 4.Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: Symposium on Principals of Programming Languages (POPL), pp. 269–282. ACM Press, New York (1979)Google Scholar
- 5.Lahiri, S.K., Qadeer, S.: Verifying properties of well-founded linked lists. In: Symposium on Principals of Programming Languages (POPL), pp. 115–126 (2006)Google Scholar
- 7.Lev-Ami, T.: TVLA: A framework for kleene logic based static analysis. Master’s thesis, Tel-Aviv University (May 2000)Google Scholar
- 8.Lev-Ami, T., Reps, T.W., Sagiv, M., Wilhelm, R.: Putting static analysis to work for verification: A case study. In: International Symposium on Software Testing and Analysis (ISSTA), pp. 26–38 (2000)Google Scholar