CSCI 1260

Compilers and Program Analysis

Introduction

Welcome to CSCI 1260 at Brown University!

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.

All course lectures will be recorded and livestreamed on Panopto.

Assignments

Homework Out In
0. OCaml Warmup Sep. 7 Sep. 14
1. S-expressions Sep. 14 Sep. 21
2. Characters Sep. 21 Sep. 28
3. DMAOLC (div, mul, and, or, let, case) Sep. 28 Oct. 12
4. Error handling and the heap Oct. 12 Oct. 19
5. Fun with files Oct. 26 Nov. 2 Nov 3
6. Apply, variadic functions Nov. 2 Nov. 16
7. MiniML Nov. 16 Nov. 23
8. Optimizations Nov. 23 Dec. 12 (benchmarks Dec 5)
Lab Handout Github Classroom
Compiler Infrastructure Handout Github Classroom
Debugging Assembly Handout Github Classroom
Parser Generators Handout Github Classroom
Drill Out In
Drill 1 (Solutions) Sep. 7 Sep. 11
Drill 2 (Solutions) Sep. 14 Sep. 18
Drill 3 (Solutions) Sep. 21 Sep. 25
Drill 4 (Solutions) Oct. 5 Oct. 9
Drill 5 (Solutions) Oct. 19 Oct. 23
Drill 6 (Solutions) Oct. 31 Nov. 6
Drill 7 (Solutions) Nov. 9 Nov. 13 15
Drill 8 (Solutions) Nov. 16 Nov. 20
Drill 9 (Solutions) Nov. 30 Dec 4
Exam Date
Midterm Oct. 26
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 will (eventually) be linked here.

Lecture topics for future dates are very tentative.

Date Topic Recording
September 7 What is a compiler? Recording
September 12 OCaml intro; S-Expressions Recording
September 14 Unary operations Recording
September 19 Booleans Recording
September 21 More Booleans, conditionals Recording
September 26 Binary operations Recording
September 28 Naming expressions with let Recording
October 3 Pairs and the heap Recording
October 5 Debugging assembly and assorted topics Recording
October 10 NO CLASS
October 12 Handling errors Recording
October 17 Interacting with the environment Recording
October 19 Output and functions Recording
October 24 More functions Recording
October 26 MIDTERM (In Class)
October 31 Tail calls Recording
November 2 Guest lecture by Yaron Minsky Recording
November 7 Parsing Recording
November 9 More parsing; function pointers Recording
November 14 First-class and anonymous functions Recording
November 16 Closures Recording
November 21 Optimization intro - constant folding Recording
November 23 NO CLASS
November 28 Inlining and CSE Recording
November 30 IRs and register allocation Recording
December 5 Trust and verification; wrap-up Recording
December 7 Guest Lecture by Desmond Cheong
December 13 FINAL (2pm-4pm)

Calendar

Zoom links are included in the Google Calendar event, as well as in the SignMeUp Queue.

Resources

Quick Links

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

Ethan Mullen šŸ¦–

UTA | emullen2

I’m a senior studying Computer Science and Theatre Arts. I’m from Atlanta, Georgia, and I love musical theatre. Pronouns: he/him/his

Raj Paul 🐨

UTA | rpaul5

Hi, I'm a senior from St. Louis, Missouri studying English and Computer Science. I love movies, breathing exercises, and all things food. Pronouns: he/him/his

Yanyan Ren šŸ¦

GTA | yren17

Hi there! My name is Yanyan and I’m a PhD student doing research in computing education. I’m from Nanjing, China. I love hanging out with my cat Oreo. Pronouns: she/her/hers

Nick Young šŸ

HTA | nyoung10

Hi! I'm from Vancouver and I enjoy climbing, mixology, and keyboards! Pronouns: he/him/his

Tyler Zickmund šŸŒ‹

UTA | tzickmun

Hello! My name is Tyler, I'm a 0.5'er (hence the grad photo) originally from North Carolina! My favorite type of camel is the Bactrian Camel. Pronouns: he/him/his