CSCI 1260
Compilers and Program Analysis
Fall 2023
Introduction
Welcome to CSCI 1260 at Brown University!
NOTE FOR FALL 2023 REGISTRATION (9/7/23): This course is extremely oversubscribed right now. We are trying to hire more TAs and increase the course capacity. If you are hoping to take the class, please make sure it is in your shopping cart and submit an override request for the main section, not the online one on CAB. We sincerely hope that everyone who wants to take the class will be able to enroll. Please do not email Rob about your override request.
Have you ever wondered why C programs seem to run faster than Python programs? Have you ever been confused by an error message and wondered why Java couldn't understand your program? In CSCI 1260, we'll learn how compilers read in code in one language and produce code in another; in particular, we'll learn how to translate high-level languages to code that your computer's processor can understand. We will get hands-on practice developing compilers for a series of increasingly complex languages. Along the way, we'll learn some general best practices for developing and testing complex software systems.
Lectures take place every Monday and Wednesday from 9:30 - 10:50 AM in CIT 241. All course lectures will be recorded and livestreamed on Panopto.
Assignments
Homework | Out | In |
---|---|---|
0. OCaml Warmup | Sep. 6 | Sep. 13 |
1. S-expressions | Sep. 13 | Sep. 20 |
2. Characters | Sep. 20 | Sep. 27 |
3. DMAOLC (div, mul, and, or, let, case) | Sep. 27 | Oct. 11 |
4. Error handling and the heap | Oct. 11 | Oct. 18 |
5. Fun with files | Oct. 18 | Nov. 1 |
6. Apply, variadic functions | Nov. 1 | Nov. 15 |
7. MiniML | Nov. 15 | Nov. 27 |
8. Optimizations | Nov. 27 | Dec. 12 (benchmarks Dec 6) |
Lab | Handout | Github Classroom |
---|---|---|
Compiler Infrastructure | Handout | Github Classroom |
Debugging Assembly | Handout | Github Classroom |
Parser Generators | Handout | Github Classroom |
Drill | Out | In |
---|---|---|
Drill 1 | Sep. 6 | Sep. 10 |
Drill 2 | Sep. 13 | Sep. 17 |
Drill 3 | Sep. 20 | Sep. 24 |
Exam | Date |
---|---|
Midterm | Oct. 25 |
Final | Dec. 13 |
Lectures
Lectures take place every Monday and Wednesday from 9:30 - 10:50 AM in CIT 241. The lecture notes will be updated after every class. Streams and recordings will show up in our Panopto folder and are linked here.
Lecture topics for future dates are very tentative.
Date | Topic | Recording |
---|---|---|
September 06 | What is a compiler? | Recording (Last year's recording with audio) |
September 11 | OCaml intro; S-Expressions | Recording |
September 13 | Unary operations | Recording |
September 18 | Booleans | Recording |
September 20 | More booleans, conditionals | Recording |
September 25 | Binary operations | Recording |
September 27 | Abstract syntax trees | Recording |
October 02 | Naming expression with let | Recording |
October 04 | Pairs and the heap | Recording |
October 09 | NO CLASS | |
October 11 | Handling errrors | Recording |
October 16 | Slack day (debugging assembly?) | Recording |
October 18 | Interacting with the environment | Recording |
October 23 | Output and functions | Recording |
October 25 | MIDTERM EXAM (in class) | |
October 30 | More on functions | Recording |
November 01 | Tail calls | Recording |
November 06 | More on parsing | Recording |
November 08 | Function pointers; first-class and anonymous functions | Recording |
November 13 | Closures | Recording |
November 15 | Optimization intro -- constant folding | Recording |
November 20 | Inlining, CSE | Recording |
November 22 | NO CLASS | |
November 27 | IRs and register allocation | Recording |
November 29 | Trust and verification | Recording |
December 04 | TBA | Recording |
December 06 | TBA | Recording |
December 13 | FINAL EXAM (in person) |
Calendar
Zoom links are included in the Google Calendar event, as well as in the Hours Queue.
Resources
Quick Links
- Syllabus
- Software Guide
- Environment Setup Guide
- x86-64 reference
- Compiler from lectures
- EdStem
- Panopto
- Anonymous Feedback Form
- Extension Request Form
Reference Labs
Contact
Staff

Robert Lewis 🦙
Professor | rlewis13
Call me Rob! I'm half computer scientist, half mathematician, and fully excited to learn about compilers with you all this semester. Pronouns: he/him/his

Jiahua Chen 🌵
HTA | jchen345
Hi! I'm a senior from HK and Shanghai studying Math & CS! Talk to me about art, photography, or board games! Pronouns: he/him/his

Yutong Li 🍦
UTA | yli195
Just call me Yuu! I'm a master's student studying CS, and I used to be a ling major. I love strolling around while listening to J-pop/Vocaloid/Post-rock.

Parker Simon 🦖
UTA | psimon2
Hi everyone! I'm a senior from Massachusetts studying Geology and Computer Science. I love climbing, hiking and skiing, and a good bowl of mac and cheese.

Linus Sun 🤠
UTA | lsun23
Hi! I'm from Vancouver and I enjoy climbing, mixology, and keyboards! Pronouns: he/him/his

Nora Tang 🐨
UTA | jtang82
Hello! My name is Nora. Tizzy K's is my favorite spot in Providence. Pronouns: she/her/hers

Conrad Zimmerman 🏃♀️
UTA | czimmer
Hi! I study math, play Pokemon Go, and sometimes run. In no particular order, I love coffee, programming languages, cute (little) dogs, and first order logic. Pronouns: she/her/hers