skip to main content
Skip header Section
Modern Compiler Implementation in JavaOctober 2003
Publisher:
  • Cambridge University Press
  • 40 W. 20 St. New York, NY
  • United States
ISBN:978-0-521-82060-8
Published:01 October 2003
Pages:
528
Skip Bibliometrics Section
Reflects downloads up to 31 Dec 2024Bibliometrics
Skip Abstract Section
Abstract

From the Publisher:

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 compilation of object-oriented and functional languages, garbage collection, loop optimization, SSA form, instruction scheduling, optimization for cache-memory hierarchies, can be used for a second-semester or graduate course.

Cited By

  1. Léchenet J, Blazy S and Pichardie D A Fast Verified Liveness Analysis in SSA Form Automated Reasoning, (324-340)
  2. ACM
    You Y and Chen S (2016). VecRA, ACM Transactions on Embedded Computing Systems, 15:4, (1-30), Online publication date: 1-Sep-2016.
  3. ACM
    Rodrigues B, Quintão Pereira F and Aranha D Sparse representation of implicit flows with applications to side-channel detection Proceedings of the 25th International Conference on Compiler Construction, (110-120)
  4. ACM
    Sperle Campos V, Alves P, Nazaré Santos H and Quintão Pereira F Restrictification of function arguments Proceedings of the 25th International Conference on Compiler Construction, (163-173)
  5. ACM
    Alves P, Gruber F, Doerfert J, Lamprineas A, Grosser T, Rastello F and Pereira F (2015). Runtime pointer disambiguation, ACM SIGPLAN Notices, 50:10, (589-606), Online publication date: 18-Dec-2015.
  6. ACM
    Alves P, Gruber F, Doerfert J, Lamprineas A, Grosser T, Rastello F and Pereira F Runtime pointer disambiguation Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, (589-606)
  7. You Y and Chen S Vector-aware register allocation for GPU shader processors Proceedings of the 2015 International Conference on Compilers, Architecture and Synthesis for Embedded Systems, (99-108)
  8. Demontiê F, Cezar J, Bigonha M, Campos F and Magno Quintão Pereira F Automatic Inference of Loop Complexity Through Polynomial Interpolation Proceedings of the 19th Brazilian Symposium on Programming Languages - Volume 9325, (1-15)
  9. Montenegro M, Peña R and Sánchez-Hernández J A Generic Intermediate Representation for Verification Condition Generation Revised Selected Papers of the 25th International Symposium on Logic-Based Program Synthesis and Transformation - Volume 9527, (227-243)
  10. ACM
    Lasseter J The Interpreter In An Undergraduate Compilers Course Proceedings of the 46th ACM Technical Symposium on Computer Science Education, (168-173)
  11. ACM
    Liu P, Tripp O and Zhang X (2014). Flint, ACM SIGPLAN Notices, 49:10, (543-560), Online publication date: 31-Dec-2015.
  12. ACM
    Liu P, Tripp O and Zhang X Flint Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications, (543-560)
  13. ACM
    Lindner M, Lindner A and Lindgren P RTFM-core Proceedings of the WESE'14: Workshop on Embedded and Cyber-Physical Systems Education, (1-9)
  14. ACM
    Piccoli G, Santos H, Rodrigues R, Pousa C, Borin E and Quintão Pereira F Compiler support for selective page migration in NUMA architectures Proceedings of the 23rd international conference on Parallel architectures and compilation, (369-380)
  15. ACM
    Rayside D A compiler project with learning progressions Companion Proceedings of the 36th International Conference on Software Engineering, (392-399)
  16. ACM
    Saleena N and Paleri V Global value numbering for redundancy detection Proceedings of the 29th Annual ACM Symposium on Applied Computing, (1609-1611)
  17. SöDerberg E, Ekman T, Hedin G and Magnusson E (2013). Extensible intraprocedural flow analysis at the abstract syntax tree level, Science of Computer Programming, 78:10, (1809-1827), Online publication date: 1-Oct-2013.
  18. ACM
    Matsumoto S and Sakurai K A proposal for the privacy leakage verification tool for Android application developers Proceedings of the 7th International Conference on Ubiquitous Information Management and Communication, (1-8)
  19. ACM
    Boissinot B, Brisk P, Darte A and Rastello F (2012). SSI Properties Revisited, ACM Transactions on Embedded Computing Systems, 11S:1, (1-23), Online publication date: 1-Jun-2012.
  20. ACM
    Dayarathna M and Suzumura T Hirundo Proceedings of the 3rd ACM/SPEC International Conference on Performance Engineering, (335-346)
  21. ACM
    Campanoni S, Jones T, Holloway G, Reddi V, Wei G and Brooks D HELIX Proceedings of the Tenth International Symposium on Code Generation and Optimization, (84-93)
  22. Boissinot B, Brandner F, Darte A, de Dinechin B and Rastello F A non-iterative data-flow algorithm for computing liveness sets in strict SSA programs Proceedings of the 9th Asian conference on Programming Languages and Systems, (137-154)
  23. ACM
    Kim S, Kwon K, Kim C, Jang C, Lee J and Min S (2011). Demand Paging Techniques for Flash Memory Using Compiler Post-Pass Optimizations, ACM Transactions on Embedded Computing Systems, 10:4, (1-29), Online publication date: 1-Nov-2011.
  24. Leuschel M, Falampin J, Fritz F and Plagge D (2011). Automated property verification for large scale B models with ProB, Formal Aspects of Computing, 23:6, (683-709), Online publication date: 1-Nov-2011.
  25. ACM
    Tavares A, Colombet Q, Bigonha M, Guillon C, Pereira F and Rastello F Decoupled graph-coloring register allocation with hierarchical aliasing Proceedings of the 14th International Workshop on Software and Compilers for Embedded Systems, (1-10)
  26. ACM
    Ortin F and Garcia M Separating different responsibilities into parallel hierarchies Proceedings of The Fourth International C* Conference on Computer Science and Software Engineering, (63-72)
  27. Morell L (2011). Design of an extensible interpreter using information hiding, Journal of Computing Sciences in Colleges, 26:5, (130-136), Online publication date: 1-May-2011.
  28. Rimsa A, d'Amorim M and Pereira F Tainted flow analysis on e-SSA-form programs Proceedings of the 20th international conference on Compiler construction: part of the joint European conferences on theory and practice of software, (124-143)
  29. Rolando P, Sisto R and Risso F (2011). SPAF, IEEE/ACM Transactions on Networking, 19:1, (14-27), Online publication date: 1-Feb-2011.
  30. ACM
    Mallen A and Brylow D Compiler construction with a dash of concurrency and an embedded twist Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion, (161-168)
  31. ACM
    Gondow K, Fukuyasu N and Arahori Y MieruCompiler Proceedings of the 41st ACM technical symposium on Computer science education, (7-11)
  32. Fenwick J and Gross L Lazy evaluation of PDE coefficients in the EScript system Proceedings of the Eighth Australasian Symposium on Parallel and Distributed Computing - Volume 107, (71-76)
  33. ACM
    Jones T, O'Boyle M, Abella J, González A and Ergin O (2009). Exploring the limits of early register release, ACM Transactions on Architecture and Code Optimization, 6:3, (1-30), Online publication date: 1-Sep-2009.
  34. Gill A A Haskell Hosted DSL for Writing Transformation Systems Proceedings of the IFIP TC 2 Working Conference on Domain-Specific Languages, (285-309)
  35. Sassa M, Ito Y and Kohama M (2009). Comparison and evaluation of back-translation algorithms for static single assignment forms, Computer Languages, Systems and Structures, 35:2, (173-195), Online publication date: 1-Jul-2009.
  36. Boissinot B, Darte A, Rastello F, de Dinechin B and Guillon C Revisiting Out-of-SSA Translation for Correctness, Code Quality and Efficiency Proceedings of the 7th annual IEEE/ACM International Symposium on Code Generation and Optimization, (114-125)
  37. Bringert B and Ranta A (2008). A pattern for almost compositional functions, Journal of Functional Programming, 18:5-6, (567-598), Online publication date: 1-Sep-2008.
  38. ACM
    Campanoni S, Agosta G and Reghizzi S (2008). A parallel dynamic compiler for CIL bytecode, ACM SIGPLAN Notices, 43:4, (11-20), Online publication date: 1-Apr-2008.
  39. Zatarain-Cabada R, Barrón-Estrada M, Zepeda-Sanchez L and Vega-Juárez F Authoring learning objects for web-based intelligent tutoring systems Proceedings of the 6th international conference on Advances in web based learning, (66-77)
  40. Lee J, Palsberg J and Pereira F Aliased register allocation for straight-line programs is NP-complete Proceedings of the 34th international conference on Automata, Languages and Programming, (680-691)
  41. Vasa R, Lumpe M and Schneider J Patterns of component evolution Proceedings of the 6th international conference on Software composition, (235-251)
  42. ACM
    D'Ursi A, Cavallaro L and Monga M On bytecode slicing and aspectJ interferences Proceedings of the 6th workshop on Foundations of aspect-oriented languages, (35-43)
  43. ACM
    Du W, Teng Z and Wang R (2007). SEED, ACM SIGCSE Bulletin, 39:1, (486-490), Online publication date: 7-Mar-2007.
  44. ACM
    Du W, Teng Z and Wang R SEED Proceedings of the 38th SIGCSE technical symposium on Computer science education, (486-490)
  45. Pitzer M and Dobler H An object-oriented and generic compiler generator Proceedings of the 11th international conference on Computer aided systems theory, (130-137)
  46. Collier R Debugging agents in agent factory Proceedings of the 4th international conference on Programming multi-agent systems, (229-248)
  47. Hammond S and Lacey D Loop transformations in the ahead-of-time optimization of java bytecode Proceedings of the 15th international conference on Compiler Construction, (109-123)
  48. Pereira F and Palsberg J Register allocation after classical SSA elimination is NP-Complete Proceedings of the 9th European joint conference on Foundations of Software Science and Computation Structures, (79-93)
  49. Dzidek W, Briand L and Labiche Y Lessons learned from developing a dynamic OCL constraint enforcement tool for java Proceedings of the 2005 international conference on Satellite Events at the MoDELS, (10-19)
  50. Ryu S and Ramsey N Source-Level debugging for multiple languages with modest programming effort Proceedings of the 14th international conference on Compiler Construction, (10-26)
  51. ACM
    Nguyen D, Ricken M and Wong S Design patterns for parsing Proceedings of the 36th SIGCSE technical symposium on Computer science education, (477-481)
  52. ACM
    Nguyen D, Ricken M and Wong S (2005). Design patterns for parsing, ACM SIGCSE Bulletin, 37:1, (477-481), Online publication date: 23-Feb-2005.
  53. ACM
    Park C, Lim J, Kwon K, Lee J and Min S Compiler-assisted demand paging for embedded systems with flash memory Proceedings of the 4th ACM international conference on Embedded software, (114-124)
  54. ACM
    Smith M, Ramsey N and Holloway G (2004). A generalized algorithm for graph-coloring register allocation, ACM SIGPLAN Notices, 39:6, (277-288), Online publication date: 9-Jun-2004.
  55. ACM
    Smith M, Ramsey N and Holloway G A generalized algorithm for graph-coloring register allocation Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation, (277-288)
Contributors
  • Princeton University
  • University of California, Los Angeles

Reviews

Uwe Kastens

Compiler construction courses are an important part of the computer science curriculum of many universities. Although only a few of the students in these courses will later work in compiler development, these courses provide valuable insights into programming language principles, language design issues, and the implementation of domain-specific languages. The methods used in compiler construction demonstrate how practical software engineering techniques, combined with well-understood theoretical models, lead to modularized software systems of significant functionality and size. This book is intended to be a textbook for a one- or two-semester course. The one-semester course would cover Part 1 of the book (chapters 1 through 12), presenting compiler construction fundamentals, accompanied by a practical compiler implementation project. A second course could cover the advanced material presented in Part 2 of the book (chapters 13 through 21). Compared to the first edition, this second edition of the book has been extensively rewritten. The example language, "Tiger," that was previously used in the practical compiler project has been replaced by "MiniJava," a subset of Java. More object-oriented concepts, such as the visitor pattern for semantic analysis, have been added. Part 1 of the book is titled "Fundamentals of Compilation." It follows the standard structuring of compiler tasks and phases, addressing lexical and syntactical analysis, abstract syntax, and semantic analysis, as well as code generation issues such as activation records, basic blocks, instruction selection, and register allocation. Each chapter has both paper-and-pencil exercises and a programming project that corresponds to one module of a compiler. The programming exercises use modern Java-based compiler tools such as JavaCC, an LL-parser generator, and SableCC, an LALR-parser generator. Both generators also produce lexical analyzers. The tools are freely available, and can be accessed through the well-structured online resources pages for this book hosted by Cambridge University Press. The book does not aim for completeness in its references to alternative methods and tools. Part 1 provides a concise, but sufficiently precise overview of the basic methods applied in compiler construction. Only the rather short chapter on semantic analysis does not reach that quality standard: for name analysis and type analysis, ad hoc solutions are presented rather than systematic methods. Despite this shortcoming, however, the first part of the book, with its strong emphasis on practical implementation, would be very well suited to accompany a first compiler course, or to help its readers in refreshing their compiler knowledge. Part 2 of the book, "Advanced Topics," is intended as a text for an advanced compiler course, either for students who have already taken the fundamental course based on Part 1, or for people with basic compiler know-how from other sources. Part 2 still proposes paper-and-pencil exercises, but does not continue the use of practical MiniJava projects, which makes it somewhat independent of the first part. Part 2 includes a discussion of garbage collection, and the special language features and compilation problems introduced by object-oriented and functional languages. It presents program analyses and transformations based on dataflow analysis and special optimization techniques for loops. It also discusses static single assignment form, pipelining and scheduling for instruction-level parallel (ILP) processors, and optimization for cache-memory hierarchies. With this part of his book, the author manages to provide a nice and interesting view of some of the more advanced and modern topics in compiler construction. In summary, I recommend this book as a textbook for both beginning and advanced compiler courses. It includes a discussion of the most relevant current techniques used in compiler front ends and back ends. It puts a strong emphasis on practical aspects by using Java as its implementation language, discussing Java-based compiler tools, and proposing practical exercises that implement the various phases of a compiler. Finally, this is also a well-written book, which strictly adheres to a no-nonsense style, and therefore is a pleasure to read. Online Computing Reviews Service

Hector A. Villa-Martinez

The objective of this book is to serve as a textbook for a two-semester course in compilers. The book is divided into two parts. Part 1 is adequate for an undergraduate course covering the principles of compilers, and Part 2 is more appropriate for a graduate course, as it is focused on advanced topics. Part 1 is comprised of 12 chapters, each describing one phase of a compiler. Chapter 1 is an introduction to the topic, and chapter 2 covers the standard material in lexical analysis: regular expressions and finite automata. The JavaCC and SableCC parser generators are introduced in this chapter. Chapter 3 addresses syntax analysis, and starts by explaining some parsing algorithms, for example recursive descent and LR parsing, and then demonstrates how to construct a parser using the aforementioned parser generators. The chapter ends with error recovery theory. Chapter 4 is about semantic actions using an abstract syntax tree. Chapter 5 covers semantic analysis and type checking. Chapter 6 studies techniques to implement activation records, and chapter 7 covers translation to machine-independent intermediate code, producing intermediate representation (IR) trees. Chapter 8 studies some transformations to IR trees that are necessary for the convenience of next phases, including hoisting side effects out of expressions, and clean up of conditional branches. Chapter 9 reviews some algorithms for instruction selection, and chapter 10 explains optimization through liveness analysis from control-flow graphs. Chapter 11 addresses register allocation techniques. Finally, chapter 12 is about code emission. Part 2 discusses more advanced topics, and has nine chapters. Chapter 13 is a review of some methods of garbage collection: mark and sweep, reference counts, copying collection, generational collection, incremental collection, and Bakers algorithm. Chapter 14 explores the compiling of object-oriented languages, and chapter 15 does the same for functional languages. Chapter 16 demonstrates how to deal with the two main kinds of polymorphism: parametric polymorphism and overloading. Chapters 17 through 19 are about optimization. The authors present an extensive review of techniques and their alternatives, including data flow analysis, loop optimization, and static single-assignment forms. Finally, chapters 20 and 21 address possible optimizations in machines supporting pipelining and cache management. Some valuable features are contained in the book. Although it has the word Java in its title, the book is not loaded with code, so anybody can benefit by reading it. Another advantage is its coverage of modern issues like reduced instruction set computing (RISC) machines, garbage collection, optimization, and compiling object-oriented and functional languages. On the first page, there is a warning that only [t]he most accepted and successful techniques are described concisely, rather than as an exhaustive catalog of every possible variant. For example, the chapters about lexical and syntactic analysis are very succinct, so, depending of the class and the instructor, another book may be needed. There is a companion Web site where the parser generators can be downloaded. At the end of each chapter, there are sections with a commented bibliography, a program assignment, and a set of exercises. The book is very readable, with a precise and concise style. Overall, I think this a very valuable textbook, which is worth its price. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Recommendations