CS 321 Programming Languages

Fall 2016

Lectures

Please check Prof. Sestoft’s web page for the slides and the source code used in the book. The PLC textbook slides posted here are adaptation of the original ones.

Important Dates (tentative):

  • Exam 1: 10.10.2016
  • Exam 2: 07.11.2016
  • Exam 3: 28.11.2016
  • Exam 4: 10.01.2017

19.09.2016 Monday

21.09.2016 Wednesday

  • Basics, tuples, functions (up to Slide #34 “Functions as arguments”)

26.09.2016 Monday

  • Basics, tuples, functions (cont’d)
  • Lists (up to Slide #19 “lengthOf”) [2up] [4up]

28.09.2016 Wednesday

  • Lists (up to Slide #32, fold_left).
  • Watch videos:
    • [Reversing a list]
    • [Map]
    • [Maya the bee]
    • [fold left & fold right] (Note: This video uses F# as the programming language. The differences from OCaml is that the “let” expressions do not have the “in” keyword, fold_left is called fold, and fold_right is called foldBack. Otherwise, the ideas are the same.)

03.10.2016 Monday

05.10.2016 Wednesday

10.10.2016 Monday

12.10.2016 Wednesday

  • User-defined data types (cont’d)

17.10.2016 Monday

  • An interpreter for the SimpleExpr language (constant ints, names, arithmetic operations, let-in).
  • Read Chapter 1 and Chapter 2 (up to Section 2.3.2) in PLC.

19.10.2016 Wednesday

  • A Stack-based machine, and compiling Expr’s to stack instructions. [Code]
  • Read Sections 2.5-2.8 of Chapter 2 in PLC.

24.10.2016 Monday

  • Defining a Lexer [Slides] [Code]
  • Read PLC Chapter 03, Sections 3.1-3.3.

26.10.2016 Wednesday

  • Defining a parser [Code]
  • Read PLC Sections 3.4, 3.6.3, 3.6.4
  • Extending the parser and lexer to recognize let-in expressions. [Code Changes]

31.10.2016 Monday

  • See Sample Problem Set 03 (and the solutions)
    • Extending the language with ‘<’ and ‘=’.
    • Extending the language with ‘if-then-else’.
    • Using Prim as a single AST constructor for binary operators.
    • Adding boolean values.

02.11.2016 Wednesday

07.11.2016 Monday

  • Exam 2

09.11.2016 Wednesday

14.11.2016 Monday

  • Type Checking (excluding functions) [Code]
  • Read PLC Sections 4.8-4.11, 5.4.

16.11.2016 Wednesday

  • Type checking continued. [Code]

21.11.2016 Monday

  • Type inference and polymorphism [Slides]
  • Read PLC Chapter 6 (only sections 6.2, 6.5, 6.6)

23.11.2016 Wednesday

28.11.2016 Monday

30.11.2016 Wednesday

05.12.2016 Monday

  • Lambda calculus (cont’d with recursion) [Code]
  • Read: PLC Section 5.6

07.12.2016 Wednesday

  • Imperative programming [Slides] [Lecture code]
  • Read: The C Programming Language by K&R, Chapter 5, Sections 5.1-5.4. (Available on LMS)

12.12.2016 Monday

Cancelled

14.12.2016 Wednesday

19.12.2015 Monday

  • Garbage collection [Slides]
  • Read: PLC Chapter 10, Sections 10.1-10.5

21.12.2015 Wednesday

10.01.2017