Schedule

Table of Contents

Week 1: Basics

TUE 01-21 Lecture 1

  • Title: Course Introduction
  • Topics:
    • Discuss how the course structure, expectations, etc.
    • Briefly talk about Rust
    • Install Rust and Cargo
    • Set up our first Cargo project
  • Reading:
  • Discussion Questions:
    • Why are you taking this course? What do you want to get out of it?
    • Have you heard of Rust before this course?
    • Do you like using a low-level programming language like C?

THU 01-23 Lecture 2

  • Title: Basic Programming
  • Topics:
    • Reminder ourselves how to read BNF grammars
    • Do some "normal" programming with Rust
    • Look more carefully at the grammar of Rust
  • Reading:
  • Discussion Questions:
    • How well does Python or C++ programming transfer to basic Rust programming? Do you feel you could write any program on integers in Rust that you could already write in Python? Why or why not?
    • One somewhat strange feature of Rust's parser is that it allows trailing commas. Why do you think this is?
    • Are there features you wish Rust had? Are there features it has (that we've seen so far) that you don't like?

Week 2: Ownership

TUE 01-28 Lecture 3

  • Title: The Stack and Heap
  • Topics:
    • Determine the role of the stack and the heap in a systems PL, and how these things affect how we use Rust
    • Look at a couple ways of managing memory
  • Reading:
  • Discussion Questions:
    • Why do we have to know the size of data that will be put on the stack at compile time?
    • What are the benefits of Rust's ownership model over automatic reference counting? What are the downsides?
    • What about the tradeoffs between reference counting and garbage collection?

THU 01-30 Lecture 4

  • Title: References and Borrowing
  • Topics:
    • Look more carefully at Rust's borrow system
    • See some examples of things we can't do according to Rust's borrow checker
  • Reading:
  • Discussion Questions:
    • How do references relate to pointers?
    • Is it worthwhile to enforce a single mutable reference if you aren't interested in concurrency?
    • How might you think of visualizing ownership and borrowing? (There are a couple existing tools to do this, but I think there's still room for improvement.)

Week 3: Data

TUE 02-04 Lecture 5

  • Title: Structures and Enumerations
  • Topics:
    • Cover structures (product types) and enumerations (union types) in Rust
    • Look at how Rust's borrow system interacts with more complex data
  • Reading:
  • Discussion Questions (from Piazza):
    • What is the difference between matching-expressions and nested if-expressions? What are the tradeoffs?
    • How are enumerations and structures laid out in memory?
    • Is it possible to define structures with immutable fields?
    • When should a structure store it's own data or references to other data?

THU 02-06 Lecture 6

  • Title: Collections and Slices
  • Topics:
    • Cover vectors and hash maps in Rust (they are very similar to data structures in other PLs, modulo the interaction with the borrow system)
  • Reading:
  • Discussion Questions (from Piazza):
    • How does string concatenation work? What does push_str do and who owns what data after it's called?
    • Why does Rust implement deref coercion?
    • It is possible to replace a value in a vectors and take ownership of the original value?

Week 4: Functions

TUE 02-11 Lecture 7

THU 02-13 Lecture 8

Week 5: Lifetimes

THU 02-20 Lecture 9

Week 6: Smart Pointers

TUE 02-25 Lecture 10

  • Title: Boxes and Recursive Data
  • Topics:
  • Reading:
  • Reminders:

THU 02-27 Lecture 11

  • Title: Reference Counting and Internal Mutability
  • Topics:
  • Reading:
  • Reminders:

Week 7

TUE 03-04 Lecture 12

  • Title: TBD
  • Topics:
  • Reading:
  • Reminders:

THU 03-06 Midterm Exam

Week 8: SPRING RECESS

Week 9: Theory

TUE 03-18 Lecture 13

  • Title: Logic and Type Theory
  • Topics:
  • Reading:
  • Reminders:

THU 03-20 Lecture 14

  • Title: Linear Types
  • Topics:
  • Reading:
  • Reminders:

Week 10: Interpreters

TUE 03-25 Lecture 15

  • Title: Crafting Interpreters
  • Topics:
  • Reading:
  • Reminders:

THU 03-27 Lecture 16

  • Title: Workshop: An Interpreter for STLC
  • Topics:
  • Reading:
  • Reminders:

Week 11: FR Syntax

TUE 04-01 Lecture 17

  • Title: FR Calculus: Introduction
  • Topics:
  • Reading:
  • Reminders:

THU 04-03 Lecture 18

  • Title: FR Calculus: Syntax
  • Topics:
  • Reading:
  • Reminders:

Week 12: FR Semantics

TUE 04-08 Lecture 19

  • Title: Workshop: A Parser
  • Topics:
  • Reading:
  • Reminders:

THU 04-10 Lecture 20

  • Title: FR Calculus: Semantics
  • Topics:
  • Reading:
  • Reminders:

Week 13: FR Borrow Checking

TUE 04-15 Lecture 21

  • Title: Workshop: An Evaluator
  • Topics:
  • Reading:
  • Reminders:

THU 04-17 Lecture 22

  • Title: FR Calculus: Type and Borrow Checking
  • Topics:
  • Reading:
  • Reminders:

Week 14: FR Extensions

TUE 04-22 Lecture 23

  • Title: Workshop: A Type/Borrow Checker
  • Topics:
  • Reading:
  • Reminders:

THU 04-24 Lecture 24

  • Title: FR Calculus: Extensions
  • Topics:
  • Reading:
  • Reminders:

Week 15: FR Soundness

TUE 04-29 Lecture 25

  • Title: Progress and Preservation (Part 1)
  • Topics:
  • Reading:
  • Reminders:

TUE 05-01 Lecture 26

  • Title: Progress and Preservation (Part 2)
  • Topics:
  • Reading:
  • Reminders: