File last modified: <06.04.07> back to index

CS325 Reading Guide

Here I point out which parts of the module textbook and other material you may wish to cover in your revision. (You are revising, aren't you, rather than studying for the first time?)

Appel's textbook

I will go chapter by chapter:
  1. Important chapter to read; short and sweet.
  2. We haven't covered lexing in much detail in this module. But it will be helpful to read the introduction, 2.1, 2.2, and 2.3. Don't forget to look at class handout which has a slightly broader view.
  3. Very important chapter, study carefully. But skip pages 62 to 65 and top of 66, as well as section 3.4. Look for relevant exercises and attempt them.
  4. Important chapter, study entirely, but skip exercises.
  5. We've studied types and symbol tables in detail, but using other material (see Dragon Book below). Worth looking through, particularly the bits of code.
  6. Study carefully. The exercises are useful too, even though they discuss programs written in C.
  7. Study fully, and attempt exercises. The nodes of IR trees (figure 7.2) should be well understood, but not details of coding, such as in program 7.3.
  8. Short but important chapter.
  9. Study well, but do not worry about memorising the toy architectures (figures 9.1 and 9.4). And skip the PROGRAM section (pg 197 onwards).
  10. Study. Exercise 10.1 is good.
  11. Very important algorithm for graph colouring. Skip 11.4.
  12. Skip this very short chapter.
  13. Study 13.1 and 13.2 only.
  14. Study whole chapter. Exercise 14.3 particularly good.
  15. Study 15.1, 15.2, 15.5, and 15.6.
  16. Study upto 16.2. The algorithm is quite complex; rather than try to understand every detail, try to catch the gist of it.
  17. Study upto and including use-def and def-use chains.
  18. Skip this and all other chapters...

Other books

In teaching this module, I consulted other books too, and I recommend that you have a look at these to clarify some of the more difficult concepts.

Modern Compiler Design, by Grune, Bal et al was module textbook for two years and the library has several copies. I recommend reading the first chapter, section 3.1, 3.2.3, 3.2.5, 4.2.4.2, 4.2.7, 6.1, 6.2.9, 6.3 upto and including 6.3.5.1, and 6.5.

Compilers: Principles, Techniques, Tools (also widely known as The Dragon Book) by Aho, Sethi and Ullman, is a classic, and the library has several copies. Read, if you have the time, chapter 4 upto and including 4.5, chapter 5 upto and including 5.4, chapter 6, chapter 7 upto and including 7.6 (but skip too many details), chapter 8 upto and including 8.3, and sections 9.1, 9.7, and 9.10, 10.2, 10.5, 10.6, and 10.7.

Chapter 2 of Watt and Brown's Programming Language Processors in Java was the inspiration for the descripton of tomb diagrams, you can also find relevant material by using google with T diagrams. Section 6.4 provides a good explanation of run-time memory management.

Wirth's Compiler Construction is available off the module webpage and is a good read. It's a good idea to read it upto and including Chapter 8, though of course glazing over the Oberon-specific material. The target instructions are very different than what we looked at so skip the next three chapters and 13, 14, and 15. Chapter 12 on run-time organisation is very good, so if you can't get the Dragon Book then I suggest reading about it here. Chapter 16 is an overview of optimisation so I think you should read it.

Finally, The Theory and Practice of Compiler Writing is a very old book (shows in printing), but very good. Have a look at chapters 5, 8, and 10, particularly for explanation of symbol table structures. (The images I scanned and included in notes are from here.)

 


Feel free to email me with any questions, or come to my office during office hours.