@Deprecated
protected abstract static class DataFlow.ConditionNavigator<FlowItem extends DataFlow.Item>
extends java.lang.Object
ConditionNavigator
is used to traverse boolean
expressions that are
used as conditions, such as in if statements, while statements,
left branches of && and ||. The ConditionNavigator
is used
to generate
a finer-grained analysis, so that the branching flows from a
condition can take into account the fact that the condition is true or
false. For example, in the statement if (cond) s1 else s2
,
dataflow for s1
can continue in the knowledge that
cond
evaluated to true, and similarly, s2
can be analyzed using the knowledge that cond
evaluated to
false.Modifier | Constructor and Description |
---|---|
protected |
DataFlow.ConditionNavigator()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
DataFlow.BoolItem<FlowItem> |
andResults(DataFlow.BoolItem<FlowItem> left,
DataFlow.BoolItem<FlowItem> right,
FlowItem startingItem)
Deprecated.
Combine the results of analyzing the left and right arms of
an AND boolean operator (either && or &).
|
abstract FlowItem |
combine(FlowItem item1,
FlowItem item2)
Deprecated.
Combine two
Item s together, when the information
contained in both items is true. |
abstract DataFlow.BoolItem<FlowItem> |
handleExpression(Expr expr,
FlowItem startingItem)
Deprecated.
Produce a
BoolItem for an expression that is not
a boolean operator, such as &&, &, ||, | or !. |
DataFlow.BoolItem<FlowItem> |
navigate(Expr expr,
FlowItem startingItem)
Deprecated.
Navigate the expression
expr , where the
Item at the start of evaluating the expression is
startingItem . |
DataFlow.BoolItem<FlowItem> |
notResult(DataFlow.BoolItem<FlowItem> results)
Deprecated.
Modify the results of analyzing the child of
a NEGATION boolean operator (a !).
|
DataFlow.BoolItem<FlowItem> |
orResults(DataFlow.BoolItem<FlowItem> left,
DataFlow.BoolItem<FlowItem> right,
FlowItem startingItem)
Deprecated.
Combine the results of analyzing the left and right arms of
an OR boolean operator (either || or |).
|
public DataFlow.BoolItem<FlowItem> navigate(Expr expr, FlowItem startingItem)
expr
, where the
Item
at the start of evaluating the expression is
startingItem
.
A BoolItem
is returned, containing the
Item
s that are appropriate when expr
evaluates to true and false.public DataFlow.BoolItem<FlowItem> andResults(DataFlow.BoolItem<FlowItem> left, DataFlow.BoolItem<FlowItem> right, FlowItem startingItem)
public DataFlow.BoolItem<FlowItem> orResults(DataFlow.BoolItem<FlowItem> left, DataFlow.BoolItem<FlowItem> right, FlowItem startingItem)
public DataFlow.BoolItem<FlowItem> notResult(DataFlow.BoolItem<FlowItem> results)
public abstract FlowItem combine(FlowItem item1, FlowItem item2)
Item
s together, when the information
contained in both items is true. Thus, for example, in a not-null
analysis, where Item
s are sets of not-null variables,
combining them corresponds to unioning the sets. Note that this
could be a different operation to the confluence operation.public abstract DataFlow.BoolItem<FlowItem> handleExpression(Expr expr, FlowItem startingItem)
BoolItem
for an expression that is not
a boolean operator, such as &&, &, ||, | or !.