Each type of node is assigned a different id
to make it easily possible
to do a switch over all nodes.
The computational type of the underlying value.
The indexes of the instructions which initialize this variable/ the origin of the value identifies the expression which initialized this variable.
The indexes of the instructions which initialize this variable/ the origin of the value identifies the expression which initialized this variable.
Defined, if and only if this is a variable usage.
In general, the origin is positive and identifies a single, unique assignment statement.
However, the origin can be negative if the value assigned to the variable is not
directly created by the program, but is either created by the JVM (e.g., the
DivisionByZeroException
created by the JVM when an int
value is divided by 0
) or
is just a constant.
true
if the statement/expression is GUARANTEED to have no externally observable
effect if it is not executed.
true
if the statement/expression is GUARANTEED to have no externally observable
effect if it is not executed.
Sideeffect free instructions can be removed if the result of the evaluation of the
expression/statement is not used. For those instructions, which may result in an exception, it
has to be guaranteed that the exception is NEVER thrown. For example, a div instruction
is sideeffect free if it is (statically) known that the divisor is always not equal to zero;
otherwise, even if the result value is not used, the expression is not (potentially) side
effect free. An array load is only side effect free if the array reference is non-null and
if the index is valid.
true
if the expression is GUARENTEED to have no side effect other than
wasting some CPU cycles if it is not executed.
Deeply nested expressions are not supported; i.e. an expression's sub-expressions have to be Var or Const expressions. Generally, a statements expressions have to to simple expressions too - except of the Assignment statement; in the latter case the right-expression can have references to simple expressions. Hence, in case of Assignment statements the side-effect freenes is determined by the referenced expression; in all other cases the side-effect freeness is determined directly by the statement/expression.
true
if this expression is a Var.
A human readable name of the local variable.
Returns the sub expression with the given index; if the index is wrong the result is undefined!
The number of sub expression directly referenced by this expression.
The number of sub expression directly referenced by this expression.
A unary expression has one sub expression (the operand), a binary expression has
two and a method has as many as explicit and implicit (this
) parameters exist.
The set of the indexes of the statements where this variable
is used.
The value information.
A (final) variable definition, which is uniquely identified by its origin/the index of the corresponding AssignmentStatement. I.e., per method there must be at most one D variable which has the given origin. Initially, the pc of the underlying bytecode instruction is used.