eecs 662: programming languages
fall 2017

essentials | announcements | homework | summaries | schedule

essentials

Instructor Dr. J. Garrett Morris
Email garrettm@ku.edu
Office Eaton 2028
Office hours MW 1—3 PM, and by appointment
Course websites http://ittc.ku.edu/~garrett/eecs662f17/
http://piazza.com/ku/fall2017/eecs662/home
Lectures Learned Hall 3151, 8:00—8:50 AM

syllabus

The syllabus is available here. The high-level objectives for this course are that students should be able to:

announcements

12/1 There will be a special review session for the final exam on Tuesday, December 5th from 4:30-6:00 PM in Learned 2112. Class on Wednesday, December 6th will also be devoted to reviewing for the final. The practice problems are highly likely to be relevant to the forms of questions on the actual final.
11/17 I'll be away on the first of December; a guest lecture will be delivered by Justin Dawson.
11/6 Homework 4 has been posted
10/23 Homework 3 has been posted.
Midterm sample solutions are available.
Homework 2 sample solutions are available.
9/29 Homework 2 and the homework 1 solutions have been posted
9/20 The homework 1 due date has been extended to 9/29.
9/19 Access to the solutions is now limited to students in the course. If you are enrolled in the course, you should be able to access the solutions using your KU ID. Please let me know if you have trouble.
9/11

There will be a couple of Haskell labs this week and next week, scheduled as follows: These are optional sessions to review Haskell programming (and functional programming in general), and to answer any questions you may have.

Wednesday, 9/13 5:00-7:00 PM Eaton 1005C Lab1.hs
Thursdsay, 9/14 5:00-7:00 PM Eaton 1005C Lab2.hs
Tuesday, 9/19 5:00-7:00 PM Eaton 1005C
Wednesday, 9/20 5:00-7:00 PM Eaton 1005C

If you would like to come to one of the labs, but cannot make any of the scheduled times, please get in touch (soon).

9/6 Homework 0 solutions and homework 1 posted.
9/1 I'll be away from the 1st through the 10th of Septembers. Lectures on 9/6 and 9/8 will be delivered by Adam Petz.
8/23 Homework 0 has been updated: Aces in Blackjack are worth either 1 or 11 points, not either 1 or 10 points.
8/21 Homework 0 is posted!
8/19 There will be no office hours on Monday, August 21st. Office hours will resume as scheduled on Wednesday, August 23rd.

homework

Homework and solutions are no longer available.

Number Due date Download Sample solutions
0 Friday, September 1st, 8:00 AM Hw0.hs Hw0Solutions.hs
1 Friday, September 29th, 8:00 AM Specification
Distribution
Hw1Solutions.zip
2 Friday, October 13, 8:00 AM Specification
Distribution
With andThen
With >>=
3 Friday, November 3, 8:00 AM Specification
Distribution
Hw3Solutions.zip
4 Wednesday, December 6, 11:00 AM Specification
Distribution

summary notes

practice problems

Practice problems for the final exam are available here, with solutions here. I will add new practice problems as we meet new topics in the rest of the semester. (Last updated: 12/1)

schedule

date topics code other
8/21 Introductions
Course objectives
Homework 0 out
8/23 Arithmetic expressions and their interpretation
Desugaring
PLIH: "Arithemetic expression" and "Simple elaborator"
Arith0.hs
8/25 Adding Booleans
Type errors and type checking
Monadic notation for Maybe
PLIH: "Adding Booleans" and "Monadic redux"
Arith1.hs
8/28 Adding let
Substitution
Call-by-name and call-by-value (without calls yet)
Formal notation for evaluation
PLIH: "Formal systems" and "Adding identifiers"
Arith2.hs
8/30 Untyped functions
Typing let
PLIH: no readings.
Ulc0.hs
9/1 Types for functions
PLIH: "Function types"
Stlc0.hs
9/6 Substitutions and environments Homework 1 out
9/8 Substitutions and environments
Products
PLIH: Adding environments
9/11 Products
Currying and uncurrying
Higher-order functions
PLIH: Currying
Notes on currying
Stlc1.hs
9/13 Static and dynamic scope
PLIH: Scoping
Notes on environments and scoping
Blc.hs
9/15 Recursion and fixed points
Recapitulate STLC
PLIH: "Untyped recursion", "Typed recursion"
Notes on recursion and fixed points
Stlc2.hs
9/18 Exceptions Lcex.hs
9/20 The unit type (see Stlc3.hs)
State as an effect
Stlc3.hs
Lcst0.hs
9/22 State as an effect (see Lcst1.hs)
Generalizing effects (see Lcst2.hs)
Lcst1.hs
Lcst2.hs
9/25 Generalizing effects
Type classes
Lcex1.hs
Classes.hs
Lcst3.hs
9/27 Generalizing effects
Monads
Also, a diversion on defining the integers
Lcex2.hs
Nat.hs
9/29 Homework discussion Homework 2 out
10/2 Homework 2 discussion
From effects to monads
Lcex3.hs
10/4 Monads
The state monad
Lcex4.hs
Lcst5.hs
10/6 The state monad
Combining state and exceptions
Lcst6.hs Lcsx0.hs
10/9 Combining state and exceptions
The writer monad
Combining writing and exceptions
Lcsx1.hs
Lcw.hs
Lcwx.hs
10/11 Type and effect systems
Notes on effects
10/13 Proofs, programs, and the Curry-Howard correspondence.
10/18 Midterm review
10/20 Midterm
10/23 Midterm discussion
Homework 3 discussion
Homework 3 out
10/25 Subsumption and subtyping
Notes on subsumption and subtyping
10/27 Subsumption and subtyping
Implementing subtyping
10/30 Implementing subtyping
Lcef1.hs contains Pos, a subtype of Int
Lcef0.hs
Lcef1.hs
11/3 Hindley-Milner polymorphism
Notes on same
11/6 Implementing H-M Homework 4 out
11/8 Girard-Reynolds polymorphism
Type abstraction and type application
Notes on same
11/10 Implementing G-R
Encoding products
Grlc.hs
11/13 Encoding products
Encoding sums
Also described in the Notes on GR polymorphism.
11/15 Recursion
Folds over naturals and lists
Notes on folds and recursive types
11/17 Folds over naturals and lists
Type operators and fixed points
Notes on folds and recursive types
11/27 Structural rules in proof
11/29 Substructural logics
New connectives in substructural settings
Notes on substructural types