Class DefaultFixedPointSolver<T extends IVariable<T>>
java.lang.Object
com.ibm.wala.fixedpoint.impl.AbstractFixedPointSolver<T>
com.ibm.wala.fixedpoint.impl.DefaultFixedPointSolver<T>
- All Implemented Interfaces:
FixedPointConstants, IFixedPointSolver<T>, VerboseAction
- Direct Known Subclasses:
DataflowSolver, PropagationSystem, SSAInference
public abstract class DefaultFixedPointSolver<T extends IVariable<T>>
extends AbstractFixedPointSolver<T>
Default implementation of a fixed point solver.
-
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
Methods inherited from class AbstractFixedPointSolver
addAllStatementsToWorkList, addToWorkList, changedVariable, emptyWorkList, getMaxEvalBetweenTopo, getMinSizeForTopSort, getNumberOfEvaluations, getPeriodicMaintainInterval, getStatements, getTopologicalGrowthFactor, getVerboseInterval, incNumberOfEvaluations, initForFirstSolve, initializeVariables, initializeWorkList, 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(T 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 solveprotected abstract voidInitialize all lattice vars in the system.protected abstract voidInitialize the work list for iteration.jstatic booleanisChanged(byte code) static booleanisFixed(byte code) static booleanisSideEffect(byte code) static Stringprotected abstract T[]makeStmtRHS(int size) booleannewStatement(T lhs, NullaryOperator<T> operator, boolean toWorkList, boolean eager) Add a step with zero operands on the right-hand side.booleannewStatement(T lhs, AbstractOperator<T> operator, T[] rhs, boolean toWorkList, boolean eager) Add a step to the system with an arbitrary number of operands on the right-hand side.booleannewStatement(T lhs, AbstractOperator<T> operator, T op1, T op2, boolean toWorkList, boolean eager) Add an equation with two operands on the right-hand side.booleannewStatement(T lhs, AbstractOperator<T> operator, T op1, T op2, T op3, boolean toWorkList, boolean eager) Add a step with three operands on the right-hand side.booleannewStatement(T lhs, UnaryOperator<T> operator, T 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
-
DefaultFixedPointSolver
public DefaultFixedPointSolver(int expectedOut) - Parameters:
expectedOut- number of expected out edges in the "usual" case for constraints .. used to tune graph representation
-
DefaultFixedPointSolver
public DefaultFixedPointSolver()
-
-
Method Details
-
getFixedPointSystem
- Returns:
- the set of statements solved by this
IFixedPointSolver
-