Idea · Aug 23, 2026

Mini-Compiler Workbench

A multi-week course project in which students implement a complete compiler pipeline from scratch: lexer, recursive-descent parser, AST, type checker, and a bytecode virtual machine, culminating in a working language that compiles and runs a reference program.

What it would do

Most CS students use compilers but never build one. Mini-Compiler Workbench is a staged assignment sequence where each lab builds on the previous: Lab 1 implements a regex-based lexer for a toy language; Lab 2 adds a recursive-descent parser producing an explicit AST; Lab 3 implements a structural type checker; Lab 4 generates bytecode for a stack-based VM; Lab 5 builds the VM itself. A reference language spec is provided that supports variables, arithmetic, conditionals, while-loops, and functions. Each lab has an autograded test suite. The final deliverable is a demo that compiles and runs Fibonacci, merge sort, and a student-chosen program. Students may use TypeScript, Python, or Java.

Key features

  • Five modular labs with clear interfaces so each stage can be graded independently
  • Reference language specification with a grammar and sample programs
  • Autograded test suite for each lab stage (lexer tokens, parser AST shapes, VM execution traces)
  • Stretch goals: garbage collection, closures, or a REPL mode
  • Written reflection prompt comparing their VM design decisions to real-world VMs (CPython, JVM)

More in Systems & Hardware

Chaos Tester's Toolkit

Students build a three-node HTTP key-value store, then implement a deterministic chaos testing harness that kills nodes, delays messages, and partitions the network. They observe real CAP theorem trade-offs in their own system and write a failure mode postmortem.

Systems & HardwareClass assignmentLargeSep 3, 2026

Build Your Own LLM Router

Students implement a production-quality LLM gateway supporting model selection by cost tier, streaming responses, per-user cost budgeting, retry with backoff, and a live admin dashboard, then benchmark it against an open-source reference implementation.

Systems & HardwareClass assignmentLargeAug 30, 2026

Build Your Own Database Engine

A structured multi-week assignment where students implement a minimal relational database from scratch: a B-tree storage engine, a SQL parser for a core subset of SQL, and a naive query optimizer. Students finish with a working database they can query from Python.

Systems & HardwareClass assignmentLargeAug 19, 2026

Network Protocol Animator

An interactive web platform that animates TCP handshake, HTTP/1.1 vs. HTTP/2, UDP, and DNS resolution as step-by-step packet flows, with instructor controls to pause, rewind, and inject faults like packet loss or reordering.

Systems & HardwareTeaching toolLargeAug 17, 2026

All 39 ideas in Systems & Hardware →