Class PDGNode

    • Method Detail

      • getId

        public int getId()
        Returns:
        the id
      • getType

        public PDGNodeType getType()
        Returns:
        the type
      • getBlock

        public IRBlock getBlock()
        Returns:
        the block
      • setBlock

        public void setBlock​(IRBlock block)
        Sets the block this node belongs to.
        Parameters:
        block - the owning block, may be null for region nodes
      • isTainted

        public boolean isTainted()
        Returns:
        whether tainted
      • setTainted

        public void setTainted​(boolean tainted)
        Marks or clears this node as carrying tainted data.
        Parameters:
        tainted - whether the node is tainted
      • getTaintLabel

        public String getTaintLabel()
        Returns:
        the taint label
      • setTaintLabel

        public void setTaintLabel​(String taintLabel)
        Sets the label describing where the taint on this node came from.
        Parameters:
        taintLabel - the taint label
      • getLabel

        public abstract String getLabel()
        Returns:
        a short human-readable description of what this node represents
      • getUsedValues

        public abstract List<Value> getUsedValues()
        Returns:
        the values this node reads
      • getDefinedValue

        public abstract SSAValue getDefinedValue()
        Returns:
        the value this node defines, or null if it defines none
      • addIncomingEdge

        public void addIncomingEdge​(PDGEdge edge)
        Records an edge arriving at this node, ignoring duplicates.
        Parameters:
        edge - the incoming edge
      • addOutgoingEdge

        public void addOutgoingEdge​(PDGEdge edge)
        Records an edge leaving this node, ignoring duplicates.
        Parameters:
        edge - the outgoing edge
      • removeIncomingEdge

        public void removeIncomingEdge​(PDGEdge edge)
        Drops an edge arriving at this node.
        Parameters:
        edge - the incoming edge to remove
      • removeOutgoingEdge

        public void removeOutgoingEdge​(PDGEdge edge)
        Drops an edge leaving this node.
        Parameters:
        edge - the outgoing edge to remove
      • getIncomingEdges

        public List<PDGEdge> getIncomingEdges()
        Returns:
        an unmodifiable view of the edges arriving at this node
      • getOutgoingEdges

        public List<PDGEdge> getOutgoingEdges()
        Returns:
        an unmodifiable view of the edges leaving this node
      • getPredecessors

        public List<PDGNode> getPredecessors()
        Returns:
        the source node of each incoming edge, one entry per edge
      • getSuccessors

        public List<PDGNode> getSuccessors()
        Returns:
        the target node of each outgoing edge, one entry per edge
      • getControlDependenceEdges

        public List<PDGEdge> getControlDependenceEdges()
        Returns:
        the incoming edges that are control dependences
      • getDataDependenceEdges

        public List<PDGEdge> getDataDependenceEdges()
        Returns:
        the incoming edges that are data dependences
      • hasIncomingEdges

        public boolean hasIncomingEdges()
        Returns:
        whether any edge arrives at this node
      • hasOutgoingEdges

        public boolean hasOutgoingEdges()
        Returns:
        whether any edge leaves this node
      • getInDegree

        public int getInDegree()
        Returns:
        the number of incoming edges
      • getOutDegree

        public int getOutDegree()
        Returns:
        the number of outgoing edges
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object