public class ReturnPathTypeAnalysis extends BasicAbstractDataflowAnalysis<ReturnPathType>
Constructor and Description |
---|
ReturnPathTypeAnalysis(CFG cfg,
ReverseDepthFirstSearch rdfs,
DepthFirstSearch dfs)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
copy(ReturnPathType source,
ReturnPathType dest)
Copy dataflow facts.
|
ReturnPathType |
createFact()
Create empty (uninitialized) dataflow facts for one program point.
|
void |
edgeTransfer(Edge edge,
ReturnPathType fact)
Edge transfer function.
|
void |
finishIteration()
Called after finishing an iteration of analysis.
|
BlockOrder |
getBlockOrder(CFG cfg)
Return the BlockOrder specifying the order in which BasicBlocks should be
visited in the main dataflow loop.
|
int |
getLastUpdateTimestamp(ReturnPathType fact) |
void |
initEntryFact(ReturnPathType result)
Initialize the "entry" fact for the graph.
|
boolean |
isForwards()
Returns true if the analysis is forwards, false if backwards.
|
boolean |
isTop(ReturnPathType fact)
Is the given fact the top value.
|
void |
makeFactTop(ReturnPathType fact)
Make given fact the top value.
|
void |
meetInto(ReturnPathType fact,
Edge edge,
ReturnPathType result)
Meet a dataflow fact associated with an incoming edge into another fact.
|
boolean |
same(ReturnPathType fact1,
ReturnPathType fact2)
Are given dataflow facts the same?
|
void |
setLastUpdateTimestamp(ReturnPathType fact,
int timestamp) |
void |
startIteration()
Called before beginning an iteration of analysis.
|
void |
transfer(BasicBlock basicBlock,
org.apache.bcel.generic.InstructionHandle end,
ReturnPathType start,
ReturnPathType result)
Transfer function for the analysis.
|
factToString, getFactAfterLocation, getFactAtLocation, getFactOnEdge, getResultFact, getStartFact, resultFactIterator
public ReturnPathTypeAnalysis(CFG cfg, ReverseDepthFirstSearch rdfs, DepthFirstSearch dfs)
cfg
- the method's CFGrdfs
- a ReverseDepthFirstSearch on the method's CFGdfs
- a DepthFirstSearch on the method's CFGpublic void copy(ReturnPathType source, ReturnPathType dest)
DataflowAnalysis
public ReturnPathType createFact()
DataflowAnalysis
public void edgeTransfer(Edge edge, ReturnPathType fact)
DataflowAnalysis
A do-nothing implementation is legal, and appropriate for analyses where branches are not significant.
edgeTransfer
in interface DataflowAnalysis<ReturnPathType>
edgeTransfer
in class BasicAbstractDataflowAnalysis<ReturnPathType>
edge
- the Edgefact
- a dataflow factpublic void finishIteration()
DataflowAnalysis
finishIteration
in interface DataflowAnalysis<ReturnPathType>
finishIteration
in class BasicAbstractDataflowAnalysis<ReturnPathType>
public BlockOrder getBlockOrder(CFG cfg)
DataflowAnalysis
cfg
- the CFG upon which we're performing dataflow analysispublic int getLastUpdateTimestamp(ReturnPathType fact)
getLastUpdateTimestamp
in interface DataflowAnalysis<ReturnPathType>
getLastUpdateTimestamp
in class BasicAbstractDataflowAnalysis<ReturnPathType>
public void initEntryFact(ReturnPathType result) throws DataflowAnalysisException
DataflowAnalysis
DataflowAnalysisException
public boolean isForwards()
DataflowAnalysis
public boolean isTop(ReturnPathType fact)
DataflowAnalysis
public void makeFactTop(ReturnPathType fact)
DataflowAnalysis
public void meetInto(ReturnPathType fact, Edge edge, ReturnPathType result) throws DataflowAnalysisException
DataflowAnalysis
fact
- the predecessor fact (incoming edge)edge
- the edge from the predecessorresult
- the result factDataflowAnalysisException
public boolean same(ReturnPathType fact1, ReturnPathType fact2)
DataflowAnalysis
public void setLastUpdateTimestamp(ReturnPathType fact, int timestamp)
setLastUpdateTimestamp
in interface DataflowAnalysis<ReturnPathType>
setLastUpdateTimestamp
in class BasicAbstractDataflowAnalysis<ReturnPathType>
public void startIteration()
DataflowAnalysis
startIteration
in interface DataflowAnalysis<ReturnPathType>
startIteration
in class BasicAbstractDataflowAnalysis<ReturnPathType>
public void transfer(BasicBlock basicBlock, org.apache.bcel.generic.InstructionHandle end, ReturnPathType start, ReturnPathType result) throws DataflowAnalysisException
DataflowAnalysis
basicBlock
- the basic blockend
- if nonnull, stop before considering this instruction;
otherwise, consider all of the instructions in the basic blockstart
- dataflow facts at beginning of block (if forward analysis) or
end of block (if backwards analysis)result
- resulting dataflow facts at other end of blockDataflowAnalysisException
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.