Class CFCFGBuilder

java.lang.Object
org.checkerframework.dataflow.cfg.builder.CFGBuilder
org.checkerframework.framework.flow.CFCFGBuilder

public class CFCFGBuilder extends CFGBuilder
A control-flow graph builder (see CFGBuilder) that knows about the Checker Framework annotations and their representation as AnnotatedTypeMirrors.
  • Constructor Details

    • CFCFGBuilder

      protected CFCFGBuilder()
      This class should never be instantiated. Protected to still allow subclasses.
  • Method Details

    • build

      public static ControlFlowGraph build(CompilationUnitTree root, UnderlyingAST underlyingAST, BaseTypeChecker checker, AnnotatedTypeFactory factory, ProcessingEnvironment env)
      Builds the control flow graph of some code.
      Parameters:
      root - the compilation unit that contains the code
      underlyingAST - the AST of the code (a method, lambda, or initializer) for which to build the CFG
      checker - the checker whose options and type factory guide CFG construction
      factory - the type factory
      env - the processing environment
      Returns:
      the control flow graph of the given code
    • assumeAssertionsActivatedForAssertTree

      public static boolean assumeAssertionsActivatedForAssertTree(BaseTypeChecker checker, AssertTree tree)
      Given a SourceChecker and an AssertTree, returns true if the AssertTree uses an @AssumeAssertion string that is relevant to the SourceChecker.
      Parameters:
      checker - the checker
      tree - an assert tree
      Returns:
      true if the assert tree contains an @AssumeAssertion(checker) message string for any subchecker of the given checker's ultimate parent checker