• Complain

Jeremy G. Siek - Essentials of Compilation: An Incremental Approach in Racket

Here you can read online Jeremy G. Siek - Essentials of Compilation: An Incremental Approach in Racket full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: Cambridge, MA, year: 2023, publisher: MIT Press, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

No cover
  • Book:
    Essentials of Compilation: An Incremental Approach in Racket
  • Author:
  • Publisher:
    MIT Press
  • Genre:
  • Year:
    2023
  • City:
    Cambridge, MA
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Essentials of Compilation: An Incremental Approach in Racket: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Essentials of Compilation: An Incremental Approach in Racket" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

A hands-on approach to understanding and building compilers.Compilers are notoriously some of the most difficult programs to teach and understand. Most books about compilers dedicate one chapter to each progressive stage, a structure that hides how language features motivate design choices. By contrast, this innovative textbook provides an incremental approach that allows students to write every single line of code themselves. Essentials of Compilation guides the reader in constructing their own compiler for a small but powerful programming language, adding complex language features as the book progresses. Jeremy Siek explains the essential concepts, algorithms, and data structures that underlie modern compilers and lays the groundwork for future study of advanced topics. Already in wide use by students and professionals alike, this rigorous but accessible book invites readers to learn by doing. Deconstructs the challenge of compiler construction into bite-sized pieces Enhances learning by connecting language features to compiler design choices Develops understanding of how programs are mapped onto computer hardware Learn-by-doing approach suitable for students and professionals Proven in the classroom Extensive ancillary resources include source code and solutions

Jeremy G. Siek: author's other books


Who wrote Essentials of Compilation: An Incremental Approach in Racket? Find out the surname, the name of the author of the book and a list of all author's works by series.

Essentials of Compilation: An Incremental Approach in Racket — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Essentials of Compilation: An Incremental Approach in Racket" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Contents
List of Figures
List of Table
Guide
Pagebreaks of the print version
Essentials of Compilation An Incremental Approach in Racket Jeremy G Siek - photo 1

Essentials of Compilation

An Incremental Approach in Racket

Jeremy G. Siek

The MIT Press
Cambridge, Massachusetts
London, England

2023 Massachusetts Institute of Technology

This work is subject to a Creative Commons CC-BY-ND-NC license.

Subject to such license, all rights are reserved.

The MIT Press would like to thank the anonymous peer reviewers who provided - photo 2

The MIT Press would like to thank the anonymous peer reviewers who provided comments on drafts of this book. The generous work of academic experts is essential for establishing the authority and quality of our publications. We acknowledge with gratitude the contributions of these otherwise uncredited readers.

Library of Congress Cataloging-in-Publication Data

Names: Siek, Jeremy, author.

Title: Essentials of compilation: an incremental approach in Racket / Jeremy G. Siek.

Description: Cambridge, Massachusetts: The MIT Press, [2023] | Includes bibliographical references and index.

Identifiers: LCCN 2022015399 (print) | LCCN 2022015400 (ebook) | ISBN 9780262047760 (hardcover) | ISBN 9780262373272 (epub) | ISBN 9780262373289 (pdf)

Subjects: LCSH: Racket (Computer program language) | Compilers (Computer programs)

Classification: LCC QA76.73.R33 S54 2023 (print) | LCC QA76.73.R33 (ebook) | DDC 005.13/3dc23/eng/20220705

LC record available at https://lccn.loc.gov/2022015399

LC ebook record available at https://lccn.loc.gov/2022015400

d_r0

This book is dedicated to Katie, my partner in everything, my children, who grew up during the writing of this book, and the programming language students at Indiana University, whose thoughtful questions made this a better book.

Contents

List of Illustrations


Diagram of chapter dependencies.


The concrete syntax of Int.


The abstract syntax of Int.


Example of recursive functions for Int. These functions recognize whether an AST is in Int.


Interpreter for the Int language.


A partial evaluator for Int.


The concrete syntax of Var.


The abstract syntax of Var.


Interpreter for Int as a class.


Interpreter for the Var language.


Association lists implement the dictionary interface.


The syntax of the x86Int assembly language (AT&T syntax).


An x86 program that computes (+ 10 32).


An x86 program that computes (+ 52 (- 10)).


Memory layout of a frame.


The abstract syntax of x86Int assembly.


Diagram of the passes for compiling Var.


The concrete syntax of the Var intermediate language.


The abstract syntax of the Var intermediate language.


Skeleton for the uniquify pass.


is Var with operands restricted to atomic expressions.


Skeleton for the explicate_control pass.


A running example for register allocation.


An example with function calls.


The set data structure.


Example output of liveness analysis on a short example.


The running example annotated with live-after sets.


The Racket graph package.


Interference results for the running example.


The interference graph of the example program.


A sudoku game board and the corresponding colored graph.


The saturation-based greedy graph coloring algorithm.


The priority queue data structure.


Diagram of the passes for Var with register allocation.


The x86 output from the running example (figure 3.1), limiting allocation to just rbx and rcx.


The concrete syntax of If, extending Var (figure 2.1) with Booleans and conditionals.


The abstract syntax of If.


Interpreter for the If language. (See figure 4.4 for interp-op.)


Interpreter for the primitive operators in the If language.


Type checker for the Var language.


Type checker for the If language.


The concrete syntax of the If intermediate language, an extension of Var (figure 2.12).


The abstract syntax of If, an extension of Var (figure 2.13).


The concrete syntax of x86If (extends x86Int of figure 2.6).


The abstract syntax of x86If (extends x86Int shown in figure 2.10).


is If in monadic normal form (extends in figure 2.15).


Translation from If to If via the explicate_control.


Skeleton for the explicate_pred auxiliary function.


Example compilation of an if expression to x86, showing the results of explicate_control, select_instructions, and the final x86 assembly code.


Diagram of the passes for If, a language with conditionals.


Translation from If to If via the improved explicate_control.


Merging basic blocks by removing unnecessary jumps.


The concrete syntax of While, extending If (figure 4.1).


The abstract syntax of While, extending If (figure 4.2).


Interpreter for While.


Type checker for the While language.


Generic work list algorithm for dataflow analysis.


is While in monadic normal form.


The abstract syntax of , extending If (figure 4.8).


Diagram of the passes for While.


The concrete syntax of Tup, extending While (figure 5.1).


The abstract syntax of Tup.


Interpreter for the Tup language.


Type checker for the Tup language.


A copying collector in action.


Depiction of the Cheney algorithm copying the live tuples.


Maintaining a root stack to facilitate garbage collection.


Representation of tuples in the heap.


The compilers interface to the garbage collector.


Output of the expose_allocation pass.


is Alloc in monadic normal form.


The abstract syntax of Tup, extending (figure 5.7).


The concrete syntax of x86Global (extends x86If shown in figure 4.9).


The abstract syntax of x86Global (extends x86If shown in figure 4.10).


Output of the explicate_control (left) and select_instructions (right) passes on the running example.


The prelude and conclusion generated by the prelude_and_conclusion pass for the running example.


Diagram of the passes for Tup, a language with tuples.


The concrete syntax of Struct, extending Tup (figure 6.1).


The abstract syntax of Struct, extending Tup (figure 6.2).


The concrete syntax of Array, extending Tup (figure 6.1).


The abstract syntax of Array, extending Tup (figure 6.2).


Example program that computes the inner product.


Type checker for the Array language.


Interpreter for Array.


The concrete syntax of Fun, extending Tup (figure 6.1).


The abstract syntax of Fun, extending Tup (figure 6.2).


Example of using functions in Fun.


Interpreter for the Fun language.


Type checker for the Fun language.


Memory layout of caller and callee frames.


is FunRef in monadic normal form.


The abstract syntax of Fun, extending Tup (figure 6.12).


The concrete syntax of (extends x86Global of figure 6.13).


The abstract syntax of x86Def callq* (extends x86Global of figure 6.14).


Example compilation of a simple function to x86.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Essentials of Compilation: An Incremental Approach in Racket»

Look at similar books to Essentials of Compilation: An Incremental Approach in Racket. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Essentials of Compilation: An Incremental Approach in Racket»

Discussion, reviews of the book Essentials of Compilation: An Incremental Approach in Racket and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.