harpoon.Analysis.Companions
Class DataFlowSolver.Forward<N extends Graph.Node<N,E>,E extends Graph.Edge<N,E>,FACT>
java.lang.Object
harpoon.Analysis.Companions.DataFlowSolver<N,E,FACT>
harpoon.Analysis.Companions.DataFlowSolver.Forward<N,E,FACT>
- Enclosing class:
- DataFlowSolver<N extends Graph.Node<N,E>,E extends Graph.Edge<N,E>,FACT>
public abstract static class DataFlowSolver.Forward<N extends Graph.Node<N,E>,E extends Graph.Edge<N,E>,FACT>
- extends DataFlowSolver<N,E,FACT>
DataFlowSolver.Forward
is a dataflow solver for
forward dataflow analyses. You need only define a join
operation on your FACT
type, an initial value for
each node (usually, an HCodeElement
implementation which
also implements Graph.Node
, such as Quad
)
via the return value of the init()
method), and a means
for computing the OUT
dataflow fact given the
IN
fact for a node (HCodeElement
).
Calling compute()
will then return a mapping from
every Graph.Node
to the final IN
dataflow fact for that element.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataFlowSolver.Forward
public DataFlowSolver.Forward()
out
protected abstract FACT out(N hce,
FACT in)
- Compute the
OUT
fact given the IN
fact for a Node
(HCodeElement
).
compute
public final Map<N,FACT> compute(Graph<N,E> g)
- Description copied from class:
DataFlowSolver
- Compute all dataflow facts on the given
Graph
.
Note that HCode
subclasses with elements implementing
CFGraphable
are typically also instances of
Graph
.
- Specified by:
compute
in class DataFlowSolver<N extends Graph.Node<N,E>,E extends Graph.Edge<N,E>,FACT>