Our experience shows that the second year is a good time to give
a course based on programming concepts.
In the first year, students lack the maturity to understand the concepts
and in the third and fourth years, students tend to become conservative.
In the second year, students are mature enough to understand the
concepts and open enough to appreciate them.

This Web site also contains
errata for the book,
a poster showing the principal programming paradigms,
a pointer to a Wiki devoted to the book,
an animated kernel language interpreter,
some example code, and other technical information.
For more general information on the book please go to the
main Web site.
We would like to ask
anyone who makes new material or improves this material,
to please contact the authors so that we can
add your material to this Web site.

Poster showing the principal programming paradigms

Wiki for the book

There is a Wiki for the book
with extra information contributed
by readers, including how to express the book's ideas and code examples in other
languages than Oz, pointers to discussions on Lambda the Ultimate
related to the book, and other contributions.
We thank Dominic Fox for his initiative in setting up the Wiki.

Kernel language interpreters

The kernel language interpreter VamOz was developed by Frej Drejhammar,
Dragan Havelka, and Christian Schulte to animate the execution of the kernel languages
according to the abstract machine semantics of the book.
A lab session based on the interpreter and a compiled version for Mozart 1.3.0 is
available
here (unfortunately the source code is not available).
The interpreter single-steps through execution and shows the instruction
executed and the state of the single-assignment store.
The interpreter supports concurrent execution and garbage collection
in an especially nice way: it allows the student to choose which thread
to single-step or whether to do garbage collection (which "cleans up" the store).

Another kernel language interpreter, ozInOz, was developed by Yves Jaradin.
This one is available with full source code
here.

Lazy
quicksort and lazy
mergesort.
These are two examples to show how the smart use of lazy execution can create an efficient
incremental algorithm starting from a declarative algorithm.
Starting from an efficient sorting algorithm, we add lazy declarations
to create an incremental algorithm that efficiently calculates the smallest k
elements out of n without knowing k in advance.

Contract
Net Protocol.
This shows how to implement a contract net protocol in just three lines
using functional building blocks as concurrency patterns.

Observable
port objects.
This shows how to extend a port object to output a stream of the object's
internal states. This is another example of using functional building
blocks as concurrency patterns.

Partial
barrier synchronization.
This shows how to implement several variations on barrier synchronization.
The examples show when to stay in the declarative subset and when to use ports.
This is another example of using functional building blocks as concurrency patterns.

Multi-core execution.
This shows how to use Mozart's transparent distribution support to run programs
on multi-core processors to exploit all the cores.

Declarative memoization
by Lyle Kopnicky.
This shows how to do memoization by using lazy evaluation to build an infinite table
of results as they are needed.

The Oz Minesweeper
(paper).
This looks like the usual minesweeper game,
but it is extended with a digital assistant that uses
constraint programming to deduce squares that are known to be safe.
When it cannot deduce that a square is safe, it calculates the
probability that a square contains a mine, assuming a uniform
distribution of mines.
This program comes with complete source code for Mozart version 1.3.0 (which also runs on 1.4.0).

FlexClock
(paper).
This is a clock utility with a dynamically adaptive display.
It uses the powerful multiparadigm GUI library QTk to dynamically adapt
the display to changing window size.
This program comes with complete source code for Mozart version 1.4.0.

This is a third-year course on computer programming
for computer science majors.
The course covers about one half of the content of the book.
The course is given by Irene Langkilde-Geary
at Brigham Young University.
The course material including slides is available
here.
The main page of the course is
here.
This is probably the most thorough course using the book.

This is a full set of course material for
a second-year course on computer programming
for computer science majors.
The course follows the structure of the book
and covers approximately one third of its content.
Feel free to use and modify the course as you wish.
We ask only that you give credit to
Christian Schulte and Seif Haridi, who developed the course material.

More traditional approaches, such as starting with
object-oriented programming
or starting with functional programming and adding state,
are also possible with the book.
But we strongly discourage both of these approaches,
because they place too much emphasis on state, sequential programming,
and inheritance.
Instead, we encourage the use of composition
and higher-order programming instead of inheritance.
We give a broad view of data abstraction,
of which traditional object-oriented programming is just a part.
We show how to do concurrent programming
in a much simpler way than the usual
shared-state concurrency.

This course material was used by Seif Haridi
for CS2104,
a two semester-hour course given at the
National University of Singapore in the Fall 2003 semester.
Student evaluations at the end of the course were very positive;
typical quotes are "workload a bit too much ... but the assignments were great",
"great experience learning from him [Haridi]",
"very good tutorials and lectures",
"enjoyed this module very much".

The course material was developed by Seif Haridi and Christian Schulte,
based mainly on the course material developed for
Datalogi II
by Christian Schulte,
with some contributions from other sources.
Christian Schulte was awarded Best Teacher in Information Technology
at KTH for his Datalogi II course.

Lecture slides (more than 1100 slides)

Slides are given two to a page in PDF format.
They can be obtained in PowerPoint format upon request from Christian Schulte or Seif Haridi.

These slides were used for earlier second-year courses, in particular the
LINF1251 course at UCL and the original Datalogi II course at KTH.
We will release up-to-date versions of these slides during 2005.
In the meantime you may find these useful as raw material.
They cover some parts of the book better than the previous
course, such as data abstraction, higher-order programming, and object-oriented programming.
Feel free to use and modify the slides as you wish.
We ask only that you give credit to
Seif Haridi and Peter Van Roy, who developed the slides.
We would appreciate if you would make any improvements
available to the general community.

Other material for general programming courses

Some additional course material is available at
Datalogi II
(various materials, developed by Christian Schulte),
INGI2131
(lab sessions on concurrent programming, developed at UCL),
and
LINF1251
(various materials in French and some in English,
developed by Seif Haridi, Peter Van Roy, and Raphaël Collet).

Here are the slides and lab sessions for FSAC1450, a second-year course that takes eight weeks.
There is also an extended version, FSAB1402, that takes 12 weeks.
Both courses are in French and are described in detail in French on
this page.
A English-language course with similar goals is available
here.

The FSAC1450 course consists of seven two-hour lectures, six four-hour lab sessions, a test, and a final exam.
The course was given to all engineering students at UCL (around 300 students,
includes non-CS majors) in Fall 2004.
In my view, this is the best short programming course that we have developed so far.
It gives a self-contained and no-nonsense introduction to programming concepts,
covering declarative programming,
semantics, state, data abstraction including objects and abstract data types,
polymorphism, inheritance,
concurrency, and multi-agent systems.
As prerequisites, students must have had a first introduction
to programming and to simple mathematical concepts such as sets and lists.
After this course, students are ready to continue in many different directions, such as
object-oriented programming, concurrent programming,
software engineering, and theoretical computer science.

The course was developed by Peter Van Roy, with some inspiration from the two previous courses.
The lab sessions were developed by Raphaël Collet, Isabelle Dony,
Boris Mejías, and Luis Quesada.
Feel free to use and modify the course material as you wish.
We ask only that you give credit to the developers.
Here are the
official course Web site
and the
most up-to-date Web site.
The eight weeks are organized as follows:

Final exam: it counts for two thirds of the final grade
(exam questions).

The lecture slides and lab sessions for this course are in French.
UCL is a French-speaking university in Belgium.
See this site
for the most up-to-date course notes and explanation in French.
We may eventually translate them into English, if there is an opportunity.
In the meantime, here
is a bilingual English/French
glossary of all the technical terms used in the course.