public abstract class AbstractDominatorsAnalysis extends BasicAbstractDataflowAnalysis<java.util.BitSet>
BasicAbstractDataflowAnalysis.getResultFact(edu.umd.cs.findbugs.ba.BasicBlock) method to get the dominator set for a given
basic block. The dominator sets are represented using the
BitSet class, with the individual bits corresponding to the
IDs of basic blocks.
Subclasses extend this class to compute either dominators or postdominators.
An EdgeChooser may be specified to select which edges to take into account. For example, exception edges could be ignored.
DataflowAnalysis,
CFG,
BasicBlock| Constructor and Description |
|---|
AbstractDominatorsAnalysis(CFG cfg,
boolean ignoreExceptionEdges)
Constructor.
|
AbstractDominatorsAnalysis(CFG cfg,
EdgeChooser edgeChooser)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copy(java.util.BitSet source,
java.util.BitSet dest)
Copy dataflow facts.
|
java.util.BitSet |
createFact()
Create empty (uninitialized) dataflow facts for one program point.
|
java.util.BitSet |
getAllDominatedBy(BasicBlock dominator)
Get a bitset containing the unique IDs of all blocks in CFG dominated (or
postdominated, depending on how the analysis was done) by given block.
|
java.util.BitSet |
getAllDominatorsOf(BasicBlock block)
Get a bitset containing the unique IDs of all blocks which dominate (or
postdominate) the given block.
|
void |
initEntryFact(java.util.BitSet result)
Initialize the "entry" fact for the graph.
|
boolean |
isTop(java.util.BitSet fact)
Is the given fact the top value.
|
void |
makeFactTop(java.util.BitSet fact)
Make given fact the top value.
|
void |
meetInto(java.util.BitSet fact,
Edge edge,
java.util.BitSet result)
Meet a dataflow fact associated with an incoming edge into another fact.
|
boolean |
same(java.util.BitSet fact1,
java.util.BitSet fact2)
Are given dataflow facts the same?
|
void |
transfer(BasicBlock basicBlock,
org.apache.bcel.generic.InstructionHandle end,
java.util.BitSet start,
java.util.BitSet result)
Transfer function for the analysis.
|
edgeTransfer, factToString, finishIteration, getFactAfterLocation, getFactAtLocation, getFactOnEdge, getLastUpdateTimestamp, getResultFact, getStartFact, resultFactIterator, setLastUpdateTimestamp, startIterationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBlockOrder, isForwardspublic AbstractDominatorsAnalysis(CFG cfg, boolean ignoreExceptionEdges)
cfg - the CFG to compute dominator relationships forignoreExceptionEdges - true if exception edges should be ignoredpublic AbstractDominatorsAnalysis(CFG cfg, EdgeChooser edgeChooser)
cfg - the CFG to compute dominator relationships foredgeChooser - EdgeChooser to choose which Edges to consider significantpublic java.util.BitSet createFact()
DataflowAnalysispublic void copy(java.util.BitSet source,
java.util.BitSet dest)
DataflowAnalysispublic void initEntryFact(java.util.BitSet result)
DataflowAnalysispublic boolean isTop(java.util.BitSet fact)
DataflowAnalysispublic void makeFactTop(java.util.BitSet fact)
DataflowAnalysispublic boolean same(java.util.BitSet fact1,
java.util.BitSet fact2)
DataflowAnalysispublic void transfer(BasicBlock basicBlock, @CheckForNull org.apache.bcel.generic.InstructionHandle end, java.util.BitSet start, java.util.BitSet result) throws DataflowAnalysisException
DataflowAnalysisbasicBlock - 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 blockDataflowAnalysisExceptionpublic void meetInto(java.util.BitSet fact,
Edge edge,
java.util.BitSet result)
throws DataflowAnalysisException
DataflowAnalysisfact - the predecessor fact (incoming edge)edge - the edge from the predecessorresult - the result factDataflowAnalysisExceptionpublic java.util.BitSet getAllDominatorsOf(BasicBlock block)
block - a BasicBlockpublic java.util.BitSet getAllDominatedBy(BasicBlock dominator)
dominator - we want to get all blocks dominated (or postdominated) by this
blockFindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.