Heap reference analysis using access graphs
2007, ACM Transactions on Programming Languages and Systems
https://doi.org/10.1145/1290520.1290521Abstract
Despite significant progress in the theory and practice of program analysis, analyzing properties of heap data has not reached the same level of maturity as the analysis of static and stack data. The spatial and temporal structure of stack and static data is well understood while that of heap data seems arbitrary and is unbounded. We devise bounded representations that summarize properties of the heap data. This summarization is based on the structure of the program that manipulates the heap. The resulting summary representations are certain kinds of graphs called access graphs . The boundedness of these representations and the monotonicity of the operations to manipulate them make it possible to compute them through data flow analysis. An important application that benefits from heap reference analysis is garbage collection, where currently liveness is conservatively approximated by reachability from program variables. As a consequence, current garbage collectors leave a lot of gar...
References (41)
- AGESEN, O., DETLEFS, D., AND MOSS, J. E. 1998. Garbage collection and local variable type-precision and liveness in Java virtual machines. In PLDI '98: Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation. ACM Press, New York, NY, USA, 269-279.
- AHO, A. V., SETHI, R., AND ULLMAN, J. D. 1986. Compilers -Principles, Techniques, and Tools. Addison- Wesley.
- BLANCHET, B. 1999. Escape analysis for object-oriented languages: application to Java. In OOPSLA '99: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications. ACM Press, New York, NY, USA, 20-34.
- BLANCHET, B. 2003. Escape analysis for Java T M : Theory and practice. ACM Transactions on Programming Languages and Systems 25, 6, 713-775.
- BOEHM, H. An artificial garbage collection benchmark. http://www.hpl.hp.com/personal/Hans_Boehm/ gc/gc_bench.html.
- CANNAROZZI, D. J., PLEZBERT, M. P., AND CYTRON, R. K. 2000. Contaminated garbage collection. In PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementa- tion. ACM Press, New York, NY, USA, 264-273.
- CARLISLE, M. C. 1996. Olden: Parallelizing programs with dynamic data structures on distributed-memory machines. Ph.D. thesis, Princeton University.
- CHASE, D. R., WEGMAN, M., AND ZADECK, F. K. 1990. Analysis of pointers and structures. In PLDI '90: Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation. ACM Press, New York, NY, USA, 296-310.
- CHENG, B.-C. AND HWU, W.-M. W. 2000. Modular interprocedural pointer analysis using access paths: de- sign, implementation, and evaluation. In PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation. ACM Press, New York, NY, USA, 57-69.
- CHEREM, S. AND RUGINA, R. 2006. Compile-time deallocation of individual objects. In ISMM '06: Proceedings of the 2006 international symposium on Memory management. ACM Press, New York, NY, USA, 138-149.
- CHOI, J.-D., BURKE, M., AND CARINI, P. 1993. Efficient flow-sensitive interprocedural computation of pointer- induced aliases and side effects. In POPL '93: Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages. ACM Press, New York, NY, USA, 232-245.
- CHOI, J.-D., GUPTA, M., SERRANO, M., SREEDHAR, V. C., AND MIDKIFF, S. 1999. Escape analysis for Java. In OOPSLA '99: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications. ACM Press, New York, NY, USA, 1-19.
- GADBOIS, D., FITERMAN, C., CHASE, D., SHAPIRO, M., NILSEN, K., HAAHR, P., BARNES, N., AND PIRI- NEN, P. P. The GC FAQ. http://www.iecc.com/gclist/GC-faq.html.
- GUYER, S. Z., MCKINLEY, K. S., AND FRAMPTON, D. 2006. Free-me: a static analysis for automatic individ- ual object reclamation. In PLDI '06: Proceedings of the 2006 ACM SIGPLAN conference on Programming language design and implementation. ACM Press, New York, NY, USA, 364-375.
- HACKETT, B. AND RUGINA, R. 2005. Region-based shape analysis with tracked locations. In POPL '05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages. ACM Press, New York, NY, USA, 310-323.
- HALLENBERG, N., ELSMAN, M., AND TOFTE, M. 2002. Combining region inference and garbage collection. In PLDI '02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation. ACM Press, New York, NY, USA, 141-152.
- HECHT, M. S. 1977. Flow Analysis of Computer Programs. Elsevier North-Holland Inc.
- HIND, M., BURKE, M., CARINI, P., AND CHOI, J.-D. 1999. Interprocedural pointer alias analysis. ACM Transactions on Programming Languages and Systems 21, 4, 848-894.
- HIRZEL, M., DIWAN, A., AND HENKEL, J. 2002. On the usefulness of type and liveness accuracy for garbage collection and leak detection. ACM Transactions on Programming Languages and Systems 24, 6, 593-624.
- HIRZEL, M., HENKEL, J., DIWAN, A., AND HIND, M. 2002. Understanding the connectivity of heap objects. In ISMM '02: Proceedings of the 3rd international symposium on Memory management. ACM Press, New York, NY, USA, 36-49.
- HORWITZ, S., PFEIFFER, P., AND REPS, T. 1989. Dependence analysis for pointer variables. In PLDI '89: Proceedings of the ACM SIGPLAN 1989 Conference on Programming language design and implementation. ACM Press, New York, NY, USA, 28-40.
- IYER, P. C. 2005. PVS based proofs of safety properties of access graph operations. http://www.cse.iitb. ac.in/ ~uday/hraResources/AGSafety.html.
- JONES, N. D. AND MUCHNICK, S. S. 1979. Flow analysis and optimization of lisp-like structures. In POPL '79: Proceedings of the 6th ACM SIGACT-SIGPLAN symposium on Principles of programming languages. ACM Press, New York, NY, USA, 244-256.
- JONES, N. D. AND MUCHNICK, S. S. 1982. A flexible approach to interprocedural data flow analysis and programs with recursive data structures. In POPL '82: Proceedings of the 9th ACM SIGPLAN-SIGACT sym- posium on Principles of programming languages. ACM Press, New York, NY, USA, 66-74.
- KARKARE, A. 2005. XSB-Prolog based prototype implementation of heap reference analysis. http://www. cse.iitb.ac.in/ ~uday/hraResources/hraPrototpye.html.
- KARKARE, A., KHEDKER, U., AND SANYAL, A. 2007. Liveness of heap data for functional programs. In HAV 2007: Heap Analysis and Verification Workshop. 64-80. http://research.microsoft.com/ ~jjb/ papers/HAV_proceedings.pdf.
- KARKARE, A., SANYAL, A., AND KHEDKER, U. 2007. Heap reference analysis for functional programs. (In preparation).
- KARKARE, B. 2007. Complexity and efficiency issues in data flow analysis. Ph.D. thesis, Department of Com- puter Science and Engineering, Indian Institute of Technology, Bombay. (Submitted).
- KHEDKER, U. P. 2002. Data flow analysis. In Compiler Design Handbook: Optimizations and Machine Code Generation, Y. N. Srikant and P. Shankar, Eds. CRC Press, Inc., Boca Raton, FL, USA.
- KHEDKER, U. P., DHAMDHERE, D. M., AND MYCROFT, A. 2003. Bidirectional data flow analysis for type inferencing. Computer Languages, Systems and Structures 29, 1-2, 15-44.
- LARUS, J. R. AND HILFINGER, P. N. 1988. Detecting conflicts between structure accesses. In PLDI '88: Proceedings of the ACM SIGPLAN 1988 conference on Programming Language design and Implementation. ACM Press, New York, NY, USA, 24-31.
- MCDOWELL, C. E. 1998. Reducing garbage in java. SIGPLAN Notices 33, 9, 84-86.
- REID, A., MCCORQUODALE, J., BAKER, J., HSIEH, W., AND ZACHARY, J. 1999. The need for predictable garbage collection. In Proceedings of the ACM SIGPLAN Workshop on Compiler Support for System Software (WCSSS'99).
- SAGIV, M., REPS, T., AND WILHELM, R. 2002. Shape analysis and applications. In Compiler Design Handbook: Optimizations and Machine Code Generation, Y. N. Srikant and P. Shankar, Eds. CRC Press, Inc, Boca Raton, FL, USA.
- SHAHAM, R., KOLODNER, E. K., AND SAGIV, M. 2000. On effectiveness of gc in java. In ISMM '00: Pro- ceedings of the 2nd international symposium on Memory management. ACM Press, New York, NY, USA, 12-17.
- SHAHAM, R., KOLODNER, E. K., AND SAGIV, M. 2001. Heap profiling for space-efficient java. In PLDI '01: Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation. ACM Press, New York, NY, USA, 104-113.
- SHAHAM, R., KOLODNER, E. K., AND SAGIV, M. 2002. Estimating the impact of heap liveness information on space consumption in Java. In ISMM '02: Proceedings of the 3rd international symposium on Memory management. ACM Press, New York, NY, USA, 64-75.
- SHAHAM, R., YAHAV, E., KOLODNER, E. K., AND SAGIV, S. 2003. Establishing local temporal heap safety properties with applications to compile-time memory management. In SAS '03: Proceedings of the 10th International Symposium on Static Analysis. Springer-Verlag, London, UK, 483-503.
- TOFTE, M. AND BIRKEDAL, L. 1998. A region inference algorithm. ACM Transactions on Programming Languages and Systems 20, 4, 724-767.
- VALL ÉE-RAI, R., HENDREN, L., SUNDARESAN, V., LAM, P., GAGNON, E., AND CO, P. 1999. Soot -a java optimization framework. In Proceedings of CASCON 1999. 125-135.
- WILSON, R. P. AND LAM, M. S. 1995. Efficient, context-sensitive pointer analysis for C programs. In PLDI '95: Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation. ACM Press, New York, NY, USA, 1-12.