编译原理

出版时间:2011-1  出版社:机械工业出版社  作者:Alfred V. Aho,Monica S. Lam,Ravi Sethi,Jeffrey D. Ullman  页数:1009  
Tag标签:无  

前言

In the time since the 1986 edition of this book, the world of compiler designhas changed significantly. Programming languages have evolved to present newcompilation problems. Computer architectures offer a variety of resources ofwhich the compiler designer must take advantage. Perhaps most interestingly,the venerable technology of code optimization has found use outside compilers.It is now used in tools that find bugs in software, and most importantly, findsecurity holes in existing code. And much of the "front-end" technology ——grammars, regular expressions, parsers, and syntax-directed translators —— arestill in wide use.Thus, our philosophy from previous versions of the book has not changed.We recognize that few readers will build, or even maintain, a compiler for amajor programming language. Yet the models, theory, and algorithms associ-ated with a compiler can be applied to a wide range of problems in softwaredesign and software development. We therefore emphasize problems that aremost commonly encountered in designing a language processor, regardless ofthe source language or target machine.Use of the BookIt takes at least two quarters or even two semesters to cover all or most of thematerial in this book. It is common to cover the first half in an undergraduatecourse and the second half of the book —— stressing code optimization —— ina second course at the graduate or mezzanine level. Here is an outline of thechapters:Chapter 1 contains motivational material and also presents some backgroundissues in computer architecture and programming-language principles.Chapter 2 develops a miniature compiler and introduces many of the impor-taut concepts, which are then developed in later chapters. The compiler itselfappears in the appendix.Chapter 3 covers lexical analysis, regular expressions, finite-state machines, andscanner-generator tools. This material is fundamental to text-processing of allsorts.

内容概要

本书是编译领域无可替代的经典著作,被广大计算机专业人士誉为“龙书”。本书上一版自1986年出版以来,被世界各地的著名高等院校和研究机构(包括美国哥伦比亚大学、斯坦福大学、哈佛大学、普林斯顿大学、贝尔实验室)作为本科生和研究生的编译原理课程的教材。该书对我国高等计算机教育领域也产生了重大影响。
  第2版对每一章都进行了全面的修订,以反映自上一版出版20多年来软件工程。程序设计语言和计算机体系结构方面的发展对编译技术的影响。本书全面介绍了编译器的设计,并强调编译技术在软件设计和开发中的广泛应用。每章中都包含大量的习题和丰富的参考文献。
  本书适合作为高等院校计算机专业本科生和研究生的编译原理与技术课程的教材,也可供广大计算机技术人员参考。
  cd中包含如下内容:
  ·comptia project+考试模拟题。
  ·作者的项目管理培训视频。
  ·项目管理工作表和模板。

作者简介

Alfred
V.Aho,美国歌伦比亚大学教授,美国国家工程院院士,ACM和IEEE会士,曾获得IEEE的冯·诺伊曼奖。著有多部算法、数据结构、编译器、数据库系统及计算机科学基础方面的著作。

书籍目录

1 introduction
 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 hnplementing 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 m 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 aftlne 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 summarv 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

章节摘录

插图:Languagel, are used to search databases. Database queries consist of predicatescontaining relational and boolean operators. They can be interpreted or com-piled into commands to search a database for records satisfying that predicate.Compiled SimulationSimulation is a general technique used in many scientific and engineering disci-plines to understand a phenomenon or to validate a design. Inputs to a simula-tor usually include the description of the design and specific input parametersfor that particular simulation run. Simulations can be very expensive. We typi-cally need to simulate many possible design alternatives on many different inputsets, and each experiment may take days to complete on a high-performancemachine. Instead of writing a simulator that interprets the design, it is fasterto compile the design to produce machine code that simulates that particulardesign natively. Compiled simulation can run orders of magnitude faster thanan interpreter-based approach. Compiled simulation is used in many state-of-the-art tools that simulate designs written in Verilog or VHDL.1.5.5  Software Productivity ToolsPrograms are arguably the most complicated engineering artifacts ever pro-duced; they consist of many many details, every one of which must be correctbefore the program will work completely. As a result, errors are rampant inprograms; errors may crash a system, produce wrong results, render a systemvulnerable to security attacks, or even lead to catastrophic failures in criticalsystems. Testing is the primary technique for locating errors in programs.An interesting and promising complementary approach is to use data-flowanalysis to locate errors statically (that is, before the program is run). Data-flow analysis can find errors along all the possible execution paths, and notjust those exercised by the input data sets, as in the case of program testing.Many of the data-flow-analysis techniques, originally developed for compileroptimizations, can be used to create tools that assist programmers in theirsoftware engineering tasks.The problem of finding all program'errors is undecidable. A data-flow anal-ysis may be designed to warn the programmers of all possible statements witha particular category of errors. But if most of these warnings are false alarms,users will not use the tool. Thus, practical error detectors are often neithersound nor complete. That is, they may not find all the errors in the program,and not all errors reported are guaranteed to be real errors. Nonetheless, var-ious static analyses have been developed and shown to be effective in findingerrors, such as dereferencing null or freed pointers, in real programs. The factthat error detectors may be unsound makes them significantly different fromcompiler optimizations. Optimizers must be conservative and cannot alter thesemantics of the program under any circumstances.

编辑推荐

《编译原理(英文版·第2版)》:经典原版书库

图书封面

图书标签Tags

评论、评分、阅读与下载


    编译原理 PDF格式下载


用户评论 (总计83条)

 
 

  •   编译原理就看这本了!英文版还可以锻炼英文
  •   这是一本很经典的编译原理教材,适合本科教学或者自学使用.不过此版本的纸张不是很好,字也比较小,建议买人民邮电出版社的影印版.
  •   虽然我的英语不是很好,但是从前面一章来看的话,就是几个专业词汇重复出现的频率较高,算比较好懂。从内容的本身上来说,都觉得这本书了解编译原理是十分合适的,特别是从理论上去了解,可能要真的想自己动手编这本书的实践性就差点了。
  •   编译原理之中的经典之作,而且英文的读起来更有感觉,更贴近作者本身的想表达的意思。
  •   编译原理的经典书籍!
  •   再写多少评论也无改这本书的地位。
    知道的人,不会因为评论怎么样会影响对这本书的购买需求。
    不知道的人,其实也不用买这本书。
    不过还是推荐一下。
    对编译原来有兴趣,就看看吧。
  •   学编译原理不容错过的书籍
  •   懂得编译原理的人才是真正的大牛~
  •   曾经简单看了会中文版,觉得很不爽,很难理解。后来对比看了英文版,才发现原版英文书看起来很爽有木有!!强烈推荐直接看原版!!神书!!
  •   在读中,编译总体比较抽象,确实有点不好理解。。。书看得很慢
  •   不是轻意能读得懂的一本书,不在于其是英文版,而是在于这些知识是一般编程的人接触得较少的。要掌握还是得需要反复地、耐心地、每次拿出整桩时间来读,不适合作为床前读物。尽管很难,但对于想要在编程方面进阶的话,尤其是提高效率的话,这方面的知识就必不可少了。
  •   看计算机的书还是要看原版的
  •   龙书很经典了,质量也很不错
  •   终于得到了 传说中的 “龙书”,学习中!
  •   很好,塑封包装,纸质比邮电版的好,但是字比邮电版的小,看起来比较累
  •   比起看中文版果然更加好,是本好书~
  •   一边看龙书,一边学英语,
  •   经典原版书
  •   经典,我喜欢原版书。尤其是经典的
  •   里面包含了我想要了解的东西,我喜欢去阅读第一手资料
  •   快递速度很快,纸张很不错,很是经典的
  •   语言通俗易懂,对英语水平的要求不是很高,但要潜心思考才能领悟得透。
  •   循序渐进 好教材
  •   很值得收藏和适合理论基础学习
  •   前几天收到的货,送货效率挺高。
    书也非常好
  •   书的纸张质量一般,希望不要有错误才好!
  •   书送到的很快,大略翻了下,木有空白页之类的情况。而且是新书。
  •   写的非常详细,拜读中。。。。。。
  •   受教育,推荐。
  •   印刷没什么问题,纸还是很薄,内容好多啊
  •   不错,得细细研读
  •   值得仔细好好读。
  •   being dong
  •   需要,当年被非典搅和了,没学好。
  •   原版的东西,一般都不差的。
  •   没啥好说的,慢慢啃英文砖头书吧。。
  •   送的速度很快,一天之内就送到了,服务态度还好
  •   速度怎么变慢了,在北京要两天?
  •   很好。很满意!
  •   我们上课用的,没办法才买
  •   这本书基本是天书,因为我编译原理本来就不懂,在加上又是为国人写得
  •   只是搞不明白为什么要用Java去实现一个编译器?
  •   看了电子版的,才决定买这本书的,到手后还没开始看。作为龙书,当然不是一两天就能读懂的,希望能坚持读下去。
  •   内容不错,不愧是龙书,但是纸张太差,有破页的地方
  •   书比我想象中要小,一千多页也不是很厚,不过纸质还不错,印刷什么的都很好,这本书够我看的了。
  •   写的比较细致,可以一边学英文,一边学编程,一举两德。
  •   中文版的实在是烂!原版的好很多,就是书小了点,字小了点。
  •   当然内容不用说了。
  •   印刷得字有点小了,看着费劲,其他的还可以
  •   值得精读多遍
  •   翻译的图书并不能完全表达原文的意思,虽然已经翻译的很好。
    这本书我只需要看词法解析器、语法分析器。后面的部分太复杂,没有看了。
    希望能把这本书,和翻译版的书分成上下两册。
  •   早知道买翻译版的了
  •   包装不错,还不错,还没看,看起来挺厚
  •   印刷用纸太薄存在残页
  •   平时没有看太多英文原著,所以...
  •   书很小,看起来就一个练习本那么大,纸张质量也不好,心里落差比较大
  •   非常值得阅读跟收藏的一本书!
  •   书的内容是很好的,但是书的字太小了,看起来很辛苦,另外习题答案在网上找不到,找到的都是不完整的,希望有人能提供答案
  •   印装质量一般真的很一般,机械工业出版社都是这样啦!
  •   其他都还好,就是纸张太小了
  •   内容好,但出版社偷懒啦。
  •   买了本英文版的,希望能更贴切的学习,编译原理还是很重要很有用的,学计算机的还好好是看看这本书。
  •   相比中文图书来说,英文图书能看到作者本意,还能学习英语 一举两得
  •   The "Dragon Book". This is the updated edition of the classic compiler textbook. The coverage of grammars, parsing and optimization is very strong (and has the best theoretical treatment - well beyond what we will normally do); but the material on semantics and type checking is mixed up with intermediate code generation, and there is very little about SSA representations of programs.For a serious reader considering a more practical book about building a real world modern compiler, two more books may help:Engineering a Compiler, Cooper and Torczon (Morgan-Kaufman..., 2004).andModern Compiler Implementation in Java, Appel (Cambridge University Press, 2nd edition, 2002) 阅读更多 ›
  •   关键的是书里面的英文都简单易懂啊!没什么阅读困难,很不错!虽然这本纸质书的特点是,字小,纸张透明,并且是那种小十六开的书,看书有一点不爽,因为这个给四星!!为什么不出质量好一点的呢,这么经典的书,即使贵一点也没有关系啊!!
  •   不过买回来了以后随便翻了一翻就开始睡大觉了。
  •   很不错嘛,用来收藏挺好
  •   书的内容不必多说,是编译原理的泰斗级读物。书纸张符合机工社一贯传统,薄如蝉翼。
  •   习题有难度。第二章排布有点杂乱。阅读感受尚可。有时走神则全页如同天书,原版虽好,中文吾爱啊。
  •   全英文的,必须打起精神来看。
  •   书好小阿,,又厚,,这样排版太不合适了。。刚到手就变成两半了
  •   上课用的...还行 带着也挺方便~
  •   龙书必须是得5星。。
  •   32开,但是很厚,买了之后听说很难
  •   不管怎么说,我的这本是正版的。书的内容都知道,不评价。经典就是经典
  •   内容通俗易懂,覆盖全面,知识点很细,注重思想,安排也很合理,很喜欢这本书。
  •   好。八。。。。。。。。。
  •   给力的龙书
  •   对英文要求高
  •   是真的,不错哦
  •   完全凭着名字买的
  •   书比想象中的小一大圈
  •   经典龙书
 

250万本中文图书简介、评论、评分,PDF格式免费下载。 第一图书网 手机版

京ICP备13047387号-7