Modern Compiler Implementation in Ml

by
Format: Hardcover
Pub. Date: 1997-12-13
Publisher(s): Cambridge University Press
  • Free Shipping Icon

    This Item Qualifies for Free Shipping!*

    *Excludes marketplace orders.

List Price: $68.25

Buy New

Arriving Soon. Will ship when available.
$65.00

Rent Textbook

Select for Price
There was a problem. Please try again later.

Rent Digital

Rent Digital Options
Online:180 Days access
Downloadable:180 Days
$89.28
Online:1825 Days access
Downloadable:Lifetime Access
$111.59
$89.28

Used Textbook

We're Sorry
Sold Out

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

This new, expanded textbook describes all phases of a modern compiler: lexical analysis, parsing, abstract syntax, semantic actions, intermediate representations, instruction selection via tree matching, dataflow analysis, graph-coloring register allocation, and runtime systems. It includes good coverage of current techniques in code generation and register allocation, as well as functional and object-oriented languages, that are missing from most books. In addition, more advanced chapters are now included so that it can be used as the basis for two-semester or graduate course. The most accepted and successful techniques are described in a concise way, rather than as an exhaustive catalog of every possible variant. Detailed descriptions of the interfaces between modules of a compiler are illustrated with actual C header files. The first part of the book, Fundamentals of Compilation, is suitable for a one-semester first course in compiler design. The second part, Advanced Topics, which includes the advanced chapters, covers the compilation of object-oriented and functional languages, garbage collection, loop optimizations, SSA form, loop scheduling, and optimization for cache-memory hierarchies.

Table of Contents

Preface ix
Part I Fundamentals of Compilation 3(264)
1 Introduction
3(11)
1.1 Modules and Interfaces
4(1)
1.2 Tools and software
5(2)
1.3 Data structures for tree languages
7(7)
2 Lexical Analysis
14(24)
2.1 Lexical tokens
15(1)
2.2 Regular expressions
16(3)
2.3 Finite automata
19(3)
2.4 Nondeterministic finite automata
22(6)
2.5 ML-Lex: a lexical analyzer generator
28(10)
3 Parsing
38(49)
3.1 Context-free grammars
40(5)
3.2 Predictive parsing
45(10)
3.3 LR parsing
55(13)
3.4 Using parser generators
68(7)
3.5 Error recovery
75(12)
4 Abstract Syntax
87(16)
4.1 Semantic actions
87(5)
4.2 Abstract parse trees
92(11)
5 Semantic Analysis
103(21)
5.1 Symbol tables
103(8)
5.2 Bindings for the Tiger compiler
111(3)
5.3 Type-checking expressions
114(3)
5.4 Type-checking declarations
117(7)
6 Activation Records
124(24)
6.1 Stack frames
126(8)
6.2 Frames in the Tiger compiler
134(14)
7 Translation to Intermediate Code
148(25)
7.1 Intermediate representation trees
149(3)
7.2 Translation into trees
152(15)
7.3 Declarations
167(6)
8 Basic Blocks and Traces
173(13)
8.1 Canonical trees
174(5)
8.2 Taming conditional branches
179(7)
9 Instruction Selection
186(25)
9.1 Algorithms for instruction selection
189(8)
9.2 CISC machines
197(3)
9.3 Instruction selection for the Tiger compiler
200(11)
10 Liveness Analysis
211(17)
10.1 Solution of dataflow equations
213(9)
10.2 Liveness in the Tiger compiler
222(6)
11 Register Allocation
228(30)
11.1 Coloring by simplification
229(3)
11.2 Coalescing
232(4)
11.3 Precolored nodes
236(5)
11.4 Graph coloring implementation
241(9)
11.5 Register allocation for trees
250(8)
12 Putting It All Together
258(9)
Part II Advanced Topics 267(245)
13 Garbage Collection
267(26)
13.1 Mark-and-sweep collection
267(5)
13.2 Reference counts
272(2)
13.3 Copying collection
274(5)
13.4 Generational collection
279(2)
13.5 Incremental collection
281(3)
13.6 Baker's algorithm
284(1)
13.7 Interface to the compiler
285(8)
14 Object-Oriented Languages
293(16)
14.1 Classes
293(3)
14.2 Single inheritance of data fields
296(2)
14.3 Multiple inheritance
298(2)
14.4 Testing class membership
300(4)
14.5 Private fields and methods
304(1)
14.6 Classless languages
304(1)
14.7 Optimizing object-oriented programs
305(4)
15 Functional Programming Languages
309(35)
15.1 A simple functional language
310(2)
15.2 Closures
312(1)
15.3 Immutable variables
313(7)
15.4 Inline expansion
320(6)
15.5 Closure conversion
326(3)
15.6 Efficient tail recursion
329(2)
15.7 Lazy evaluation
331(13)
16 Polymorphic Types
344(33)
16.1 Parametric polymorphism
345(8)
16.2 Type inference
353(10)
16.3 Representation of polymorphic variables
363(9)
16.4 Resolution of static overloading
372(5)
17 Dataflow Analysis
377(27)
17.1 Intermediate representation for flow analysis
378(3)
17.2 Various dataflow analyses
381(5)
17.3 Transformations using dataflow analysis
386(1)
17.4 Speeding up dataflow analysis
387(9)
17.5 Alias analysis
396(8)
18 Loop Optimizations
404(23)
18.1 Dominators
407(5)
18.2 Loop-invariant computations
412(1)
18.3 Induction variables
413(6)
18.4 Array-bounds checks
419(4)
18.5 Loop unrolling
423(4)
19 Static Single-Assignment Form
427(41)
19.1 Converting to SSA form
430(8)
19.2 Efficient computation of the dominator tree
438(7)
19.3 Optimization algorithms using SSA
445(6)
19.4 Arrays, pointers, and memory
451(2)
19.5 The control-dependence graph
453(3)
19.6 Converting back from SSA form
456(2)
19.7 A functional intermediate form
458(10)
20 Pipelining and Scheduling
468(24)
20.1 Loop scheduling without resource bounds
472(4)
20.2 Resource-bounded loop pipelining
476(8)
20.3 Branch prediction
484(8)
21 The Memory Hierarchy
492(20)
21.1 Cache organization
493(3)
21.2 Cache-block alignment
496(2)
21.3 Prefetching
498(6)
21.4 Loop interchange
504(1)
21.5 Blocking
505(3)
21.6 Garbage collection and the memory hierarchy
508(4)
Appendix: Tiger Language Reference Manual 512(10)
A.1 Lexical issues 512(1)
A.2 Declarations 512(3)
A.3 Variables and expressions 515(4)
A.4 Standard library 519(1)
A.5 Sample Tiger programs 520(2)
Bibliography 522(9)
Index 531

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.