edu.cmu.cs.crystal.flow.worklist
Class WorklistFactory

java.lang.Object
  extended by edu.cmu.cs.crystal.flow.worklist.WorklistFactory

public class WorklistFactory
extends Object

Factory for worklist objects to be used by flow analysis implementations. Worklist objects can perform conventional or branch-sensitive flow analyses.

Author:
Kevin Bierhoff
See Also:
MotherFlowAnalysis

Constructor Summary
WorklistFactory()
          Default worklist factory.
 
Method Summary
<LE> WorklistTemplate<LE,ASTNode,ILatticeOperations<LE>>
createBranchInsensitiveWorklist(MethodDeclaration method, ITransferFunction<LE> transferFunction)
          Creates a worklist object that performs a conventional flow analysis on the given method with the given transfer function.
<LE> WorklistTemplate<LE,ASTNode,ILatticeOperations<LE>>
createBranchSensitiveWorklist(MethodDeclaration method, IBranchSensitiveTransferFunction<LE> transferFunction)
          Creates a worklist object that performs a branch-sensitive flow analysis on the given method with the given transfer function.
 void setMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
          Use the given progress monitor to listen to cancellation in subsequently created worklist instances.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorklistFactory

public WorklistFactory()
Default worklist factory.

See Also:
to use a cancellation monitor.
Method Detail

setMonitor

public void setMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
Use the given progress monitor to listen to cancellation in subsequently created worklist instances.

Parameters:
monitor - Monitor to listen to cancellation or null if worklists should not be cancelled.

createBranchInsensitiveWorklist

public <LE> WorklistTemplate<LE,ASTNode,ILatticeOperations<LE>> createBranchInsensitiveWorklist(MethodDeclaration method,
                                                                                                ITransferFunction<LE> transferFunction)
Creates a worklist object that performs a conventional flow analysis on the given method with the given transfer function.

Type Parameters:
LE -
Parameters:
method -
transferFunction -
Returns:
Worklist object that performs a conventional flow analysis.
See Also:
createBranchSensitiveWorklist(MethodDeclaration, IBranchSensitiveTransferFunction)

createBranchSensitiveWorklist

public <LE> WorklistTemplate<LE,ASTNode,ILatticeOperations<LE>> createBranchSensitiveWorklist(MethodDeclaration method,
                                                                                              IBranchSensitiveTransferFunction<LE> transferFunction)
Creates a worklist object that performs a branch-sensitive flow analysis on the given method with the given transfer function. Branch sensitivity means that the analysis will maintain separate information about different outcomes of a given AST node, such as boolean tests or exceptional control flow.

Type Parameters:
LE -
Parameters:
method -
transferFunction -
Returns:
Worklist object that performs a branch-sensitive flow analysis.