public class ExitChecker extends DataFlow<ExitChecker.DataFlowItem>
Modifier and Type | Class and Description |
---|---|
protected static class |
ExitChecker.DataFlowItem |
DataFlow.BoolItem<FlowItem extends DataFlow.Item>, DataFlow.ConditionNavigator<FlowItem extends DataFlow.Item>, DataFlow.FlowGraphSource<FlowItem extends DataFlow.Item>, DataFlow.Frame<FlowItem extends DataFlow.Item>, DataFlow.Item
Modifier and Type | Field and Description |
---|---|
protected CodeNode |
code |
dataflowOnEntry, detectBackEdges, flowCounter, flowgraphStack, forward, postordering
error, job, nf, ts
bypass, bypassParent
Constructor and Description |
---|
ExitChecker(Job job,
TypeSystem ts,
NodeFactory nf) |
Modifier and Type | Method and Description |
---|---|
void |
check(FlowGraph<ExitChecker.DataFlowItem> graph,
Term n,
boolean entry,
ExitChecker.DataFlowItem inItem,
java.util.Map<FlowGraph.EdgeKey,ExitChecker.DataFlowItem> outItems)
Check that the term n satisfies whatever properties this
dataflow is checking for.
|
ExitChecker.DataFlowItem |
confluence(java.util.List<ExitChecker.DataFlowItem> inItems,
FlowGraph.Peer<ExitChecker.DataFlowItem> peer,
FlowGraph<ExitChecker.DataFlowItem> graph)
The confluence operator for many flows.
|
ExitChecker.DataFlowItem |
createInitialItem(FlowGraph<ExitChecker.DataFlowItem> graph,
Term node,
boolean entry)
Create an initial Item for the term node.
|
java.util.Map<FlowGraph.EdgeKey,ExitChecker.DataFlowItem> |
flow(ExitChecker.DataFlowItem in,
FlowGraph<ExitChecker.DataFlowItem> graph,
FlowGraph.Peer<ExitChecker.DataFlowItem> peer)
Produce new
Item s as appropriate for the
Peer and the input Item s. |
protected FlowGraph<ExitChecker.DataFlowItem> |
initGraph(CodeNode code,
Term root)
Initialize the
FlowGraph to be used in the dataflow
analysis. |
check, confluence, constructItemsFromCondition, createCFGBuilder, createFrame, createInitialItem, currentFlowGraph, dataflow, dataflow, dataflow, dumpFlowGraph, enterCall, filterItems, filterItemsExceptionSubclass, filterItemsNonError, filterItemsNonException, findSCCs, flow, flow, flow, flow, flowBooleanConditions, flowToBooleanFlow, hasTrueFalseBranches, initGraph, itemsToMap, itemToMap, lang, leave, leaveCall, post, safeConfluence, safeConfluence, safeConfluence
begin, catchErrors, enter, enterCall, enterError, errorQueue, hasErrors, job, leaveCall, leaveCall, nodeFactory, typeSystem
bypass, bypass, bypassChildren, override, visitChildren
copy, enter, finish, finish, leave, override, toString, visitEdge, visitEdgeNoOverride
protected CodeNode code
public ExitChecker(Job job, TypeSystem ts, NodeFactory nf)
protected FlowGraph<ExitChecker.DataFlowItem> initGraph(CodeNode code, Term root)
DataFlow
FlowGraph
to be used in the dataflow
analysis.initGraph
in class DataFlow<ExitChecker.DataFlowItem>
FlowGraph.
public ExitChecker.DataFlowItem createInitialItem(FlowGraph<ExitChecker.DataFlowItem> graph, Term node, boolean entry)
DataFlow
createInitialItem
in class DataFlow<ExitChecker.DataFlowItem>
public java.util.Map<FlowGraph.EdgeKey,ExitChecker.DataFlowItem> flow(ExitChecker.DataFlowItem in, FlowGraph<ExitChecker.DataFlowItem> graph, FlowGraph.Peer<ExitChecker.DataFlowItem> peer)
DataFlow
Item
s as appropriate for the
Peer
and the input Item
s.flow
in class DataFlow<ExitChecker.DataFlowItem>
graph
- the FlowGraph which the dataflow is operating onpeer
- the Peer which this method must calculate the flow for.public ExitChecker.DataFlowItem confluence(java.util.List<ExitChecker.DataFlowItem> inItems, FlowGraph.Peer<ExitChecker.DataFlowItem> peer, FlowGraph<ExitChecker.DataFlowItem> graph)
DataFlow
confluence
in class DataFlow<ExitChecker.DataFlowItem>
inItems
- List of Item
s that flow into node
.
this method will only be called if the list has at least 2
elements.peer
- Peer
for which the items
are
flowing into.public void check(FlowGraph<ExitChecker.DataFlowItem> graph, Term n, boolean entry, ExitChecker.DataFlowItem inItem, java.util.Map<FlowGraph.EdgeKey,ExitChecker.DataFlowItem> outItems) throws SemanticException
DataFlow
check
in class DataFlow<ExitChecker.DataFlowItem>
SemanticException
- if the properties this dataflow
analysis is checking for is not satisfied.