Idea · Oct 12, 2026

Build Your Own Static Recompiler

A staged compilers assignment in which students translate CHIP-8 (then a small 6502 subset) ROMs ahead of time into WebAssembly, using their own interpreter as the oracle that proves every recompiled program behaves identically.

What it would do

Static recompilation, recently used to run PS2 games in the browser as WebAssembly, is a great capstone for a compilers or architecture course because correctness is unambiguous: the recompiled game must behave exactly like the original. Milestones: (1) write a reference CHIP-8 interpreter with a deterministic trace format; (2) disassemble ROMs and recover basic blocks and a control-flow graph, discovering why indirect jumps and self-modifying code make this undecidable in general; (3) emit WebAssembly text per basic block with a dispatcher loop, then compile with wabt; (4) add optimizations (block chaining, register promotion to Wasm locals, dead flag elimination) and measure speedups; (5) handle the hard cases with a fallback to the interpreter. The autograder runs both engines on public-domain ROMs with scripted inputs and compares register, memory and framebuffer traces tick by tick, reporting the first divergence.

Key features

  • Reference interpreter with canonical execution traces used as the correctness oracle
  • Disassembler with basic-block discovery and CFG visualization
  • WebAssembly code generator with dispatcher loop and block chaining
  • Optimization milestone with measured speedups against the interpreter
  • Trace-diff autograder that pinpoints the first divergent instruction

More in Systems & Hardware

Build Your Own Resumable Download Manager

A staged networking assignment in which students build a GetRight-style download manager with HTTP range requests, parallel segments, validators and checksums, graded against a chaos server that drops connections, rotates URLs and silently changes files mid-download.

Systems & HardwareClass assignmentLargeOct 13, 2026

In-Band

A browser lab that simulates a 1970s telephone trunk with DTMF, MF and 2600 Hz supervision tones, so students can seize a trunk with a blue box and then see that the same flaw (control mixed with data) is behind SQL injection and prompt injection.

Systems & HardwareTeaching toolMediumOct 13, 2026

Build Your Own RISC-V Emulator That Boots

A staged course project where students write an RV32IMA emulator in TypeScript or C, add a UART, timer and traps, and finish by booting a provided mini-kernel and shell in the browser.

Systems & HardwareClass assignmentLargeOct 10, 2026

Cache Miss Theater

Pick or type a small loop nest over arrays, configure a cache, and watch every load land as a hit, compulsory, capacity or conflict miss on an animated set-associative cache, with simulator-verified 'predict the miss rate' questions.

BuiltSystems & HardwareProduct for a businessOct 10, 2026

All 39 ideas in Systems & Hardware →