Class Lectures and Reading Assignments
CS 31600
Programming Languages
Spring, 2021

This page documents what we do in class. It contains Java programs that we will discuss in class, reading assignments, simple homework exercises that you can work on for practice and exam preparation (not for credit), and links to other sources of information.

The exam is today. The exam can be downloaded from Brightspace at 11:00 a.m. The exam file is on the same page in Brightspace where you submit programming assignments. Your completed exam file is due back in Brightspace at 11:00 p.m. this evening. There are more detailed instructions about completing the exam in the exam file. If you have questions, please send me an email at any time during the exam.

Here is a link to today's video lecture.

Here are the code examples we used in class.

Here is a link to today's video lecture.

The course exam is Tuesday, May 4 (according to the university's final exam schedule). Here are sample ML problems for the exam.

Here are the code examples we used in class.

Here is a link to today's video lecture.

Here is a reference to a really good explanation of higher order functions, but written for JavaScript. It's a chapter in an excellent, online, free, JavaScript book.

Here is another reference to a good explanation of higher order functions, but written for OCaml, a dialect of ML. It's a chapter in an online, free, OCaml book.

Here is the list of problems about higher order functions and several more solutions from today's class.

Here is a way you can practice using higher order functions with Java. Solve some (all) of the CodingBat problems about map and filter. The problems are not hard and their explanations are pretty good.

Here is a link to today's video lecture.

Here is a list of problems about ML's higher order functions and a few solutions from today's class.

Here is a link to today's video lecture.

See the homework assignment page for your fifth programming assignment.

Read Sections 11.1 - 11.4 (pages 165-171) from Chapter 11 of the textbook.

Here are slides for Chapter 11 (from the textbook's web site).

Here is the code from today's class.

Here is yet another explanation of how to derive the code for foldl and foldr.

Here is a link to today's video lecture.

Here is the code from today's class.

Here is another explanation of foldr & foldl that adds to what is in the textbook.

Here is a link to today's video lecture.

Read Chapter 10 (pages 148-162) from the textbook.

Here are slides for Chapter 10 (from the textbook's web site).

Here is the code from today's class.

Here is a link to today's video lecture.

Here is the code from today's class.

Here is a link to today's video lecture.

Here is the code from today's class.

Here is a link to today's video lecture.

Here are the notes and examples from today's class.

Here is a link to today's video lecture.

Today we worked on examples 15, 16, and 17 of the recursive functions.

Here are the notes and examples about anonymous function values.

Here is a link to today's video lecture.

Read Chapter 9 (pages 133-144) from the textbook.

Here are slides for Chapter 9 (from the textbook's web site).

Today we worked on examples 11, 12, 13, and 14 of the recursive functions.

Spring Break - No class today.

Spring Break - No class today.

Here is a link to today's video lecture.

See the homework assignment page for your fourth programming assignment.

Here are some notes from class.

Here is a link to today's video lecture.

Here is a collection of recursive function definitions. We will go over as many as we can in class.

Today we solved a few more of these type declaration problems.

And we solved a few of these "function type" problems.

Here is a link to today's video lecture.

For practice with thinking about pattern matching and polymorphic types, do the problems in the following file.

For more practice with thinking about polymorphic types, do the problems in the following file.

In the textbook, at the end of Chapter 8, Exercises 1, 3, 4 and 5 are very good problems. I really recommend that you try them. If you have a question about them, please ask.

Here are the two recursive functions that we wrote in class.

Here is a link to today's video lecture.

For practice with thinking about polymorphic types, do the problems in the following file.

Today we finished solving these pattern matching problems.

And we started solving these (monomorphic) type declaration problems.

Here is a link to today's video lecture.

Read this explanation of ML patterns.

For practice with thinking about types and type inference, do the problems in the following file.

For practice with thinking about pattern matching, do the problems in the following file.

Read Chapter 8 (pages 118-130) from the textbook.

Here are slides for Chapter 8 (from the textbook's web site).

Here are the examples from class.

Here is a link to today's video lecture.

See the homework assignment page for your third programming assignment.

Read this explanation of ML patterns.

Do Exercises 2 from the end of Chapter 6 (page 102) of the textbook. This is just a practice exercise. This is not homework that you will turn in.

Here is a link to today's video lecture.

Read Sections 7.7 - 7.10 (pages 107-115) from the textbook.

Here is the ML repl transcript from class and some examples.

Here is a link to today's video lecture.

Read Sections 7.1 - 7.6 (pages 103-107), about ML patterns, from the textbook.

Here are slides for Chapter 7 (from the textbook's web site).

Here is the ML repl transcript from class and some examples.

Here is a link to today's video lecture.

See the homework assignment page for your second programming assignment.

Read Sections 5.10 - 5.12 (pages 78-83) from the textbook.

Read Chapter 6 from the textbook.

Here are slides for Chapter 6 (from the textbook's web site).

Here is the ML repl transcript from class and some notes and examples.

Here is a link to today's video lecture.

Here are the ML, Java, and JavaScript repl sessions we used in class.

Here is a link to today's video lecture.

Do Exercise 1 from the end of Chapter 3 (page 41). This is a practice exercise, not homework that you will turn in.

Read Sections 5.1 - 5.9 (pages 65-78) from the textbook.

Here are slides for Chapter 5 (from the textbook's web site).

You will need a version of the ML programming language in order to start reading Chapter 5. Use the following link to download a Windows installer for ML.

Here are the examples we did during class.

Here is a link to today's video lecture.

Here are the examples we did during class.

Here are useful references for Java, C++ and JavaScript operators and their precedence/associativity.

Here is a link to today's video lecture.

Here are the tokenizing examples we used in class.

Here is a link to today's video lecture.

Read Chapter 3 from the textbook, Modern Programming Languages: A Practical Introduction.

Here are slides for Chapter 3 (from the textbook's web site).

We will use the following web sites as examples of useful, real world grammars that we can analyze.

The following reference has good explanations and examples of BNF grammars.

Here are the examples that we did during class.

Here is a link to today's video lecture.

For next week, read Chapter 2 from the textbook, Modern Programming Languages: A Practical Introduction.

Here are slides for Chapter 2 (from the textbook's web site).

Here is a generic implementation of binary trees.

Here is a link to today's video lecture.

See the homework assignment page for your first programming assignment.

Here is the recursive isFull() method that we wrote for the BTree class.

Here is a link to today's video lecture.

Read the following slightly more detailed reference about the binary tree data structure.

Here is an interactive version of the previous reference.

Here is a link to today's video lecture.

We will begin the course by studying tree data structures. Read the following online chapter.

The following zip file contains Java programs that implement and process binary trees.

Here are the drawings we used in today's lecture.

Here is a famous visual representation of infinite recursion.

Read Chapters 1 and 2 (pages 1-25) from the textbook, Modern Programming Languages: A Practical Introduction.