org.checkerframework.dataflow.cfg.builder.PhaseOneResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of checker Show documentation
Show all versions of checker Show documentation
The Checker Framework enhances Java's type system to
make it more powerful and useful. This lets software developers
detect and prevent errors in their Java programs.
The Checker Framework includes compiler plug-ins ("checkers")
that find bugs or verify their absence. It also permits you to
write your own compiler plug-ins.
package org.checkerframework.dataflow.cfg.builder;
import com.sun.source.tree.BinaryTree;
import com.sun.source.tree.ClassTree;
import com.sun.source.tree.LambdaExpressionTree;
import com.sun.source.tree.Tree;
import com.sun.source.tree.UnaryTree;
import org.checkerframework.dataflow.cfg.UnderlyingAST;
import org.checkerframework.dataflow.cfg.builder.ExtendedNode.ExtendedNodeType;
import org.checkerframework.dataflow.cfg.node.Node;
import org.checkerframework.dataflow.cfg.node.ReturnNode;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringJoiner;
import javax.lang.model.util.Types;
/** A wrapper object to pass around the result of phase one. */
public class PhaseOneResult {
/** AST for which the CFG is to be built. */
/*package-private*/ final UnderlyingAST underlyingAST;
/**
* Maps from AST {@link Tree}s to sets of {@link Node}s. Every Tree that produces a value will
* have at least one corresponding Node. Trees that undergo conversions, such as boxing or
* unboxing, can map to two distinct Nodes. The Node for the pre-conversion value is stored in
* the treeToCfgNodes, while the Node for the post-conversion value is stored in the
* treeToConvertedCfgNodes.
*/
/*package-private*/ final IdentityHashMap> treeToCfgNodes;
/** Map from AST {@link Tree}s to post-conversion sets of {@link Node}s. */
/*package-private*/ final IdentityHashMap> treeToConvertedCfgNodes;
/**
* Map from postfix increment or decrement trees that are AST {@link UnaryTree}s to the
* synthetic tree that is {@code v + 1} or {@code v - 1}.
*/
/*package-private*/ final IdentityHashMap postfixTreeToCfgNodes;
/** The list of extended nodes. */
/*package-private*/ final List nodeList;
/** The bindings of labels to positions (i.e., indices) in the {@code nodeList}. */
/*package-private*/ final Map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy