- 出版社: Cambridge University Press; Revised ed. (2004年7月8日)
- 平装: 556页
- 语种： 英语
- ISBN: 0521607655
- 条形码: 9780521607650
- 商品尺寸: 17.9 x 3.1 x 24.3 cm
- 商品重量: 957 g
- 品牌: Cambridge University Press
- ASIN: 0521607655
- 用户评分: 1 条商品评论
- 亚马逊热销商品排名: 图书商品里排第975,311名 (查看图书商品销售排行榜)
Modern Compiler Implementation in C (英语) 平装 – 2004年7月8日
Part I. Fundamentals of Compilation: 1. Introduction; 2. Lexical analysis; 3. Parsing; 4. Abstract syntax; 5. Semantic analysis; 6. Activation records; 7. Translation to intermediate code; 8. Basic blocks and traces; 9. Instruction selection; 10. Liveness analysis; 11. Register allocation; 12. Putting it all together; Part II. Advanced Topics: 13. Garbage collection; 14. Object-oriented languages; 15. Functional programming languages; 16. Polymorphic types; 17. Dataflow analysis; 18. Loop optimizations; 19. Static single-assignment form; 20. Pipelining and scheduling; 21. The memory hierarchy; Appendix.
However, this is a "Paperback Re-Issue" of the original 1997 edition.
This book is weak on types of grammars and the differences between LL, LR and LALR parsers for instance, and could include a hell of a lot more material on using parser generators. BUT it includes a lot of readable material on more advanced topics like code generation and garbage collection. It covers the design and implementation of object oriented languages, which is a pleasant suprise.
Before tackling this book, I recommend starting with something like "Crafting a Compiler with C" by Fischer and LeBlanc. Before using this book, you must have a masterful command of the C language (in my opinion the C code is unusually ugly in this book, too).
I don't care too much for the ongoing project of the Tiger language and compiler, but it's better than nothing. (The author may as well have compiled Pascal instead).
I've covered a fair amount work and even then had to read this book carefully. I've tackled books like "Compilers: Principles, Techniques and Tools" (the so called Dragon Book) and "Crafting a Compiler with C," amongst dozens of others. This is not a light read, and it is quite dense. But it's straight to the point, and covers material other compiler construction books don't.
One of the high points of this book is that it won't put you to sleep! It really IS readable. Finally, I will emphasise again, this is not a beginner's text.
The book (at least the first half) stands or falls on the project. The project itself is outstanding - there are several interesting tidbits. It's probably too large for a three-credit course at most institutions - I had to pare it down by giving additional pieces to my students.
Unfortunately, the project destroys the book. The book devotes large portions of the first half to trying to explain it. Explanations are only marginally coherent. To make sense, the project desperately needs detailed, low-level documentation, listing each function of each module and what it does. Additionally, it would work better if there were a clearer distinction of where the theory ends and the project begins.
The program is itself well-structured on the high level. Within functions, they need to format code properly. They do some interesting things with trying to do functional programming within C - a controversial move, but not one that I mind. The definite impression I get is that the publishers demanded a C version against Appel's will. I haven't read the Java or ML versions, but I bet the code is better (especially ML).
Outside the project, I found the book strong. The algorithms are well-presented, with lots of outstanding examples. (My students found them confusing; I attribute that to the material's inherent difficulty, not the writing.) It does a thorough job, but not overly thorough. Some of the later chapters on advanced topics I've found slightly less complete - but they're advanced topics, after all.
I'd recommend it over the dragon book; but it's a close call. But this could be so much better so easily... Appel just needs to flesh out the project, and he'd have a truly great book.