(Last modified Thu Apr 17 22:42 2008)
Bring your work to class on the due date.
Class members will present parts of the analysis,
and evaluate each other's work.
Calculate gen[S], kill[S], in[S], and out[S] for all the compound statements of the program below.
/*d1*/ i = m-1;
/*d2*/ j = n;
/*d3*/ a = u1;
do
/*d4*/ i = i+1;
/*d5*/ j = j+1;
if e1 then
/*d6*/ a = u2;
else
/*d7*/ i = u3;
while e2;
Use these compound statements (and any others you find necessary):
/*d1*/ i = m-1; /*d2*/ j = n; /*d3*/ a = u1;
/*d4*/ i = i+1; /*d5*/ j = j+1;
if e1 then
/*d6*/ a = u2;
else
/*d7*/ i = u3;
do
/* S2 */
/*d4*/ i = i+1;
/*d5*/ j = j+1;
/* S3 */
if e1 then
/*d6*/ a = u2;
else
/*d7*/ i = u3;
while e2;
/* S1 */
/*d1*/ i = m-1;
/*d2*/ j = n;
/*d3*/ a = u1;
/* S4 */
do
/* S2 */
/*d4*/ i = i+1;
/*d5*/ j = j+1;
/* S3 */
if e1 then
/*d6*/ a = u2;
else
/*d7*/ i = u3;
while e2;