Class DataflowSolver<T, V extends IVariable<V>>

All Implemented Interfaces:
FixedPointConstants, IFixedPointSolver<V>, VerboseAction
Direct Known Subclasses:
BitVectorSolver, BooleanSolver, NullPointerSolver

public abstract class DataflowSolver<T, V extends IVariable<V>> extends DefaultFixedPointSolver<V>
Iterative solver for a Killdall dataflow framework
  • Constructor Details

  • Method Details

    • 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
    • makeEdgeVariable

      protected abstract V 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<V extends IVariable<V>>
    • initializeWorkList

      protected void initializeWorkList()
      Description copied from class: AbstractFixedPointSolver
      Initialize the work list for iteration.j
      Specified by:
      initializeWorkList in class AbstractFixedPointSolver<V extends IVariable<V>>
    • getOut

      public V getOut(Object node)
      Returns the OUT variable for a node in the problem's flow graph.

      The solver must have initialized its variables, and the problem must provide node transfer functions.

      Parameters:
      node - a node in the problem's flow graph
      Returns:
      the node's OUT variable
      Throws:
      NullPointerException - if the node has no initialized OUT variable
    • getIn

      public V getIn(Object node)
      Returns the IN variable for a node in the problem's flow graph.

      The solver must have initialized its variables.

      Parameters:
      node - a node in the problem's flow graph
      Returns:
      the node's IN variable
      Throws:
      NullPointerException - if the node has no initialized IN variable
    • getEdge

      public @Nullable V getEdge(Object key)
    • getEdge

      public V getEdge(Object src, Object dst)
    • buildEquations

      protected void buildEquations(boolean toWorkList, boolean eager)
    • getProblem

      public IKilldallFramework<T,V> getProblem()