Java Reference
In-Depth Information
Fragment
Transfer Function
Explanation
Regardless of which expressions are
available on entry to this node, expres-
sion
v
+
w
becomes available after the
node. The other expressions are not
a
f
(
in
)
=
in
∪{
v
+
w
}
v+w
ff
ected by this node.
The assignment to
v
potentially
changes the value of
v
+
w
,andthe
node includes no recomputation of
this expression. Regardless of which
expressions are available on entry to
this node, expression
v
+
w
is
not
avail-
able after the node. The same would
be true of any expression that men-
tions
v
or
w
, but the availability of ex-
pression
a
+
b
is not a
f
(
in
)
=
in
−{
v
+
w
}
v = 9
ff
ected by this
node.
This node a
ects no expression; thus,
the solution on exit from the node is
identical to the solution on entry.
ff
f
(
in
)
=
in
print("hello")
This node makes
w
+
y
unavailable be-
cause it changes
y
, but it makes
v
+
w
available. This is the most general
form of a transfer function for avail-
ableexpressions.
f
(
in
)
=
(
in
−{
w
+
y
}
)
y = v+w
∪{
v
+
w
}
Figure 14.47: Data flow transfer functions for availableexpressions.