org.jtool.jxplatform.graph.pdg
Class Dependence

java.lang.Object
  extended byorg.jtool.jxplatform.graph.GraphEdge
      extended byorg.jtool.jxplatform.graph.pdg.Dependence
All Implemented Interfaces:
GraphEdgeSort, GraphElement
Direct Known Subclasses:
CD, DD

public class Dependence
extends GraphEdge

An edge (dependence) of PDGs.

Author:
Katsuhsa Maruyama

Field Summary
 
Fields inherited from class org.jtool.jxplatform.graph.GraphEdge
dst, sort, src
 
Fields inherited from interface org.jtool.jxplatform.graph.GraphEdgeSort
antiDependence, CDs, DDs, deforderDependence, defuseDependence, fallControlDependence, fallThroughFlow, falseControlDependence, falseControlFlow, flows, outputDependence, parameterFlow, parameterIn, parameterOut, trueControlDependence, trueControlFlow
 
Constructor Summary
protected Dependence()
          Creates a new, empty object.
  Dependence(PDGNode src, PDGNode dst)
          Creates a new edge.
 
Method Summary
 boolean equals(GraphElement elem)
          Tests if this edge equals to a given edge.
 boolean isCD()
          Tests if this edge represents the control dependence.
 boolean isDD()
          Tests if this edge represents the data dependence.
 void print()
          Displays information about this edge.
 void print(java.lang.StringBuffer buf)
          Collects information about this edge for printing.
 void write(java.lang.StringBuffer buf)
          Collects information about this edge for writing an XML document.
 
Methods inherited from class org.jtool.jxplatform.graph.GraphEdge
getDstNode, getSort, getSrcNode, setDstNode, setSort, setSrcNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dependence

protected Dependence()
Creates a new, empty object.


Dependence

public Dependence(PDGNode src,
                  PDGNode dst)
Creates a new edge.

Parameters:
src - A source node of this edge.
dst - A destination node of this edge.
Method Detail

equals

public boolean equals(GraphElement elem)
Tests if this edge equals to a given edge.

Specified by:
equals in interface GraphElement
Overrides:
equals in class GraphEdge
Parameters:
elem - A edge to be checked.
Returns:
true if the edges are equal, otherwise false.

isCD

public boolean isCD()
Tests if this edge represents the control dependence.

Returns:
true if this edge is a control dependence.

isDD

public boolean isDD()
Tests if this edge represents the data dependence.

Returns:
true if this edge is a data dependence.

print

public void print()
Displays information about this edge.

Specified by:
print in interface GraphElement
Overrides:
print in class GraphEdge

print

public void print(java.lang.StringBuffer buf)
Collects information about this edge for printing.

Overrides:
print in class GraphEdge
Parameters:
buf - The information about the edge.

write

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

Overrides:
write in class GraphEdge
Parameters:
buf - The information about the edge.