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.
- {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 Scholar
Digital Library
- {Age95} O. Agesen. The Cartesian product algorithm: simple and precise type inference of parametric polymorphism. In Proc. ECOOP. LNCS: 2--26, 1995. Springer. Google Scholar
Digital Library
- {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 Scholar
Digital Library
- {Antlr06} T. Parr. ANTLR: ANother Tool for Language Recognition, Ver 3.0. {http://www.antlr.org/}Google Scholar
- {ASU86} A. V Aho, R. Sethi and J. D. Ullman. Compilers: Principles, Techniques and Tools. Addison-Wesley, 1986. Google Scholar
Digital Library
- {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 Scholar
Digital Library
- {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 Scholar
Digital Library
- {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 Scholar
Digital Library
- {Car97} L. Cardelli. Type Systems. In A. B. Tucker Jr. (Eds.), The Computer Science and Engineering Handbook, pp. 2208--2236, 1997. CRC Press.Google Scholar
- {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 Scholar
Digital Library
- {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 Scholar
Digital Library
- {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 Scholar
Digital Library
- {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 Scholar
Digital Library
- {Gro98} D. Grove. Effective interprocedural optimization of object-oriented languages. PhD Thesis, University of Washington, 1998. Google Scholar
Digital Library
- {Muc97} S. Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann, 1997. Google Scholar
Digital Library
- {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 Scholar
Digital Library
- {Ple96} J. Plevyak. Optimization of object-oriented and concurrent programs. PhD Thesis, University of Illinois at Urbana-Champaign, 1996. Google Scholar
Digital Library
- {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 Scholar
Digital Library
- {Ran00} V. P. Ranganath. Object flow analysis for optimizing finite state models of Java. MS thesis, Kansas State University, 2000.Google Scholar
- {Ryd79} B. Ryder. Constructing the call graph of a program. IEEE Transactions on Software Engineering 5(3): 216--225, 1979.Google Scholar
Digital Library
- {SabCC98} É. Gagnon. SABLECC, An object-oriented compiler framework. MS Thesis. McGill University. March 1998. Google Scholar
Digital Library
- {Shi88} O. Shivers. Control flow analysis in scheme. In Proc. PLDI. ACM SIGPLAN Notices 23 (7): 164--174, June 1988. Google Scholar
Digital Library
- {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 Scholar
Digital Library
- {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 Scholar
Digital Library
- {Sri92} A. Srivastava. Unreachable procedures in object oriented programming. ACM Letters on Programming Languages and Systems 1: 355--364, Dec. 1992. Google Scholar
Digital Library
- {TP00} F. Tip and J. Palsberg. Scalable propagation based call graph construction algorithms. In Proc. OOPSLA. ACM SIGPLAN Notices 35: 281--293. 2000. Google Scholar
Digital Library
Index Terms
Precise static type analysis for object oriented programs
Recommendations
Static Type Analysis for Python
WISA '14: Proceedings of the 2014 11th Web Information System and Application ConferencePython is a kind of dynamic-typed language which provides flexibility but leaves the programmer without the benefits of static typing. This paper describes Type, a tool that works for static type annotation and inference for python. It could simulate ...
Improving precision of type analysis using non-discriminative union
This paper presents a new type analysis for logic programs. The analysis is performed with a priori type definitions; and type expressions are formed from a fixed alphabet of type constructors. Non-discriminative union is used to join type information ...






Comments