17-363/17-663: Programming Language Pragmatics

Class Tu/Th 1:25 - 2:45 p.m. in GHC 5222
Recitation F 1:25 - 2:15 p.m.. in DH 1112
Fall 2022
12 units

Professor Jonathan Aldrich
aldrich at cs dot cmu dot edu
TCS 422
Office hours: Tuesday 5-6pm, or by appointment
For appointments outside of office hours, email the instructor.

TA Bradley Teo

Office hours: Wednesdays 5-6pm in the carrels on GHC level 5

Course Description

This course provides a broad and pragmatic foundation in the most basic tool of the programmer: programming languages. It starts with the fundamentals of syntax, parsing, and binding, the core structural concepts in programming languages. The course will then cover program semantics and type systems, and students will learn to relate them with a type soundness theorem. Finally, a coverage of intermediate optimization and code generation offers the opportunity to discuss both producing efficient code and reasoning about the correctness of program transformations. Assignments involve a combination of tool-assisted formal reasoning and proofs about programming languages, and implementing these language constructs in a compiler.

Prerequisites. Programming maturity and knowledge of reasoning about programs equivalent to passing 15-150, and mathematical maturity equivalent to passing either 15-251 or 21-228). Students with substantial math and programming experience who have not satisfied the specific prerequisites can contact the instructor for permission to enroll.

Requirements Satisfied.This course fulfills the Logic and Languages constrained elective category for the Computer Science major.

Why take this course?

How does this course compare to CMU's other PL/compilers courses?

First of all, CMU has an amazing selection of courses in this area-you can't go wrong! But this course has some differences that make it a particularly great match for some students:

Course Syllabus and Policies

The syllabus covers course learning objectives, supplemental textbooks, assessments, late work policy, and policies.


Date Topic and Slides Additional Reading or Code Assignments Due
Aug 30 Course introduction PLP, chapter 1
Sep 1 Syntax and Lexical Analysis PLP, chapter 2 through 2.2; in-class exercise HW0: Warmup
Sep 2 RecitationImplementing lexical analysis
Sep 6 Binding PLP, chapter 3; in-class exercise
Sep 8 Inductive definitions and proofs 04-formal.pdf; in-class exercise HW1: Lexical analysis
Sep 9 RecitationThe SASyLF Proof Assistant 04-formal-sasylf.pdf
Sep 13 Dynamic semantics: Big-step lecture05-big-step.pdf; in-class exercise
Sep 15 Dynamic semantics: Small-step small-step.pdf; in-class exercise HW2: Inductive proofs
Sep 16 RecitationDynamic semantics practice
Sep 20 Top-Down Parsing PLP section 2.3; in-class exercise
Sep 22 Bottom-Up Parsing in-class exercise and reference sheet HW3: Dynamic Semantics
Sep 23 RecitationParsing implementation
Sep 27 Typing rules 09-typing.pdf; in-class exercise
Sep 29 Type Soundness 10-soundness.pdf; in-class exercise HW4 checkpoint
Sep 30 RecitationStatic Semantics practice
Oct 4 Type Checking PLP chapter 7
Oct 6 Composite Types PLP Chapter 8 HW4: Parsing
Oct 7 RecitationStatic semantics practice
Oct 11 Mid-semester exam 1
Oct 13 Semantics of Objects PLP chapter 10; Featherweight Java paper
Oct 14 RecitationMidterm discussion HW5: Static semantics
Oct 25 Implementation of Objects PLP chapter 10; in-class exercise
Oct 27 Implementing Functional Programming Notes; in-class exercise HW6 checkpoint
Oct 28 No class - Tartan Community Day
Nov 1 Intermediate representations and WebAssembly PLP chapter 15; HW6: Typechecking
Nov 3 Garbage collection Notes on garbage collection
Nov 4 Recitation Code generation practice
Nov 8 Local Optimization and Correctness PLP chapter 17; Notes on Optimization Correctness; in-class exercise HW7 checkpoint
Nov 10 Rust
Nov 11 Recitation Optimization and correctness practice
Nov 15 Global Optimization in-class exercise HW7: Code generation
Nov 17 Register Allocation and Instruction Scheduling in-class exercise
Nov 18 RecitationProject discussion
Nov 22 Loop optimizations (notes) in-class exercise HW8: Translation correctness, Project Proposal
Nov 24 No class - Thanksgiving break
Nov 25 No Recitation - Thanksgiving break
Nov 26 Control Flow PLP chapters 6 and 9; in-class exercise
Nov 28 The Curry-Howard Isomorphism in-class exercise
Nov 29 Recitation2nd midterm review
Dec 6 Midterm exam 2
Dec 8 Programming languages and compilers research
Dec 9 Recitation2nd midterm post-review
TBD (finals week) Project presentations Project presentations and final deliverables