harpoon.Analysis.Companions
Class DataFlowSolver.Forward<N extends Graph.Node<N,E>,E extends Graph.Edge<N,E>,FACT>

java.lang.Object
  extended by harpoon.Analysis.Companions.DataFlowSolver<N,E,FACT>
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class harpoon.Analysis.Companions.DataFlowSolver
DataFlowSolver.Forward<N extends Graph.Node<N,E>,E extends Graph.Edge<N,E>,FACT>
 
Constructor Summary
DataFlowSolver.Forward()
           
 
Method Summary
 Map<N,FACT> compute(Graph<N,E> g)
          Compute all dataflow facts on the given Graph.
protected abstract  FACT out(N hce, FACT in)
          Compute the OUT fact given the IN fact for a Node (HCodeElement).
 
Methods inherited from class harpoon.Analysis.Companions.DataFlowSolver
init, join
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataFlowSolver.Forward

public DataFlowSolver.Forward()
Method Detail

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>