CSCI 1260

Compilers and Program Analysis

Fall 2024

Introduction

Welcome to CSCI 1260 at Brown University!

IMPORTANT NOTE FOR FALL 2024 REGISTRATION: to request an override for CS1260, please use the central override form provided by the CS department. Do not email Rob or the CS1260 staff. Direct questions or concerns about the course override process to enroll-questions@lists.cs.brown.edu.

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 3:00 - 4:20 PM in CIT 368. All course lectures will be recorded and livestreamed on Panopto.

Assignments

Homework Out In
0. OCaml Warmup Sep. 4 Sep. 11
1. S-expressions Sep. 11 Sep. 18
2. Characters Sep. 18 Sep. 25
3. DMAOC (div, mul, and, or, case) Sep. 25 Oct. 9
4. Error handling and the heap Oct. 9 Oct. 18
5. Fun with files Oct. 23 Oct. 30
6. Apply, variadic functions Oct. 30 Nov. 13
7. MiniML Nov. 13 Nov. 20
8. Optimizations Nov. 20 Dec. 13 (benchmarks Dec 4)
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. 4 Sep. 8
Drill 2 (Solutions) Sep. 11 Sep. 15
Drill 3 (Solutions) Sep. 18 Sep. 22
Drill 4 (Solutions) Sep. 25 Sep. 29
Drill 5 (Solutions) Oct. 9 Oct. 13
Drill 6 (Solutions) Oct. 30 Nov. 3
Drill 7 (Solutions) Nov. 13 Nov. 17 19
Drill 8 (Solutions) Nov. 26 Dec 6
Exam Date
Midterm Oct. 21
Final Dec. 18

Lectures

Lectures take place every Monday and Wednesday from 3:00 - 4:20 PM in CIT 368. 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 04 What is a compiler? Recording
September 09 OCaml intro; S-Expressions Recording
September 11 Unary operations Recording
September 16 Booleans Recording
September 18 More booleans, conditionals Recording
September 23 Binary operations Recording
September 25 Abstract syntax trees Recording
September 30 Naming expression with let Recording
October 02 Pairs and the heap Recording
October 07 Handling errrors Recording
October 09 Debugging assembly Recording
October 14 NO CLASS Recording
October 16 Guest Lecture: Douglas Creager Recording
October 21 MIDTERM EXAM (In Person) Recording
October 23 Interacting with the environment Recording
October 28 Functions Recording
October 30 Tail calls Recording
November 04 First class functions Recording
November 06 Lambda lifting and closures Recording
November 11 Parsing Recording
November 13 SICK DAY, NO CLASS Recording
November 18 Optimization intro -- constant folding Recording
November 20 Inlining, CSE Recording
November 25 IRs and register allocation Recording
November 27 NO CLASS Recording
December 02 Trust and Verification Recording
December 04 TBD Recording
December 18 FINAL EXAM (In Person) Recording

Calendar

Zoom links are included in the Google Calendar event, as well as in the Hours 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

Christina Stepin 🦩

HTA | cstepin

Hi! I'm a senior from Seattle studying Math + CS and Music! Outside of class, I enjoy playing chess and reading Young Adult literature. Pronouns: she/her/hers

Max Guo 🦙

UTA | mguo36

Hi! My name is Max. I'm from New Jersey, and I'm currently a junior studying computer science. I love music (I will listen to anything), basketball, computer graphics, and painting! Pronouns: he/him/his

Oscar McNally 🦎

UTA | omcnally

Hello! I'm a senior from Portland, Maine studying CS and Education. I'm an avid chess player and love to cook and discover new music! Pronouns: they/he

Effy Pelayo Tran 🪐

UTA | ttran59

Hey! I'm a senior from the Bay Area studying CS. In my free time, I love studying art history, biking, and playing pool. Pronouns: she/her/hers

Lukas Strelecky 🍔

UTA | lstrelec

Hi! I'm a junior from New Jersey studying CS. In my free time, I enjoy weightlifting, distance running, and cooking. Pronouns: he/him/his