harpoon.Analysis.Quads
Class CallGraphImpl2

java.lang.Object
  |
  +--harpoon.Analysis.Quads.CallGraphImpl2
All Implemented Interfaces:
CallGraph

public class CallGraphImpl2
extends Object
implements CallGraph

CallGraphImpl2 constructs a simple directed call graph. This version pays closer attention to types for a more precise result. To quantify this a bit, the standard CallGraphImpl yields a 510-node call graph on the "Hello, World" program, compared to the 370-node graph that CallGraphImpl2 gives you.

CallGraphImpl2 only works on SSI form.

Version:
$Id: CallGraphImpl2.java,v 1.3 2002/02/26 22:41:41 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
CallGraphImpl2(ClassHierarchy ch, HCodeFactory hcf)
          Creates a CallGraph using the specified ClassHierarchy.
 
Method Summary
 Set callableMethods()
          Returns the set of all the methods that can be called in the execution of the program.
 HMethod[] calls(CALL cs, ReachingDefs rd, ExactTypeMap etm)
          Return a list of all possible methods called by this method at a particular call site.
 HMethod[] calls(HMethod m)
          Return a list of all possible methods called by this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallGraphImpl2

public CallGraphImpl2(ClassHierarchy ch,
                      HCodeFactory hcf)
Creates a CallGraph using the specified ClassHierarchy. hcf must be a code factory that generates quad-ssi form.

Method Detail

calls

public HMethod[] calls(HMethod m)
Return a list of all possible methods called by this method.

Specified by:
calls in interface CallGraph

calls

public HMethod[] calls(CALL cs,
                       ReachingDefs rd,
                       ExactTypeMap etm)
Return a list of all possible methods called by this method at a particular call site.


callableMethods

public Set callableMethods()
Returns the set of all the methods that can be called in the execution of the program.