具体描述
This book provides the foundation for understanding the theory and pracitce of compilers. Revised and updated, it reflects the current state of compilation. Every chapter has been completely revised to reflect developments in software engineering, programming languages, and computer architecture that have occurred since 1986, when the last edition published. The authors, recognizing that few readers will ever go on to construct a compiler, retain their focus on the broader set of problems faced in software design and software development. Computer scientists, developers, and aspiring students that want to learn how to build, maintain, and execute a compiler for a major programming language.
作者简介
Alfred V. Aho is Lawrence Gussman Professor of Computer Science at Columbia University. Professor Aho has won several awards including the Great Teacher Award for 2003 from the Society of Columbia Graduates and the IEEE John von Neumann Medal. He is a member of the National Academy of Engineering and a fellow of the ACM and IEEE.
Monica S. Lam is a Professor of Computer Science at Stanford University, was the Chief Scientist at Tensilica and the founding CEO of moka5. She led the SUIF project which produced one of the most popular research compilers, and pioneered numerous compiler techniques used in industry.
Ravi Sethi launched the research organization in Avaya and is president of Avaya Labs. Previously, he was a senior vice president at Bell Labs in Murray Hill and chief technical officer for communications software at Lucent Technologies. He has held teaching positions at the Pennsylvania State University and the University of Arizona, and has taught at Princeton University and Rutgers. He is a fellow of the ACM.
Jeffrey Ullman is CEO of Gradiance and a Stanford W. Ascherman Professor of Computer Science at Stanford University. His research interests include database theory, database integration, data mining, and education using the information infrastructure. He is a member of the National Academy of Engineering, a fellow of the ACM, and winner of the Karlstrom Award and Knuth Prize.
目录信息
1.1 Language Processors
1.2 The Structure of a Compiler
1.3 The Evolution of Programming Languages
1.4 The Science of Building a Compiler
1.5 Applications of Compiler Technology
1.6 Programming Language Basics
1.7 Summary of Chapter 1
1.8 References for Chapter 1
2 A Simple Syntax-Directed Translator
2.1 Introduction
2.2 Syntax Definition
2.3 Syntax-Directed Translation
2.4 Parsing
2.5 A Translator for Simple Expressions
2.6 Lexical Analysis
2.7 Symbol Tables
2.8 Intermediate Code Generation
2.9 Summary of Chapter 2
3 Lexical Analysis
3.1 The Role of the Lexical Analyzer
3.2 Input Buffering
3.3 Specification of Tokens
3.4 Recognition of Tokens
3.5 The Lexical-Analyzer Generator Lex
3.6 Finite Automata
3.7 From Regular Expressions to Automata
3.8 Design of a Lexical-Analyzer Generator
3.9 Optimization of DFA-Based Pattern Matchers
3.10 Summary of Chapter 3
3.11 References for Chapter 3
4 Syntax Analysis
4.1 Introduction
4.2 Context-Free Grammars
4.3 Writing a Grammar
4.4 Top-Down Parsing
4.5 Bottom-Up Parsing
4.6 Introduction to LR Parsing: Simple LR
4.7 More Powerful LR Parsers
4.8 Using Ambiguous Grammars
4.9 Parser Generators
4.10 Summary of Chapter 4
4.11 References for Chapter 4
5 Syntax-Directed Translation
5.1 Syntax-Directed Definitions
5.2 Evaluation Orders for SDD's
5.3 Applications of Syntax-Directed Translation
5.4 Syntax-Directed Translation Schemes
5.5 Implementing L-Attributed SDD's
5.6 Summary of Chapter 5
5.7 References for Chapter 5
6 Intermediate-Code Generation
6.1 Variants of Syntax Trees
6.2 Three-Address Code
6.3 Types and Declarations
6.4 Translation of Expressions
6.5 Type Checking
6.6 Control Flow
6.7 Backpatching
6.8 Switch-Statements
6.9 Intermediate Code for Procedures
6.10 Summary of Chapter 6
6.11 References for Chapter 6
7 Run-Time Environments
7.1 Storage Organization
7.2 Stack Allocation of Space
7.3 Access to Nonlocal Data on the Stack
7.4 Heap Management
7.5 Introduction to Garbage Collection
7.6 Introduction to Trace-Based Collection
7.7 Short-Pause Garbage Collection
7.8 Advanced Topics in Garbage Collection
7.9 Summary of Chapter 7
7.10 References for Chapter 7
8 Code Generation
8.1 Issues in the Design of a Code Generator
8.2 The Target Language
8.3 Addresses in the Target Code
8.4 Basic Blocks and Flow Graphs
8.5 Optimization of Basic Blocks
8.6 A Simple Code Generator
8.7 Peephole Optimization
8.8 Register Allocation and Assignment
8.9 Instruction Selection by Tree Rewriting
8.10 Optimal Code Generation for Expressions
8.11 Dynamic Programming Code-Generation
8.12 Summary of Chapter 8
8.13 References for Chapter 8
9 Machine-Independent Optimizations
9.1 The Principal Sources of Optimization
9.2 Introduction to Data-Flow Analysis
9.3 Foundations of Data-Flow Analysis
9.4 Constant Propagation
9.5 Partial-Redundancy Elimination
9.6 Loops in Flow Graphs
9.7 Region-Based Analysis
9.8 Symbolic Analysis
9.9 Summary of Chapter 9
9.10 References for Chapter 9
10 Instruction-Level Parallelism
10.1 Processor Architectures
10.2 Code-Scheduling Constraints
10.3 Basic-Block Scheduling
10.4 Global Code Scheduling
10.5 Software Pipelining
10.6 Summary of Chapter 10
10.7 References for Chapter 10
11 Optimizing for Parallelism and Locality
11.1 Basic Concepts
11.2 Matrix Multiply: An In-Depth Example
11.3 Iteration Spaces
11.4 Affine Array Indexes
11.5 Data Reuse
11.6 Array Data-Dependence Analysis
11.7 Finding Synchronization-Free Parallelism
11.8 Synchronization Between Parallel Loops
11.9 Pipelining
11.10 Locality Optimizations
11.11 Other Uses of Affine Transforms
11.12 Summary of Chapter 11
11.13 References for Chapter 11
12 Interprocedural Analysis
12.1 Basic Concepts
12.2 Why Interprocedural Analysis?
12.3 A Logical Representation of Data Flow
12.4 A Simple Pointer-Analysis Algorithm
12.5 Context-Insensitive Interprocedural Analysis
12.6 Context-Sensitive Pointer Analysis
12.7 Datalog Implementation by BDD's
12.8 Summary of Chapter 12
12.9 References for Chapter 12
A A Complete Front End
A.1 The Source Language
A.2 Main
A.3 Lexical Analyzer
A.4 Symbol Tables and Types
A.5 Intermediate Code for Expressions
A.6 Jumping Code for Boolean Expressions
A.7 Intermediate Code for Statements
A.8 Parser
A.9 Creating the Front End
B Finding Linearly Independent Solutions
Index
· · · · · · (收起)
读后感
从我现在看的两章来看,这个第二版没有86年版写得好。比如,对第二章“一个简单的语法制导翻译器”,第二版确实写得没有86年版好懂。另外,86年版是基于c语言来叙述的,为了赶潮流去迎合java语言,第二版生硬把本来就是基于c语言所写成的这章内容换成用java语言,造成不太流畅...
确实很有这方面的需求,这是最近心态太浮躁了。希望能马上就用在什么地方,但是要理解里面的精髓,还得去了解状态机等等
看了一下china-pub上的样章。 1、2章翻译的不错,忠实于原文,术语准确。 不过美中不足的是有漏译的地方,个别段落直接落掉了。
诚心地说,这是一本好教科书,但不是一本全能的书,也不是一本工具书。这本书不适合实践,里面通篇的抽象大道理,例子不多。如果你之前对编译原理不甚了解,或是想巩固对编译原理知识,这本书再适合不过了;如果你已经具备了编译知识,想自己动手构建一个编译器的话,我还...
诚心地说,这是一本好教科书,但不是一本全能的书,也不是一本工具书。这本书不适合实践,里面通篇的抽象大道理,例子不多。如果你之前对编译原理不甚了解,或是想巩固对编译原理知识,这本书再适合不过了;如果你已经具备了编译知识,想自己动手构建一个编译器的话,我还...
用户评价
从这本书的封面设计来看,它就散发出一种非常沉稳和专业的学术气息。封面上“Compilers”几个大字,字体选择得非常恰当,既有力量感又不失严谨,没有任何花哨的修饰,直接点明了主题。我注意到封面的配色是一种深邃的、偏冷的色调,这很容易让人联想到计算机科学的严谨与逻辑,也营造了一种专注的阅读氛围。我个人喜欢那些设计简洁但寓意深刻的书籍封面,它们通常意味着内容更加扎实,而非徒有其表。这本书的封面恰恰如此,它没有试图通过过于鲜艳或复杂的图案来吸引眼球,而是用一种内敛而自信的方式,向读者传达了其内在的价值。这让我对接下来的阅读内容充满了好奇和期待,因为我相信,一个如此精心设计的封面背后,一定隐藏着同样高质量的内容。
我对这本书的装帧细节印象尤为深刻。它采用了硬壳精装,封面材质耐磨且不易沾染指纹,这种质感让人觉得非常高级。书脊的设计也考虑到了长期使用的需求,折叠起来非常顺畅,不会出现那种生硬的、容易损坏的感觉。我尤其喜欢的是书页的边缘处理,裁剪得非常整齐,而且纸张的厚度适中,既不会显得过于单薄,也不会过于厚重,拿在手里恰到好处。更值得一提的是,封面上的书名“Compilers”采用了一种特殊的烫银工艺,在光线下会折射出迷人的光泽,细节处彰显出出版方的用心。我一直认为,一本优秀的图书,其外在呈现与内在内容同等重要,它能够反映出作者和出版者对知识的尊重,以及对读者体验的考量。这本书在这些方面都做得近乎完美,让我在阅读之前就获得了一种愉悦的体验,也更加坚信这本书的内容一定也不会让我失望。
这本书的封面设计实在是太吸引人了,那种深邃的蓝色背景,配上简洁有力的银色字体,一眼望去就透着一股专业和沉稳的气息。我是在一个技术论坛上偶然看到有人推荐这本书的,虽然当时我并没有立刻入手,但那个封面却深深地印在了我的脑海里。后来,当我在书店里无意间翻到它时,那种熟悉的视觉冲击感再次袭来,我几乎是毫不犹豫地就把它带回家了。拿到手后,它的纸质触感也很棒,厚实而略带纹理,翻阅起来有一种踏实的感觉,这对于一本可能需要反复研读的专业书籍来说,是非常重要的。我喜欢那些设计精良的书籍,它们不仅在内容上提供价值,在视觉和触觉上也能带来一种享受。这本书的装帧设计无疑是其中的佼佼者,让我对即将展开的阅读之旅充满了期待。我个人对书籍的外在形态非常看重,一本好的书,从封面到内页的排版,都应该传递出一种严谨和专业的态度,这本书在这方面做得相当出色,让我觉得它不仅仅是一本工具书,更像是一件值得收藏的艺术品。
这本书的包装给我留下深刻印象。它采用了那种非常有质感的磨砂材质,触感温润,不易留下指纹。封面上“Compilers”这几个字的印刷非常精致,采用了立体感强的烫金工艺,在不同的光线下会折射出不同的光泽,显得既高贵又不失大气。我一直觉得,一本好的专业书籍,它的外在包装是其专业性和价值感的一种体现。这本书在这方面做得非常出色,它让我感受到了一种对书籍本身的尊重,以及对读者的诚意。我喜欢那种拿在手里就能感受到分量的书籍,它仿佛承载着沉甸甸的知识和智慧。这本书的包装,恰恰给了我这样的感觉,让我对接下来的阅读充满期待,相信它一定能带来丰富的知识和深刻的见解。
当我第一次看到这本书的封面时,我脑海中立刻浮现出的是严谨的逻辑、精巧的算法,以及那些隐藏在代码背后,将人类意图转化为机器语言的智慧。封面上“Compilers”这几个字,没有一点多余的设计,直击核心,仿佛是一道通往计算机底层世界的钥匙。这种极简的设计风格,对于我这种偏爱技术类书籍的读者来说,无疑是一种强大的吸引力。它让我感觉这本书不是那种流于表面的科普读物,而是一本真正深入探讨编译原理的专业书籍。我尤其喜欢封面的字体,它带有一种经典而现代的结合感,既有学术的厚重,又不失一丝科技的灵动。总而言之,这本书的封面设计,为我构建了一个关于编译世界的初步印象,也成功地勾起了我对阅读的强烈欲望。
只能算是讀了一半吧……
这本书很不适合入门编译原理,不适合新手
这本书很不适合入门编译原理,不适合新手
虽然Compiler看的是Pro. Hilfinger的讲义 姑且也标记一下吧……这块是难得还挺看的下去的底层 指不准哪天又想看了
明了了全书整体思路,和大部分章节的话题和深度。着重阅读了CPU,寄存器,多核体系的部分。不愧是龙书。