org.checkerframework.dataflow.cfg.builder.CFGTranslationPhaseTwo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataflow Show documentation
Show all versions of dataflow Show documentation
Dataflow is a dataflow framework based on the javac compiler.
package org.checkerframework.dataflow.cfg.builder;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.dataflow.cfg.ControlFlowGraph;
import org.checkerframework.dataflow.cfg.block.BlockImpl;
import org.checkerframework.dataflow.cfg.block.ConditionalBlockImpl;
import org.checkerframework.dataflow.cfg.block.ExceptionBlockImpl;
import org.checkerframework.dataflow.cfg.block.RegularBlockImpl;
import org.checkerframework.dataflow.cfg.block.SingleSuccessorBlockImpl;
import org.checkerframework.dataflow.cfg.block.SpecialBlock.SpecialBlockType;
import org.checkerframework.dataflow.cfg.block.SpecialBlockImpl;
import org.checkerframework.dataflow.cfg.node.CatchMarkerNode;
import org.checkerframework.dataflow.cfg.node.Node;
import org.checkerframework.javacutil.BugInCF;
import org.plumelib.util.ArraySet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.lang.model.type.TypeMirror;
/** Class that performs phase two of the translation process. */
@SuppressWarnings("nullness") // TODO
public class CFGTranslationPhaseTwo {
private CFGTranslationPhaseTwo() {}
/**
* Perform phase two of the translation.
*
* @param in the result of phase one
* @return a control flow graph that might still contain degenerate basic blocks (such as empty
* regular basic blocks or conditional blocks with the same block as 'then' and 'else'
* successor)
*/
@SuppressWarnings("interning:not.interned") // AST node comparisons
public static ControlFlowGraph process(PhaseOneResult in) {
Map