CS 17-670: Virtual Machines and Managed Runtimes

Instructor: Ben L. Titzer
Syllabus: here
Piazza: https://piazza.com/cmu/fall2022/cs17670

Traditional compiler and programming language courses focus on language implementations that generate code statically (offline) for a target machine. Yet in today's landscape, many programming languages run on virtual machines where either a virtual instruction set architecture (bytecode) or the source code of the program is translated (and optimized) dynamically for an underlying machine. Such languages come with additional challenges beyond traditional compilation as taught in courses, including efficient representation of high-level language constructs and automatic memory management in the form of garbage collection. Together, the components of the virtual machine and services form what is known as a managed runtime system. This course focuses on implementation techniques for managed runtime systems. Students will learn the basics of virtual machine implementation and build working prototypes to run actual programs. Prior knowledge of compilers and some familiarity with programming language implementation is required.

Key topics

Textbook

Portions of the projects will follow the structure in "Crafting Interpreters" by Robert Nystrom.

Lecture Notes

Assessment Structure