Do problem 1 of Mini Project 2.1: prove that ud and
UD compute the same information.
You may modify the definition of clear so that it doesn't
include the conjunct ``use
'', as long as then
this conjunct is added in the definitions of ud and
du.
A technique to use in the proof is to define a function rd that uses the same definitions as for ud and then show that rd and RD are the same sets.
Do Exercises 2.3 and 2.4, defining modifications of available expression and live variable analyses. Note that Strongly Live Variable Analysis SLVA (the modification of live variable analysis) cannot be expressed using KILL and GEN sets, but rather must specify a transfer function. Also SLVA requires that you initialize the set of strongly live variables at the end of the program to include a special ``return''' variable.
Here are some examples of SLVA:
r is strongly live before the assignment.z and a are all
to faint variables.b is strongly live until the loop is done; a is faint
everywhere and r is strongly live after its first assignment.
As with all homeworks, please turn in your homework on paper at the beginning of lecture.