Homework # 6
due November 14
Read Section 2.5 up to the end of 2.5.2 (page 88)
Do problem 2.10.
Consider (but do not do) Problem 2.13.
The ``similar result'' in the second half is true for WHILE,
but neither is true for Java flow graphs with exceptions.
- Write a simple Java try-catch statement which
has ``dead code'': code that cannot be reached.
Since we have this situation, we cannot directly use the
proof of Lemma 2.32 on page 78.
But it turns out that if we have an additional restriction on the
transfer functions, we can preserve the desired result
(
).
- Look at the proof (particular the middle of page 79) and find
an additional restriction on the transfer functions that permits the proof to carry forward. Use the terminology from Appendix A 1 (Properties of functions, pages 393-394).
Explain this restriction intuitively.
As with all homeworks, please turn in your homework on paper at the
beginning of lecture. You may also send the code in an email attachments to boyouen at gmail.com
About this document
John Boyland
2006-11-07