Module FlowVar::FlowVar_internal

Provides classes and predicates that ought to be private but cannot use the private annotation because they may be referred to by unit tests.

Predicates

allReadsDominatedByOverwrite

Holds if all read accesses of v are dominated by an overwrite of v.

assignmentLikeOperation

Holds if v is modified as a side effect of evaluating node, receiving a value best described by e. This corresponds to FlowVar::definedByExpr, except that the case where node instanceof Initializer is covered by initializer instead of this predicate.

blockVarDefinedByVariable

Holds if sbb is the SubBasicBlock where v receives its initial value. See the documentation for FlowVar.definedByInitialValue.

dominatedByOverwrite

Holds if va accesses v and is dominated by an overwrite of v.

fullySupportedSsaVariable

For various reasons, not all variables handled perfectly by the SSA library. Ideally, this predicate should become larger as the SSA library improves. Before we can remove the BlockVar class completely, the SSA library needs the following improvements. - Considering uninitialized local variables to be definitions. - Supporting fields, globals and statics like the Java SSA library does. - Supporting all local variables, even if their address is taken by address-of, reference assignments, or lambdas.

getAnOverwritingBB

Gets a basic block in which v is overwritten.

indexOfFirstOverwriteInBB
initializer

Holds if v is initialized by init to have value assignedExpr.

mayBeUsedUninitialized

Holds if va may be an uninitialized access to v.

notAccessedAtStartOfBB

Holds if v has not been accessed at the start of bb, for a variable v where allReadsDominatedByOverwrite(v) does not hold.

overwrite

Holds if the value of the variable accessed at va is completely overwritten at node, where va is uniquely determined by node.

readAccess

Holds if the value of the variable accessed at va may affect the execution of the program.

skipLoop

Holds if some loop always assigns to v before leaving through an edge from bbInside in its condition to bbOutside outside the loop, where (sbbDef, v) is a BlockVar defined outside the loop. Also, v must be used outside the loop.

Classes

AlwaysTrueUponEntryLoop

A for-loop or while-loop whose condition is always true upon entry but not always true after the first iteration.

BlockVar

A variable whose analysis is backed by a simple control flow analysis that does not perform as well as the SSA library but gives better results for data flow purposes in some cases.

DataFlowSubBasicBlockCutNode

A point in a basic block where a non-SSA variable may have a different value than it did elsewhere in the same basic block. Extending this class configures the SubBasicBlocks library as needed for the implementation of this library.

SsaVar

A variable whose analysis is backed by the SSA library.

UninitializedLocalVariable

A local variable that is uninitialized immediately after its declaration.

Datatypes