Class Loop

    • Constructor Detail

      • Loop

        public Loop​(NodeList<CFG,​Statement,​Edge> cfgMatrix,
                    Statement condition,
                    Statement firstFollower,
                    java.util.Collection<Statement> body)
        Builds the loop.
        Parameters:
        cfgMatrix - the matrix of the cfg containing this loop
        condition - the condition of the loop
        firstFollower - the first statement after the loop exits
        body - the statements in the loop body
    • Method Detail

      • bodyStatements

        public java.util.Collection<Statement> bodyStatements()
        Description copied from class: ControlFlowStructure
        Yields all the Statements contained in the body of this structure (thus excluding the condition and the first follower).
        Specified by:
        bodyStatements in class ControlFlowStructure
        Returns:
        the statements of the body of this structure
      • getBody

        public java.util.Collection<Statement> getBody()
        Yields the Statements contained in the body of this loop.
        Returns:
        the body of the loop
      • contains

        public boolean contains​(Statement st)
        Description copied from class: ControlFlowStructure
        Yields true if the given statement is part of the body of this structure. Note that this method will return false if st is either the condition of the first follower of this structure.
        Specified by:
        contains in class ControlFlowStructure
        Parameters:
        st - the statement to check
        Returns:
        true if st is in the body of this structure
      • getTargetedStatements

        public java.util.Collection<Statement> getTargetedStatements()
        Description copied from class: ControlFlowStructure
        Yields all the statements that are targeted by some node in this structure. This always comprises destination nodes of conditional branches, and join points where more than one branch converge. Equivalently, these can be characterized as targets of conditional or unconditional branches and followers of conditional or unconditional branches.
        Specified by:
        getTargetedStatements in class ControlFlowStructure
        Returns:
        the targeted statements