Jump to ratings and reviews
Rate this book

Engineering a Compiler

Rate this book
The practice of compiler construction changes continually, in part because the designs of processors and systems change. For example, when we began to write Engineering a Compiler (eac) in 1998, some of our colleagues questioned the wisdom of including a chapter on instruction scheduling because out-of-order execution threatened to make scheduling largely irrelevant. Today, as the second edition goes to press, the rise of multicore processors and the pushformorecoreshasmadein-orderexecutionpipelinesattractiveagainbecausetheirsmaller footprints allow the designer to place more cores on a chip. Instruction scheduling will remain important for the near-term future.

1113 pages, Kindle Edition

First published September 1, 2003

69 people are currently reading
1042 people want to read

About the author

Keith D. Cooper

4 books8 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
79 (38%)
4 stars
77 (37%)
3 stars
40 (19%)
2 stars
6 (2%)
1 star
4 (1%)
Displaying 1 - 12 of 12 reviews
Profile Image for Andrew Obrigewitsch.
951 reviews165 followers
January 5, 2017
Given that this can easily be made into a very confusing and convoluted subject, this book does a really good job of simplifying Compiler Engineering. Still I must give a warning that this subject is not for the faint of heart.
Profile Image for Peter Sichevsky.
20 reviews7 followers
November 24, 2019
I hate to say this, but I wasn't as impressed with this book as I thought I should have been, GIVEN its place in the pantheon of programming books.

However, I still list this as a must read for all developers.
Profile Image for Gregory Blake.
36 reviews6 followers
September 14, 2016
Engineering a Compiler is an excellent introductory text on compilers. I particularly enjoyed the textbook's clean layout and design and cleanly written algorithms placed very close to the paragraphs where they are relevant.

Particularly after reading Muchnick, I found the amount of text explanation with a lack of concrete examples to be disturbing. Whole sections pass without any accompanying code examples. While I didn't think that pseudocode would have particularly enriched these topics, and I could certainly look up the relevant papers provided in the bibliography, I found the lack of a concrete representation to work with left me somehow wanting more.

All in all I suggest Engineering a Compiler as an excellent candidate for easy entry into a discussion on compilers, or an undergraduate text. After reading this textbook, if you're still hungry for more on compilers, try Appel's Compilers in ML and Muchnick's Advanced Compiler Design and Implementation.
Profile Image for Will Semin.
17 reviews16 followers
Read
November 11, 2019
The book is full of valuable insights and good, elbaorate explanations. Well worth the read.
Profile Image for Yury.
41 reviews8 followers
November 1, 2018
It may be a great introduction, but I will never know. The problems with books like this is that they skim over topics not going deep into the subject ever. This book has some good chapters. The content in the book is not dense, it’s written in very dry academic style. In plain english, it is just boring. I cannot see anyone reading this book from cover to cover. And yet it is not a reference. I do not recommend it.
Profile Image for Nick Black.
Author 2 books886 followers
January 25, 2009
GT Barnes & Noble 2009-01-0x. I've been reading too many books and papers about compilers the past few months to really enjoy this book very much, especially compared to Kennedy's and Muchinek's. This is kind of the "West End" or perhaps "Goals 2000" of the trio they form, with the least rigorous presentation and most minimal coverage. I think we're using this in CS6241 only because so many MS students are gormless waste-wits, admitted only to collect some tuition (I'm coming to loathe introducing myself as an MS student; until I start my PhD, I'm going to stick with "principal engineer, mcafee" and only admit I'm also a student when prodded). Sigh, such is life!
2 reviews
August 12, 2009
Alright book if you are looking for a good overview of compiler concepts. I read this while using the Dragon Book as a reference, and I think in the future I will definitely use the Dragon book to look up information, but this book did a much better job of explaining concepts in a non-technical way first.
4 reviews1 follower
June 2, 2017
A lit bit boring, filled with well-known facts, very weak front-end. But after all this is just a intro to compiler.
Profile Image for Irvi.
88 reviews7 followers
December 4, 2019
I enjoyed how the author clearly explained how algorithms in the compilers is working, especially the layout part that I think also contributed to the fact that it’s easier for me to read it.
Profile Image for Tom M..
30 reviews
July 27, 2025
I'm somewhat disappointed by this book, although it's not a bad reference overall.

The text is mostly fine and quite thorough, with a very similar approach to the "Dragon Book" while being sometimes more up-to-date (full reference of the Dragon Book at the end).

However, many sections are less detailed and painful to read. For example, the RE/NFA/DFA scanners seem to miss some steps and a proper presentation. The transformation from RE to NFA starts with a block of theory in which some terms have not been introduced - the reader has to fetch them further in the book and look at later examples to make sense of what the authors meant. Or the top-down and bottom-up parsing sections, which are essential parts of understanding how compilers work, are too summarized and not very clear in comparison to the Dragon Book either. There too, the authors tend to be entrenched in their abstract narrative, sometimes being even inconsistent in their notation, instead of clarifying what they mean with a simple example.

I'm surprised that modern tools are not better represented since they are a great help when developing a compiler (Lex, Yacc, ANTLR, LLVM, ...). It's always a good idea to mix theory and practice, and help the reader understand how it is applied with existing tools. After all, most of them won't be making a new compiler from scratch, they will be using existing tools.

There seems to be font issues as well, because some variable letters appear in a completely different format in the equations and the related text, which may be confusing sometimes. I know that this problem occurs sometimes in the publishing process when different software tools are used - authors of a couple of other books have reported that to me in the past. But this is the third edition, such issues should have been identified for a long time.

More frustrating is the lack of solution to the exercises. The book claims in the preface that the solutions, along with other resources, were available on the website. I typed the long URL to get there, but there was nothing available. After a few exchanges with a support who was obviously unwilling to help in any way, it appears that this promised "additional material" is only available to professors, after giving personal details on a specific portal (you still have to go through the support to get there, and get an approval after submitting your personal details).

It's not entirely legal and I was relying on the solutions to help with the learning curve, so I feel cheated. Just keep in mind that it's simply not available to anyone - I'm not even sure that it's free to teachers who qualify.

Physically overall, it is easy to handle and while the sheets are curiously uneven on the fore edge, the assembly seems robust and not likely to fall apart after the first reading. I like the notes in the margin, but why not use them to add definitions and acronyms (that I had to search multiple times)? The very succinct index didn't help much either. For some of the terms, I finally looked into the Dragon book.

Considering the steep price of this book, I'm removing a few stars for all those problems. If the solutions were freely available (or better - in the book itself), if the book had a good index, and no font issues, I would have given it 3 stars.

Buy this book only if you can't get a copy of Compilers: Principles, Techniques, and Tools by Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman.
Profile Image for Vipul Chawathe.
3 reviews1 follower
April 3, 2016
Engineering a Compiler is the default follow up for Engineering students after having just completed theory of computer science course laying common foundation with pure science.
Displaying 1 - 12 of 12 reviews

Can't find what you're looking for?

Get help and learn more about the design.