Reimplementing the Wheel: Teaching Compilers with a Small Self-Contained One
Daniil Berezun, Dmitry Boulytchev

TL;DR
This paper describes a semester-long course on building a small, self-contained compiler from scratch for a series of increasingly complex languages, emphasizing practical implementation and student learning outcomes.
Contribution
It introduces a novel teaching approach using a family of languages and symbolic interpreters for code generation, avoiding reliance on existing compiler frameworks.
Findings
Students gained practical compiler construction experience
The course successfully covered advanced language features
Positive student feedback on learning outcomes
Abstract
We report on a one-semester compiler construction course based on the idea of implementing a small self-contained compiler for a small model language from scratch, not using other compiler construction frameworks. The course is built around an evolving family of languages with increasing expressiveness and complexity, which finally is crowned by a language with first-class functions, S-expressions, pattern matching, and garbage collection. The code generation technique is based on the idea of symbolic interpreters, which allows to implement a robust albeit not a very efficient native code generator. We give the motivation for the course, describe its structure, and report some results of teaching based on students' post-course surveys.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
