harpoon.Analysis.MetaMethods
Class MetaCallGraph

java.lang.Object
  extended by jpaul.Graphs.DiGraph<MetaMethod>
      extended by harpoon.Analysis.MetaMethods.MetaCallGraph
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MetaCallGraphAbstr

public abstract class MetaCallGraph
extends jpaul.Graphs.DiGraph<MetaMethod>
implements Serializable

MetaCallGraph is for meta methods what callGraph is for "normal" methods. It provides information on what meta methods are called by a given meta method [at a specific call site].

Version:
$Id: MetaCallGraph.java,v 1.10 2005/12/10 17:26:39 salcianu Exp $
Author:
Alexandru SALCIANU <salcianu@retezat.lcs.mit.edu>
See Also:
Serialized Form

Field Summary
protected  jpaul.Graphs.BiDiNavigator<MetaMethod> navigator
           
 
Fields inherited from class jpaul.Graphs.DiGraph
CACHING
 
Constructor Summary
MetaCallGraph()
           
 
Method Summary
abstract  Set getAllMetaMethods()
          Returns the set of all the meta methods that might be called during the execution of the program.
 jpaul.Graphs.BiDiNavigator<MetaMethod> getBiDiNavigator()
          Returns a bi-directional top-down graph navigator through this meta-callgraph.
abstract  MetaMethod[] getCallees(MetaMethod mm)
          Returns the meta methods that can be called by mm.
abstract  MetaMethod[] getCallees(MetaMethod mm, CALL cs)
          Returns the meta methods that can be called by mm at the call site q.
abstract  Set getCallSites(MetaMethod mm)
          Returns the set of all the call sites in the code of the meta-method mm.
 jpaul.Graphs.ForwardNavigator<MetaMethod> getForwardNavigator()
          Returns a forward-only navigator through this meta-callgraph.
 Set getRoots()
           
abstract  Set getRunMetaMethods()
          Returns the set of the meta-methods that could be called as the body of some thread.
abstract  jpaul.DataStructs.Relation getSplitRelation()
          Computes the split relation.
abstract  Set getTransCallees(MetaMethod mm)
          Returns the set of all the meta methods that might be called, directly or indirectly, by the meta method mm.
abstract  void print(PrintStream ps, boolean detailed_view, MetaMethod root)
          Nice pretty-printer for debug purposes.
 
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

navigator

protected jpaul.Graphs.BiDiNavigator<MetaMethod> navigator
Constructor Detail

MetaCallGraph

public MetaCallGraph()
Method Detail

getCallees

public abstract MetaMethod[] getCallees(MetaMethod mm)
Returns the meta methods that can be called by mm.


getCallees

public abstract MetaMethod[] getCallees(MetaMethod mm,
                                        CALL cs)
Returns the meta methods that can be called by mm at the call site q.


getCallSites

public abstract Set getCallSites(MetaMethod mm)
Returns the set of all the call sites in the code of the meta-method mm.


getAllMetaMethods

public abstract Set getAllMetaMethods()
Returns the set of all the meta methods that might be called during the execution of the program.


getTransCallees

public abstract Set getTransCallees(MetaMethod mm)
Returns the set of all the meta methods that might be called, directly or indirectly, by the meta method mm. It's just the transitive closure of the getCallees method.


getSplitRelation

public abstract jpaul.DataStructs.Relation getSplitRelation()
Computes the split relation. This is a Relation that associates to each HMethod the set of MetaMethods specialized from it.


getRunMetaMethods

public abstract Set getRunMetaMethods()
Returns the set of the meta-methods that could be called as the body of some thread.


print

public abstract void print(PrintStream ps,
                           boolean detailed_view,
                           MetaMethod root)
Nice pretty-printer for debug purposes.


getRoots

public Set getRoots()
Specified by:
getRoots in class jpaul.Graphs.DiGraph<MetaMethod>

getBiDiNavigator

public jpaul.Graphs.BiDiNavigator<MetaMethod> getBiDiNavigator()
Returns a bi-directional top-down graph navigator through this meta-callgraph. Complexity: BIG; at least linear in the number of nodes and edges in the call graph. Therefore, we cache its result internally.

Overrides:
getBiDiNavigator in class jpaul.Graphs.DiGraph<MetaMethod>

getForwardNavigator

public jpaul.Graphs.ForwardNavigator<MetaMethod> getForwardNavigator()
Returns a forward-only navigator through this meta-callgraph. Complexity: O(1).

Overrides:
getForwardNavigator in class jpaul.Graphs.DiGraph<MetaMethod>