public abstract class StructuredAnalysis
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
static boolean |
DEBUG_IF |
static boolean |
DEBUG_STATEMENTS |
static boolean |
DEBUG_TRY |
static boolean |
DEBUG_WHILE |
int |
MERGETYPE |
| Constructor and Description |
|---|
StructuredAnalysis() |
| Modifier and Type | Method and Description |
|---|---|
abstract DavaFlowSet |
cloneFlowSet(DavaFlowSet flowSet)
Make a clone of the flowset The implementor should know when they want a
shallow or deep clone
|
void |
debug(java.lang.String debug) |
void |
debug(java.lang.String methodName,
java.lang.String debug) |
abstract DavaFlowSet |
emptyFlowSet() |
DavaFlowSet |
getAfterSet(java.lang.Object afterThis) |
DavaFlowSet |
getBeforeSet(java.lang.Object beforeThis) |
java.lang.String |
getLabel(ASTNode node)
returns label on the ASTNode null if the ASTNode cannot hold a label or
if the label is null
|
DavaFlowSet |
handleBreak(java.lang.String label,
DavaFlowSet out,
ASTNode node)
Need 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
|
DavaFlowSet |
handleContinue(java.lang.String label,
java.lang.Object output,
ASTNode node)
Need to handleContinue stmts There can be explicit continues (in which
case label is non null) There can always be implicit continues ASTNode is
non null
|
boolean |
isDifferent(DavaFlowSet oldObj,
DavaFlowSet newObj) |
DavaFlowSet |
merge(DavaFlowSet in1,
DavaFlowSet in2) |
DavaFlowSet |
mergeExplicitAndImplicit(java.lang.String label,
DavaFlowSet output,
java.util.List<DavaFlowSet> explicitSet,
java.util.List<DavaFlowSet> implicitSet) |
abstract DavaFlowSet |
newInitialFlow() |
void |
print(java.lang.Object toPrint) |
DavaFlowSet |
process(java.lang.Object body,
DavaFlowSet input) |
DavaFlowSet |
processAbruptStatements(Stmt s,
DavaFlowSet input)
Whenever a statement has to be processed the first step is to invoke this
method.
|
DavaFlowSet |
processASTDoWhileNode(ASTDoWhileNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTForLoopNode(ASTForLoopNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTIfElseNode(ASTIfElseNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTIfNode(ASTIfNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTLabeledBlockNode(ASTLabeledBlockNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTMethodNode(ASTMethodNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTNode(ASTNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTStatementSequenceNode(ASTStatementSequenceNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTSwitchNode(ASTSwitchNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTSynchronizedBlockNode(ASTSynchronizedBlockNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTTryNode(ASTTryNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTUnconditionalLoopNode(ASTUnconditionalLoopNode node,
DavaFlowSet input) |
DavaFlowSet |
processASTWhileNode(ASTWhileNode node,
DavaFlowSet input) |
DavaFlowSet |
processCondition(ASTCondition cond,
DavaFlowSet input)
This implementation breaks down the aggregated condition to the terminal
conditions which all have type ASTUnaryBinaryCondition.
|
DavaFlowSet |
processSingleSubBodyNode(ASTNode node,
DavaFlowSet input)
This method is called from the specialized ASTNodes.
|
abstract DavaFlowSet |
processStatement(Stmt s,
DavaFlowSet input)
Specific stmts within AST Constructs are processed through this method.
|
abstract DavaFlowSet |
processSwitchKey(Value key,
DavaFlowSet input)
Deal with the key in the switch construct
|
abstract DavaFlowSet |
processSynchronizedLocal(Local local,
DavaFlowSet input)
To deal with the local used for synch blocks
|
abstract DavaFlowSet |
processUnaryBinaryCondition(ASTUnaryBinaryCondition cond,
DavaFlowSet 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
separately.
|
abstract void |
setMergeType() |
public static boolean DEBUG
public static boolean DEBUG_IF
public static boolean DEBUG_WHILE
public static boolean DEBUG_STATEMENTS
public static boolean DEBUG_TRY
public int MERGETYPE
public abstract void setMergeType()
public abstract DavaFlowSet newInitialFlow()
public abstract DavaFlowSet emptyFlowSet()
public abstract DavaFlowSet cloneFlowSet(DavaFlowSet flowSet)
public abstract DavaFlowSet processStatement(Stmt s, DavaFlowSet input)
public abstract DavaFlowSet processUnaryBinaryCondition(ASTUnaryBinaryCondition cond, DavaFlowSet input)
public abstract DavaFlowSet processSynchronizedLocal(Local local, DavaFlowSet input)
public abstract DavaFlowSet processSwitchKey(Value key, DavaFlowSet input)
public void print(java.lang.Object toPrint)
public DavaFlowSet processCondition(ASTCondition cond, DavaFlowSet input)
public DavaFlowSet process(java.lang.Object body, DavaFlowSet input)
public DavaFlowSet processASTNode(ASTNode node, DavaFlowSet input)
public final DavaFlowSet processSingleSubBodyNode(ASTNode node, DavaFlowSet input)
public java.lang.String getLabel(ASTNode node)
public DavaFlowSet processAbruptStatements(Stmt s, DavaFlowSet input)
public DavaFlowSet processASTMethodNode(ASTMethodNode node, DavaFlowSet input)
public DavaFlowSet processASTStatementSequenceNode(ASTStatementSequenceNode node, DavaFlowSet input)
public DavaFlowSet processASTLabeledBlockNode(ASTLabeledBlockNode node, DavaFlowSet input)
public DavaFlowSet processASTSynchronizedBlockNode(ASTSynchronizedBlockNode node, DavaFlowSet input)
public DavaFlowSet processASTIfNode(ASTIfNode node, DavaFlowSet input)
public DavaFlowSet processASTIfElseNode(ASTIfElseNode node, DavaFlowSet input)
public DavaFlowSet processASTWhileNode(ASTWhileNode node, DavaFlowSet input)
public DavaFlowSet processASTDoWhileNode(ASTDoWhileNode node, DavaFlowSet input)
public DavaFlowSet processASTUnconditionalLoopNode(ASTUnconditionalLoopNode node, DavaFlowSet input)
public DavaFlowSet processASTForLoopNode(ASTForLoopNode node, DavaFlowSet input)
public DavaFlowSet processASTSwitchNode(ASTSwitchNode node, DavaFlowSet input)
public DavaFlowSet processASTTryNode(ASTTryNode node, DavaFlowSet input)
public DavaFlowSet merge(DavaFlowSet in1, DavaFlowSet in2)
public DavaFlowSet mergeExplicitAndImplicit(java.lang.String label, DavaFlowSet output, java.util.List<DavaFlowSet> explicitSet, java.util.List<DavaFlowSet> implicitSet)
public DavaFlowSet handleBreak(java.lang.String label, DavaFlowSet out, ASTNode node)
public DavaFlowSet handleContinue(java.lang.String label, java.lang.Object output, ASTNode node)
public boolean isDifferent(DavaFlowSet oldObj, DavaFlowSet newObj)
public DavaFlowSet getBeforeSet(java.lang.Object beforeThis)
public DavaFlowSet getAfterSet(java.lang.Object afterThis)
public void debug(java.lang.String methodName,
java.lang.String debug)
public void debug(java.lang.String debug)