public class NotNullChecker
extends polyglot.visit.DataFlow<jif.visit.NotNullChecker.DataFlowItem>
polyglot.visit.DataFlow.BoolItem<FlowItem extends polyglot.visit.DataFlow.Item>, polyglot.visit.DataFlow.ConditionNavigator<FlowItem extends polyglot.visit.DataFlow.Item>, polyglot.visit.DataFlow.FlowGraphSource<FlowItem extends polyglot.visit.DataFlow.Item>, polyglot.visit.DataFlow.Frame<FlowItem extends polyglot.visit.DataFlow.Item>, polyglot.visit.DataFlow.Item
Constructor and Description |
---|
NotNullChecker(polyglot.frontend.Job job) |
NotNullChecker(polyglot.frontend.Job job,
polyglot.types.TypeSystem ts,
polyglot.ast.NodeFactory nf) |
Modifier and Type | Method and Description |
---|---|
polyglot.visit.NodeVisitor |
begin() |
protected void |
check(polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph,
polyglot.ast.Term n,
boolean entry,
jif.visit.NotNullChecker.DataFlowItem inItem,
java.util.Map<polyglot.visit.FlowGraph.EdgeKey,jif.visit.NotNullChecker.DataFlowItem> outItems)
"Check" the nodes of the graph for the not null analysis.
|
protected jif.visit.NotNullChecker.DataFlowItem |
confluence(java.util.List<jif.visit.NotNullChecker.DataFlowItem> items,
polyglot.visit.FlowGraph.Peer<jif.visit.NotNullChecker.DataFlowItem> peer,
polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph)
The confluence operator is intersection: a variable is not null only
if it is not null on all paths flowing in.
|
protected jif.visit.NotNullChecker.DataFlowItem |
createInitialItem(polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph,
polyglot.ast.Term node,
boolean entry)
Create an initial Item for the dataflow analysis.
|
jif.visit.NotNullChecker.DataFlowItem |
createItem(polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph,
polyglot.ast.Term n) |
protected java.util.Map<polyglot.visit.FlowGraph.EdgeKey,jif.visit.NotNullChecker.DataFlowItem> |
flow(java.util.List<jif.visit.NotNullChecker.DataFlowItem> inItems,
java.util.List<polyglot.visit.FlowGraph.EdgeKey> inItemKeys,
polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph,
polyglot.visit.FlowGraph.Peer<jif.visit.NotNullChecker.DataFlowItem> peer) |
java.util.Map<polyglot.visit.FlowGraph.EdgeKey,jif.visit.NotNullChecker.DataFlowItem> |
flow(jif.visit.NotNullChecker.DataFlowItem trueItem,
jif.visit.NotNullChecker.DataFlowItem falseItem,
jif.visit.NotNullChecker.DataFlowItem otherItem,
polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph,
polyglot.visit.FlowGraph.Peer<jif.visit.NotNullChecker.DataFlowItem> peer)
If a local variable is initialized with a non-null expression, then
the variable is not null.
|
check, confluence, constructItemsFromCondition, createCFGBuilder, createFrame, createInitialItem, currentFlowGraph, dataflow, dataflow, dataflow, dumpFlowGraph, enterCall, filterItems, filterItemsExceptionSubclass, filterItemsNonError, filterItemsNonException, findSCCs, flow, flow, flow, flowBooleanConditions, flowToBooleanFlow, hasTrueFalseBranches, initGraph, initGraph, itemsToMap, itemToMap, lang, leave, leaveCall, post, safeConfluence, safeConfluence, safeConfluence
catchErrors, enter, enterCall, enterError, errorQueue, hasErrors, job, leaveCall, leaveCall, nodeFactory, typeSystem
bypass, bypass, bypassChildren, override, visitChildren
public NotNullChecker(polyglot.frontend.Job job, polyglot.types.TypeSystem ts, polyglot.ast.NodeFactory nf)
public NotNullChecker(polyglot.frontend.Job job)
public polyglot.visit.NodeVisitor begin()
begin
in class polyglot.visit.ErrorHandlingVisitor
public jif.visit.NotNullChecker.DataFlowItem createItem(polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph, polyglot.ast.Term n)
protected jif.visit.NotNullChecker.DataFlowItem createInitialItem(polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph, polyglot.ast.Term node, boolean entry)
createInitialItem
in class polyglot.visit.DataFlow<jif.visit.NotNullChecker.DataFlowItem>
protected java.util.Map<polyglot.visit.FlowGraph.EdgeKey,jif.visit.NotNullChecker.DataFlowItem> flow(java.util.List<jif.visit.NotNullChecker.DataFlowItem> inItems, java.util.List<polyglot.visit.FlowGraph.EdgeKey> inItemKeys, polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph, polyglot.visit.FlowGraph.Peer<jif.visit.NotNullChecker.DataFlowItem> peer)
flow
in class polyglot.visit.DataFlow<jif.visit.NotNullChecker.DataFlowItem>
public java.util.Map<polyglot.visit.FlowGraph.EdgeKey,jif.visit.NotNullChecker.DataFlowItem> flow(jif.visit.NotNullChecker.DataFlowItem trueItem, jif.visit.NotNullChecker.DataFlowItem falseItem, jif.visit.NotNullChecker.DataFlowItem otherItem, polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph, polyglot.visit.FlowGraph.Peer<jif.visit.NotNullChecker.DataFlowItem> peer)
flow
in class polyglot.visit.DataFlow<jif.visit.NotNullChecker.DataFlowItem>
protected jif.visit.NotNullChecker.DataFlowItem confluence(java.util.List<jif.visit.NotNullChecker.DataFlowItem> items, polyglot.visit.FlowGraph.Peer<jif.visit.NotNullChecker.DataFlowItem> peer, polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph)
confluence
in class polyglot.visit.DataFlow<jif.visit.NotNullChecker.DataFlowItem>
protected void check(polyglot.visit.FlowGraph<jif.visit.NotNullChecker.DataFlowItem> graph, polyglot.ast.Term n, boolean entry, jif.visit.NotNullChecker.DataFlowItem inItem, java.util.Map<polyglot.visit.FlowGraph.EdgeKey,jif.visit.NotNullChecker.DataFlowItem> outItems)
check
in class polyglot.visit.DataFlow<jif.visit.NotNullChecker.DataFlowItem>