soot.dava.toolkits.base.AST.structuredAnalysis
Class CP

java.lang.Object
  extended by soot.dava.toolkits.base.AST.structuredAnalysis.StructuredAnalysis
      extended by soot.dava.toolkits.base.AST.structuredAnalysis.CP

public class CP
extends StructuredAnalysis


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
CP(ASTMethodNode analyze, HashMap<String,Object> constantFields, HashMap<String,SootField> classNameFieldNameToSootFieldMapping)
           
 
Method Summary
 CPTuple checkForValueHints(ASTCondition cond, CPFlowSet input, boolean isElseBranch)
           
 Object cloneFlowSet(Object flowSet)
          Make a clone of the flowset The implementor should know when they want a shallow or deep clone
 CPTuple createCPTupleIfPossible(Value a, Value b, CPFlowSet input)
           
 void createInitialInput()
           
 DavaFlowSet emptyFlowSet()
           
 Object killButGetValueForUse(Local left, CPFlowSet toReturn)
           
 Object newInitialFlow()
           
 Object processASTIfElseNode(ASTIfElseNode node, Object input)
           
 Object processASTIfNode(ASTIfNode node, Object input)
           
 Object processStatement(Stmt s, Object input)
          Specific stmts within AST Constructs are processed through this method.
 Object processSwitchKey(Value key, Object input)
          Deal with the key in the switch construct
 Object processSynchronizedLocal(Local local, Object input)
          To deal with the local used for synch blocks
 Object processUnaryBinaryCondition(ASTUnaryBinaryCondition cond, Object input)
          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 separatly.
 void setMergeType()
           
 
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, processASTLabeledBlockNode, processASTMethodNode, processASTNode, processASTStatementSequenceNode, processASTSwitchNode, processASTSynchronizedBlockNode, processASTTryNode, processASTUnconditionalLoopNode, processASTWhileNode, processCondition, processSingleSubBodyNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CP

public CP(ASTMethodNode analyze,
          HashMap<String,Object> constantFields,
          HashMap<String,SootField> classNameFieldNameToSootFieldMapping)
Method Detail

createInitialInput

public void createInitialInput()

emptyFlowSet

public DavaFlowSet emptyFlowSet()
Specified by:
emptyFlowSet in class StructuredAnalysis

setMergeType

public void setMergeType()
Specified by:
setMergeType in class StructuredAnalysis

newInitialFlow

public Object newInitialFlow()
Specified by:
newInitialFlow in class StructuredAnalysis

cloneFlowSet

public Object cloneFlowSet(Object flowSet)
Description copied from class: StructuredAnalysis
Make a clone of the flowset The implementor should know when they want a shallow or deep clone

Specified by:
cloneFlowSet in class StructuredAnalysis

processUnaryBinaryCondition

public Object processUnaryBinaryCondition(ASTUnaryBinaryCondition cond,
                                          Object input)
Description copied from class: StructuredAnalysis
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 separatly. To be able to deal with entire aggregated conditions the user should wite their own implementation of the method processCondition

Specified by:
processUnaryBinaryCondition in class StructuredAnalysis

processSynchronizedLocal

public Object processSynchronizedLocal(Local local,
                                       Object input)
Description copied from class: StructuredAnalysis
To deal with the local used for synch blocks

Specified by:
processSynchronizedLocal in class StructuredAnalysis

processSwitchKey

public Object processSwitchKey(Value key,
                               Object input)
Description copied from class: StructuredAnalysis
Deal with the key in the switch construct

Specified by:
processSwitchKey in class StructuredAnalysis

processStatement

public Object processStatement(Stmt s,
                               Object input)
Description copied from class: StructuredAnalysis
Specific stmts within AST Constructs are processed through this method. It will be invoked everytime a stmt is encountered

Specified by:
processStatement in class StructuredAnalysis

killButGetValueForUse

public Object killButGetValueForUse(Local left,
                                    CPFlowSet toReturn)

processASTIfNode

public Object processASTIfNode(ASTIfNode node,
                               Object input)
Overrides:
processASTIfNode in class StructuredAnalysis

processASTIfElseNode

public Object processASTIfElseNode(ASTIfElseNode node,
                                   Object input)
Overrides:
processASTIfElseNode in class StructuredAnalysis

checkForValueHints

public CPTuple checkForValueHints(ASTCondition cond,
                                  CPFlowSet input,
                                  boolean isElseBranch)

createCPTupleIfPossible

public CPTuple createCPTupleIfPossible(Value a,
                                       Value b,
                                       CPFlowSet input)