skip to main content
article

Precise static type analysis for object oriented programs

Authors Info & Claims
Published:01 February 2007Publication History
Skip Abstract Section

Abstract

A precise static type analysis is important to make available dynamic aspects of object-oriented programs (OOPs) approximately known at compile-time. Many techniques have been proposed for static type analysis depending upon the tradeoff of cost and precision; the techniques may generate spurious possible types for a particular dynamic dispatch which makes the static type analysis imprecise. In this paper, we propose a symbolic execution based type analysis technique that analyzes the dynamic type inter-procedurally by keeping the flow of the program in consideration. We analyze test cases with different class hierarchies. The proposed technique was capable to resolve the target method for most of the dynamic dispatches at reduced computational cost.

References

  1. {ACG01} B. Alpern, A. Cocchi, and D. Grove. Dynamic type checking in Jalapeño. In Proc. The Usenix Java Virtual Machine Research and Technology Symposium, pp. 41--52, April 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. {Age95} O. Agesen. The Cartesian product algorithm: simple and precise type inference of parametric polymorphism. In Proc. ECOOP. LNCS: 2--26, 1995. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. {AM95} M. Alt and F. Martin. Generation of efficient interprocedural analyzers with PAG. In Proc. Int. Symp. Static Analysis. LNCS 983: 33--50, Sep. 1995. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. {Antlr06} T. Parr. ANTLR: ANother Tool for Language Recognition, Ver 3.0. {http://www.antlr.org/}Google ScholarGoogle Scholar
  5. {ASU86} A. V Aho, R. Sethi and J. D. Ullman. Compilers: Principles, Techniques and Tools. Addison-Wesley, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. {Bac97} D.F. Bacon. Fast and effective optimization of object oriented languages. PhD Thesis, Report No. UCB/CSD-98-1017, University of California, Berkeley, Dec. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. {Ban00} J. C. Corbett, M. B. Dwyer, J. Hatcliff, S. Laubach, C. S. Pasareanu, Robby, and H. Zheng. Bandera: Extracting finite-state models from Java source code. In Proc. ICSE, pp. 439--448. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. {BS96} D. F. Bacon and P. F. Sweeney. Fast static analysis of C++ virtual function calls. In Proc. OOPSLA. ACM SIGPLAN Notices 31: 324--341, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. {Car97} L. Cardelli. Type Systems. In A. B. Tucker Jr. (Eds.), The Computer Science and Engineering Handbook, pp. 2208--2236, 1997. CRC Press.Google ScholarGoogle Scholar
  10. {CCHK90} D. Callahan, A. Carle, M. W. Hall, and K. Kennedy. Constructing the procedure call multigraph. IEEE Transactions on Software Engineering 16(4):483--487, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. {DC95} J. Dean and C. Chambers. Optimization of object oriented programs using static class hierarchy analysis. In Proc. ECOOP. LNCS 952: 77--101, 1995. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. {EGH94} M. Emami, R. Ghiya, and L. J. Hendren. Context-sensitive interprocedural points to analysis in the presence of function pointers. In Proc. PLDI. ACM SIGPLAN Notices 29 (6): 242--256, June 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. {GC01} D. Grove and C Chambers. A framework for call graph construction algorithms. ACM Transactions on Programming Languages and Systems 23 (6):685--746, Nov. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. {Gro98} D. Grove. Effective interprocedural optimization of object-oriented languages. PhD Thesis, University of Washington, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. {Muc97} S. Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. {PC94} J. Plevyak and A. A. Chien. Precise concrete type inference for object-oriented languages. In Proc. OOPSLA. SIGPLAN Notices 29: 324--340, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. {Ple96} J. Plevyak. Optimization of object-oriented and concurrent programs. PhD Thesis, University of Illinois at Urbana-Champaign, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. {QH04} F. Qian and L. Hendren. Towards dynamic interprocedural analysis in JVMs. In Proc. Usenix 3rd Virtual Machine Research and Technology Symposium (VM-04), May 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. {Ran00} V. P. Ranganath. Object flow analysis for optimizing finite state models of Java. MS thesis, Kansas State University, 2000.Google ScholarGoogle Scholar
  20. {Ryd79} B. Ryder. Constructing the call graph of a program. IEEE Transactions on Software Engineering 5(3): 216--225, 1979.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. {SabCC98} É. Gagnon. SABLECC, An object-oriented compiler framework. MS Thesis. McGill University. March 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. {Shi88} O. Shivers. Control flow analysis in scheme. In Proc. PLDI. ACM SIGPLAN Notices 23 (7): 164--174, June 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. {Shi91} O. Shivers. Control-flow analysis of higher-order languages. Ph.D. thesis, Tech. Rep. CMUCS-91-145, Carnegie Mellon Univ., Pittsburgh, PA, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. {SHR+00} V. Sundaresan, L. Hendren, C. Razafimahefa, R. Vallee-Rai, P. Lam, E Gagnon, and C. Godin. Practical virtual method calls resolution for Java. In Proc. OOPSLA. ACM SIGPLAN Notices 35: 264--280, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. {Sri92} A. Srivastava. Unreachable procedures in object oriented programming. ACM Letters on Programming Languages and Systems 1: 355--364, Dec. 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. {TP00} F. Tip and J. Palsberg. Scalable propagation based call graph construction algorithms. In Proc. OOPSLA. ACM SIGPLAN Notices 35: 281--293. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Precise static type analysis for object oriented programs

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!