Class ControlFlowGraphPass

  • All Implemented Interfaces:
    java.util.function.Consumer<TranslationResult>

    @Deprecated(since="3.4",
                forRemoval=true)
    public class ControlFlowGraphPass
    extends Pass
    Deprecated, for removal: This API element is subject to removal in a future version.
    This Edge-Type is deprecated as it is conceptually less precise then the EvaluationOrderGraphPass.
    Creates a simple control flow graph (CFG) based on AST.

    The CFG is a directed cyclic graph with Node representing statements and edges representing the program control flow.

    • Return statements will have no successors.
    • Branch statements (if/switch/exception traps) will have multiple successors.
    • Simple statements will have their following statement as sole successor
    • break / continue will create respective edges
    • Field Summary

      • Fields inherited from class de.fraunhofer.aisec.cpg.passes.Pass

        lang
    • Constructor Summary

      Constructors 
      Constructor Description
      ControlFlowGraphPass()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void accept​(TranslationResult t)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      void addTodo​(int index, Statement... statements)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Adds statements to this.remaining, omitting null.
      void addTodo​(int index, java.util.List<Statement> stmts)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      void cleanup()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Consumer

        andThen
    • Constructor Detail

      • ControlFlowGraphPass

        public ControlFlowGraphPass()
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Method Detail

      • cleanup

        public void cleanup()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        cleanup in class Pass
      • accept

        public void accept​(TranslationResult t)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • addTodo

        public void addTodo​(int index,
                            java.util.List<Statement> stmts)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • addTodo

        public void addTodo​(int index,
                            Statement... statements)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Adds statements to this.remaining, omitting null.
        Parameters:
        index - the index
        statements - the statements to add