dk.brics.string.intermediate.operations
Class WorkList

java.lang.Object
  extended by dk.brics.string.intermediate.operations.WorkList

public class WorkList
extends Object

A worklist algorithm for performing flow analyses on a set of methods.


Constructor Summary
WorkList(FlowAnalysis fa)
          Creates a worklist for the given analysis.
 
Method Summary
 void add(Statement s)
          Adds the given statement to the worklist.
 void addAll(List<? extends Statement> statements)
          Adds all specified statements to the worklist.
 void addAll(Method m)
          Adds all statements from the body of the given method to the worklist.
 void iterate()
          Iterate through the worklist until no more statements remain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkList

public WorkList(FlowAnalysis fa)
Creates a worklist for the given analysis.

Parameters:
fa - the flow analysis.
Method Detail

add

public void add(Statement s)
Adds the given statement to the worklist.

Parameters:
s - the statement.

addAll

public void addAll(List<? extends Statement> statements)
Adds all specified statements to the worklist.


addAll

public void addAll(Method m)
Adds all statements from the body of the given method to the worklist.

Parameters:
m - the method.

iterate

public void iterate()
Iterate through the worklist until no more statements remain.

In each iteration step, the transfer method in the associated FlowAnalysis is called, which will in turn call the add method in the worklist for all statements affected by the change.



Copyright © 2003-2009 Anders Møller, Aske Simon Christensen, Asger Feldthaus.