Programming Books C Java PHP Python Learn more Browse Programming Books
  • List Price: $89.95
  • Save: $67.11(75%)
Rented from RentU
To Rent, select Shipping State from options above
Due Date: May 29, 2015
FREE return shipping at the end of the semester. Access codes and supplements are not guaranteed with rentals.
Condition: Used: Good
Comment: Fast shipping from Amazon! Qualifies for Prime Shipping and FREE standard shipping for orders over $35. Overnight, 2 day and International shipping available! Excellent Customer Service.. May not include supplements such as CD, access code or DVD.
Access codes and supplements are not guaranteed with used items.
  • List Price: $89.95
  • Save: $28.87 (32%)
In Stock.
Ships from and sold by
Gift-wrap available.
Engineering a Compiler, S... has been added to your Cart
Sell yours for a Gift Card
We'll buy it for $14.32
Learn More
Trade in now
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

Engineering a Compiler, Second Edition Hardcover – February 21, 2011

ISBN-13: 978-0120884780 ISBN-10: 012088478X Edition: 2nd

Buy New
Price: $61.08
Price: $22.83 - $22.84
33 New from $54.94 24 Used from $20.20
Amazon Price New from Used from
"Please retry"
"Please retry"
$54.94 $20.20
"Please retry"

Hero Quick Promo
Save up to 90% on Textbooks
Rent textbooks, buy textbooks, or get up to 80% back when you sell us your books. Shop Now

Frequently Bought Together

Engineering a Compiler, Second Edition + Compilers: Principles, Techniques, and Tools (2nd Edition)
Price for both: $207.32

Buy the selected items together
Shop the new
New! Introducing the, a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Hardcover: 824 pages
  • Publisher: Morgan Kaufmann; 2 edition (February 21, 2011)
  • Language: English
  • ISBN-10: 012088478X
  • ISBN-13: 978-0120884780
  • Product Dimensions: 9.3 x 7.6 x 1.6 inches
  • Shipping Weight: 3.4 pounds (View shipping rates and policies)
  • Average Customer Review: 4.7 out of 5 stars  See all reviews (9 customer reviews)
  • Amazon Best Sellers Rank: #75,788 in Books (See Top 100 in Books)

Editorial Reviews Review

This entirely revised second edition of Engineering a Compiler is full of technical updates and new material covering the latest developments in compiler technology. In this comprehensive text you will learn important techniques for constructing a modern compiler. Leading educators and researchers Keith Cooper and Linda Torczon combine basic principles with pragmatic insights from their experience building state-of-the-art compilers. They will help you fully understand important techniques such as compilation of imperative and object-oriented languages, construction of static single assignment forms, instruction scheduling, and graph-coloring register allocation.

  • In-depth treatment of algorithms and techniques used in the front end of a modern compiler
  • Focus on code optimization and code generation, the primary areas of recent research and development
  • Improvements in presentation including conceptual overviews for each chapter, summaries and review questions for sections, and prominent placement of definitions for new terms
  • Examples drawn from several different programming languages

  • Changes This Edition

    The second edition of Engineering a Compiler presents both perspectives: big-picture views of the problems in compiler construction and detailed discussions of algorithmic alternatives. In preparing the second edition of Engineering a Compiler, we focused on the usability of the book, both as a textbook and as a reference for professionals. Specifically, we:

    • Improved the flow of ideas to help the student who reads the book sequentially. Chapter introductions explain the purpose of the chapter, lay out the major concepts, and provide a high-level overview of the chapter’s subject matter. Examples have been reworked to provide continuity across chapters. In addition, each chapter begins with a summary and a set of keywords to aid the user who treats Engineering a Compiler as a reference book.
    • Added section reviews and review questions at the end of each major section. The review questions provide a quick check as to whether or not the reader has understood the major points of the section.
    • Moved definitions of key terms into the margin adjacent to the paragraph where they are first defined and discussed.
    • Revised the material on optimization extensively so that it provides broader coverage of the possibilities for an optimizing compiler.

    Compiler development today focuses on optimization and on code generation. A newly hired compiler writer is far more likely to port a code generator to a new processor or modify an optimization pass than to write a scanner or parser. The successful compiler writer must be familiar with current best-practice techniques in optimization, such as the construction of static single-assignment form, and in code generation, such as software pipelining. They must also have the background and insight to understand new techniques as they appear during the coming years.

    Finally, they must understand the techniques of scanning, parsing, and semantic elaboration well enough to build or modify a front end. Our goal for the second edition of Engineering a Compiler has been to create a text and a course that exposes students to the critical issues in modern compilers and provides them with the background to tackle those problems. We have retained, from the first edition, the basic balance of material. Front ends are commodity components; they can be purchased from a reliable vendor or adapted from one of the many open-source systems. At the same time, optimizers and code generators are custom-crafted for particular processors and, sometimes, for individual models, because performance relies so heavily on specific low-level details of the generated code. These facts affect the way that we build compilers today; they should also affect the way that we teach compiler construction.

    Read a Sample Chapter from Engineering a Compiler on "Practical Issues"

    Even with automatic parser generators, the compiler writer must manage several issues to produce a robust, efficient parser for a real programming language. This chapter addresses several issues that arise in practice.


    "Keith Cooper and Linda Torczon are leading compilers researchers who have also built several state-of-the-art compilers. This book adeptly spans both worlds, by explaining both time-tested techniques and new algorithms, and by providing practical advice on engineering and constructing a compiler. Engineering a Compiler is a rich survey and exposition of the important techniques necessary to build a modern compiler."--Jim Larus, Microsoft Research

    "The book is well written, and well supported with diagrams, tables, and illustrative examples. It is a suitable textbook for use in a compilers course at the undergraduate or graduate level, where the primary focus of the course is code optimization."--ACM's Computing

    "This book is a wealth of useful information, prepared didactically, with many helpful hints, historical indications, and suggestions for further reading. It is a helpful working book for undergraduate and intermediate-level students, written by authors with an excellent professional and teaching background. An engineer will use the book as a general reference. For special topics, an ambitious reader will consult more recent publications in the subject area."--ACM's Computing

    Customer Reviews

    4.7 out of 5 stars
    5 star
    4 star
    3 star
    2 star
    1 star
    See all 9 customer reviews
    There are also many examples to help understand the material better.
    This new book would be a great way to consolidate your knowledge and let you prepare you for further study, or research.
    Andrew Pape
    The last years have seen a resurgence of really good books covering modern compiler engineering.
    Dr. Bruce Watson

    Most Helpful Customer Reviews

    36 of 36 people found the following review helpful By Dr. Bruce Watson on October 16, 2011
    Format: Hardcover Verified Purchase
    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.
    Comment Was this review helpful to you? Yes No Sending feedback...
    Thank you for your feedback. If this review is inappropriate, please let us know.
    Sorry, we failed to record your vote. Please try again
    19 of 20 people found the following review helpful By Andrew Pape on October 3, 2011
    Format: Hardcover Verified Purchase
    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!
    Read more ›
    Comment Was this review helpful to you? Yes No Sending feedback...
    Thank you for your feedback. If this review is inappropriate, please let us know.
    Sorry, we failed to record your vote. Please try again
    3 of 3 people found the following review helpful By Mark on January 3, 2014
    Format: Hardcover Verified Purchase
    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.
    Comment Was this review helpful to you? Yes No Sending feedback...
    Thank you for your feedback. If this review is inappropriate, please let us know.
    Sorry, we failed to record your vote. Please try again
    6 of 7 people found the following review helpful By Duncan on September 18, 2012
    Format: Hardcover
    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.
    Comment Was this review helpful to you? Yes No Sending feedback...
    Thank you for your feedback. If this review is inappropriate, please let us know.
    Sorry, we failed to record your vote. Please try again
    1 of 2 people found the following review helpful By Shams on April 15, 2013
    Format: Hardcover
    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.
    Comment Was this review helpful to you? Yes No Sending feedback...
    Thank you for your feedback. If this review is inappropriate, please let us know.
    Sorry, we failed to record your vote. Please try again