GetTextbooks.com  
 Compare Prices & Save up to 90%
Search by ISBN, title, author, etc ...

Login | Sign up | My Wish List 


Modern Compiler Implementation in C

by Andrew W. Appel, Maia Ginsburg (Contributor)

ISBN-10: 9780521583909
ISBN-10: 0-521-58390-X
ISBN-13: 9780521583909
ISBN-13: 978-0-521-58390-9
Hardcover
1997-12-13
Cambridge University Press


Find Lowest Price

Editorials


Product Description
This new, expanded textbook describes all phases of a modern compiler: lexical analysis, parsing, abstract syntax, semantic actions, intermediate representations, instruction selection via tree matching, dataflow analysis, graph-coloring register allocation, and runtime systems. It includes good coverage of current techniques in code generation and register allocation, as well as functional and object-oriented languages, that are missing from most books. In addition, more advanced chapters are now included so that it can be used as the basis for a two-semester or graduate course. The most accepted and successful techniques are described in a concise way, rather than as an exhaustive catalog of every possible variant. Detailed descriptions of the interfaces between modules of a compiler are illustrated with actual C header files. The first part of the book, Fundamentals of Compilation, is suitable for a one-semester first course in compiler design. The second part, Advanced Topics, which includes the advanced chapters, covers the compilation of object-oriented and functional languages, garbage collection, loop optimizations, SSA form, loop scheduling, and optimization for cache-memory hierarchies.

Reviews


Paperback Re-Issue
Thought that this might be a second edition of this book (there is a second edition of Appel's Java book).

However, this is a "Paperback Re-Issue" of the original 1997 edition.

This is actually a decent book
Despite what others have said in their reviews, this is not a bad book at all for those who *already have some basic exposure to compiler theory.*

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.


this is a java book in disguise
I bought this book, much to my chagrin, because I had looked at the Java one which FYI is a verbatim copy of this one. All the author did was translate the examples from Java to C. This was done in a very poor fashion I might add. He attempts to duplicate the object orientedness of java with straight c (no c plus plus). So instead of using a standard parse tree and symbol table, he invents this cockamamie type of tree structure using very java-esque structures. Anyway my recommendation is if you are looking for a Compiler book in C then this is not your book. If you are looking for Java, then you might as well get the java version of this guys book. My personnal recommendation is to get the dragon book.

The Project kills this book
The book is fairly good. Covers the compiler theory pretty well, and includes a good coverage of advanced topics at the end. I gave it a low rating because the project really kills this book. The first 12 chapters are a walk-through gide for building a compiler for the tiger language (which the author defined). The tiger language itself is weird at first since it doesn't have any statements. It only has expressions. Besides, the language is not thoroughly documented in the book and leaves a lot of things open for the implementor. At any rate, after building the first few chapters (about the time you've done the parse tree) the book starts to get confusing, dedicating more and more space to describe the bits and pieces of the project (which I read somewhere was ported to C from ML). All in all it's a good reference book, but it's really confusing if this is your primary text. I'd recommend it as a secondary textbook. And I wouldn't recommend tiger for a compiler project, better use decaf (search google).

Excellent concept, fair execution
I chose this textbook for a five-student independent study course. The book's concept is great: Define a substantial language, and describe a compiler for it over the semester, having the students write the interesting bits. I was excited to read this text and do the project with my students.

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.



Home | Browse | Professors | Merchants | Webmasters | Contact Us

[ Canada | United Kingdom ]

Copyright © 2003-2008 GetTextbooks.com