abc.tm.weaving.weaver.tmanalysis.callgraph
Class AbstractedCallGraph

java.lang.Object
  extended by CallGraph
      extended by abc.tm.weaving.weaver.tmanalysis.callgraph.AbstractedCallGraph

public class AbstractedCallGraph
extends CallGraph

A abstracted version of a call graph. This call graph contains only those edges on paths to any method that is matched by the NodePredicate that is passed in.

Author:
Eric Bodden

Field Summary
protected static int COMPUTING
          Status flag used in the computation.
protected  CallGraph delegate
          The original callgraph.
protected static int FALSE
          Status flag used in the computation.
protected  NodePredicate nodePredicate
          The node predicate, which tells what nodes to retain.
protected  java.util.Map resultCache
          A result cache.
protected static int TRUE
          Status flag used in the computation.
 
Constructor Summary
AbstractedCallGraph(CallGraph fullGraph, NodePredicate nodePredicate)
          Constructs an abstraction of the given call graph under the given NodePredicate.
 
Method Summary
protected  int abstractPath(Edge currEdge)
          Build the abstraction for a certain path in the graph.
protected  void addEdgeToThis(Edge edge)
          Copies the edge correctly into "this".
protected  void performAbstraction()
          This builds up the abstracted graph, storing the relevant edges in the field CallGraph#edges.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected CallGraph delegate
The original callgraph.


nodePredicate

protected NodePredicate nodePredicate
The node predicate, which tells what nodes to retain.


resultCache

protected transient java.util.Map resultCache
A result cache.


TRUE

protected static final int TRUE
Status flag used in the computation. TRUE means have to keep this method, FALSE meanse can leave out this method and COMPUTING means that we are currently computing this status for this method. (This is used to avoid infinite recursion.)

See Also:
Constant Field Values

FALSE

protected static final int FALSE
Status flag used in the computation. TRUE means have to keep this method, FALSE meanse can leave out this method and COMPUTING means that we are currently computing this status for this method. (This is used to avoid infinite recursion.)

See Also:
Constant Field Values

COMPUTING

protected static final int COMPUTING
Status flag used in the computation. TRUE means have to keep this method, FALSE meanse can leave out this method and COMPUTING means that we are currently computing this status for this method. (This is used to avoid infinite recursion.)

See Also:
Constant Field Values
Constructor Detail

AbstractedCallGraph

public AbstractedCallGraph(CallGraph fullGraph,
                           NodePredicate nodePredicate)
Constructs an abstraction of the given call graph under the given NodePredicate.

Parameters:
fullGraph - the original call graph
nodePredicate - a predicate telling what nodes to retain in the abstracted graph
Method Detail

performAbstraction

protected void performAbstraction()
This builds up the abstracted graph, storing the relevant edges in the field CallGraph#edges.


abstractPath

protected int abstractPath(Edge currEdge)
Build the abstraction for a certain path in the graph.

Parameters:
currEdge - the edge pointing to the current node

addEdgeToThis

protected void addEdgeToThis(Edge edge)
Copies the edge correctly into "this".

Parameters:
edge -