public abstract class StructuredAnalysis<E>
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<E> |
cloneFlowSet(DavaFlowSet<E> 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<E> |
emptyFlowSet() |
DavaFlowSet<E> |
getAfterSet(java.lang.Object afterThis) |
DavaFlowSet<E> |
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<E> |
handleBreak(java.lang.String label,
DavaFlowSet<E> 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<E> |
handleContinue(java.lang.String label,
DavaFlowSet<E> out,
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<E> oldObj,
DavaFlowSet<E> newObj) |
DavaFlowSet<E> |
merge(DavaFlowSet<E> in1,
DavaFlowSet<E> in2) |
DavaFlowSet<E> |
mergeExplicitAndImplicit(java.lang.String label,
DavaFlowSet<E> output,
java.util.List<DavaFlowSet<E>> explicitSet,
java.util.List<DavaFlowSet<E>> implicitSet) |
abstract DavaFlowSet<E> |
newInitialFlow() |
void |
print(java.lang.Object toPrint) |
DavaFlowSet<E> |
process(java.lang.Object body,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processAbruptStatements(Stmt s,
DavaFlowSet<E> input)
Whenever a statement has to be processed the first step is to invoke this
method.
|
DavaFlowSet<E> |
processASTDoWhileNode(ASTDoWhileNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTForLoopNode(ASTForLoopNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTIfElseNode(ASTIfElseNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTIfNode(ASTIfNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTLabeledBlockNode(ASTLabeledBlockNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTMethodNode(ASTMethodNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTNode(ASTNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTStatementSequenceNode(ASTStatementSequenceNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTSwitchNode(ASTSwitchNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTSynchronizedBlockNode(ASTSynchronizedBlockNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTTryNode(ASTTryNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTUnconditionalLoopNode(ASTUnconditionalLoopNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processASTWhileNode(ASTWhileNode node,
DavaFlowSet<E> input) |
DavaFlowSet<E> |
processCondition(ASTCondition cond,
DavaFlowSet<E> input)
This implementation breaks down the aggregated condition to the terminal
conditions which all have type ASTUnaryBinaryCondition.
|
DavaFlowSet<E> |
processSingleSubBodyNode(ASTNode node,
DavaFlowSet<E> input)
This method is called from the specialized ASTNodes.
|
abstract DavaFlowSet<E> |
processStatement(Stmt s,
DavaFlowSet<E> input)
Specific stmts within AST Constructs are processed through this method.
|
abstract DavaFlowSet<E> |
processSwitchKey(Value key,
DavaFlowSet<E> input)
Deal with the key in the switch construct
|
abstract DavaFlowSet<E> |
processSynchronizedLocal(Local local,
DavaFlowSet<E> input)
To deal with the local used for synch blocks
|
abstract DavaFlowSet<E> |
processUnaryBinaryCondition(ASTUnaryBinaryCondition cond,
DavaFlowSet<E> 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<E> newInitialFlow()
public abstract DavaFlowSet<E> emptyFlowSet()
public abstract DavaFlowSet<E> cloneFlowSet(DavaFlowSet<E> flowSet)
public abstract DavaFlowSet<E> processStatement(Stmt s, DavaFlowSet<E> input)
public abstract DavaFlowSet<E> processUnaryBinaryCondition(ASTUnaryBinaryCondition cond, DavaFlowSet<E> input)
public abstract DavaFlowSet<E> processSynchronizedLocal(Local local, DavaFlowSet<E> input)
public abstract DavaFlowSet<E> processSwitchKey(Value key, DavaFlowSet<E> input)
public void print(java.lang.Object toPrint)
public DavaFlowSet<E> processCondition(ASTCondition cond, DavaFlowSet<E> input)
public DavaFlowSet<E> process(java.lang.Object body, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTNode(ASTNode node, DavaFlowSet<E> input)
public final DavaFlowSet<E> processSingleSubBodyNode(ASTNode node, DavaFlowSet<E> input)
public java.lang.String getLabel(ASTNode node)
public DavaFlowSet<E> processAbruptStatements(Stmt s, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTMethodNode(ASTMethodNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTStatementSequenceNode(ASTStatementSequenceNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTLabeledBlockNode(ASTLabeledBlockNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTSynchronizedBlockNode(ASTSynchronizedBlockNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTIfNode(ASTIfNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTIfElseNode(ASTIfElseNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTWhileNode(ASTWhileNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTDoWhileNode(ASTDoWhileNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTUnconditionalLoopNode(ASTUnconditionalLoopNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTForLoopNode(ASTForLoopNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTSwitchNode(ASTSwitchNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> processASTTryNode(ASTTryNode node, DavaFlowSet<E> input)
public DavaFlowSet<E> merge(DavaFlowSet<E> in1, DavaFlowSet<E> in2)
public DavaFlowSet<E> mergeExplicitAndImplicit(java.lang.String label, DavaFlowSet<E> output, java.util.List<DavaFlowSet<E>> explicitSet, java.util.List<DavaFlowSet<E>> implicitSet)
public DavaFlowSet<E> handleBreak(java.lang.String label, DavaFlowSet<E> out, ASTNode node)
public DavaFlowSet<E> handleContinue(java.lang.String label, DavaFlowSet<E> out, ASTNode node)
public boolean isDifferent(DavaFlowSet<E> oldObj, DavaFlowSet<E> newObj)
public DavaFlowSet<E> getBeforeSet(java.lang.Object beforeThis)
public DavaFlowSet<E> getAfterSet(java.lang.Object afterThis)
public void debug(java.lang.String methodName, java.lang.String debug)
public void debug(java.lang.String debug)