Compilers

Principles, Techniques and Tools

Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman

Publisher: Addison-Wesley, 1986, 796 pages

ISBN: 0-201-10194-7

Keywords: Programming

Last modified: March 14, 2022, 9:01 a.m.

Anyone interested in compiler design is familiar with "the Dragon Book". Principles of Compiler Design, by Alfred V. Aho and Jeffrey D. Ullman. The dragon book was a landmark text in compiler design, a field which was rapidly evolving. Since it was first published, the state of compiler design has advanced.

As a result, Addison-Wesley announces the birth of a new dragon, Compilers: Principles, Techniques, and Tools, by the team of Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman.

The text begins with an introduction to the principal ideas behind compilation, and then illustrates these ideas by constructing a simple one-pass compiler. The remainder of the book amplifies the ideas presented in the first two chapters and discusses more advanced topics such as syntax analysis, type checking, code generation, and code optimization.

The new dragon presents the basic material featured in the old dragon, while also delving into recent developments in the field. Features of the new dragon include:

  • Pragmatics of compiler development
  • More on syntax-directed translation, type checking, run-time organization, automatic code generation, and code optimization
  • Wide variety of graded problems and exercises
  1. Introduction to Compiling
    1. Compilers
    2. Analysis of the source program
    3. The phases of a compiler
    4. Cousins of the compiler
    5. The grouping of phases
    6. Compiler-construction tools
    • Bibliographic notes
  2. A Simple One-Pass Compiler
    1. Overview Syntax definition
    2. Syntax-directed translation
    3. Parsing
    4. A translator for simple expressions
    5. Lexical analysis
    6. Incorporating a symbol table
    7. Abstract stack machines
    8. Putting the techniques together
    • Exercises
    • Bibliographic notes
  3. Lexical Analysis
    1. The role of the lexical analyzer
    2. Input buffering
    3. Specification of tokens
    4. Recognition of tokens
    5. A language for specifying lexical analyzers
    6. Finite automata
    7. From a regular expression to an NFA
    8. Design of a lexical analyzer generator
    9. Optimization of DFA-based pattern matchers
    • Exercises
    • Bibliographic notes
  4. Syntax Analysis
    1. The role of the parser
    2. Context-free grammars
    3. Writing a grammar
    4. Top-down parsing
    5. Bottom-up parsing
    6. Operator-precedence parsing
    7. LR parsers
    8. Using ambiguous grammars
    9. Parser generators
    • Exercises
    • Bibliographic notes
  5. Syntax-Directed Translation
    1. Syntax-directed definitions
    2. Construction of syntax trees
    3. Bottom-up evaluation of S-attributed definitions
    4. L-attributed definitions
    5. Top down translation
    6. Bottom-up evaluation of inherited attributes
    7. Recursive evaluators
    8. Space for attribute values at compile time
    9. Assigning spaces at compiler-construction time
    10. Analysis of syntax-directed definitions
    • Exercises
    • Bibliographic notes
  6. Type Checking
    1. Type Systems
    2. Specification of a simple type checker
    3. Equivalence of type expressions
    4. Type conversions
    5. Overloading of functions and operators
    6. Polymorphic functions
    7. An algorithm for unification
    • Exercises
    • Bibliographic notes
  7. Run-Time Environment
    1. Source language issues
    2. Storage organization
    3. Storage-allocation strategies
    4. Access to nonlocal names
    5. Parameter passing
    6. Symbol tables
    7. Language facilities for dynamic storage allocation
    8. Dynamic storage allocation techniques
    9. Storage allocation in Fortran
    • Exercises
    • Bibliographic notes
  8. Intermediate Code Generation
    1. Intermediate languages
    2. Declarations
    3. Assignment statements
    4. Boolean expressions
    5. Case statements
    6. Backpatching
    7. Procedure Calls
    • Exercises
    • Bibliographic notes
  9. Code Generation
    1. Issues in the design of a code generator
    2. The target machine
    3. Run-time storage management
    4. Basic blocks and flow graphs
    5. Next-use information
    6. A simple code generator
    7. Register allocation and assignment
    8. the dag representation of basic blocks
    9. Peephole optimization
    10. Generating code from dags
    11. Dynamic programming code-generation algorithm
    12. Code-generator generators
    • Exercises
    • Bibliographic notes
  10. Code Optimization
    1. Introduction
    2. The principal sources of optimization
    3. Optimization of basic blocks
    4. Loops in flow graphs
    5. Introduction to global data-flow analysis
    6. Iterative solution of data-flow equations
    7. Code-improving transformations
    8. Dealing with aliases
    9. Data-flow analysis of structured flow graphs
    10. Efficient data-flow algorithms
    11. A tool for data-flow analysis
    12. Estimation of types
    13. Symbolic debugging of optimized code
    • Exercises
    • Bibliographic notes
  11. Want to Write a Compiler?
    1. Planning a compiler
    2. Approaches to compiler development
    3. The compiler-development environment
    4. Testing and maintenance
  12. A Look at Some Compilers
    1. EQN, a preprocessor for typesetting mathematics
    2. Compilers for Pascal
    3. The C compilers
    4. The Fortran H compilers
    5. The Bliss/11 compiler
    6. Modula-2 optimizing compiler
  • Appendix A: Compiler Project
    1. Introduction
    2. A Pascal subset
    3. Program structure
    4. Lexical conventions
    5. Suggested exercises
    6. Evolution of the interpreter
    7. Extensions

Reviews

Compilers

Reviewed by Roland Buresund

OK ***** (5 out of 10)

Last modified: May 21, 2007, 2:57 a.m.

The book to have read if you're into compilers.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required