CAS CS 320: Concepts of Programming Languages (UNDER CONSTRUCTION)

CAS CS 320 is a course about programming languages, particularly the design and implementation of programming languages. In this course, we take up the programming language as an object of formal study. This course is not about how to program, though the principles we cover are generally useful for writing and reasoning about programs.

The first part of the course is on functional programming in OCaml, based on CS 3110: Data Structures and Functional Programming at Cornell University and its associated textbook (referred to as OCP below). Its topics include algebraic data types, higher-order functions, and polymorphism. It's during this part that we learn to think functionally, to view programs not as sequences of commands manipulating global state, but as compositions of functions that deconstruct and reorient data.

In the second part of the course we implement several interpreters for various fragments of OCaml; that is, we write OCaml programs that execute OCaml programs. The topics covered include parsing, operational semantics, variable scope, type checking and type inference. By the end of the course, you'll be able to execute some of the simpler programs we wrote in the first part of the course using your own interpreter.

Schedule

Date

Topic

Reading

Assignments

9/2

Course Overview

OCP 1.1, 1.2, 1.3, 2.1, 2.3

9/3

Lab 1: Installation Party

9/4

Basics I: Introducing OCaml

OCP 2.2, 2.4, 2.6, 2.7

Assignment 1

9/9

Basics II: Desiging functions

9/10

Lab 2: OCaml Party

9/11

Basics III: Inference Rules

Assignment 2 (A1 due)

9/16

Basics IV: Lists, Tail-Recursion

OCP 3.1, 3.5, 3.7, 3.8

9/17

Lab 3: Recursion Classics

9/18

Basics V: Derivations

Assignment 3 (A2 due)

9/23

Data I: Unions and Products

OCP 3.2, 3.4, 3.9

9/24

Lab 4: TSV Reader

9/25

Data II: Algebraic Data Types

OCP 3.6, 3.9, 3.11, 8.3

Assignment 4 (A3 due)

9/30

HOP I: Maps and Filters

OCP 4.1, 4.2, 4.3, 4.7

10/1

Lab 5: S-Expressions

10/2

HOP II: Folds

OCP 4.4, 4.5

Assignment 5 (A4 due)

10/7

OCaml I: Error Handling, Testing

OCP 3.3, 3.10

10/8

Lab 5: When2meet

10/9

OCaml II: Modules

OCP 5.1, 5.2, 5.3, 5.4, 5.5

Practice Midterm (A5 due)

10/14

No Lecture (Substitute Monday)

10/15

Lab 7: Midterm Review

10/16

Midterm

Assignment 6

10/21

Parsing I: In Theory

10/22

Lab 6: Formal Grammar Worksheet

10/23

Parsing II: In Practice

Mini-Project 1 (A6 due)

10/28

Semantics I: Operational Semantics

OCP 9.1

10/29

Lab 8: Parser Generators

10/30

Semantics II: Substitution

OCP 9.3

MP1 Check-in due

11/4

Semantics III: Variables, Scope, Closures

OCP 9.4

11/5

Lab 9: Operational Semantics Worksheet

11/6

Semantics IV: Environments

OCP 9.4

Mini-Project 2 (MP1 due)

11/11

Types I: Simple Types

OCP 9.5

11/12

Lab 10: An Imperative Language

11/13

Types II: Progress and Preservation

OCP 9.5

MP2 Check-in due

11/18

Types III: Polymorphism

OCP 9.5

11/19

Lab 11: Closures Worksheet

11/20

Inference I: Hindley-Milner (Light)

OCP 9.6

Mini-Project 3 (MP2 due)

11/25

Inference II: Unification

OCP 9.6

11/26

No Lab (Thanksgiving Recess)

11/27

No Lecture (Thanksgiving Recess)

12/2

Inference III: Constraint-Based Inference

OCP 9.6

12/3

Lab 12: Type Inference Worksheet

12/4

Inference IV: Extended Example

OCP 9.6

MP3 Check-in due

12/9

Advanced: Byte-Code Interpretion

12/10

Lab 15: Final Exam Review

MP3 due

TBD

Final Exam

Calendar