Class UnreachableCodeFinder
- java.lang.Object
-
- soot.dava.toolkits.base.AST.structuredAnalysis.StructuredAnalysis
-
- soot.dava.toolkits.base.AST.structuredAnalysis.UnreachableCodeFinder
-
public class UnreachableCodeFinder extends StructuredAnalysis
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classUnreachableCodeFinder.UnreachableCodeFlowSet
-
Field Summary
Fields Modifier and Type Field Description static booleanDEBUG-
Fields inherited from class soot.dava.toolkits.base.AST.structuredAnalysis.StructuredAnalysis
DEBUG_IF, DEBUG_STATEMENTS, DEBUG_TRY, DEBUG_WHILE, MERGETYPE
-
-
Constructor Summary
Constructors Constructor Description UnreachableCodeFinder(Object analyze)
-
Method Summary
-
Methods inherited from class soot.dava.toolkits.base.AST.structuredAnalysis.StructuredAnalysis
debug, debug, getAfterSet, getBeforeSet, getLabel, handleContinue, isDifferent, merge, mergeExplicitAndImplicit, print, process, processASTMethodNode, processASTNode, processCondition, processSingleSubBodyNode
-
-
-
-
Constructor Detail
-
UnreachableCodeFinder
public UnreachableCodeFinder(Object analyze)
-
-
Method Detail
-
setMergeType
public void setMergeType()
- Specified by:
setMergeTypein classStructuredAnalysis
-
newInitialFlow
public DavaFlowSet newInitialFlow()
- Specified by:
newInitialFlowin classStructuredAnalysis
-
emptyFlowSet
public DavaFlowSet emptyFlowSet()
- Specified by:
emptyFlowSetin classStructuredAnalysis
-
cloneFlowSet
public UnreachableCodeFinder.UnreachableCodeFlowSet cloneFlowSet(DavaFlowSet flowSet)
Description copied from class:StructuredAnalysisMake a clone of the flowset The implementor should know when they want a shallow or deep clone- Specified by:
cloneFlowSetin classStructuredAnalysis
-
processUnaryBinaryCondition
public DavaFlowSet processUnaryBinaryCondition(ASTUnaryBinaryCondition cond, DavaFlowSet input)
Description copied from class:StructuredAnalysisTo have maximum flexibility in analyzing conditions the analysis API breaks down the aggregated conditions to simple unary or binary conditions user defined code can then deal with each condition separately. To be able to deal with entire aggregated conditions the user should wite their own implementation of the method processCondition- Specified by:
processUnaryBinaryConditionin classStructuredAnalysis
-
processSynchronizedLocal
public DavaFlowSet processSynchronizedLocal(Local local, DavaFlowSet input)
Description copied from class:StructuredAnalysisTo deal with the local used for synch blocks- Specified by:
processSynchronizedLocalin classStructuredAnalysis
-
processSwitchKey
public DavaFlowSet processSwitchKey(Value key, DavaFlowSet input)
Description copied from class:StructuredAnalysisDeal with the key in the switch construct- Specified by:
processSwitchKeyin classStructuredAnalysis
-
processStatement
public DavaFlowSet processStatement(Stmt s, DavaFlowSet input)
Description copied from class:StructuredAnalysisSpecific stmts within AST Constructs are processed through this method. It will be invoked everytime a stmt is encountered- Specified by:
processStatementin classStructuredAnalysis
-
processAbruptStatements
public DavaFlowSet processAbruptStatements(Stmt s, DavaFlowSet input)
Description copied from class:StructuredAnalysisWhenever a statement has to be processed the first step is to invoke this method. This is to remove the tedious work of adding code to deal with abrupt control flow from the programmer of the analysis. The method invokes the processStatement method for all other statements A programmer can decide to override this method if they want to do something specific- Overrides:
processAbruptStatementsin classStructuredAnalysis
-
handleBreak
public DavaFlowSet handleBreak(String label, DavaFlowSet output, ASTNode node)
Description copied from class:StructuredAnalysisNeed to handleBreak stmts There can be explicit breaks (in which case label is non null) There can always be implicit breaks ASTNode is non null- Overrides:
handleBreakin classStructuredAnalysis
-
isReachable
public boolean isReachable(Object input)
-
processASTStatementSequenceNode
public DavaFlowSet processASTStatementSequenceNode(ASTStatementSequenceNode node, DavaFlowSet input)
- Overrides:
processASTStatementSequenceNodein classStructuredAnalysis
-
processASTLabeledBlockNode
public DavaFlowSet processASTLabeledBlockNode(ASTLabeledBlockNode node, DavaFlowSet input)
- Overrides:
processASTLabeledBlockNodein classStructuredAnalysis
-
processASTSynchronizedBlockNode
public DavaFlowSet processASTSynchronizedBlockNode(ASTSynchronizedBlockNode node, DavaFlowSet input)
- Overrides:
processASTSynchronizedBlockNodein classStructuredAnalysis
-
processASTIfElseNode
public DavaFlowSet processASTIfElseNode(ASTIfElseNode node, DavaFlowSet input)
- Overrides:
processASTIfElseNodein classStructuredAnalysis
-
ifNotReachableReturnInputElseProcessBodyAndReturnTrue
public DavaFlowSet ifNotReachableReturnInputElseProcessBodyAndReturnTrue(ASTNode node, DavaFlowSet input)
-
processASTIfNode
public DavaFlowSet processASTIfNode(ASTIfNode node, DavaFlowSet input)
- Overrides:
processASTIfNodein classStructuredAnalysis
-
processASTWhileNode
public DavaFlowSet processASTWhileNode(ASTWhileNode node, DavaFlowSet input)
- Overrides:
processASTWhileNodein classStructuredAnalysis
-
processASTDoWhileNode
public DavaFlowSet processASTDoWhileNode(ASTDoWhileNode node, DavaFlowSet input)
- Overrides:
processASTDoWhileNodein classStructuredAnalysis
-
processASTUnconditionalLoopNode
public DavaFlowSet processASTUnconditionalLoopNode(ASTUnconditionalLoopNode node, DavaFlowSet input)
- Overrides:
processASTUnconditionalLoopNodein classStructuredAnalysis
-
processASTForLoopNode
public DavaFlowSet processASTForLoopNode(ASTForLoopNode node, DavaFlowSet input)
- Overrides:
processASTForLoopNodein classStructuredAnalysis
-
processASTSwitchNode
public DavaFlowSet processASTSwitchNode(ASTSwitchNode node, DavaFlowSet input)
- Overrides:
processASTSwitchNodein classStructuredAnalysis
-
processASTTryNode
public DavaFlowSet processASTTryNode(ASTTryNode node, DavaFlowSet input)
- Overrides:
processASTTryNodein classStructuredAnalysis
-
isConstructReachable
public boolean isConstructReachable(Object construct)
-
-