Class CFCFGBuilder.CFCFGTranslationPhaseOne

  • All Implemented Interfaces:
    com.sun.source.tree.TreeVisitor<Node,​java.lang.Void>
    Enclosing class:
    CFCFGBuilder

    protected static class CFCFGBuilder.CFCFGTranslationPhaseOne
    extends CFGTranslationPhaseOne
    A specialized phase-one CFG builder, with a few modifications that make use of the type factory. It is responsible for: 1) translating foreach loops so that the declarations of their iteration variables have the right annotations, 2) registering the containing elements of artificial trees with the relevant type factories, and 3) generating appropriate assertion CFG structure in the presence of @AssumeAssertion assertion strings which mention the checker or its supercheckers.
    • Field Detail

      • atypeFactory

        protected final AnnotatedTypeFactory atypeFactory
        Type factory to provide types used during CFG building.
    • Constructor Detail

      • CFCFGTranslationPhaseOne

        public CFCFGTranslationPhaseOne​(CFTreeBuilder builder,
                                        BaseTypeChecker checker,
                                        AnnotatedTypeFactory atypeFactory,
                                        boolean assumeAssertionsEnabled,
                                        boolean assumeAssertionsDisabled,
                                        javax.annotation.processing.ProcessingEnvironment env)
    • Method Detail

      • handleArtificialTree

        public void handleArtificialTree​(com.sun.source.tree.Tree tree)
        Perform any actions required when CFG translation creates a new Tree that is not part of the original AST.

        Assigns a path to the artificial tree.

        Overrides:
        handleArtificialTree in class CFGTranslationPhaseOne
        Parameters:
        tree - the newly created Tree
      • createEnhancedForLoopIteratorVariable

        protected com.sun.source.tree.VariableTree createEnhancedForLoopIteratorVariable​(com.sun.source.tree.MethodInvocationTree iteratorCall,
                                                                                         javax.lang.model.element.VariableElement variableElement)
        Overrides:
        createEnhancedForLoopIteratorVariable in class CFGTranslationPhaseOne
      • createEnhancedForLoopArrayVariable

        protected com.sun.source.tree.VariableTree createEnhancedForLoopArrayVariable​(com.sun.source.tree.ExpressionTree expression,
                                                                                      javax.lang.model.element.VariableElement variableElement)
        Overrides:
        createEnhancedForLoopArrayVariable in class CFGTranslationPhaseOne