Principles of Programming Languages


Catalog Description: Principles of functional, imperative, and object-oriented programming languages; elements of language theory; the typed-l calculus, functional languages, and stack implementation of recursion; imperative languages, block structure, and more on stack allocation model; user-defined types, heap storage model; and object-oriented languages, data abstraction, genericity, polymorphism, and inheritance. Case studies may include Algol, Pascal, Ada, LISP, Scheme, Smalltalk, Java, and C++. Prerequisites: Undergraduates: CS 335, CS 434, and either CS 385 or CS 182; Graduates: MA 502 and CS 590.

Textbook(s)


Required: Essentials of Programming Languages (2nd ed.) by  Friedman, Wand, and  Haynes; MIT Press (EOPL).

The Little Schemer (4th ed.), by  Friedman and Felleisen; MIT Press (LS).


Week-By-Week

Week
Topics Covered
Reading
Assignments
1
Course overview; basics of functional programming; Scheme data types and procedures
LS ch 1,2
LS ch 1,2
2
Recursively specified data; recursive programs; inductive reasoning.
LS 3-5, EOPL 1.1, 1.2

3
Tail recursion; higher order procedures and closures.
LS 8
hw1, due in 1 week
4
Lexical scope; data abstraction; Scheme package for abstract syntax trees.
EOPL 1.3, 2.1, 2.2
hw2, due in 2 weeks
5
Procedural representation of data structures; environment-passing interpreters: basics.
EOPL 2.3, 3.1-3.1
hw3, due 1 wk
6
Environment-passing interpreters: local binding and procedures.
EOPL 3.4, 3.5

7
Environment-passing interpreters: recursion.
EOPL 3.6
hw4, due 1 wk
8
Environment-passing interpreters: variable assignment; parameter passing; statements.
EOPL 3.7, 3.8

9
Introduction to types, typing rules, type checking.
EOPL 4.1, 4.2
hw5, due 1 wk
10
Type inference; enforcing abstraction boundaries.
EOPL 4.3, 4.4

11
Objects, classes, subtyping.
EOPL 5.1-5.3
hw6, due 2 wk
12
Object-oriented design patterns for implementing interpreters and checkers.
EOPL 6.1
hw7, due 2 wk
13
Java inner classes, scoping and nested procedures; generic classes.


14
Course wrap-up and review for final exam.