com.ibm.wala.dataflow.graph
Class DataflowSolver<T>

java.lang.Object
  extended by com.ibm.wala.fixedpoint.impl.AbstractFixedPointSolver
      extended by com.ibm.wala.fixedpoint.impl.DefaultFixedPointSolver
          extended by com.ibm.wala.dataflow.graph.DataflowSolver<T>
All Implemented Interfaces:
FixedPointConstants, IFixedPointSolver, VerboseAction
Direct Known Subclasses:
BitVectorSolver, BooleanSolver

public abstract class DataflowSolver<T>
extends DefaultFixedPointSolver

Iterative solver for a killdall dataflow framework


Field Summary
 
Fields inherited from class com.ibm.wala.fixedpoint.impl.AbstractFixedPointSolver
DEFAULT_PERIODIC_MAINTENANCE_INTERVAL, DEFAULT_VERBOSE_INTERVAL, verbose, workList
 
Fields inherited from interface com.ibm.wala.fixpoint.FixedPointConstants
CHANGED, CHANGED_AND_FIXED, CHANGED_MASK, FIXED_MASK, NOT_CHANGED, NOT_CHANGED_AND_FIXED, SIDE_EFFECT_MASK
 
Constructor Summary
DataflowSolver(IKilldallFramework<T> problem)
           
 
Method Summary
protected  void buildEquations(boolean toWorkList, boolean eager)
           
 IVariable getEdge(java.lang.Object key)
           
 IVariable getEdge(java.lang.Object src, java.lang.Object dst)
           
 IVariable getIn(java.lang.Object node)
           
 IVariable getOut(java.lang.Object node)
           
 IKilldallFramework getProblem()
           
protected  void initializeVariables()
          Initialize all lattice vars in the system.
protected  void initializeWorkList()
          Initialize the work list for iteration.j
protected abstract  IVariable makeEdgeVariable(T src, T dst)
           
protected abstract  IVariable makeNodeVariable(T n, boolean IN)
           
 
Methods inherited from class com.ibm.wala.fixedpoint.impl.DefaultFixedPointSolver
getFixedPointSystem
 
Methods inherited from class com.ibm.wala.fixedpoint.impl.AbstractFixedPointSolver
addAllStatementsToWorkList, addToWorkList, changedVariable, emptyWorkList, getMaxEvalBetweenTopo, getMinSizeForTopSort, getNumberOfEvaluations, getPeriodicMaintainInterval, getStatements, getTopologicalGrowthFactor, getVerboseInterval, incNumberOfEvaluations, initForFirstSolve, isChanged, isFixed, isSideEffect, lineBreak, newStatement, newStatement, newStatement, newStatement, newStatement, orderStatements, performVerboseAction, periodicMaintenance, removeStatement, setMaxEvalBetweenTopo, setMinEquationsForTopSort, setTopologicalGrowthFactor, solve, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataflowSolver

public DataflowSolver(IKilldallFramework<T> problem)
Parameters:
problem -
Method Detail

makeNodeVariable

protected abstract IVariable makeNodeVariable(T n,
                                              boolean IN)
Parameters:
n - a node
Returns:
a fresh variable to represent the lattice value at the IN or OUT of n

makeEdgeVariable

protected abstract IVariable makeEdgeVariable(T src,
                                              T dst)

initializeVariables

protected void initializeVariables()
Description copied from class: AbstractFixedPointSolver
Initialize all lattice vars in the system.

Specified by:
initializeVariables in class AbstractFixedPointSolver

initializeWorkList

protected void initializeWorkList()
Description copied from class: AbstractFixedPointSolver
Initialize the work list for iteration.j

Specified by:
initializeWorkList in class AbstractFixedPointSolver

getOut

public IVariable getOut(java.lang.Object node)

getIn

public IVariable getIn(java.lang.Object node)

getEdge

public IVariable getEdge(java.lang.Object key)

getEdge

public IVariable getEdge(java.lang.Object src,
                         java.lang.Object dst)

buildEquations

protected void buildEquations(boolean toWorkList,
                              boolean eager)

getProblem

public IKilldallFramework getProblem()