Precise static analysis for generic programs in object oriented languages
Surender Kumar, Rajeev Kumar · ACM SIGSOFT Software Engineering Notes · 2012
Genericity enriched with multiple data types and classes is becoming a common feature of object oriented languages. Therefore, static analysis of such generic programs is gaining importance. Unfortunately such work does not exist. In this work, we statically analyse such generic programs for approximating the possible dynamic (run-time) types of objects. We propose a single pass technique for analyzing the generic programs inter-procedurally statement-wise following the control flow of the execution. The technique is able to resolve the covariance, contravariance and invariance relationship existing amongst different instances with type parameters as arguments to a class. We assess the performance of the proposed technique by carrying out experiments on a set of standard benchmark programs