joeq.Compiler.Dataflow
Class Solver

java.lang.Object
  extended by joeq.Compiler.Dataflow.Solver
Direct Known Subclasses:
IterativeSolver, WorklistSolver

public abstract class Solver
extends Object

Solver

Version:
$Id: Solver.java 1931 2004-09-22 22:17:47Z joewhaley $
Author:
John Whaley

Field Summary
protected  Map dataflowValues
          Map from locations to dataflow values.
protected  jwutil.collections.MapFactory factory
          Map factory to create map from locations to dataflow values.
protected  Problem problem
          The dataflow problem to solve.
 
Constructor Summary
protected Solver()
           
protected Solver(jwutil.collections.MapFactory factory)
           
 
Method Summary
abstract  Iterator allLocations()
          Returns an iteration of all graph locations.
abstract  Iterator boundaryLocations()
          Returns an iteration of all boundary locations.
static void compareResults(jwutil.graphs.Graph g, Solver s1, Solver s2)
           
 boolean direction()
          Returns the direction of the dataflow problem that we are solving.
static void dumpResults(jwutil.graphs.Graph g, Solver s)
           
 Fact getDataflowValue(Object c)
          Get the dataflow value associated with the given location.
 void initialize(Problem p, jwutil.graphs.Graph graph)
          Initializes the solver to prepare to solve the dataflow problem on the given graph.
protected  void initializeDataflowValueMap()
          (Re-)initialize the map from locations to dataflow values.
 void reset()
          Frees the memory associated with this solver.
abstract  void solve()
          Solves this dataflow problem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

problem

protected Problem problem
The dataflow problem to solve.


factory

protected final jwutil.collections.MapFactory factory
Map factory to create map from locations to dataflow values.


dataflowValues

protected Map dataflowValues
Map from locations to dataflow values.

Constructor Detail

Solver

protected Solver(jwutil.collections.MapFactory factory)

Solver

protected Solver()
Method Detail

direction

public boolean direction()
Returns the direction of the dataflow problem that we are solving.


allLocations

public abstract Iterator allLocations()
Returns an iteration of all graph locations.


boundaryLocations

public abstract Iterator boundaryLocations()
Returns an iteration of all boundary locations.


initialize

public void initialize(Problem p,
                       jwutil.graphs.Graph graph)
Initializes the solver to prepare to solve the dataflow problem on the given graph.


solve

public abstract void solve()
Solves this dataflow problem.


reset

public void reset()
Frees the memory associated with this solver.


initializeDataflowValueMap

protected void initializeDataflowValueMap()
(Re-)initialize the map from locations to dataflow values.


getDataflowValue

public Fact getDataflowValue(Object c)
Get the dataflow value associated with the given location.


dumpResults

public static void dumpResults(jwutil.graphs.Graph g,
                               Solver s)

compareResults

public static void compareResults(jwutil.graphs.Graph g,
                                  Solver s1,
                                  Solver s2)


Copyright © 2001-2008 John Whaley. All Rights Reserved.