CS 550
Spring 2015
Programming Languages
Thursdays 18:30-21:20
Korman Center 104C

Geoffrey Mainland
University Crossings 106
Teaching Assistant:
Mark Boady
Warning! This material is for an old version of the course.

Midterm Submission

The midterm will be released on BlackBoard on Friday, May 1.

When it is released, you will find a new “test” under the Tests menu on BlackBoard. This test is called “Are You Ready to Take the Midterm?” It consist of a single yes/no question. When you choose “yes” and submit the test, the real midterm will then become available to you. The real midterm is named “Midterm”, it will be under the “Tests” menu in BlackBoard, and it consists of a single PDF file.

Once the midterm is released to you, you have three hours to complete your answers. Your answers must be checked in to your git repository just as with the homeworks. Note that your submission window starts when you answer “yes” to the yes/no question, not when you download the PDF file.

Please be sure you can dedicate three full hours to the midterm before accessing it. You may choose any three hour window in which to take the midterm, but you must complete the midterm by 11:59pm EDT on Sunday, May 10.

All questions regarding the midterm must be sent to Prof. Mainland; you may not ask Mark, or any other TA, faculty member, student, etc. any questions regarding the midterm. Violation of this rule will result in a score of 0.

If you have any questions about the midterm, please post a private note on Piazza. I will only answer questions that seek to resolve a genuine ambiguity in the midterm. I will not provide hints.

I always strive to answer Piazza questions promptly, but I guarantee availability during the following three-hour windows:

Midterm Solution Shell

We have provided you with a shell for your solution here. Please extract this tarball in your ~/cs550/git directory and immediately commit the resulting midterm directory. You can do this as follows:

$ cd ~/cs550/git
$ wget 'https://www.cs.drexel.edu/~mainland/courses/cs550-201435/exams/midterm.tar.gz'
$ tar xf midterm.tar.gz
$ git add midterm
$ git commit -m "Initial check-in for midterm."

All your changes should be made to the files midterm-haskell.hs and midterm-answers.txt. Be sure to commit your work to the repository.

We suggest you download the shell before you start the midterm.

Midterm Study Guide

The midterm will cover the material through week 5 of the course.

You will be asked to write some small functions in Haskell. Your code must compile for credit.

I suggest you focus on the following topics:

  1. Lambda calculus. Do not worry about the evaluation rules—we will see those again in the second half of the course.

  2. Recursive functions in Scheme. Understand base and inductive/recursive cases.

  3. Recursive functions in Haskell. Understand base and inductive/recursive cases.

  4. State. Understand set!.

  5. Streams. Understand how they are implemented using force and delay, and understand how to construct and use streams.

  6. The environment model of evaluation. You should be able to explain how an expression will be evaluated without asking an interpreter to evaluate it for you.

  7. The metacircular interpreter and its variants. Understand how the amb interpreter implements search.

  8. Lazy evaluation.

  9. Proof by induction. The midterm will contain a proof about a Haskell program that manipulates lists.