Schedule

See the diary for a list of what has been covered so far, when some homework is due, and what is planned next, if you want to read ahead.

There are code samples in these directories that may not be web accessible, but that you can read and copy from your CS account.

Declarative programming

Reading: slides (4up)

Goal: understanding the difference between imperative and declarative programming. Detecting the elements of a problem and stating the relationships between them.

Homework: due in class on paper at the beginning of the next lecture, estimated total effort less than an hour.

  1. Code problem E in your favorite imperative/OO language. Include unit testing and trace of execution.
  2. Consider a small (but not too small) problem of your choice. Describe the problem in English. Define the elements of the problem. State some interesting/relevant relationships between them.

An introduction to Curry

Reading:
  1. Slides (4up)
  2. Tutorial up to Sect. 3
  3. Consult the Pakcs Manual as needed to execute and test programs.
Goal: Ability to encode simple problems into Curry programs and to execute and test them.

Homework: due on paper in class at the beginning of the Tuesday lecture following the completion of this unit. See the diary for the exact date.

Fill in the missing portions of code which are identified by "...". The amount of code is quite small. The focus is on reasoning about the code and understanding why is (or is not) correct.

  1. Problem 1
  2. Problem 2

Rewriting

Reading:
  1. Slides (4up)
  2. Quick Introduction to Term Rewriting.
  3. Only for consultation Terese Lite
Goal: Understanding rewriting as a model for functional logic computations

Homework: Exercises number 3, 5, 6 and 9b found in the slides. As usual, due on paper in class at the beginning of the Tuesday lecture following the completion of this unit. See the diary for the exact date. If you cannot complete the exercises because of the functional logic paradigm, code the problems in your preferred imperative or object-oriented language and point out what you are not able to do in Curry.

Narrowing

Reading:
  1. Slides (4up)
  2. Programming with Narrowing: a Tutorial.
Goal: Understanding narrowing and using it for programming

Homework: Exercises number 5, 8, 9, and 10a found in the slides. Submit according to the usual conventions (format, medium, schedule, etc.)

Strategies

Reading:
  1. Slides (4up)
Goal: Understanding the evaluation strategy of narrowing (functional logic) computation

Homework: Exercises number 6 and 8 in the slides. Code a Curry program for this problem. Submit according to the usual conventions (format, medium, schedule, etc.)

Compiling

Reading:
  1. Slides (4up)
Goal: Learning an abstract compilation scheme for a functional logic language

Homework: Exercises number 6A, 6B and 9 in the slides. Code a Curry program for the U2 problem at http://okmij.org/ftp/kakuritu/StrangeLoop.pdf. Submit according to the usual conventions.

Contact: antoy@cs.pdx.edu
Last update Tue Sep 12 12:13:48 PDT 2017