java.lang.Object
Compil3r.Dataflow.Solver
Compil3r.Dataflow.WorklistSolver
Compil3r.Dataflow.PriorityQueueSolver
- public class PriorityQueueSolver
- extends WorklistSolver
PriorityQueueSolver
- Version:
- $Id: PriorityQueueSolver.java,v 1.1 2003/06/17 02:37:51 joewhaley Exp $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nodesToPriorities
protected java.util.Map nodesToPriorities
- Map from nodes to their (integer) priorities.
worklist
protected Util.Collections.MaxPriorityQueue worklist
- Priority-queue implementation of the worklist.
PriorityQueueSolver
public PriorityQueueSolver(Util.Collections.MapFactory f)
PriorityQueueSolver
public PriorityQueueSolver()
initialize
public void initialize(Problem p,
Util.Graphs.Graph graph)
- Description copied from class:
Solver
- Initializes the solver to prepare to solve the dataflow
problem on the given graph.
- Overrides:
initialize in class WorklistSolver
initialize
public void initialize(Problem p,
Util.Graphs.Graph graph,
java.util.List traversalOrder)
- Initializes this solver with the given dataflow problem, graph, and
traversal order.
initializeTraversalOrder
protected void initializeTraversalOrder(java.util.List order)
allLocations
public java.util.Iterator allLocations()
- Description copied from class:
Solver
- Returns an iteration of all graph locations.
- Specified by:
allLocations in class Solver
initializeWorklist
protected void initializeWorklist()
- Description copied from class:
WorklistSolver
- (Re-)initialize the worklist.
- Specified by:
initializeWorklist in class WorklistSolver
hasNext
protected boolean hasNext()
- Description copied from class:
WorklistSolver
- Returns true if the worklist is not empty, false otherwise.
- Specified by:
hasNext in class WorklistSolver
pull
protected java.lang.Object pull()
- Description copied from class:
WorklistSolver
- Pull the next location off of the worklist.
- Specified by:
pull in class WorklistSolver
pushAll
protected void pushAll(java.util.Collection c)
- Description copied from class:
WorklistSolver
- Push all of the given locations onto the worklist.
- Specified by:
pushAll in class WorklistSolver