Package org.jtool.pdg

Class DD

All Implemented Interfaces:
DependencyGraphEdge

public class DD extends Dependence
An edge that represents data dependence (DD) between PDG nodes.
  • Constructor Details

    • DD

      public DD(PDGNode src, PDGNode dst, JVariableReference jv)
      Creates a new object that represents a data dependence.
      Parameters:
      src - the source node
      dst - destination node
      jv - the variable related to this data dependence
  • Method Details

    • getVariable

      public JVariableReference 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

      public void setLoopCarriedNode(PDGNode node)
      Sets the loop-carried node for this data dependence.
      Parameters:
      node - loop-carried node
    • getLoopCarriedNode

      public PDGNode 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, otherwise false
    • isLoopIndependent

      public boolean isLoopIndependent()
      Tests if this dependence edge is independent to a loop.
      Returns:
      true if the edge is a loop-independent dependence, otherwise false
    • 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

      public boolean equals(GraphElement elem)
      Tests if a given graph element is equal to this graph element.
      Overrides:
      equals in class GraphEdge
      Parameters:
      elem - the graph element to be checked
      Returns:
      the true if the given graph element is equal to this graph element
    • equals

      public boolean equals(DD edge)
      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 class Dependence
    • toString

      public String toString()
      Obtains information on this edge.
      Overrides:
      toString in class Dependence
      Returns:
      the string representing the information