org.jtool.jxplatform.graph.pdg
Class PDGNode

java.lang.Object
  extended byorg.jtool.jxplatform.graph.GraphNode
      extended byorg.jtool.jxplatform.graph.pdg.PDGNode
All Implemented Interfaces:
GraphElement, GraphNodeSort
Direct Known Subclasses:
PDGMethodEntry, PDGStatement

public class PDGNode
extends GraphNode

A node of PDGs.

Author:
Katsuhsa Maruyama

Field Summary
protected  CFGNode cfgnode
          A CFG node correspoinding to this node.
 
Fields inherited from class org.jtool.jxplatform.graph.GraphNode
id, nodeNum, sort
 
Fields inherited from interface org.jtool.jxplatform.graph.GraphNodeSort
actualIn, actualOut, assignments, assignmentSt, branches, breakSt, callings, caseLabel, classEntry, classExit, constructorCall, constructorEntry, constructorExit, continueSt, defaultLabel, doSt, entries, exits, fieldDecl, formalIn, formalOut, forSt, ifSt, ignores, instanceCreation, interfaceEntry, interfaceExit, labelSt, localDecl, mergeSt, methodCall, methodEntry, methodExit, newSt, parameters, polymorphicCall, returnSt, switchSt, synchronizedSt, throwSt, trySt, whileSt
 
Constructor Summary
protected PDGNode()
          Creates a new, empty object.
protected PDGNode(CFGNode node)
          Creates a new node.
 
Method Summary
 CFGNode getCFGNode()
          Returns a CFG node corresponding to this node.
 java.lang.String getDefId()
          Returns the identifier of the DOM element corresponding to this node.
 GraphElementSet getIncomingCDEdges()
          Returns control dependence edges incoming to this node.
 GraphElementList getIncomingDDEdges()
          Returns data dependence edges incoming to this node.
 GraphElementList getOutgoingCDEdges()
          Returns control dependence edges outgoing from this node.
 GraphElementList getOutgoingDDEdges()
          Returns data dependence edges outgoing from this node.
 boolean isBranchSt()
          Tests if this node corresponds to the branch statement.
 boolean isDominated()
          Tests if this node is dominated by another node.
 boolean isFalseDominated()
          Tests if this node is dominated by another node with respect to false dependence.
 boolean isLoopSt()
          Tests if this node is classified into the loop (while, do, and for).
 boolean isStatement()
          Tests if this node indicates a statement node.
 boolean isTrueDominated()
          Tests if this node is dominated by another node with respect to true dependence.
 void print()
          Displays information about this node.
 void print(java.lang.String mesg, java.lang.StringBuffer buf)
          Displays information about this node.
 void write(java.lang.StringBuffer buf)
          Collects information about this node for writing an XML document.
 
Methods inherited from class org.jtool.jxplatform.graph.GraphNode
addIncomingEdge, addIncomingEdges, addOutgoingEdge, addOutgoingEdges, clear, clearId, clearIncomingEdges, clearOutgoingEdges, equals, getDstNodes, getId, getIncomingEdges, getOutgoingEdges, getSort, getSrcNodes, print, removeIncomingEdge, removeOutgoingEdge, setDstNodes, setIncomingEdges, setOutgoingEdges, setSort, setSrcNodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cfgnode

protected CFGNode cfgnode
A CFG node correspoinding to this node.

Constructor Detail

PDGNode

protected PDGNode()
Creates a new, empty object.


PDGNode

protected PDGNode(CFGNode node)
Creates a new node.

Parameters:
node - A CFG node correspoinding to this node.
Method Detail

getCFGNode

public CFGNode getCFGNode()
Returns a CFG node corresponding to this node.

Returns:
The CFG node corresponding to this node.

getDefId

public java.lang.String getDefId()
Returns the identifier of the DOM element corresponding to this node.

Returns:
The identifier of the DOM element.
See Also:
CFGNode.getDefId().

isStatement

public boolean isStatement()
Tests if this node indicates a statement node.

Returns:
always false.

isLoopSt

public boolean isLoopSt()
Tests if this node is classified into the loop (while, do, and for).

Returns:
true if this node is classified into the loop, otherwise false.
See Also:
CFGNode.isLoopSt().

isBranchSt

public boolean isBranchSt()
Tests if this node corresponds to the branch statement.

Returns:
true if this node corresponds to the branch statement, otherwise false.
See Also:
CFGNode.isBranchSt().

getIncomingCDEdges

public GraphElementSet getIncomingCDEdges()
Returns control dependence edges incoming to this node.

Returns:
The control dependence incoming edges.

getOutgoingCDEdges

public GraphElementList getOutgoingCDEdges()
Returns control dependence edges outgoing from this node.

Returns:
The control dependence outgoing edges.

getIncomingDDEdges

public GraphElementList getIncomingDDEdges()
Returns data dependence edges incoming to this node.

Returns:
The data dependence incoming edges.

getOutgoingDDEdges

public GraphElementList getOutgoingDDEdges()
Returns data dependence edges outgoing from this node.

Returns:
The data dependence outgoing edges.

isDominated

public boolean isDominated()
Tests if this node is dominated by another node.

Returns:
true if this node is dominated by another node, otherwise false.

isTrueDominated

public boolean isTrueDominated()
Tests if this node is dominated by another node with respect to true dependence.

Returns:
true if this node is dominated by another node, otherwise false.

isFalseDominated

public boolean isFalseDominated()
Tests if this node is dominated by another node with respect to false dependence.

Returns:
true if this node is dominated by another node, otherwise false.

print

public void print()
Displays information about this node.

Specified by:
print in interface GraphElement
Overrides:
print in class GraphNode
See Also:
CFGNode.print().

print

public void print(java.lang.String mesg,
                  java.lang.StringBuffer buf)
Displays information about this node.

Parameters:
mesg - The description about this node.
buf - The information about the node.
See Also:
CFGNode.print(String, StringBuffer).

write

public void write(java.lang.StringBuffer buf)
Collects information about this node for writing an XML document.

Overrides:
write in class GraphNode
Parameters:
buf - The information about the node.
See Also:
CFGNode.write(StringBuffer).