Compilers / Edition 1

Hardcover (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $4.13
Usually ships in 1-2 business days
(Save 96%)
Other sellers (Hardcover)
  • All (24) from $4.13   
  • New (2) from $49.88   
  • Used (22) from $4.11   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any coupons and promotions
Seller since 2014

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New Scarce older publication; appears mostly untouched and unread, likely out of print. Gift Quality Book in Excellent Condition.

Ships from: Newton, MA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2008

Feedback rating:


Condition: New

Ships from: Chicago, IL

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by


The text begins with an introduction to the principal ideas behind compilation, and then illustrates these ideas by constructing a simple one-pass compiler.

This classic book, known to compiler developers as "the Dragon Book" is the bible of compiler design. This book by Aho, Sethi and Ullman teaches the reader everything from Backus Naur Form to code generation and optimization. The contents of this book apply to anyone doing any sort of language development, be it as simple as reading an HTML file, or as advanced as writing a C compiler.

Read More Show Less

Editorial Reviews

From Barnes & Noble

Fatbrain Review

This classic book, known to compiler developers as "the Dragon Book" is the bible of compiler design. This book by Aho, Sethi and Ullman teaches the reader everything from Backus Naur Form to code generation and optimization. The contents of this book apply to anyone doing any sort of language development, be it as simple as reading an HTML file, or as advanced as writing a C compiler.
Read More Show Less

Product Details

  • ISBN-13: 9780201100884
  • Publisher: Addison-Wesley
  • Publication date: 1/1/1986
  • Edition description: Older Edition
  • Edition number: 1
  • Pages: 500
  • Product dimensions: 6.62 (w) x 9.50 (h) x 1.42 (d)

Meet the Author

Ravi Sethi, director of Computing Science Research, has been at AT&T Bell Laboratories in Murray Hill, New Jersey since 1976. He has held teaching positions at Pennsylvania State university and the University of Arizona, and has taught at Princeton University and Rutgers. Dr. Sethi is co-author of the "dragon book", Compilers: Principles, Techniques and Tools and has written numerous articles. His books have been translated in Japanese, German, French, Italian, Spanish, and Korean.
Read More Show Less

Read an Excerpt

From Chapter 10: Code Optimization

...Meet-Over-Paths Solutions to Data-Flow Problems

Let us imagine that a flow graph has associated with each of its nodes a transfer function, one of the functions in the set F. For each block B, let fB be the transfer function for B.

Consider any path P = B0 => B1 => . . . => Bk from the initial node B0 to some block Bk. We can define the transfer function for P to be the composition of fB0, fBk-1. Note that fBk is not part of the composition, reflecting the point of view that this path is taken to reach the beginning of block Bk, not its end.

We have assumed that the values in V represent information about data used by the program, and that the confluence operator tells how that information is combined when paths converge. It also makes sense to see the top element as representing "no information," since a path carrying the top element yields to any other paths. Thus, if B is a block in the flow graph, the information entering B should be computable by considering every possible path from the initial node to B and seeing what happens along the path, starting out with no information.

Inprinciple, this meet could be over an infinite number of different values, since there are an infinite number of different paths. In practice, it is often adequate to consider only acyclic paths, and even when it is not, as for the constant computation framework discussed above, there are usually other reasons we can find to make this infinite meet by finite meetbe finite for any particular flow graph.

The mop solution to a flow graph makes sense when we realize that as far as information reaching block B is concerned, the flow graph may as well be the one suggested in Fig. 10.61, where the transfer function associated with each of the (possibly infinite number of) paths P1, P2, . . . , in the original flow graph has been given an entirely separate path to B. In Fig. 10.61, the information reaching B is given by the meet over all paths.

Conservativbe Solutions to Flow Problems

When we try to solve the data-flow equations that come from an arbitrary framework, we may or may not be able to obtain the mop solution easily. Fortunately, as with the concrete examples of data-flow frameworks in Sections 10.5 and 10.6, there is a safe direction in which to err, and the iterative data-flow algorithm we discussed in those sections turns out always to provide us with a safe solution. We say a solution in[B] is a safe solution if in[B] is less than or equal to mop(B) for all blocks B.

Despite what the reader might imagine, we did not pull this definition out of thin air. Recall that in any flow graph, the set of apparent paths to a node (those that are paths in the flow graph) can be a proper subset of the real paths, those that are taken on some execution of the program corresponding to this flow graph. In order that the result of the data-flow analysis be usable for whatever purpose we intend it, the data must still be safe if we modify the flow graph by deleting some paths, since we cannot in general distinguish real paths from apparent paths that are not real.

While we may prefer the "true" solution to the data-flow problem, we shall almost surely have no efficient way to tell exactly which paths are real and which are not, so we are forced to accept the mop solution as the closest feasible solution. Thus, whatever use we make of the data-flow information must be consistent with the possibility that the solution we obtain is less than or equal to the true solution. Once we accept that, we should also be able to accept a solution that is less than or equal to the mop for those frameworks that are monotone but not distributive. For distributive frameworks, like those of Section 10.6, the simple iterative algorithm computes the mop solution...

Read More Show Less

Table of Contents

1. Introduction to Compiling.
Analysis of the Source Program.
The Phases of a Compiler.
Cousins of the Compiler.
The Grouping of Phases.
Compiler-Construction Tools.
Bibliographic Notes.

2. A Simple One-Pass Compiler.
Overview Syntax Definition.
Syntax-Directed Translation.
A Translator for Simple Expressions.
Lexical Analysis.
Incorporating a Symbol Table.
Abstract Stack Machines.
Putting the Techniques Together.
Bibliographic Notes.

3. Lexical Analysis.
The Role of the Lexical Analyzer.
Input Buffering.
Specification of Tokens.
Recognition of Tokens.
A Language for Specifying Lexical Analyzers.
Finite Automata.
From a Regular Expression to an NFA.
Design of a Lexical Analyzer Generator.
Optimization of DFA-Based Pattern Matchers.
Bibliographic Notes.

4. Syntax Analysis.
The Role of the Parser.
Context-Free Grammars.
Writing a Grammar.
Top-Down Parsing.
Bottom-Up Parsing.
Operator-Precedence Parsing.
LR Parsers.
Using Ambiguous Grammars.
Parser Generators.
Bibliographic Notes.

5. Syntax-Directed Translation.
Syntax-Directed Definitions.
Construction of Syntax Trees.
Bottom-Up Evaluation of S-Attributed Definitions.
L-Attributed Definitions.
Top Down Translation.
Bottom-Up Evaluation of Inherited Attributes.
Recursive Evaluators.
Space for Attribute Values at Compile Time.
Assigning Spaces at Compiler-Construction Time.
Analysis of Syntax-Directed Definitions.
Bibliographic Notes.

6. Type Checking.
Type Systems.
Specification of a Simple Type Checker.
Equivalence of Type Expressions.
Type Conversions.
Overloading of Functions and Operators.
Polymorphic Functions.
An algorithm for Unification.
Bibliographic Notes.

7. Run-Time Environments.
Source Language Issues.
Storage Organization.
Storage-Allocation Strategies.
Access to Nonlocal Names.
Parameter Passing.
Symbol Tables.
Language Facilities for Dynamic Storage Allocation.
Dynamic Storage Allocation Techniques.
Storage Allocation in Fortran.
Bibliographic Notes.

8. Intermediate Code Generation.
Intermediate Languages.
Assignment Statements.
Boolean Expressions.
Case Statements.
Procedure Calls.
Bibliographic Notes.

9. Code Generation.
Issues in the Design of a Code Generator.
The Target Machine.
Run-Time Storage Management.
Basic Blocks and Flow Graphs.
Next-Use Information.
A Simple Code Generator.
Register Allocation and Assignment.
The Dag Representation of Basic Blocks.
Peephole Optimization.
Generating Code from Dags.
Dynamic Programming Code-Generation Algorithm.
Code-Generator Generators.
Bibliographic Notes.

10. Code Optimization.
The Principal Sources of Optimization.
Optimization of Basic Blocks.
Loops in Flow Graphs.
Introduction to Global Data-Flow Analysis.
Iterative Solution of Data-Flow Equations.
Code-Improving Transformations.
Dealing with Aliases.
Data-Flow Analysis of Structured Flow Graphs.
Efficient Data-Flow Algorithms.
A Tool for Data-Flow Analysis.
Estimation of Types.
Symbolic Debugging of Optimized Code.
Bibliographic Notes.

11. Want to Write a Compiler?
Planning a Compiler.
Approaches to Compiler Development.
The Compiler-Development Environment.
Testing and Maintenance.

12. A Look at Some Compilers.
EQN, a Preprocessor for Typesetting Mathematics.
Compilers for Pascal.
The C Compilers.
The Fortran H Compilers.
The Bliss/11 Compiler.
Modula-2 Optimizing Compiler.

Appendix: A Compiler Project.
A Pascal Subset.
Program Structure.
Lexical Conventions.
Suggested Exercises.
Evolution of the Interpreter.

Read More Show Less

Customer Reviews

Average Rating 5
( 1 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)