Class StatementBlockRewriteRule

    • Constructor Detail

      • StatementBlockRewriteRule

        public StatementBlockRewriteRule()
    • Method Detail

      • createCutVarName

        public static String createCutVarName​(boolean fun)
      • createsSplitDag

        public abstract boolean createsSplitDag()
        Indicates if the rewrite potentially splits dags, which is used for phase ordering of rewrites.
        Returns:
        true if dag splits are possible.
      • rewriteStatementBlock

        public abstract List<StatementBlock> rewriteStatementBlock​(StatementBlock sb,
                                                                   ProgramRewriteStatus state)
        Handle an arbitrary statement block. Specific type constraints have to be ensured within the individual rewrites. If a rewrite does not apply to individual blocks, it should simply return the input block.
        Parameters:
        sb - statement block
        state - program rewrite status
        Returns:
        list of statement blocks
      • rewriteStatementBlocks

        public abstract List<StatementBlock> rewriteStatementBlocks​(List<StatementBlock> sbs,
                                                                    ProgramRewriteStatus state)
        Handle a list of statement blocks. Specific type constraints have to be ensured within the individual rewrites. If a rewrite does not require sequence access, it should simply return the input list of statement blocks.
        Parameters:
        sbs - list of statement blocks
        state - program rewrite status
        Returns:
        list of statement blocks