Class DataflowSolver<T, V extends IVariable<V>>
java.lang.Object
com.ibm.wala.fixedpoint.impl.AbstractFixedPointSolver<V>
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, NullPointerSolver
Iterative solver for a Killdall dataflow framework
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractFixedPointSolver
AbstractFixedPointSolver.Statement -
Field Summary
Fields inherited from class AbstractFixedPointSolver
DEFAULT_PERIODIC_MAINTENANCE_INTERVAL, DEFAULT_VERBOSE_INTERVAL, verbose, workListModifier and TypeFieldDescriptionstatic final intstatic final intstatic final booleanprotected Worklistworklist for the iterative solverFields inherited from interface FixedPointConstants
CHANGED, CHANGED_AND_FIXED, CHANGED_MASK, FIXED_MASK, NOT_CHANGED, NOT_CHANGED_AND_FIXED, SIDE_EFFECT_MASKModifier and TypeFieldDescriptionstatic final byteA return value which indicates that a lhs has changed, and the statement might need to be evaluated again.static final byteA return value which indicates that lhs has changed, and the statement need not be evaluated again.static final intThe bit-mask which defines the "CHANGED" flagstatic final intThe bit-mask which defines the "FIXED" flagstatic final byteA return value which indicates that lhs has not changed, and the statement might need to be evaluated again.static final byteA return value which indicates that lhs has not changed, and the statement need not be evaluated again.static final intThe bit-mask which defines the "SIDE EFFECT" flag -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildEquations(boolean toWorkList, boolean eager) @Nullable Vprotected voidInitialize all lattice vars in the system.protected voidInitialize the work list for iteration.jprotected abstract VmakeEdgeVariable(T src, T dst) protected abstract VmakeNodeVariable(T n, boolean IN) Methods inherited from class DefaultFixedPointSolver
getFixedPointSystemMethods inherited from class 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, toStringModifier and TypeMethodDescriptionvoidAdd all to the work list.voidAdd a step to the work list.voidchangedVariable(V v) Call this method when the contents of a variable changes.booleanintintintprotected intsubclasses should override as desired.Iterator<? extends INodeWithNumber> doubleprotected intsubclasses should override as desired.voidvoidSome setup which occurs only before the first solvestatic booleanisChanged(byte code) static booleanisFixed(byte code) static booleanisSideEffect(byte code) static Stringprotected abstract V[]makeStmtRHS(int size) booleannewStatement(V lhs, NullaryOperator<V> operator, boolean toWorkList, boolean eager) Add a step with zero operands on the right-hand side.booleannewStatement(V lhs, AbstractOperator<V> operator, V[] rhs, boolean toWorkList, boolean eager) Add a step to the system with an arbitrary number of operands on the right-hand side.booleannewStatement(V lhs, AbstractOperator<V> operator, V op1, V op2, boolean toWorkList, boolean eager) Add an equation with two operands on the right-hand side.booleannewStatement(V lhs, AbstractOperator<V> operator, V op1, V op2, V op3, boolean toWorkList, boolean eager) Add a step with three operands on the right-hand side.booleannewStatement(V lhs, UnaryOperator<V> operator, V rhs, boolean toWorkList, boolean eager) Add a step with one operand on the right-hand side.voidvoidoptional method used for performance debuggingprotected voida method that will be called every N evaluations.voidvoidsetMaxEvalBetweenTopo(int i) voidsetMinEquationsForTopSort(int i) voidsetTopologicalGrowthFactor(double d) booleansolve(MonitorUtil.IProgressMonitor monitor) Solve the set of dataflow graph.toString()
-
Constructor Details
-
DataflowSolver
-
-
Method Details
-
makeNodeVariable
-
makeEdgeVariable
-
initializeVariables
protected void initializeVariables()Description copied from class:AbstractFixedPointSolverInitialize all lattice vars in the system.- Specified by:
initializeVariablesin classAbstractFixedPointSolver<V extends IVariable<V>>
-
initializeWorkList
protected void initializeWorkList()Description copied from class:AbstractFixedPointSolverInitialize the work list for iteration.j- Specified by:
initializeWorkListin classAbstractFixedPointSolver<V extends IVariable<V>>
-
getOut
-
getIn
-
getEdge
-
getEdge
-
buildEquations
protected void buildEquations(boolean toWorkList, boolean eager) -
getProblem
-