Class ReachingDefs
- java.lang.Object
-
- soot.dava.toolkits.base.AST.structuredAnalysis.StructuredAnalysis<Stmt>
-
- soot.dava.toolkits.base.AST.structuredAnalysis.ReachingDefs
-
public class ReachingDefs extends StructuredAnalysis<Stmt>
CHANGE LOG: * November 21st Added support for implicit breaks and continues Tested code for reaching defs within switch/try/if/while/for * November 22nd Refactored code to make structure flow analysis framework handle breaks and returns. * November 24th newInitialFlow ERROR............initialFlow should be the set of all defs........since there needs to exist SOME path
-
-
Field Summary
-
Fields inherited from class soot.dava.toolkits.base.AST.structuredAnalysis.StructuredAnalysis
DEBUG, DEBUG_IF, DEBUG_STATEMENTS, DEBUG_TRY, DEBUG_WHILE, MERGETYPE
-
-
Constructor Summary
Constructors Constructor Description ReachingDefs(Object analyze)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DavaFlowSet<Stmt>cloneFlowSet(DavaFlowSet<Stmt> flowSet)Make a clone of the flowset The implementor should know when they want a shallow or deep cloneDavaFlowSet<Stmt>emptyFlowSet()voidgen(DavaFlowSet<Stmt> in, DefinitionStmt s)List<DefinitionStmt>getReachingDefs(Local local, Object node)voidkill(DavaFlowSet<Stmt> in, Local redefined)DavaFlowSet<Stmt>newInitialFlow()DavaFlowSet<Stmt>processStatement(Stmt s, DavaFlowSet<Stmt> inSet)Specific stmts within AST Constructs are processed through this method.DavaFlowSet<Stmt>processSwitchKey(Value key, DavaFlowSet<Stmt> inSet)Deal with the key in the switch constructDavaFlowSet<Stmt>processSynchronizedLocal(Local local, DavaFlowSet<Stmt> inSet)To deal with the local used for synch blocksDavaFlowSet<Stmt>processUnaryBinaryCondition(ASTUnaryBinaryCondition cond, DavaFlowSet<Stmt> inSet)To 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.voidreachingDefsToString(Object node)voidsetMergeType()-
Methods inherited from class soot.dava.toolkits.base.AST.structuredAnalysis.StructuredAnalysis
debug, debug, getAfterSet, getBeforeSet, getLabel, handleBreak, handleContinue, isDifferent, merge, mergeExplicitAndImplicit, print, process, processAbruptStatements, processASTDoWhileNode, processASTForLoopNode, processASTIfElseNode, processASTIfNode, processASTLabeledBlockNode, processASTMethodNode, processASTNode, processASTStatementSequenceNode, processASTSwitchNode, processASTSynchronizedBlockNode, processASTTryNode, processASTUnconditionalLoopNode, processASTWhileNode, processCondition, processSingleSubBodyNode
-
-
-
-
Constructor Detail
-
ReachingDefs
public ReachingDefs(Object analyze)
-
-
Method Detail
-
emptyFlowSet
public DavaFlowSet<Stmt> emptyFlowSet()
- Specified by:
emptyFlowSetin classStructuredAnalysis<Stmt>
-
newInitialFlow
public DavaFlowSet<Stmt> newInitialFlow()
- Specified by:
newInitialFlowin classStructuredAnalysis<Stmt>
-
setMergeType
public void setMergeType()
- Specified by:
setMergeTypein classStructuredAnalysis<Stmt>
-
cloneFlowSet
public DavaFlowSet<Stmt> cloneFlowSet(DavaFlowSet<Stmt> 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<Stmt>
-
processUnaryBinaryCondition
public DavaFlowSet<Stmt> processUnaryBinaryCondition(ASTUnaryBinaryCondition cond, DavaFlowSet<Stmt> inSet)
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<Stmt>
-
processSynchronizedLocal
public DavaFlowSet<Stmt> processSynchronizedLocal(Local local, DavaFlowSet<Stmt> inSet)
Description copied from class:StructuredAnalysisTo deal with the local used for synch blocks- Specified by:
processSynchronizedLocalin classStructuredAnalysis<Stmt>
-
processSwitchKey
public DavaFlowSet<Stmt> processSwitchKey(Value key, DavaFlowSet<Stmt> inSet)
Description copied from class:StructuredAnalysisDeal with the key in the switch construct- Specified by:
processSwitchKeyin classStructuredAnalysis<Stmt>
-
processStatement
public DavaFlowSet<Stmt> processStatement(Stmt s, DavaFlowSet<Stmt> inSet)
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<Stmt>
-
gen
public void gen(DavaFlowSet<Stmt> in, DefinitionStmt s)
-
kill
public void kill(DavaFlowSet<Stmt> in, Local redefined)
-
getReachingDefs
public List<DefinitionStmt> getReachingDefs(Local local, Object node)
-
reachingDefsToString
public void reachingDefsToString(Object node)
-
-