EXERCISE

1. Change the following example so that the expression X + Y is available

2. The following is the control flow graph for the example from the beginning of Chapter 7:

3. There may really be more available expressions thatn the definiton for available expressions finds. Find such a case.

4. show how the procedure call P(x,x) might create aliases.

5. Using the method of Section 8.7, define equations for available expression analysis (Babich and Jazayeri, 1978a).

6. Define Gen and Kill sets for interprocedural analysis of

7. The grammar of Section 8.7 fails to be an attribute grammar as defined in Chapter 6 for two reasons. What are they?

8. By using set-valued equations, extend the equations of Section 8.7 to include all the variables in a program. Perform the data flow analysis for Example 12 using these equations.

9. For Example 12:

10. Using Section 8.7 as a model, write the equations for

For each, perform the analysis on the program of Example 12.

Send questions and comments to: Karen Lemone