Patent ID: 7003507

Claim:
A program storage device, readable by a machine, tangibly embodying programming instructions to perform method steps for constructing a set of types occurring within a method, the programming instructions comprising: selecting a program P for constructing a call graph representation thereof; wherein the program P contains zero or more fields F F and at least two methods M M ; wherein each method M 1 in M M has a single body B; constructing for each method M in M M , a set of types S M of objects which occur therein; constructing for each field F in F F , a set of types S F of objects stored therein; identifying one or more allocation sites inside the body B of each of method M; determining a set of methods M′ that are directly called within the body B of each method M and propagating types from the set of types S M′ to the set of types S M and from of the set of types S M to the set of types S M′ ; determining a set of methods M″ that are virtually called within the body B of each method M and propagating types from the set of types S M″ to the set of types S M and from the set of types S M to the set of types S M″ ; determining a set of fields F that are read in the body B of each method M, and propagating types from the set of types S F to the set of types S M ; and written in the body B of each method M, and propagating types from the set of types S M to the set of types S F .