17-363/17-663: Programming Language Pragmatics

Class Tu/Th 1:25 - 2:45 p.m. in PH A18C
Recitation F 1:25 - 2:15 p.m.. in GHC 4102
Fall 2021
12 units

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

TA Sam Estep
samueles at andrew
Office hours: Tuesday 3-4pm in TCS 310

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 31 Course introduction PLP, chapter 1
Sep 2 Syntax and Lexical Analysis PLP, chapter 2 through 2.2; in-class exercise
Sep 3 RecitationImplementing lexical analysis
Sep 7 Binding PLP, chapter 3; in-class exercise
Sep 9 Inductive definitions and proofs lecture4-induction.txt; in-class exercise HW1: Lexical analysis
Sep 10 RecitationThe SASyLF Proof Assistant
Sep 14 Dynamic semantics: Big-step lecture5-dynamics.txt; in-class exercise
Sep 16 Dynamic semantics: Small-step lecture06-small-step.pdf; in-class exercise HW2: Inductive proofs
Sep 17 RecitationDynamic semantics practice
Sep 21 Top-Down Parsing PLP section 2.3; in-class exercise
Sep 23 Bottom-Up Parsing in-class exercise and reference sheet HW3: Dynamic Semantics
Sep 24 RecitationParsing implementation
Sep 28 Typing rules lecture09-typing.pdf; in-class exercise
Sep 30 Type Soundness - Progress lecture10-soundness.pdf; in-class exercise
Oct 1 RecitationMidterm review
Oct 5 Type Soundness - Preservation (same notes as before); in-class exercise
Oct 7 Environmental Semantics see Big-Step notes, above; interpreter-code.zip; in-class exercise HW4: Parsing
Oct 8 RecitationStatic semantics practice
Oct 12 Mid-semester exam 1
Oct 14 No class
Oct 15 RecitationSoundness proofs
Oct 19 Typechecking the Core of TypeScript notes/lecture13-subtyping.txt HW5: Static semantics
Oct 21 Human Aspects of Language Design
Oct 22 RecitationImplementing typecheckers
Oct 26 Code generation lecture15-webassembly.txt HW6: Typechecking
Oct 28 Intermediate representation lecture16-ir.txt
Oct 29 Recitation
Nov 2 Local Optimization in-class exercise
Nov 4 Global Optimization and Correctness lecture18-optimization.pdf; in-class exercise HW7: Code generation
Nov 5 No Recitation
Nov 9 Object-Oriented Programming Concepts and Implementation lecture19-objects.txt
Nov 11 Garbage collection lecture20-gc.txt HW8: Translation correctness
Nov 12 RecitationProject discussion
Nov 16 Register allocation, instruction scheduling, and loop optimizations lecture21-backend-opt.txt Project Proposal
Nov 18 The Curry-Howard Isomorphism see Frank Pfenning's excellent lecture notes
Nov 19 Recitation2nd midterm review
Nov 23 Midterm exam 2
Nov 25 No class
Nov 26 No Recitation
Nov 30 Register allocation
Dec 2 Programming languages and compilers research
Dec 3 Recitation2nd midterm post-review
Dec 7 8:30-11:30am Project presentations in HH B131 Project presentations and final deliverables