harpoon.Analysis.Companions
Class DataFlowSolver<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>
Direct Known Subclasses:
DataFlowSolver.Forward

public abstract class DataFlowSolver<N extends Graph.Node<N,E>,E extends Graph.Edge<N,E>,FACT>
extends Object

The DataFlowSolver class provides a parameterized framework for building simple data flow analyses for various IRs. The DataFlowSolver.Forward and DataFlowSolver.Backward subclasses contain code for forward and backward analyses, respectively.

Version:
$Id: DataFlowSolver.java,v 1.5 2004/02/08 03:19:17 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Nested Class Summary
static class DataFlowSolver.Forward<N extends Graph.Node<N,E>,E extends Graph.Edge<N,E>,FACT>
          DataFlowSolver.Forward is a dataflow solver for forward dataflow analyses.
 
Constructor Summary
DataFlowSolver()
           
 
Method Summary
abstract  Map<N,FACT> compute(Graph<N,E> hc)
          Compute all dataflow facts on the given Graph.
protected abstract  FACT init(N hce)
          Return the initial value of the dataflow FACT for the given Node (often, an HCodeElement).
protected abstract  FACT join(FACT e1, FACT e2)
          Compute the join operation on two dataflow FACTs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataFlowSolver

public DataFlowSolver()
Method Detail

join

protected abstract FACT join(FACT e1,
                             FACT e2)
Compute the join operation on two dataflow FACTs.


init

protected abstract FACT init(N hce)
Return the initial value of the dataflow FACT for the given Node (often, an HCodeElement).


compute

public abstract Map<N,FACT> compute(Graph<N,E> hc)
Compute all dataflow facts on the given Graph. Note that HCode subclasses with elements implementing CFGraphable are typically also instances of Graph.