edu.umd.cs.findbugs.ba

Class Dataflow<Fact,AnalysisType>

public class Dataflow<Fact,AnalysisType extends DataflowAnalysis<Fact>> extends Object

Perform dataflow analysis on a method using a control flow graph. Both forward and backward analyses can be performed. The analysis's transfer function is applied to transform the meet of the results of the block's logical predecessors (the block's start facts) into the block's result facts.

Author: David Hovemeyer

See Also: CFG DataflowAnalysis

Constructor Summary
Dataflow(CFG cfg, AnalysisType analysis)
Constructor.
Method Summary
voidexecute()
Run the algorithm.
AnalysisTypegetAnalysis()
Get the analysis object.
CFGgetCFG()
Get the CFG object.
intgetNumIterations()
Return the number of iterations of the main execution loop.
FactgetResultFact(BasicBlock block)
Get dataflow facts for end of given block.
FactgetStartFact(BasicBlock block)
Get dataflow facts for start of given block.

Constructor Detail

Dataflow

public Dataflow(CFG cfg, AnalysisType analysis)
Constructor.

Parameters: cfg the control flow graph analysis the DataflowAnalysis to be run

Method Detail

execute

public void execute()
Run the algorithm. Afterwards, caller can use the getStartFact() and getResultFact() methods to to get dataflow facts at start and result points of each block.

getAnalysis

public AnalysisType getAnalysis()
Get the analysis object.

getCFG

public CFG getCFG()
Get the CFG object.

getNumIterations

public int getNumIterations()
Return the number of iterations of the main execution loop.

getResultFact

public Fact getResultFact(BasicBlock block)
Get dataflow facts for end of given block.

getStartFact

public Fact getStartFact(BasicBlock block)
Get dataflow facts for start of given block.
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.