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. 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

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 5 Course Introduction
Modeling Programming Languages
Modeling Languages
2 7 Why Set Theory as a Foundation?
The Language of Logic and Set Theory
Set Theory Vapid Language Ordered Pairs
3 12 Constructive Propositional Logic Logic and Deduction JZF: Judgmental Intuitionistic ZF
4 14 Constructive First-Order Set Theory
5 19 Structured Proof: a Higher-level Proof Notation
Structured Proof Lamport Proofs:
How to Write a Proof
How to Write a 21st-Century Proof
HLF Lecture
6 21 B: a language with many programs, but few results
Inductive Definitions
Derivations as Data Structures
7 26 Forward and Backward Reasoning From Inductive Definitions
Refining Rule Induction via Redefinition
8 28 Moar Inductive Definition and Proof
Principles of Proof By Induction
9 Feb 2 Principles of Proof By Induction, (cont'd)
10 4 Natural (Big-Step) Semantics
IMP: An Imperative Programming Language
A Taste of Divergence (As Non-convergence)
11 9 Another Take On Inductive Definitions and Induction Principles
Coinductive Definition: A Counterpoint to Inductive Definition
12 11 Coinduction 2
Modeling Divergence Explicitly
IMP's evaluator is densely-defined, not totally-defined
13 16 Small-Step Semantics:
1) Structural Operational Semantics (S.O.S)
2) Reduction Semantics
3) Abstract Machine Semantics
18 Reading Week: No Class
23 Reading Week: No Class
14 25 Lexical Variables 1
Alpha-Equivalence
15 Mar 2 Lexical Variables 2
Procedures
Small-Step Safety
Barendregt's Variable Convention
16 4 Abstracting Abstract Syntax
Choose/Invent Your Own Induction Principle
17 9 Store-Passing Semantics and Mutable References
18 11 Exceptions
19 16 Semantics by Translation: Call-by-Name in Call-by-Value
The Simulation Proof Technique
20 18 Static Analysis
23 Ron @ IFIP WG Meeting: No Class
25 Ron @ IFIP WG Meeting: No Class
21 30 Type Systems
22 Apr 1 Type Systems 2
23 6 Easter Monday: No Class
24 8 CPSC509 Comprehensive Exam