Package org.jtool.pdg
Class DD
- All Implemented Interfaces:
DependencyGraphEdge
An edge that represents data dependence (DD) between PDG nodes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jtool.pdg.DependencyGraphEdge
DependencyGraphEdge.Kind
-
Field Summary
Fields inherited from class org.jtool.pdg.Dependence
kind
-
Constructor Summary
ConstructorsConstructorDescriptionDD
(PDGNode src, PDGNode dst, JVariableReference jv) Creates a new object that represents a data dependence. -
Method Summary
Modifier and TypeMethodDescriptionboolean
equals
(GraphElement elem) Tests if a given graph element is equal to this graph element.boolean
Tests if a given dependence edge is equal to this edge.Returns the loop-carried node for this data dependence.Returns the variable related to this data dependence.int
hashCode()
boolean
Tests if this dependence edge is carried by a loop.boolean
Tests if this dependence edge is independent to a loop.void
Sets as a define-order dependence.void
setLCDD()
Sets as a loop-carried data dependence.void
setLIDD()
Sets as a loop-independent data dependence.void
setLoopCarriedNode
(PDGNode node) Sets the loop-carried node for this data dependence.void
Sets as an output dependence.toString()
Obtains information on this edge.Methods inherited from class org.jtool.pdg.Dependence
equals, equals, getDstId, getDstNode, getKind, getSrcId, getSrcNode, isDependence, setKind, sortEdges
Methods inherited from class org.jtool.graph.GraphEdge
equals, setDstNode, setSrcNode, sortGrapgEdge
Methods inherited from class org.jtool.graph.GraphElement
difference, equals, getIdString, intersection, subset, subsetEqual, union
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jtool.pdg.DependencyGraphEdge
isCall, isCD, isClassMember, isDD, isDeclaration, isDefOrder, isDefUse, isExceptionCatch, isFallThrough, isFalse, isFieldAccess, isInterPDGEdge, isLCDD, isLIDD, isOutput, isParameterIn, isParameterOut, isSummary, isTrue, isUncoveredFieldAccess
-
Constructor Details
-
DD
Creates a new object that represents a data dependence.- Parameters:
src
- the source nodedst
- destination nodejv
- the variable related to this data dependence
-
-
Method Details
-
getVariable
Returns the variable related to this data dependence. The value of a variable defined in the source node reaches that used in the destination node.- Returns:
- the variable storing the passed value
-
setLoopCarriedNode
Sets the loop-carried node for this data dependence.- Parameters:
node
- loop-carried node
-
getLoopCarriedNode
Returns the loop-carried node for this data dependence.- Returns:
- the loop-carried node, or
null
if this edge does not have a loop-carried node
-
isLoopCarried
public boolean isLoopCarried()Tests if this dependence edge is carried by a loop.- Returns:
true
if the edge is a loop-carried dependence, otherwisefalse
-
isLoopIndependent
public boolean isLoopIndependent()Tests if this dependence edge is independent to a loop.- Returns:
true
if the edge is a loop-independent dependence, otherwisefalse
-
setLIDD
public void setLIDD()Sets as a loop-independent data dependence. -
setLCDD
public void setLCDD()Sets as a loop-carried data dependence. -
setDefOrder
public void setDefOrder()Sets as a define-order dependence. -
setOutput
public void setOutput()Sets as an output dependence. -
equals
Tests if a given graph element is equal to this graph element. -
equals
Tests if a given dependence edge is equal to this edge.- Parameters:
edge
- the edge to be checked- Returns:
- the
true
if the given edge is equal to this edge
-
hashCode
public int hashCode()- Overrides:
hashCode
in classDependence
-
toString
Obtains information on this edge.- Overrides:
toString
in classDependence
- Returns:
- the string representing the information
-