1. For generating Call Graph, Reachability analysis takes minimal details such as name of possible nodes or program methods and ignore other necessary details which is helps to make call graph more precise i.e. type of methods, parameters, return elements etc.
Step 1: All the entry point for the algorithm including main method are defined as reachable methods or possible nodes.
Step 2: X.m( ) in Reachables and for each call site x.n( ) where x.n( ) is an expression of type T inside method body X.m( ):
if any Z declares n( ) such that name( Y.n( ) )=name( Z.n( ) )
Ø Z.n( ) Reachables
Ø ( Z.m( ),Z.n( ) ) Edges
Step 3: Step 2 iteration until it extend to an impasse where no alternation found on reachable
No comments:
Post a Comment