Package com.ibm.wala.dataflow.graph
Class DataflowSolver<T,V extends IVariable<V>>
- java.lang.Object
-
- com.ibm.wala.fixedpoint.impl.AbstractFixedPointSolver<T>
-
- com.ibm.wala.fixedpoint.impl.DefaultFixedPointSolver<V>
-
- com.ibm.wala.dataflow.graph.DataflowSolver<T,V>
-
- All Implemented Interfaces:
FixedPointConstants
,IFixedPointSolver<V>
,VerboseAction
- Direct Known Subclasses:
BitVectorSolver
,BooleanSolver
public abstract class DataflowSolver<T,V extends IVariable<V>> extends DefaultFixedPointSolver<V>
Iterative solver for a Killdall dataflow framework
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.ibm.wala.fixedpoint.impl.AbstractFixedPointSolver
AbstractFixedPointSolver.Statement
-
-
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
Constructors Constructor Description DataflowSolver(IKilldallFramework<T,V> problem)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
buildEquations(boolean toWorkList, boolean eager)
V
getEdge(java.lang.Object key)
V
getEdge(java.lang.Object src, java.lang.Object dst)
V
getIn(java.lang.Object node)
V
getOut(java.lang.Object node)
IKilldallFramework<T,V>
getProblem()
protected void
initializeVariables()
Initialize all lattice vars in the system.protected void
initializeWorkList()
Initialize the work list for iteration.jprotected abstract V
makeEdgeVariable(T src, T dst)
protected abstract V
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, makeStmtRHS, newStatement, newStatement, newStatement, newStatement, newStatement, orderStatements, performVerboseAction, periodicMaintenance, removeStatement, setMaxEvalBetweenTopo, setMinEquationsForTopSort, setTopologicalGrowthFactor, solve, toString
-
-
-
-
Constructor Detail
-
DataflowSolver
public DataflowSolver(IKilldallFramework<T,V> problem)
-
-
Method Detail
-
makeNodeVariable
protected abstract V 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
-
initializeVariables
protected void initializeVariables()
Description copied from class:AbstractFixedPointSolver
Initialize all lattice vars in the system.- Specified by:
initializeVariables
in classAbstractFixedPointSolver<V extends IVariable<V>>
-
initializeWorkList
protected void initializeWorkList()
Description copied from class:AbstractFixedPointSolver
Initialize the work list for iteration.j- Specified by:
initializeWorkList
in classAbstractFixedPointSolver<V extends IVariable<V>>
-
getOut
public V getOut(java.lang.Object node)
-
getIn
public V getIn(java.lang.Object node)
-
getEdge
public V getEdge(java.lang.Object key)
-
getEdge
public V getEdge(java.lang.Object src, java.lang.Object dst)
-
buildEquations
protected void buildEquations(boolean toWorkList, boolean eager)
-
getProblem
public IKilldallFramework<T,V> getProblem()
-
-