






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A course outline for CS164: Introduction to Programming Languages and Compilers at UC Berkeley. The course is an upper-level elective and focuses on teaching programming language principles through DSL design and implementation. The course includes nine weekly projects, covering topics such as interpreter, parser, web browser, and language abstractions. The final exam is replaced with a project where students create a DSL in two weeks. The document also includes testimonials from students who found the course challenging but rewarding.
Typology: Lecture notes
1 / 12
This page cannot be seen from the preview
Don't miss anything!







CS164 : Introduction to Programming Languages and Compilers, Fall 2010
UC Berkeley upper-level elective course
Ras Bodik Thibaud Hottelier James Ide
I used to teach a successful compiler course:
Aha! ugrads are future developers , not compiler jocks.
Also mindshare. Reverse the brain drain to AI and bio.
you know what these are
“We design them here, but the labor is cheaper in Hell.”
Teach PL principles via DSL design and implementation
Hard in a messy language. DSLs in Lua, which is in Python.
Learn how to design and implement a DSL
Final exam replaced with a project: create a DSL in 2 weeks.
Piggybacking: three birds with one stone
coroutines + backtracking + regexes; …
Parsing: most of us want to deemphasize it
Yet it’s one of the more useful skills. How to teach it?
prolog with coroutines, it’s a few lines; later used
yield: full coroutines bytecode compiler, regex, backtracking
interpreter closures, lexical scoping, desugaring, iterators
Rx from events to high-order dataflow; reactive programming a`la RxJS
jQuery embedded DSL for declarative DOM manipulation
layout engine from constraints to attribute grammars; add OO to language