Class CFGTranslationPhaseOne

java.lang.Object
com.sun.source.util.TreeScanner<Node,Void>
org.checkerframework.dataflow.cfg.builder.CFGTranslationPhaseOne
All Implemented Interfaces:
TreeVisitor<Node,Void>
Direct Known Subclasses:
CFCFGBuilder.CFCFGTranslationPhaseOne

public class CFGTranslationPhaseOne extends TreeScanner<Node,Void>
Class that performs phase one of the translation process. It generates the following information:
  • A sequence of extended nodes.
  • A set of bindings from Labels to positions in the node sequence.
  • A set of leader nodes that give rise to basic blocks in phase two.
  • A mapping from AST tree nodes to Nodes.

The return type of this scanner is Node. For expressions, the corresponding node is returned to allow linking between different nodes.

However, for statements there is usually no single Node that is created, and thus null is returned.

Every visit* method is assumed to add at least one extended node to the list of nodes (which might only be a jump).

The entry point to process a single body (e.g., method, lambda, top-level block) is process(TreePath, UnderlyingAST).