Package edu.umd.cs.findbugs.ba
Class ReturnPathAnalysis
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis<Fact>
-
- edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis<Fact>
-
- edu.umd.cs.findbugs.ba.ForwardDataflowAnalysis<ReturnPath>
-
- edu.umd.cs.findbugs.ba.ReturnPathAnalysis
-
- All Implemented Interfaces:
DataflowAnalysis<ReturnPath>,EdgeTypes
public class ReturnPathAnalysis extends ForwardDataflowAnalysis<ReturnPath> implements EdgeTypes
-
-
Field Summary
-
Fields inherited from interface edu.umd.cs.findbugs.ba.EdgeTypes
BACKEDGE_SOURCE_EDGE, BACKEDGE_TARGET_EDGE, CHECKED_EXCEPTIONS_FLAG, EXIT_EDGE, EXPLICIT_EXCEPTIONS_FLAG, FALL_THROUGH_EDGE, GOTO_EDGE, HANDLED_EXCEPTION_EDGE, IFCMP_EDGE, JSR_EDGE, RET_EDGE, RETURN_EDGE, START_EDGE, SWITCH_DEFAULT_EDGE, SWITCH_EDGE, UNHANDLED_EXCEPTION_EDGE, UNKNOWN_EDGE
-
-
Constructor Summary
Constructors Constructor Description ReturnPathAnalysis(DepthFirstSearch dfs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopy(ReturnPath source, ReturnPath dest)Copy dataflow facts.ReturnPathcreateFact()Create empty (uninitialized) dataflow facts for one program point.voidinitEntryFact(ReturnPath fact)Initialize the "entry" fact for the graph.booleanisFactValid(ReturnPath fact)Determine whether the given fact is valid (neither top nor bottom).booleanisTop(ReturnPath fact)Is the given fact the top value.voidmakeFactTop(ReturnPath fact)Make given fact the top value.voidmeetInto(ReturnPath fact, Edge edge, ReturnPath result)Meet a dataflow fact associated with an incoming edge into another fact.booleansame(ReturnPath fact1, ReturnPath fact2)Are given dataflow facts the same?voidtransferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, ReturnPath fact)Transfer function for a single instruction.-
Methods inherited from class edu.umd.cs.findbugs.ba.ForwardDataflowAnalysis
getBlockOrder, getDepthFirstSearch, isForwards
-
Methods inherited from class edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis
getFactAfterLocation, getFactAtLocation, transfer
-
Methods inherited from class edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis
edgeTransfer, factToString, finishIteration, getFactOnEdge, getLastUpdateTimestamp, getResultFact, getStartFact, resultFactIterator, setLastUpdateTimestamp, startIteration
-
-
-
-
Constructor Detail
-
ReturnPathAnalysis
public ReturnPathAnalysis(DepthFirstSearch dfs)
-
-
Method Detail
-
createFact
public ReturnPath createFact()
Description copied from interface:DataflowAnalysisCreate empty (uninitialized) dataflow facts for one program point. A valid value will be copied into it before it is used.- Specified by:
createFactin interfaceDataflowAnalysis<ReturnPath>
-
copy
public void copy(ReturnPath source, ReturnPath dest)
Description copied from interface:DataflowAnalysisCopy dataflow facts.- Specified by:
copyin interfaceDataflowAnalysis<ReturnPath>
-
initEntryFact
public void initEntryFact(ReturnPath fact)
Description copied from interface:DataflowAnalysisInitialize the "entry" fact for the graph.- Specified by:
initEntryFactin interfaceDataflowAnalysis<ReturnPath>
-
makeFactTop
public void makeFactTop(ReturnPath fact)
Description copied from interface:DataflowAnalysisMake given fact the top value.- Specified by:
makeFactTopin interfaceDataflowAnalysis<ReturnPath>
-
isTop
public boolean isTop(ReturnPath fact)
Description copied from interface:DataflowAnalysisIs the given fact the top value.- Specified by:
isTopin interfaceDataflowAnalysis<ReturnPath>
-
same
public boolean same(ReturnPath fact1, ReturnPath fact2)
Description copied from interface:DataflowAnalysisAre given dataflow facts the same?- Specified by:
samein interfaceDataflowAnalysis<ReturnPath>
-
transferInstruction
public void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, ReturnPath fact) throws DataflowAnalysisExceptionDescription copied from class:AbstractDataflowAnalysisTransfer function for a single instruction.- Specified by:
transferInstructionin classAbstractDataflowAnalysis<ReturnPath>- Parameters:
handle- the instructionbasicBlock- the BasicBlock containing the instruction; needed to disambiguate instructions in inlined JSR subroutinesfact- which should be modified based on the instruction- Throws:
DataflowAnalysisException
-
isFactValid
public boolean isFactValid(ReturnPath fact)
Description copied from class:AbstractDataflowAnalysisDetermine whether the given fact is valid (neither top nor bottom).- Specified by:
isFactValidin classAbstractDataflowAnalysis<ReturnPath>
-
meetInto
public void meetInto(ReturnPath fact, Edge edge, ReturnPath result) throws DataflowAnalysisException
Description copied from interface:DataflowAnalysisMeet a dataflow fact associated with an incoming edge into another fact. This is used to determine the start fact for a basic block.- Specified by:
meetIntoin interfaceDataflowAnalysis<ReturnPath>- Parameters:
fact- the predecessor fact (incoming edge)edge- the edge from the predecessorresult- the result fact- Throws:
DataflowAnalysisException
-
-