Customer Reviews


14 Reviews
5 star:
 (5)
4 star:
 (5)
3 star:    (0)
2 star:
 (2)
1 star:
 (2)
 
 
 
 
 
Average Customer Review
Share your thoughts with other customers
Create your own review
 
 
Only search this product's reviews

The most helpful favorable review
The most helpful critical review


93 of 93 people found the following review helpful:
5.0 out of 5 stars Super compiler text!
This is really a super compiler text. It is also one of the most recent compiler books you can buy.

First of all this is a theoretical book. If you read the title 'Engineering a compiler' as 'Coding/Building a compiler' you would be disappointed! So, if you're looking for a learing-by-coding book, this is not for you (but I have some recommendations at the...
Published on February 21, 2005 by Jos van Roosmalen

versus
3 of 9 people found the following review helpful:
2.0 out of 5 stars Only knowledge list
I think this book is just a list of knowledge without good organization. Too many typos.
Published on October 25, 2009 by Xiaoyong Zhou


‹ Previous | 1 2 | Next ›
Most Helpful First | Newest First

93 of 93 people found the following review helpful:
5.0 out of 5 stars Super compiler text!, February 21, 2005
By 
Jos van Roosmalen (The Netherlands, Europe) - See all my reviews
(REAL NAME)   
This review is from: Engineering a Compiler (Hardcover)
This is really a super compiler text. It is also one of the most recent compiler books you can buy.

First of all this is a theoretical book. If you read the title 'Engineering a compiler' as 'Coding/Building a compiler' you would be disappointed! So, if you're looking for a learing-by-coding book, this is not for you (but I have some recommendations at the end of this review in the latest paragraph). The difference with most of the other theoretical books is that this book is not a dry text. It has also a nice layout. It gives plenty of examples, and all topics are well connected to each other. It's a pleasure to read for not native English people, so native English people can read it pretty fast.

This book read like a novel.. It does contain enough diagrams, tables, etc. but not too much (crowded), and everything is well explained.

You can read this book as a compiler introduction book. But I can only recommend this to B.Sc/M.Sc Computer Science students (like me). You don't need to have a M.Sc in Mathematics to understand this text, (all the math, eg. liveness graphs are well explained), but you will understand everything better if you have some background in algorithms (design), pseudocode, etc. like you gained during your B.Sc program. People without formal computer science education I would recommend to read a practical book first (see at the end of this review), because you may find else this text too theoretical.

This book focus on code optimizations. According to the authors (and me) compiler front ends (scanning/parsing/etc) are commodities today, and the backend (codegeneration) is where the difference is made nowadays. So if you're looking for a introduction text into compiler optimization this book is for you!

If you're looking for a more practical book I advice you to read 'Programming Language Processors in Java' from Watt & Brown. In that book you learn to build a nice stack virtual machine in Java with 'advanced features' like records (structs), procedures/functions, arrays and so on. That book is a good companion for 'Engineering a Compiler' to give you some practical insight. If you're looking for a Language Design book I advice you to look at 'Programming Language Pragmatics'. Both books are worth the money...
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


26 of 26 people found the following review helpful:
4.0 out of 5 stars Depends on what you want, June 12, 2007
Amazon Verified Purchase(What's this?)
This review is from: Engineering a Compiler (Hardcover)
What it is: A great introduction to basic concepts in contemporary compilers.
What it's not: A handbook for someone thrown in at the deep end of commercial compiler development.

I can imagine a very good one-term course in compiler construction built around this text. After a brief introduction, it gets immediately into the classic topics of lexical scanning, parsing, and syntax analysis. These three chapters help any beginner understand the multiple levels of processing, from the character level, up through reorganizing grammars for practical parsing and table-driven techniques, to the lower levels of sematic analysis. This includes a very brief discussion of type systems and type inference - less than 20 pages, on a topic that whole books devote themselves to. These 200 pages typify what you'll see in the rest of the book: a lot of attention paid to lexical analysis, a problem largely eliminated by automated tools (lex and yacc being the best known), and thin mention of the harder problems that differ significantly across languages and applications of languages.

Chapter 5 addresses the critical issue of intermediate representation, the data structures that represent the program during analysis, optimization, and code generation. Chapter 6 is titled "The Procedure Abstraction." It deals with much more than its name suggests, including procedure activation records (generalizations of stack frames), parameter passing, stack management, symbol visibility and scoping, and scraps of symbol table organization - important stuff, but hard to understand as "procedure abstaction." The next chapter deals with "Code Shape," a grab-bag including value representations, arrays and strings, control constructs, and procedures (again). It also presents a very few pages, at the end, on object oriented language - hardly enough to scratch the surface, let alone build competence. And, for lack of a better place to stick them, I would have expected support for parallelism and exceptions to appear here, but this book seems to omit the topics altogether.

Code analysis and optimization appear in chapters 8-10. That includes a competent introduction to static single assignment notation, a staple of current compiler technology mentioned earlier, in the section on intermediate representation. This covers a range of basics, but omits all significant mention of arrays, the workhorses of performance computing. Chapters 11-13 introduce the basics of instruction selection, scheduling, and register allocation. Although it mentions some hardware effects, like out-of-order execution in superscalar architecture, discussion stays close the instruction sets of popular processors. As a result, it omits mention of SIMD, VLIW, DSP, and more exotic architectures, the ones most in need of good code generation. Compiler-specific support libraries, e.g. the kind that make up for lack of hardware divide instructions, should have appeared somewhere around here, but are oddly absent.

The authors present an adequate introduction for the beginner, someone who's still not sure what a hash table is (see appendix B). It introduces many basic topics, but doesn't go into a lot of depth in any of them. The student who finishes this book will understand most major issues of classical compiler construction. I just can't see a serious, working competence coming out of this text, though. I give it four stars as an academic introduction, but a lot less for anyone with immediate problems to solve.

-- wiredweird
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


30 of 32 people found the following review helpful:
4.0 out of 5 stars I'd rather call it "A guide for engineering a compiler", September 2, 2004
By 
H. Kim (Worcester, MA United States) - See all my reviews
(REAL NAME)   
This review is from: Engineering a Compiler (Hardcover)
This book deals with all the issues you will face while engineering a MODERN compiler. Each subject is rather a brief instroduction than a thorough discussion, but detailed enough to give readers a good introduction working as a good pointer when you need a more detailed information.

Also the author tries very hard to cover as much subjects as possible you have to deal with when you design a language and implment a compiler for it.

I'd use this book not as a thorough compiler algorithm bible but as a guide to follow when implementing my compiler.
By following each chapter in the book, at least you will know what problems you should slove. If the problem is simple enough, the solution is in the book. For more complicated problems, you gotta dig into the internet.

In my opinion, this book is the best compiler engineering guide ever I read.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


19 of 19 people found the following review helpful:
4.0 out of 5 stars A great starter guide to writing a compiler, June 9, 2005
By 
This review is from: Engineering a Compiler (Hardcover)
I recently used this book to supplement the Dragon book in a Compilers course. I found this book so much easier to read and understand. They do a great job of laying out the basics and introducing you to compiler design.

I also liked how they seemed to keep an open mind about which intermediate representation is best to use. They discuss the pros and cons of graphical IRs vs Linear IRs, and let you decide which best fits your needs.

Their open mindedness ended when it came to optimization though. I got the impression that the authors consider SSA (static single assignment) form to be the silver bullet of optimization. Almost all of the optimizations they discuss in this book rely on your IR being in SSA form! I agree that SSA form does indeed make many optimizations much easier, but there is a very high initial cost involved in converting to and from SSA form. In there defense they spend almost an entire chapter on how to do these conversions.

So to sum up, this book does a great job of introducing you to compiler design. It is well written and very easy to understand. It also does a good job of discussing different compiler design choices and their pros and cons. The only short coming of this book is that the entire optimization discussion is revolves around SSA form.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


14 of 17 people found the following review helpful:
5.0 out of 5 stars Good introduction, December 28, 2003
This review is from: Engineering a Compiler (Hardcover)
This book has a good introduction guiding the beginning compiler student into understanding basic concepts and gradually revealing the more intimidating stuff, but the authors took great care not to scare the beginners away and instead offers great indepth explanations into how concepts and implementation merge.

Its an overall good book!

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


8 of 9 people found the following review helpful:
4.0 out of 5 stars Best introductory codegen/optimization book out there, December 1, 2007
By 
Mark Lacey (Seattle, WA USA) - See all my reviews
(REAL NAME)   
This review is from: Engineering a Compiler (Hardcover)
I've been working on commercial development tools for nearly 15 years now, with most of that time spent on compilers, and most of the compiler time spent on optimization and code generation.

The strength of this book is that it is a good introduction to modern compiler design, with many up-to-date techniques and references to recent papers. The authors present many algorithms in a very easy-to-grasp manner, and provide useful engineering insights. I've focused almost exclusively on the codegen/optimization sections of the book, so I can't say much about the chapters on parsing and semantic analysis.

The weakness of the book is that they don't discuss some important topics related to the areas that they do cover well. For example, pointer disambiguation, and what effect pointers and aliasing have on SSA form. There is no discussion whatsoever of this topic when they talk about things like dead code elimination. The SSA-based algorithm they present there has a first step of "mark all the needed operations as needed", but there is no discussion of what this means for writes to dereferenced pointers, or the trade-offs you face there (e.g. marking all writes to dereferenced pointers is inexpensive, but conservative, but the analysis required to mark only those dereferences that are truly necessary can be expensive and/or completely subsume the liveness issue they are trying to solve inexpensively with this SSA-based algorithm).

Having read many journal articles on optimization, this is unfortuntately common in the literature as well.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


3 of 3 people found the following review helpful:
5.0 out of 5 stars Great compiler book, October 16, 2011
Amazon Verified Purchase(What's this?)
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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


4.0 out of 5 stars great theoretical book on compiler optimisation, October 3, 2011
By 
Andrew Pape (Melbourne, Australia) - See all my reviews
(REAL NAME)   
Amazon Verified Purchase(What's this?)
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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


5.0 out of 5 stars WHAT ARE YOU WAITING FOR? GET THIS BOOK NOW!!, September 23, 2011
Are you part of the compiler construction community? If you are, then this book is for you! Authors Keith Cooper and Linda Torczon, have done an outstanding job of writing a second edition of a book which aims to give the student new insights and algorithms, and the ability to rediscover older techniques that were effective, but largely forgotten in compiler construction.

Cooper and Torczon, begin by providing a conceptual overview of all of the major components of a modern compiler. In addition, the authors introduce regular expressions, a notation that is used to describe the valid words in a programming language. The authors then focus on context-free grammars, a notation that is used to specify the syntax of programming languages. Then, they look at techniques for context-sensitive checking. Next, the authors present a survey of IR forms that compilers use, including graphical IR, linear IRS, and symbol tables. They continue with an in-depth look at the implementation of procedures and procedure calls, from the perspective of a compiler writer. In addition, the authors explore some of the implementation strategies that the compiler can employ for a variety of common programming-language constructs. The authors then introduce the problems and techniques of code optimization and present key concepts through a series of example optimizations. Then, they explore iterative data-flow analysis, which uses a simple fixed-point algorithm. Next, the authors introduce broad selection of machine-independent transformations that address a variety of inefficiencies in the compiled code. They continue with a look at different approaches to instruction selection. In addition, the authors introduce the dominant technique for scheduling in compilers: greedy list scheduling. Finally, the authors focus on global register allocation and assignment via graph coloring.

This most excellent book presents two perspectives: big-picture views of the problems in compiler construction and detailed discussions of algorithmic alternatives. Perhaps more importantly, the authors focused on the usability of the book, both as a textbook and as a reference for professionals.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


3 of 9 people found the following review helpful:
2.0 out of 5 stars Only knowledge list, October 25, 2009
Amazon Verified Purchase(What's this?)
This review is from: Engineering a Compiler (Hardcover)
I think this book is just a list of knowledge without good organization. Too many typos.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


‹ Previous | 1 2 | Next ›
Most Helpful First | Newest First

This product

Engineering a Compiler
Engineering a Compiler by Keith D. Cooper (Hardcover - November 10, 2003)
Used & New from: $4.00
Add to wishlist See buying options