| |
|
| java.lang.Object edu.umd.cs.findbugs.ba.Dataflow
Dataflow | public class Dataflow (Code) | | Perform dataflow analysis on a method using a control flow graph.
Both forward and backward analyses can be performed.
- The "start" point of each block is the entry (forward analyses)
or the exit (backward analyses).
- The "result" point of each block is the exit (forward analyses)
or the entry (backward analyses).
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 See Also: DataflowAnalysis |
Inner Class :static class BackwardProgramOrder extends ForwardProgramOrder | |
Field Summary | |
public static boolean | DEBUG |
Constructor Summary | |
public | Dataflow(CFG cfg, AnalysisType analysis) Constructor. |
DEBUG | public static boolean DEBUG(Code) | | |
Dataflow | public Dataflow(CFG cfg, AnalysisType analysis)(Code) | | Constructor.
Parameters: cfg - the control flow graph Parameters: analysis - the DataflowAnalysis to be run |
dumpDataflow | public void dumpDataflow(AnalysisType analysis)(Code) | | |
execute | public void execute() throws DataflowAnalysisException(Code) | | 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()(Code) | | Get the analysis object.
|
getCFG | public CFG getCFG()(Code) | | Get the CFG object.
|
getFactAfterLocation | public Fact getFactAfterLocation(Location location) throws DataflowAnalysisException(Code) | | Get the dataflow fact representing the point just after given Location.
Note "after" is meant in the logical sense, so for backward analyses,
after means before the location in the control flow sense.
Parameters: location - the Location the dataflow value after given Location throws: DataflowAnalysisException - |
getFactAtLocation | public Fact getFactAtLocation(Location location) throws DataflowAnalysisException(Code) | | Get dataflow fact at (just before) given Location.
Note "before" is meant in the logical sense, so for backward analyses,
before means after the location in the control flow sense.
Parameters: location - the Location the dataflow value at given Location throws: DataflowAnalysisException - |
getNumIterations | public int getNumIterations()(Code) | | Return the number of iterations of the main execution loop.
|
getResultFact | public Fact getResultFact(BasicBlock block)(Code) | | Get dataflow facts for end of given block.
|
getStartFact | public Fact getStartFact(BasicBlock block)(Code) | | Get dataflow facts for start of given block.
|
|
|
|