harpoon.Analysis.Quads
Class SSICallGraph

java.lang.Object
  extended by jpaul.Graphs.DiGraph<HMethod>
      extended by harpoon.Analysis.CallGraph
          extended by harpoon.Analysis.Quads.CallGraph
              extended by harpoon.Analysis.Quads.SSICallGraph

public class SSICallGraph
extends CallGraph

SSICallGraph

Version:
$Id: SSICallGraph.java,v 1.4 2002/04/11 18:53:50 salcianu Exp $
Author:
Alexandru SALCIANU <salcianu@MIT.edu>

Field Summary
protected  HCodeFactory hcf
           
 
Fields inherited from class harpoon.Analysis.CallGraph
navigator
 
Fields inherited from class jpaul.Graphs.DiGraph
CACHING
 
Constructor Summary
SSICallGraph(ClassHierarchy ch, HCodeFactory hcf)
          Creates a SSICallGraph.
 
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)
           
 HMethod[] calls(HMethod hm)
          Returns an array containing all possible methods called by method m.
 HMethod[] calls(HMethod hm, CALL cs)
          Returns an array containing all possible methods called by method m at the call site cs.
 CALL[] getCallSites(HMethod hm)
          Returns a list of all CALLs quads in the code of hm.
 Set<HMethod> getRunMethods()
          Safe implementation of getRunMethods: returns the set of callable methods named "run", with no argument and declared by a subclass of java.lang.Thread.
 
Methods inherited from class harpoon.Analysis.CallGraph
getBiDiNavigator, getForwardNavigator, getRoots
 
Methods inherited from class jpaul.Graphs.DiGraph
constructBiDiNavigator, dfs, dfs2, diGraph, diGraph, findPath, findPath, forAllVertices, getComponentDiGraph, numArcs, numVertices, reverseDiGraph, subDiGraph, toString, transitivePred, transitivePred, transitiveSucc, transitiveSucc, union, vertices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hcf

protected HCodeFactory hcf
Constructor Detail

SSICallGraph

public SSICallGraph(ClassHierarchy ch,
                    HCodeFactory hcf)
Creates a SSICallGraph.

Method Detail

calls

public HMethod[] calls(HMethod hm)
Description copied from class: CallGraph
Returns an array containing all possible methods called by method m. If hm doesn't call any method, return an array of length 0.

Specified by:
calls in class CallGraph

calls

public HMethod[] calls(HMethod hm,
                       CALL cs)
Description copied from class: CallGraph
Returns an array containing all possible methods called by method m at the call site cs. If there is no known callee for the call site cs, or if cs doesn't belong to the code of hm, return an array of length 0.

Specified by:
calls in class CallGraph

calls

public HMethod[] calls(CALL cs)

callableMethods

public Set callableMethods()
Description copied from class: CallGraph
Returns the set of all the methods that can be called in the execution of the program.

Specified by:
callableMethods in class CallGraph

getCallSites

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

Specified by:
getCallSites in class CallGraph

getRunMethods

public Set<HMethod> getRunMethods()
Safe implementation of getRunMethods: returns the set of callable methods named "run", with no argument and declared by a subclass of java.lang.Thread.

Overrides:
getRunMethods in class CallGraph
Returns:
set of all run() methods that may be the bodies of a thread started by the program (optional operation).