Class SDGEntryNode


  • public class SDGEntryNode
    extends PDGNode
    The entry node of one procedure in a system dependence graph, owning that procedure's PDG plus its formal-in and formal-out parameter nodes.
    • Constructor Detail

      • SDGEntryNode

        public SDGEntryNode​(int id,
                            MethodReference methodRef,
                            IRBlock entryBlock)
        Creates an entry node for a procedure.
        Parameters:
        id - the graph-unique node id
        methodRef - the procedure this node opens
        entryBlock - the procedure's entry block
    • Method Detail

      • getMethodRef

        public MethodReference getMethodRef()
        Returns:
        the method ref
      • getProcedurePDG

        public PDG getProcedurePDG()
        Returns:
        the dependence graph of the procedure body, or null if not yet attached
      • setProcedurePDG

        public void setProcedurePDG​(PDG procedurePDG)
        Attaches the dependence graph built for this procedure's body.
        Parameters:
        procedurePDG - the procedure's PDG
      • setFormalOut

        public void setFormalOut​(SDGFormalOutNode formalOut)
        Sets the node representing this procedure's return value.
        Parameters:
        formalOut - the formal-out node
      • addFormalIn

        public void addFormalIn​(SDGFormalInNode formalIn)
        Registers a parameter node on this entry.
        Parameters:
        formalIn - the formal-in node to add
      • getFormalIn

        public SDGFormalInNode getFormalIn​(int parameterIndex)
        Looks up the parameter node at a position.
        Parameters:
        parameterIndex - the parameter position to match
        Returns:
        the matching formal-in node, or null if none is registered
      • getFormalInCount

        public int getFormalInCount()
        Returns:
        the number of registered parameter nodes
      • getFormalIns

        public List<SDGFormalInNode> getFormalIns()
        Returns:
        an unmodifiable view of the parameter nodes, in registration order
      • hasFormalOut

        public boolean hasFormalOut()
        Returns:
        true if a return-value node has been set
      • getLabel

        public String getLabel()
        Specified by:
        getLabel in class PDGNode
        Returns:
        a short human-readable description of what this node represents
      • getDefinedValue

        public SSAValue getDefinedValue()
        Specified by:
        getDefinedValue in class PDGNode
        Returns:
        the value this node defines, or null if it defines none
      • getFullSignature

        public String getFullSignature()
        Returns:
        owner, name and descriptor of the procedure joined into one string
      • getMethodName

        public String getMethodName()
        Returns:
        owner and name of the procedure, without the descriptor