Skip to main content

Week 2: What compile-time can even prove

Undecidability, alias analysis, and the soundness/completeness tradeoff every static memory-safety check has to make

1 March 2027

“Prove at compile time that this program never dereferences a dangling pointer” is, in general, an undecidable question — it’s a hop away from the halting problem. So no tool in this course actually does that. Each one instead picks a smaller, decidable question that implies the bigger one for some subset of programs, and accepts one of two failure modes for the rest:

Every tool for the rest of the semester sits somewhere on that spectrum, and knowing where is the single most useful lens for judging any of them. A checker that’s unsound is a lint, not a safety guarantee, no matter how convincing its output looks. A checker that’s sound but wildly incomplete gets disabled by the first engineer it blocks from shipping.

Outline

This week’s studio

Bring a laptop. The studio session hands you a deliberately naive alias-analysis pass and asks you to find the program it gets wrong.

Teaching team