joeq.Compiler.Analysis.IPSSA
Class DefinitionGraph

java.lang.Object
  extended by joeq.Compiler.Analysis.IPSSA.DefinitionGraph

public abstract class DefinitionGraph
extends Object

This is a graph consisting of definitions that uses as much sharing as possible. Provides a dot printer.

Author:
V.Benjamin Livshits

Nested Class Summary
static interface DefinitionGraph.EdgeInfo
           
 
Field Summary
protected  int _edgeCount
           
 
Constructor Summary
DefinitionGraph()
           
 
Method Summary
 void addEdge(SSADefinition def1, SSADefinition def2)
          By default a true predicate edge is added
abstract  void addEdge(SSADefinition def1, SSADefinition def2, DefinitionGraph.EdgeInfo ei)
           
protected  void addNode(SSADefinition def)
           
abstract  SSAIterator.DefinitionIterator getAllReached(SSADefinition def)
          All reaching definitions
abstract  SSAIterator.DefinitionIterator getAllReaching(SSADefinition def)
          All reaching definitions
 int getEdgeCount()
           
abstract  DefinitionGraph.EdgeInfo getEdgeInfo(SSADefinition def1, SSADefinition def2)
          null returned means that there is no edge
 int getNodeCount()
           
abstract  SSAIterator.DefinitionIterator getReached(SSADefinition def)
           
abstract  SSAIterator.DefinitionIterator getReaching(SSADefinition def)
          One level of pointees
 Set getRoots()
          Retrieves all roots of the forest that we are constructing
 Set getTerminals()
           
abstract  boolean isRootNode(SSADefinition def)
           
abstract  boolean isTerminalNode(SSADefinition def)
           
protected  void printDot(Iterator iter, PrintStream out, boolean direction)
           
 void printDot(PrintStream out)
          Prints the subtree starting at definition def in a dot graph form.
 void printReachedToDot(SSADefinition def, PrintStream out)
           
 void printReachingToDot(SSADefinition def, PrintStream out)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_edgeCount

protected int _edgeCount
Constructor Detail

DefinitionGraph

public DefinitionGraph()
Method Detail

addNode

protected void addNode(SSADefinition def)

getEdgeCount

public int getEdgeCount()

getNodeCount

public int getNodeCount()

addEdge

public abstract void addEdge(SSADefinition def1,
                             SSADefinition def2,
                             DefinitionGraph.EdgeInfo ei)

isRootNode

public abstract boolean isRootNode(SSADefinition def)

isTerminalNode

public abstract boolean isTerminalNode(SSADefinition def)

getRoots

public Set getRoots()
Retrieves all roots of the forest that we are constructing


getTerminals

public Set getTerminals()

getReached

public abstract SSAIterator.DefinitionIterator getReached(SSADefinition def)

getAllReached

public abstract SSAIterator.DefinitionIterator getAllReached(SSADefinition def)
All reaching definitions


getReaching

public abstract SSAIterator.DefinitionIterator getReaching(SSADefinition def)
One level of pointees


getAllReaching

public abstract SSAIterator.DefinitionIterator getAllReaching(SSADefinition def)
All reaching definitions


toString

public String toString()
Overrides:
toString in class Object

printDot

public void printDot(PrintStream out)
Prints the subtree starting at definition def in a dot graph form.


printReachedToDot

public void printReachedToDot(SSADefinition def,
                              PrintStream out)

printReachingToDot

public void printReachingToDot(SSADefinition def,
                               PrintStream out)

printDot

protected void printDot(Iterator iter,
                        PrintStream out,
                        boolean direction)

addEdge

public void addEdge(SSADefinition def1,
                    SSADefinition def2)
By default a true predicate edge is added


getEdgeInfo

public abstract DefinitionGraph.EdgeInfo getEdgeInfo(SSADefinition def1,
                                                     SSADefinition def2)
null returned means that there is no edge



Copyright © 2001-2008 John Whaley. All Rights Reserved.