CPSC509: Programming Language Principles

When/Where

Instructor

Course Description

Programming languages are a fundamental part of computer science. This course introduces the formal tools needed to describe precisely what a program means. These tools help us answer many useful questions about program analyses and transformations, such as:

Topics include:

Prerequisites

This course is intended for graduate students in computer science. There are no formal course prerequisites, but you are expected to have the kind of mathematical maturity typical of one who has taken an undergraduate discrete math or theory of computation course. We will explicitly study logical specification and proof techniques in this course, so don't worry if you are rusty or not very familiar. Here are some resources I find helpful for refreshing or improving your skill at writing proofs:

Familiarity with a functional programming language (e.g., Scheme, Racket, ML, Haskell) is useful but is not required. We will use the Racket programming language at times in the course to help reinforce the connection between the mathematics and programs/programming. I will introduce any needed programming concepts in class.

Materials

To facilitate discussion among students in the class and myself, we are using the Piazza Q&A platform. The system allows you to ask questions, refine answers as a group, carry on followup discussions, and disseminate relevant information. Rather than emailing questions to me, I ask that you post your questions to Piazza. If you have any problems or feedback for the developers, email team@piazza.com.
Find our class page here.

This course has no required textbook. Material will be primarily be provided in a set of notes and/or covered in class, as well as through some supplementary readings. The material we cover will draw from a variety of sources.

The following books are recommended as alternative sources of information about topics from this course:

Some other useful texts that provide a different perspective or more depth in some areas are:

Exams

There will be one comprehensive exam (date TBD).

Homeworks

There will be approximately 6 homework assignments during the course of the semester. I recommend that homeworks be typeset using the LaTeX document preparation system, but will not require it: you have the option to prepare your homework by hand, so long as you make sure that it is clearly legible by me. I plan to provide LaTeX templates for you, so this is a good chance to learn one of the more common tools for writing academic computer science papers, though the learning curve may be steep at first. I'm happy to give guidance on how to work with LaTeX (though I probably don't know all the latest tricks). You can turn in assignments electronically as PDF's either scanned or generated by LaTeX to Gradescope

Assignments must be your individual work. You may discuss the homeworks with others, but you must write up and hand in your own solutions. In particular, follow the whiteboard policy: at the end of the discussion the "whiteboard" must be erased and you must not transcribe or take with you anything that has been written on the board (or elsewhere) during your discussion. You must be able to reproduce the results solely on your own after any such discussion.

Do not draw upon solutions to assignments (or in notes) from similar courses, nor use other such materials (e.g., programs) from any web site or other external source in preparing your work.

Grading Policy

The final grade will be comprised of the following components, with the following plan for distribution of marks (subject to revision):

Resources

The following resources are to help you with your class work.

Course Schedule (UNDER CONSTRUCTION!)

The following is a draft course schedule, based on a prior offering of the course. The exact details (including some topics) will vary depending on the content covered in class and the interests and needs of the students (and myself).

I often update the notes as the term goes along. They are timestamped, so that you can tell when the most recent version was uploaded (note that the timestamp is distinct from the original date of creation).

Lec # Date Topics Notes Supplementary Readings
1 Jan 9 Course Introduction
11 Ron @ POPL: No Class
16 Ron @ POPL: No Class
18 Ron @ POPL: No Class
2 23 Modeling Programming Languages Modeling Languages
3 25 Why Set Theory as a Foundation?
The Language of Logic and Set Theory
Set Theory
4 30 The Language of Logic and Set Theory (Continued)
How to Prove It (The Judgments)
JZF: Judgmental Intuitionistic ZF
5 Feb 1 How to Prove It (Propositional Fragment)
6 6 How to Prove It (Propositional Fragment cont'd.)
7 8 How to Prove It: Example Proofs & Metatheorems
Lamport Proofs:
How to Write a Proof
How to Write a 21st-Century Proof
HLF Lecture
8 13 B: Language with many programs, few results
Inductive Definitions
Derivations as Data Structures
Inductive Definitions
B: Equational Total Function Semantics
15 No Class: Attend Nikhil Swamy's Distinguished Lecture
20 Reading Week: No Class
22 Reading Week: No Class
9 27 Forward and Backward Reasoning From Inductive Definitions
Refining Rule Induction via Redefinition
Proof by Induction Proof of a Forward Reasoning Principle
10 29 Moar Inductive Definition and Proof
Principles of Proof By Induction
Mar 5 Ron @ IFIP WG Meeting: No Class (VIDEO IN LIEU) Van Horn Video
11 7 Ron @ IFIP WG Meeting: CLASS ON ZOOM
Principles of Function Definition By Recursion
12 12 Natural (Big-Step) Semantics
IMP: An Imperative Programming Language
A Taste of Divergence (As Non-convergence)
Big-Step Notes B: Natural Semantics IMP Notes
IMP: Natural Semantics
13 14 Another Take On Inductive Definitions and Induction Principles
Coinductive Definition: A Counterpoint to Inductive Definition
Modeling Divergence Explicitly
Coinduction Notes
14 19 Coinduction 2
IMP's evaluator is densely-defined, not totally-defined
IMP: Natural Semantics w/ coinductive divergence
15 21 Small-Step Semantics:
1) Structural Operational Semantics (S.O.S)
2) Reduction Semantics
3) Abstract Machine Semantics
S.O.S Notes
RS Notes
AM Notes
B: Structural Operational Semantics
B: Reduction Semantics
B: Abstract Machine Semantics
16 26 Lexical Variables 1
Alpha-Equivalence
Variable Binding Notes BL: Standard Reduction Semantics BL: Compatible Reduction Semantics
17 28 Lexical Variables 2
Procedures
Small-Step Safety
Barendregt's Variable Convention
Procedures
Alpha Equivalence
TFL: S.O. Semantics
18 Apr 2 Abstracting Abstract Syntax
Choose/Invent Your Own Induction Principle
Induction Unchained!
Syntax as an Initial Algebra
19 4 Exceptions
TFLexn: Reduction Semantics
20 9 Type Systems
21 11 Type Systems 2