A Modular Pointer Analysis using Function Summaries

함수 요약을 이용한 모듈단위 포인터분석

  • 박상운 (한국과학기술원 전자전산학과) ;
  • 강현구 (한국과학기술원 전산학과) ;
  • 한태숙 (한국과학기술원 전자전산학과)
  • Published : 2008.10.15

Abstract

In this paper, we present a modular pointer analysis algorithm based on the update history. We use the term 'module' to mean a set of mutually recursive procedures and the term 'modular analysis' to mean a program analysis that does not need the source codes of the other modules to analyze a module. Since a modular pointer analysis does not utilize any information on the callers, it is difficult to design a precise analysis that does not lose the information related to the program flow or the calling context. In this paper, we propose a modular and flow- and context-sensitive pointer analysis algorithm based on the update history that can memory states of a procedure independently of the information on the calling context and keep the information on the order of side effects performed. Such a memory representation not only enables the analysis to be formalized as a modular analysis, but also helps the analysis to effectively identify killed side effects and relevant alias contexts.

본 논문에서는 업데이트 기록에 기반한 모듈단위 포인터 분석 알고리즘을 제안한다. 여기서 모듈이란 상호 재귀적인 함수들의 집합을 의미하며, 모듈단위 분석이란 한 모듈을 분석 시에 다른 모듈의 소스코드가 필요하지 않는 분석을 의미한다. 일반적으로 이러한 형태의 분석은 분석 대상 모듈의 호출 문맥을 알 수 없는 상태에서 분석을 수행하여야 하기 때문에, 프로그램의 흐름 또는 호출 문맥에 관련하여 분석의 정확도를 잃을 수 있다. 본 논문에서는 업데이트 기록이라 이름지어진 모듈단위 분석 공간을 고안하여, 프로그램 문맥과 흐름에 민감한 정확도를 가지는 모듈단위 포인터 분석 방법을 제안한다. 업데이트 기록은 함수의 호출 문맥에 독립적으로 메모리 상태를 요약할 수 있을 뿐만 아니라, 메모리 반응이 일어난 순서에 관한 정보를 유지할 수 있다. 업데이트 기록의 이러한 특성은 모듈단위 분석을 정형화하는데 효과적으로 사용되었을 뿐만 아니라, 분석의 정확도를 높이기 위해 죽은 메모리 반응 또는 관련된 별칭 문맥을 구분하는 데에도 효과적으로 사용될 수 있었다.

Keywords

References

  1. D. R. Chase, M. Wegman, F. K. Zadeck, Analysis of pointers and structures, in: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 1990, pp. 296- 310
  2. W. Landi, B. G. Ryder, A safe approximate algorithm for interprocedural pointer aliasing, in: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 1992, pp. 235-248
  3. A. Deutsch, Interprocedural may-alias analysis for pointers: Beyond k-limiting, in: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 1994, pp. 230-241
  4. M. Hind, M. Burke, P. Carini, J.-D. Choi, Interprocedural pointer alias analysis, ACM Transactions on Programming Language and Systems (1999) 848-894
  5. M. Emami, R. Ghiya, L. J. Hendren, Context- sensitive interprocedural points-to analysis in the presence of function pointers, in: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 1994, pp. 242-256
  6. R. P. Wilson, M. S. Lam, Efficient context-sensitive pointer analysis for C programs, in: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 1995, pp. 1-12
  7. R. P. Wilson, Efficient, context-sensitive pointer analysis for c programs, Ph.D. thesis, Stanford University (Dec. 1997)
  8. M. Sagiv, T. Reps, R. Wilhelm, Parametric shape analysis via 3-valued logic, ACM Transactions on Programming Language and Systems (2002) 217-298
  9. J. Zhu, Towards scalable flow and context sensitive pointer analysis, in: Proceedings of ACM Design Automation Conference, 2005, pp. 831-836
  10. N. Rinetzky, M. Sagiv, E. Yahav, Interprocedural shape analysis for cutpoint-free programs, in: C. Hankin, I. Siveroni (Eds.), SAS, Vol. 3672 of Lecture Notes in Computer Science, Springer, 2005, pp. 284-302
  11. N. Rinetzky, J. Bauer, T. W. Reps, S. Sagiv, R. Wilhelm, A semantics for procedure local heaps and its abstractions, in: J. Palsberg, M. Abadi (Eds.), POPL, ACM, 2005, pp. 296-309
  12. A. Gotsman, J. Berdine, B. Cook, Interprocedural shape analysis with separated heap abstractions, in: K. Yi (Ed.), SAS, Vol. 4134 of Lecture Notes in Computer Science, Springer, 2006, pp. 240-260
  13. D. Distefano, P. W. O'Hearn, H. Yang, A local shape analysis based on separation logic, in: H. Hermanns, J. Palsberg (Eds.), TACAS, Vol. 3920 of Lecture Notes in Computer Science, Springer, 2006, pp. 287-302
  14. M. Fähndrich, J.Rehof, M. Das, Scalable context- sensitive flow analysis using instantiation constraints, in: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 2000, pp. 253-263
  15. J. S. Foster, M. Fähndrich, A. Aiken, Polymorphic versus monomorphic flow-insensitive points-to analysis for C, in: Proceedings of the Annual International Static Analysis Symposium, 2000, pp. 175-198
  16. B.-C. Cheng, W. mei W. Hwu, Modular interprocedural pointer analysis using access paths: Design, implementation, and evaluation, in: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 2000, pp. 57-69
  17. E. Ruf, Effective synchronization removal for java, in: Proceedings of the ACM SIGPLAN Conferenceon Programming Language Design and Implementation, 2000, pp. 208-218
  18. N. Heintze, O. Tardieu, Ultra-fast aliasing analysis using CLA: A million lines of C code in a second, in: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 2001, pp. 254-263
  19. A. Rountev, B. G. Ryder, Points-to and side-effect analyses for programs built with precompiled libraries, in: Proceedings of International Conference on Compiler Construction, 2002, pp. 20-36
  20. M. J. Harrold, G. Rothermel, Separate computation of alias information for reuse, IEEE Transactions on Software Engineering (1996) 442-460
  21. A. Rountev, B. G. Ryder, W. Landi, Data-flow analysis of program fragments, in: ACM SIGPLAN-SIGSOFT Symposium on the Foundations of Software Engineering, 1999, pp. 235-252
  22. J. Whaley, M. C. Rinard, Compositional pointer and escape analysis for java programs, in: OOPSLA, 1999, pp. 187-206
  23. R. Chatterjee, B. G. Ryder, W. A. Landi, Relevant context inference, in: Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1999, pp. 133-146
  24. M. Buss, D. Brand, V. C. Sreedhar, S. A. Edwards, Flexible pointer analysis using assign-fetch graphs, in Proceedings of the ACM Symposium on Applied Computing, 2008, pp. 234-239
  25. C. Calcagno, D. Distefano, P. W. O'Hearn, H. Yang, Footprint Analysis, in: Proceedings of Static Analysis Symposium, 2007, 402-418
  26. P. Cousot, R. Cousot, Abstract interpretation frameworks, Journal of Logic and Computation 2 (4) (1992) 511-547 https://doi.org/10.1093/logcom/2.4.511
  27. G. C. Necula, S. McPeak, S. P. Rahul, W. Weimer, CIL: Intermediate languages and tools for analysis and transformation of C programs, in: Proceedings of International Conference on Compiler Construction, 2002, pp. 213-228
  28. H.-G. Kang, Y. Kim, T. Han, H. Han, A path sensitive type system for resource usage verification of C like languages, in: K. Yi (Ed.), APLAS, Vol. 3780 of Lecture Notes in Computer Science, Springer, 2005, pp. 264-280