CSE 210B: Advanced Programming Languages (with AI)
When and where: TuTh 3:20–4:55 PM, Oakes Academic 106
Instructor: Cormac Flanagan
Prerequisite: CSE 210A or equivalent. Some offerings of 210A covered Software Foundations in Rocq; others covered Types and Programming Languages. Either is good background for this course.
Course description
Covers issues in the design, implementation, analysis, and specification of programming languages. Topics include formal semantics (including operational, axiomatic, and denotational semantics), advanced type systems, program analysis (including abstract interpretation and model checking), specification, and verification.
This offering will focus on specification and verification. AI is revolutionizing software engineering: it is now easy to use AI to build large software artifacts, but how can we trust that software? Software verification lets us prove strong theorems about software systems, but it has traditionally been very expensive. Combining AI with verification lets us use AI to write not only software systems but also their correctness proofs. Proof engineering that used to take person-months is becoming cheap. This course explores the state of the art in AI-driven software specification and verification.
Along the way we will explore traditional areas of programming language research (including semantics, type systems and program analysis) by building them. Student projects will take one topic, define it in the Lean proof assistant, and prove its central theorems, using an AI assistant (Claude) to do much of the proof engineering. A semantics becomes a Lean definition, a type system becomes an inductive relation, a program analysis becomes a function with a soundness proof, and “verification” becomes a theorem the machine checks. AI will also generate a slide deck that pairs the paper-style definitions with their Lean code, for presentation to the class.
Two threads
The course alternates between two threads: papers on Tuesdays and projects on Thursdays.
Reading thread. We study research papers (and blog posts, etc.) on AI-driven software verification. This thread is student-led: you choose papers to present from the reading list, or from the full paper pool. The papers lag current tools by a capability generation or more, so we read papers for their questions and methods, and run the tools for answers.
Project thread. Hands-on experimentation with AI for verification, on a series of small-to-larger projects. Start with a small project that might take an hour, and perhaps do a few, to learn some PL theory and how best to use AI. Your input to the AI can be very specific (e.g. hand-written inference rules defining a type system) or looser (e.g. “take the simply typed lambda calculus and …”). Each project produces Lean code (or code in your favorite proof assistant) plus a slide deck, which you can have the AI generate, outlining the development. The deck is how you audit that the definitions and theorem statements are correct. See the project ideas, and the example projects and decks.
Paper sessions
Leading a session
- Sign up in class 2 (Thu Jan 7), first come, first served: add your name and paper to the schedule. Prefer a paper related to one of the course topics.
- Present (~30 min): problem and context, technique, evaluation, and what you think of it. Connect it to the course’s PL topics.
- Demo (~5–10 min of the 30), where possible: run the paper’s core task, or a small piece of it, with current tools, and compare with the paper’s result. Rough and live is fine.
- Lead the discussion for the rest of the session: bring 2–3 questions.
- Post your slides to that class’s folder in the
student repo, as
slides-<yourname>.pdf.
Everyone else
Read the paper before class and post a short review (a three-sentence
summary, pros, cons, and questions) as review-<yourname>.md in that class’s
folder of the student repo.
Here is an example.
Course projects
Teams of 1–2: use AI to build a formally verified artifact, and report on the experience.
- Stack: Lean 4 by default. Rocq, Dafny, Verus, or F* are fine if you prefer them.
- Mechanizing a paper is the baseline, not the project. Getting the core
results of a POPL/PLDI/ICFP-style paper (calculus, semantics, soundness
theorem) through Lean with current AI is now largely automatic. You
still own the definitions and theorem statements, but the project must go
beyond that:
- Extend: add a feature to a paper’s calculus and prove soundness for the extension.
- Scale: mechanize several related papers and report how automatic each was, and where it stopped being automatic.
- Real compiler pass: compiler correctness or translation validation for a non-toy pass.
- Fidelity study: look for places where published papers are wrong, ambiguous, or silently assume something their mechanization exposes.
- Or propose your own; the proposal must say what goes beyond mechanization.
- Fidelity is the core of the write-up. Argue that your formal
definitions and theorem statements mean what the paper or intent means:
where they could diverge, what you checked, and anything you found the AI
getting subtly wrong. Include
#print axioms(or equivalent) output for your main theorems.
Grading
Close to pass/fail: the intent is that everyone who engages does well. By the end of the quarter you will have a portfolio of verified semantics, type systems and analyses, all pushed to GitHub.
Policies
- AI use is encouraged for everything; it is how we do the course. Use any model or tool for your projects and for understanding papers. The one exception: paper reviews must be in your own words. AI can help you understand a paper, but the summary, pros, cons and questions should be your own reading and opinions.
- AI access: you will need paid access to an AI (e.g. Claude); the free tier will likely be insufficient. Claude Pro is $20/month, or $60 for the quarter.
- Attendance: this is a discussion seminar, so attendance is expected. Bring a laptop.
Optional background reading
- Concrete Semantics by Tobias Nipkow and Gerwin Klein (free PDF) covers most of the catalog topics on one small imperative language, in Isabelle. It is a good guide for what to define and prove; we redo it in Lean.
- Software Foundations, volume 2 (Programming Language Foundations, free online) covers similar ground in Rocq.
- AI can also generate a custom textbook on any topic you want.
Where things live
- Course site: https://cormacflanagan.com/cse210b-w27/: this syllabus, the reading list, the paper pool, the project ideas, and videos on Lean and AI verification, and related courses at other universities.
- Student repo: https://github.com/cormacflanagan/cse210b-w27-projects, with one folder per class meeting (
C01-Jan05…C20-Mar11): reviews and paper slides on Tuesdays, project work on Thursdays. Projects that last longer than one class go in a top-level folder named after you. See its README for the layout.