Customer Reviews

11
4.7 out of 5 stars
5 star
8
4 star
3
3 star
0
2 star
0
1 star
0
Engineering a Compiler, Second Edition
Format: HardcoverChange
Price:$83.77 + Free shipping with Amazon Prime

Your rating(Clear)Rate this item
Share your thoughts with other customers

There was a problem filtering reviews right now. Please try again later.

45 of 45 people found the following review helpful
As a professor and former compiler writer, I'm a big fan (and owner) of compiler books (including those by Aho, Ullman, Goos, Waite, Wirth, ...). The last years have seen a resurgence of really good books covering modern compiler engineering. This one (first and, gladly, second edition) is by far the best in its class. The contemporary competition consists of
* Aho/Sethi/Ullman/Lam: nice book, great follow-on from the earlier dragon books, but is so thick that it's tough to teach from, and to be honest, it's getting convoluted.
* Allen/Kennedy: another great book, covering some of the best results in optimization (of well behaved languages like Fortran). It is, just like the latest dragon book, heavy slogging and not digestible by many students.
* Muchnick: yet another excellent book, but it hasn't (AFAIK) been updated.

By contrast, this book (Cooper/Torczon) is not only digestible (nice presentation, not overly terse), but it also covers new and interesting algorithms and data-structures. This applies not only to today's hot topics like optimization (and related data-structures like SSA) and code-generation, but also to front-ends. For example, the chapter on lexical analysis covers Brzozowski's minimization algorithm. (As a specialist in such minimization algorithms, it's very encouraging to see compiler writers/text book authors now embracing such an easily taught algorithm.) All in all, a very nice book on modern compiler engineering.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
26 of 27 people found the following review helpful
on October 4, 2011
This book is pure theory. The title didn't convey this to me.

If you haven't yet created your own compiler, then I would look elsewhere. The best bet would be too get "Brinch Hansen on Pascal Compilers", which contains a small amount of theory but heaps of code (fully commented and understandable) which you can easily digest and then modify for your custom compiler.

The compilers I've written (based largely on Hansen) used the "top down" method, which can easily be coded by hand. Although a great introduction to compilers, there is not much discussion on bottom-up parsing or code optimization.

The first half of the book reviewed here was a good refresher for me about compilation techniques. I could follow it easily, but I knew most of the material beforehand (from Hansen). The other part was different because it explained bottom-up parsing well. I never "got it" when reading the Dragon book or others. So, I was impressed by the first half of the book.

The second half is about optimization. The topics here were either briefly mentioned in Hansen (but no implementation was given), or else were absent. Hansen's approach was to use a stack-based machine, which is simple to do but not good for optimizing code. In this new book, the authors don't use a stack-based approach, but rather a register approach. This allows for lots of types of optimization. It's heavy going. There are some diagrams, but not enough for me. Pseudo code was given to explain each optimization technique, but there were always special cases that threw a spanner in the works. I liked the constant summaries, but when I faced the questions at the end of the chapters, I quickly realized I hadn't digested the material fully! I also realized that I'd never be able to implement the optimizations from the pseudo-code presented.

I learned that there is almost an infinite numbers of combinations of optimization code. This shows that there will always be areas of research in compilers. I got stuck in a lot of places, but still got a good understanding of optimization theory. Many techniques were written in acronyms to save space, but I kept forgetting what the names stood for, and that hindered my learning.

For a single-semester course, Hansen's book is better, as it's practical. This new book would be a great way to consolidate your knowledge and let you prepare you for further study, or research. There are other books on optimization, but this one has enough topics and theory for me!

It's a good book, but I've taken a star away because I feel it's too theoretical.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
5 of 5 people found the following review helpful
on January 3, 2014
Upon opening this book, you might be a little off-put. The font and format are a little odd, and there are page-long algorithms in slightly archaic pseudocode ("endfor", etc.). However, I found it be a great introduction to compilers.

I felt that implementation details of some of the algorithms were a little specific, but they also thoroughly discussed the implications, strengths, and weaknesses of each method. It was therefore easy to read the general overview and analysis of a technique, skipping the sometimes tedious implementation. Then, when implementing certain algorithms, you can flip back for techniques and tips.

The sections on abstractions focus mostly on object orientation. Languages like Haskell are not discussed, and Lisp (which, to be fair, is interpreted in its traditional form) is only given a passing mention. This is justifiable, though, as features like currying are generally considered advanced topics. I would have liked to have seen more of it, but I can't complain about its absence.

The title of the book may be the best concise description of its content. If you want to *make* a compiler and simultaneously understand how it works, this is a strong choice.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
3 of 3 people found the following review helpful
on February 12, 2015
I grew up with the first edition of the Dragon book, a fine book for its time, especially when coupled with YACC and LEX. Lately I've been contributing to LLVM and I needed something a little more up to date as a refresher. To that purpose, Engineering A Compiler, second edition, is an outstanding modern text. It uses a pleasant+simple pseudo code for its examples as opposed to Java or C++. It's emphasis is on English text and it reads well. I'd put it on the Hennessy and Patterson shelf.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
8 of 10 people found the following review helpful
on September 18, 2012
I found the book to be a nice balance between the deep theory of Aho et al's Dragon book and the implementation focus of Appel's Tiger book. To my mind it sits squarely between the two extremes.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
on April 30, 2015
Great book for a compilers class, especially upper level undergrad/new grad student. I would not have survived building my own compiler for my class had it not been for this book. I also have a copy of the dragon book but I read this first and learned from it therefore I have a bias towards it.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
1 of 2 people found the following review helpful
on April 15, 2013
The book is very well-written with an emphasis on being easy to read while it presents different concepts. There are also many examples to help understand the material better. I particularly loved the chapters on various forms of value numbering, Dataflow Analysis and SSA, and Register Allocation.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
1 of 2 people found the following review helpful
on July 6, 2013
(Haven't finished the book yet) Everything is well presented in a theoretical manner. While the subject matter is abstract, the author keeps the reader right on track.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
1 of 2 people found the following review helpful
on February 11, 2014
Clear and concise without the impenetrable waffle that seems to infuse the other well known books on the same subject.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
1 of 2 people found the following review helpful
on October 22, 2012
it is quite good and seems to be a brand new book. I am quite satisfied with this book. Like it.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
     
 
Customers who viewed this also viewed
Compilers: Principles, Techniques, and Tools (2nd Edition)
Compilers: Principles, Techniques, and Tools (2nd Edition) by Ravi Sethi (Hardcover - September 10, 2006)
$153.87


Getting Started with LLVM Core Libraries
Getting Started with LLVM Core Libraries by Rafael Auler (Paperback - August 26, 2014)
$40.49
 
     

Send us feedback

How can we make Amazon Customer Reviews better for you?
Let us know here.

Your Recently Viewed Items and Featured Recommendations 
 

After viewing product detail pages, look here to find an easy way to navigate back to pages you are interested in.