public class CopyPropagator extends DataFlow<CopyPropagator.DataFlowItem>
Modifier and Type | Class and Description |
---|---|
protected static class |
CopyPropagator.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
dataflowOnEntry, detectBackEdges, flowCounter, flowgraphStack, forward, postordering
error, job, nf, ts
bypass, bypassParent
Constructor and Description |
---|
CopyPropagator(Job job,
TypeSystem ts,
NodeFactory nf) |
Modifier and Type | Method and Description |
---|---|
void |
check(FlowGraph<CopyPropagator.DataFlowItem> graph,
Term n,
boolean entry,
CopyPropagator.DataFlowItem inItem,
java.util.Map<FlowGraph.EdgeKey,CopyPropagator.DataFlowItem> outItems)
Check that the term n satisfies whatever properties this
dataflow is checking for.
|
CopyPropagator.DataFlowItem |
confluence(java.util.List<CopyPropagator.DataFlowItem> inItems) |
CopyPropagator.DataFlowItem |
confluence(java.util.List<CopyPropagator.DataFlowItem> inItems,
FlowGraph.Peer<CopyPropagator.DataFlowItem> peer,
FlowGraph<CopyPropagator.DataFlowItem> graph)
The confluence operator for many flows.
|
CopyPropagator.DataFlowItem |
createInitialItem(FlowGraph<CopyPropagator.DataFlowItem> graph,
Term node,
boolean entry)
Create an initial Item for the term node.
|
protected java.util.Map<FlowGraph.EdgeKey,CopyPropagator.DataFlowItem> |
flow(CopyPropagator.DataFlowItem in,
FlowGraph<CopyPropagator.DataFlowItem> graph,
FlowGraph.Peer<CopyPropagator.DataFlowItem> peer)
Produce new
Item s as appropriate for the
Peer and the input Item s. |
Node |
leaveCall(Node old,
Node n,
NodeVisitor v)
Overridden superclass method, to pop from the stack of
FlowGraph s if necessary. |
void |
post(FlowGraph<CopyPropagator.DataFlowItem> graph,
Term root)
Check all of the Peers in the graph, after the dataflow analysis has
been performed.
|
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, initGraph, itemsToMap, itemToMap, lang, leave, 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
public CopyPropagator(Job job, TypeSystem ts, NodeFactory nf)
public CopyPropagator.DataFlowItem createInitialItem(FlowGraph<CopyPropagator.DataFlowItem> graph, Term node, boolean entry)
DataFlow
createInitialItem
in class DataFlow<CopyPropagator.DataFlowItem>
public CopyPropagator.DataFlowItem confluence(java.util.List<CopyPropagator.DataFlowItem> inItems, FlowGraph.Peer<CopyPropagator.DataFlowItem> peer, FlowGraph<CopyPropagator.DataFlowItem> graph)
DataFlow
confluence
in class DataFlow<CopyPropagator.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 CopyPropagator.DataFlowItem confluence(java.util.List<CopyPropagator.DataFlowItem> inItems)
protected java.util.Map<FlowGraph.EdgeKey,CopyPropagator.DataFlowItem> flow(CopyPropagator.DataFlowItem in, FlowGraph<CopyPropagator.DataFlowItem> graph, FlowGraph.Peer<CopyPropagator.DataFlowItem> peer)
DataFlow
Item
s as appropriate for the
Peer
and the input Item
s.flow
in class DataFlow<CopyPropagator.DataFlowItem>
graph
- the FlowGraph which the dataflow is operating onpeer
- the Peer which this method must calculate the flow for.public void post(FlowGraph<CopyPropagator.DataFlowItem> graph, Term root) throws SemanticException
DataFlow
post
in class DataFlow<CopyPropagator.DataFlowItem>
SemanticException
public void check(FlowGraph<CopyPropagator.DataFlowItem> graph, Term n, boolean entry, CopyPropagator.DataFlowItem inItem, java.util.Map<FlowGraph.EdgeKey,CopyPropagator.DataFlowItem> outItems) throws SemanticException
DataFlow
check
in class DataFlow<CopyPropagator.DataFlowItem>
SemanticException
- if the properties this dataflow
analysis is checking for is not satisfied.public Node leaveCall(Node old, Node n, NodeVisitor v) throws SemanticException
DataFlow
FlowGraph
s if necessary.leaveCall
in class DataFlow<CopyPropagator.DataFlowItem>
SemanticException