Introduction to Compiler Construction in a Java World

Introduction to Compiler Construction in a Java World

By: Swami Iyer (author), Bill Campbell (author), Bahar Akbal-Delibas (author)Hardback

1 - 2 weeks availability

Description

Immersing students in Java and the Java Virtual Machine (JVM), Introduction to Compiler Construction in a Java World enables a deep understanding of the Java programming language and its implementation. The text focuses on design, organization, and testing, helping students learn good software engineering skills and become better programmers. The book covers all of the standard compiler topics, including lexical analysis, parsing, abstract syntax trees, semantic analysis, code generation, and register allocation. The authors also demonstrate how JVM code can be translated to a register machine, specifically the MIPS architecture. In addition, they discuss recent strategies, such as just-in-time compiling and hotspot compiling, and present an overview of leading commercial compilers. Each chapter includes a mix of written exercises and programming projects. By working with and extending a real, functional compiler, students develop a hands-on appreciation of how compilers work, how to write compilers, and how the Java language behaves. They also get invaluable practice working with a non-trivial Java program of more than 30,000 lines of code. Fully documented Java code for the compiler is accessible at http://www.cs.umb.edu/j--/

Create a review

About Author

Bill Campbell is an associate professor in the Department of Computer Science at the University of Massachusetts, Boston. Dr. Campbell has been teaching compilers for more than twenty years and has commercial experience working with AT&T, Intermetrics Inc., Apple Computer, and Entitlenet. His areas of expertise include software engineering, object-oriented analysis, design and programming, and programming language implementation. Swami Iyer is a PhD candidate in the Department of Computer Science at the University of Massachusetts, Boston, where he has taught classes on introductory programming and data structures. His research interests are in the fields of dynamical systems, complex networks, and evolutionary game theory. Bahar Akbal-Delibas is a PhD student in the Department of Computer Science at the University of Massachusetts, Boston, where she is the teaching assistant for the compilers course. Her research interests include structural bioinformatics and software modeling.

Contents

Compilation Compilers Why Should We Study Compilers? How Does a Compiler Work? The Phases of Compilation An Overview of the j-- to JVM Compiler The j-- Compiler Source Tree The Organization of This Book Lexical Analysis Introduction Scanning Tokens Regular Expressions Finite State Automata Nondeterministic Finite-State Automata (NFA) vs. Deterministic Finite-State Automata (DFA) Regular Expressions to NFA NFA to DFA A Minimal DFA JavaCC: A Tool for Generating Scanners Parsing Introduction Context-Free Grammars and Languages Top-down Deterministic Parsing Bottom-up Deterministic Parsing Parser Generation Using JavaCC Type Checking Introduction The j--Types j-- Symbol Tables Pre-Analysis of j-- Programs Analysis of j-- Programs The Visitor Pattern and the AST Traversal Mechanism Programming Language Design and Symbol Table Structure Attribute Grammars JVM Code Generation Introduction Generating Code for Classes and Their Members Generating Code for Control and Logical Expressions Generating Code for Message Expressions, Field Selection and Array Expressions Generating Code for Assignment and Similar Operations Generating Code for String Concatenation Generating Code for Casts Translating JVM Code to MIPS Code Introduction SPIM and the MIPS Architecture Our Translator Register Allocation Introduction Naive Register Allocation Local Register Allocation Global Register Allocation Celebrity Compilers Introduction The Java HotSpot Compiler The Eclipse Compiler for Java (ECJ) The GNU Java Compiler (GCJ) Microsoft C# Compiler for .NET Framework Appendix A: Setting Up and Running j-- Appendix B: The j-- Language Appendix C: Java Syntax Appendix D: The JVM, Class Files and the CLEmitter Appendix E: MIPS and the SPIM Simulator Bibliography Index Further Readings and Exercises appear at the end of each chapter.

Product Details

  • publication date: 29/11/2012
  • ISBN13: 9781439860885
  • Format: Hardback
  • Number Of Pages: 381
  • ID: 9781439860885
  • weight: 861
  • ISBN10: 1439860882

Delivery Information

  • Saver Delivery: Yes
  • 1st Class Delivery: Yes
  • Courier Delivery: Yes
  • Store Delivery: Yes

Prices are for internet purchases only. Prices and availability in WHSmith Stores may vary significantly

Close