harpoon.Analysis.Quads
Class CallGraphImpl

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

public class CallGraphImpl
extends Object
implements CallGraph

CallGraphImpl constructs a simple directed call graph. This is the most conservative implementation of CallGraph.

Version:
$Id: CallGraphImpl.java,v 1.4 2002/04/02 23:59:00 salcianu Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
CallGraphImpl(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(HMethod m)
          Return a list of all possible methods called by this method.
 HMethod[] calls(HMethod m, CALL cs)
          Return an array containing all possible methods called by this method at a particular call site.
 CALL[] getCallSites(HMethod hm)
          Returns a list of all the CALLs quads in the code of hm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallGraphImpl

public CallGraphImpl(ClassHierarchy ch,
                     HCodeFactory hcf)
Creates a CallGraph using the specified ClassHierarchy. hcf must be a code factory that generates quad-ssi or quad-no-ssa 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

getCallSites

public CALL[] getCallSites(HMethod hm)
Returns a list of all the CALLs quads in the code of hm.

Specified by:
getCallSites in interface CallGraph

calls

public HMethod[] calls(HMethod m,
                       CALL cs)
Return an array containing all possible methods called by this method at a particular call site.

Specified by:
calls in interface CallGraph

callableMethods

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

Specified by:
callableMethods in interface CallGraph