A curated list of awesome resources, learning materials, tools, frameworks, platforms, technologies and source code projects in the field of Compilers, Interpreters and Runtimes. This list has a bias towards education.
Table of Contents
- Tools and Frameworks
- Runtimes and VMs
- Advanced Compiler Design and Implementation, S. Muchnick.
- Advanced Topics in Types and Programming Languages, B. Pierce.
- Basics of Compiler Design, T. Mogensen.
- Beautiful Racket - How to Make Your Own PL with Racket, M. Butterick.
- Building an Optimizing Compiler, B. Morgan.
- Crafting Interpreters: A Handbook for Making Programming Languages, B. Nystrom.
- Create Your Own Programming Language.
- Discussions: HN.
- Computer Systems: A Programmer’s Perspective, R. Bryant, D. O'Hallaron - A comprehensive treatement of Computer Systems including Compilers and Interpreters.
- Compiling with Continuations, A. Appel.
- Elements of Computing Systems, N. Nisan, S. Schocken - A book about computer construction from Nand Gates, through Assemblers, Compilers up to Operating Systems and Tetris game development.
- Engineering a Compiler, K. Cooper, L. Torczon.
- Essentials of Programming Languages, D. Friedman & M. Wand.
- Language Implementation Patterns, T. Parr.
- Modern Compiler Implementation in C, A. Appel.
- Modern Compiler Implementation in ML, A. Appel.
- Modern Compiler Implementation in Java, A. Appel.
- Optimizing Compilers for Modern Architectures, R. Allen & K. Kennedy.
- Programming Language Pragmatics, M. Scott.
- Programming Languages: Application and Interpretation, S. Krishnamurthi.
- Programming Languages: Theory and Practice.
- Project Oberon, N. Wirth & J. Gutknecht - 1992 Edition, 2013 Edition.
- The SSA Book, Springer, Zadeck.
- Types and Programming Languages, B. Pierce.
- Virtual Machines, Smith and Nait.
- Virtual Machines, Iain Craig.
- Warren's Abstract Machine - Prolog in Haskell, H. Aït-Kaci.
- A Brief History of JIT Compilation, J. Aycock.
- A Flexible Prolog Interpreter in Python, C. Bolz & M. Leuschel.
- A Graph Higher-Order IR, R. Leißa, M. Koster & S. Hack.
- A Prolog Interpreter in Python, C. Bolz.
- A Simple Multi-Processor Computer Based on Subleq, O. Mazonka, A. Kolodin.
- Compiler Construction Using Scheme, E. Hilsdale, J. Ashley, R. Dybvig & D. Friedman.
- Compiling with Continuations: Continued, A. Kennedy.
- Machine Code Obfuscation via Instruction Set Reduction and CFG Linearization, C. Jonischkeit.
MOVis Turing-Complete, S. Dolan.
- Nanopass Framework for Commercial Compiler Development, A. Keep & R. Dybvig.
- Nanopass Framework for Compiler Education, D. Sarkar, O. Waddell & R. Dybvig.
- Packrat Parsing Thesis on PEG, B. Ford.
- PEG-based transformer provides front-end, middle-end and back-end stages in a simple Compiler, I. Piumarta.
- Pycket: A Tracing JIT for a Functional Language.
- PyPy’s Approach to VM Construction, A. Rigo & S. Pedroni.
- Simple and Efficient Construction of SSA Form.
- SSA-based Register Allocation, S. Hack & G. Goos.
- The Essence of Compiling with Continuations, C. Flanagan, A. Sabry, B. Duba & M. Felleisen.
- The Page-Faults Weird Machine: Lessons in Instruction-less Computation, J. Bangert, S. Bratus, R. Shapiro, S. Smith.
- Trace-based JIT Compilation for Lazy Functional Languages, T. Schilling.
- Using Datalog with Binary Decision Diagrams for Program Analysis, J. Whaley, D. Avots, M. Carbin & M. Lam.
Researchers and Institutes
- C. Bolz’s Research Publications.
- Compilers Lab at Saarland University.
- Packrat Parsing (PEG) Papers and Resources.
- The CLI (Common Language Interface) Specification (ECMA-335).
- The JVM (Java Virtual Machine) Specification.
- Compilers Construction, Cambridge - An introduction to compiler construction course from the University of Cambridge.
- Compiler Construction for Undergrads, RICE University - An introduction to compiler construction and language translators course from the RICE University.
- Compilers Theory, Stanford - YouTube, Stanford.edu, Class Notes - An introduction to Compilers theory and construction course from Stanford.
- Design and Construction of Compilers, University of Texas - Design and construction of compilers including lexical analysis, parsing, code generation techniques, error analysis and simple code optimizations.
- DSL Design and Implementation Summer School - A Summer School program on the topics of DSL Design and Implementation hosted by the EPFL University.
- Foundations of Programming Languages - A course that covers many of the concepts underlying the design, definition, implementation and use of modern programming languages from a formal standpoint.
- Nand2Tetris: How to Build a Computer from First Principles, Part 2 - This 2nd part of the Nand2Tetris course covers basic language design and elementary compiler construction concepts in addition to many other topics on a basic level.
- NPTEL's Principles of Compiler Design Course - An introductory course from NPTEL on Compiler Design.
- NPTEL's Compiler Design Course - A slightly more advanced course than their Principles of Compiler Design course, covers SSA Form to a good degree.
- Programming Languages: Part A, by Grossman - Part 1 of a 3-part course series to the basic concepts of programming languages, with a strong emphasis on functional programming.
- Programming Languages: Part B, by Grossman - Part 2 of a 3-part course series to the basic concepts of programming languages, with a strong emphasis on functional programming.
- Programming Languages: Part C, by Grossman - Part 3 of a 3-part course series to the basic concepts of programming languages, with a strong emphasis on functional programming.
- Types, Logic, Semantics, and Verification from Oregon University's Summer School - A Summer School program that consists of 80 minute lectures presented by internationally recognized leaders in programming languages and formal reasoning research.
- Virtual Machines and Managed Runtimes, UCB CS294 - An introductory course on Virtual Machines and Managed Runtimes from the University of Berkeley.
- Virtual Machines Summer School 2016 (VMSS 2016) - VMSS is a Summer School program that aims to give an overview of the field, targeted at early career researchers.
- Anders Hejlsberg on Modern Compiler Construction.
- An Introduction to Combinator Compilers and Graph Reduction Machines.
- Building an Interpreter in RPython.
- Curry On! Conference - Programming Languages Conference.
- Exploring Python’s Bytecode.
- Java AOT (Ahead of Time) Compilation.
- Lang.NEXT Conference 2012.
- Lang.NEXT Conference 2014.
- MetaScala: A Tiny DIY JVM - Metascala is a tiny metacircular Java Virtual Machine (JVM) written in the Scala programming language.
- Meta-Tracing, RPython and PyPy.
- Python, Linkers and Virtual Memory - PYCON US.
- Reverse Engineering the MOS 6502 CPU.
- Single Static Assignment Form Seminar - An introductory seminar on SSA Form, Compiler Optimizations under it and its applications in other areas such as Program Analysis and Verification.
- The JVM (Java Virtual Machine) Architecture.
- The MoVfuscator: turning mov into a soul crushing RE nightmare.
- The SSA (Static Single Assignment) Form - Part 1, Part 2, Part 3 - Video Lectures from NPTEL's Compilers Course on SSA Form (see: Courses for more information).
- Type-Driven Development with Idris.
- Understanding Compiler Optimization.
- Accidentally Turing Complete.
- Adventures in JIT Compilation by Eli Bendersky:
- How to Compile with Continuations.
- Introducing the B3 JIT Compiler.
- Compiler Optmization Tutorial.
- Metacompiler Tutorial, Part 1.
- How I Wrote a Programming Language, and How You Can Too.
- Discussions: Reddit.
- Let’s Build A Simple Interpreter.
- Can we stop recommending the Dragon Book, please? - A StackExchange thread criticising the Dragons Book.
- Difference between an LL and Recursive Descent parser? - StackOverflow question.
- Does a compiler use all x86 instructions? - @HN, @Reddit - Article discussions on HN and Reddit.
- How to Write a Compiler - Article discussion on Reddit.
- How to Write a Very Basic Compiler - StackExchange thread.
- How to Write a Prolog Interpreter in a Purely Functional Language - StackExchange thread.
- Discussions: Reddit.
- Implementing Type Inference - StackOverflow question.
- I want to build a VM, any good references? - StackExchange thread.
- Resources for Amatuer Compilers Writers - Question on Reddit.
- What are the good open source implementations of Java Virtual Machine?.
- What are the latest research trends in Compilers and PLs - Quora thread.
This section aims at listing code projects of Compilers, Interpreters, Translators, Runtimes, Virtual Machines and the like.
- Chez Scheme Compiler.
- Lua Programming Language.
- Nim Language Compiler.
- Red Programming Language.
- TypeScript Language Compiler.
Educational and Toys
- C4 - C Lang in 4 Functions.
- Discussions: HN.
- CarpVM - An experimental VM implementation in C.
- Gecho - A simple-stack language implementation in C.
- Hython - A Haskell-powered Python 3 interpreter.
- Discussions: Reddit.
- MetaScala - A Metacircular JVM implementation in Scala.
- Poprc - A compiler for the Popr Language.
- PyCOOLC - A compiler for the COOL Programming Language written in Python 3.
- RabbitVM - A RISC-based VM implementation in C.
- stack_cpu - A Stack-machine simulator.
- Discussions: HN.
- tinyc.c - A Tiny-C language compiler in C.
Tools and Frameworks
- B3: The Bare Bones Backend - WebKit's optimizing JIT Compiler for procedures containing C-like code.
- LLILCL - An LLVM-based Compiler Backend for .NET Core.
- LLVM - The LLVM Compiler-Backend Framework.
- MicroVM - The "Mu" Framewrok for Programming Languages development based on the MuVM Specification.
- Movfuscator Compiler - The
M/o/Vfuscatorcompiles programs into "mov" instructions, and only "mov" instructions.
- QBE: The Quick Backend - A pure C embeddable SSA-based compiler backend.
- Summus - A (reusable) basic compiler frontend implementation using LLVM as a backend.
C (as a Backend)
- GCC - The GNU Compiler Collection.
- libFirm - A C library that provides a graph-based intermediate representation, optimizations, and assembly code generation suitable for use in compilers.
- libJIT - A library that provides generic Just-In-Time compiler functionality independent of any particular bytecode, language, or runtime.
- myJIT - A library for machine-code generation and execution at run-time.
- PCC - The Portable C Compiler.
- TCC - The Tiny C Compiler.
- Cecile - A library to generate and inspect programs and libraries in the ECMA CIL format.
- ILSpy - A .NET Decompiler.
- Reflector - A .NET Decompiler.
- Reflexil - An an assembly editor which can be used as a plugin with other .NET/CLR tools.
- dunnart - LALR(1) Parser Generator.
- FancyPars-lite - A fast parser generator.
- libdparse - A library allowing to build lexers and parsers. Contains a lexer and a parser for the D language itself.
- llvm-d - D bindings for LLVM.
- Pegged - design, test and generate parsers for PEG grammars.
- Graal - High-Performance Polyglot Runtime.
- Graal Core - Compiler and Truffel Partial Evaluator.
- Graal VM - Graal's multi-language VM distribution.
- IRHudra - A tool for displaying intermediate representations used by V8 and Dart VM optimizing compilers.
- ANTLR - A parser generator for reading, processing, executing, or translating structured text or binary files.
- BYAAC/J - BYACC/Java is an extension of the Berkeley v 1.8 YACC-compatible parser generator for Java.
- JavaCC - Java Compiler Construction and Parser Generator Toolkit.
- JFlex - JFlex is a lexical analyzer generator for Java with full Unicode support.
- JLex - JLex is a lexical analyzer generator, that can be used in combination with CUP.
- The Whimsy Compiler Framework - A compiler framework research project in Kotlin.
- AST - Python's builtin Abstract Syntax Tree package.
- Dis - Python's builtin Disassembler package.
- Parsing - A pure-Python module that implements an LR(1) parser generator, as well as CFSM and GLR parser drivers.
- PLY - An implementation of lex and yacc parsing tools for Python.
- PyParsing - An alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions.
- RPLY - A port of the PLY project to RPython.
- RPython - RPython is a framework for the implementatation of dynamic languages.
Lists of Python Parsing Tools
- Combine - Parser Combinator Library for Rust.
- IronLLVM - Safe LLVM bindings for Rust.
- LALRPOP - LR(1) parser generator for Rust.
- Nom - Parser Combinator Framework.
- PEG - A PEG Parser Generator.
- Pest - A PEG Parser Generator.
- RLS - The Rust Language Server implementation (aka RLS).
Runtimes and VMs
- JVM Implementations:
- Languages and Compilers Network Graph.
- PLT Enlightenment.
- Resources for Amateur Compiler Writers.
- SSA Form Bibliography.
- Summer Schools.
- The Witchcraft Compiler Collection.
- /r/Compilers - A subreddit community about the theory and development of compilers.
- /r/ProgrammingLanguages - A subreddit community that is dedicated to discussion of programming languages, programming language theory, design, their syntax and compilers.
To the extent possible under law, Ahmad Alhour has waived all copyright and related or neighboring rights to this work.