CS2104 Programming Language Concepts,
an undergraduate course
given to first and second year students
at the National University of Singapore by Seif Haridi (Fall 2003)
and Wei-Ngan Chin and Stefan Andrei (Fall 2004-5).
Datalogi II,
a second-year introduction to programming concepts
for both CS majors and non CS majors
given at the Royal Institute of Technology (KTH), Sweden,
by Seif Haridi
(Fall 2001),
Christian Schulte
(Fall 2002-3),
and Dilian Gurov (Fall 2004-5).
Informatique 2 (FSAB1402) (Fall 2005),
Informatique T4
(FSAC1450) (Fall 2004), and
LINF1251
(Spring 2002-5),
all second-year introductions to computer programming,
INGI2131,
a third-year introduction to concurrent programming (Spring 2003-5), and
INGI2650, a third-year introduction
to the structure of algorithmic languages (Fall 2001),
all at the Université catholique de Louvain,
Louvain-la-Neuve, Belgium, by Peter Van Roy.
CS532, a graduate course
on declarative programming (Fall 2001-3),
and CS437, a fourth-year course
on distributed systems (Spring 2001),
both given at Cairo University, Egypt, by Reem Bahgat.
Programmierkurs
Mozart, a graduate course on declarative
and constraint programming given at the University of Dortmund,
Germany, by Stephan Lehmke and Hubert Wagner (Summer 2003).
EE590, a graduate course on distributed computing (Fall 2001),
and EE490/590, a graduate course
on programming concepts,
both given at New Mexico State University, Las Cruces,
by Juris Reinfelds (Spring 2002).
Partial courses
Some courses that use the book
for a significant part of their course material:
Constraint
Programming,
an undergraduate course
given at the Universidad del Valle (Cali, Colombia)
by Juan Francisco Díaz Frias (Spring 2004).
PC111,
a final-year optional course on constraint programming
given at the Pontificia Universidad Javeriana (Cali, Colombia)
by Camilo Rueda (Spring 2004).
CS5340, Advanced Operating Systems and Distributed Computing,
a graduate course given at
the University of Texas at El Paso
by Juris Reinfelds (Spring 2004).
CS5223,
an introduction to distributed systems, algorithms, and computing
given at the National University of Singapore by Seif Haridi (Spring 2004).
2G1915, a fourth-year course on concurrent programming
given at KTH by Vladimir Vlassov (Spring 2002).
INGI2655, a fourth-year introduction to the semantics of
programming languages,
given at the Université catholique de Louvain,
Louvain-la-Neuve, Belgium, by Peter Van Roy (Spring 2002-3).
SOFTENG 325 SC,
a third-year course on software architecture
given at the University of Auckland, New Zealand.
The course consists of three parts; the first part uses the book.
The first part is taught by John Hamer (Summer 2003).
EE590, a graduate course on distributed computing
given at New Mexico State University, Las Cruces, by Juris Reinfelds (Fall 2001).
The concepts-based approach for teaching programming
Scientific foundation
The book's scientific foundation is
the kernel language approach.
In this approach,
practical programming languages are defined by translating them
to kernel languages that consist of
a small number of programmer-significant concepts.
A wide variety of programming languages and paradigms
can be defined as subsets of a general kernel language.
The general language
is easy to understand by practicing programmers
and has a simple formal semantics
that allows programmers to reason
about correctness and complexity at a high level of abstraction.
The simplicity of the semantics means that
the language's behavior is easily predicted.
Even if programmers do not use the semantics directly,
its mere existence ensures that there are no
unpleasant surprises.
The semantics supports whatever degree of formality
best suits the problem: from the most rigorous formal methods
to the most intuitive craftsmanship.
The two approaches most similar to the kernel language approach are
the foundational calculus and the virtual machine.
We explain how
the kernel language approach differs from these approaches.
A foundational calculus, like the
lambda-calculus or pi-calculus, reduces programming
to a minimal number of primitive concepts.
This is especially useful
for the theoretical study of computation.
A virtual machine defines a language in terms of
an implementation on an idealized machine.
This is especially useful for language implementors and compiler writers.
The problem with both approaches is that any realistic program written
in them will be cluttered with technical details about language mechanisms.
The kernel language approach
avoids this clutter by choosing concepts wisely.
The kernel languages are designed for programmers.
How concepts lead to multiparadigm programming
We define the precise concept of computation model to
capture the intuitive concept of “programming paradigm”.
Each kernel language is the basis of a computation model.
The book introduces more than twenty computation models
in a uniform framework and in a progressive way.
Programming paradigms appear as a kind of epiphenomenon,
depending on which concepts one uses.
We examine the relationships between
the models and show how and why
to use different models together in the same program.
This leads to multiparadigm programming
in a completely natural way.
Often models that seem vastly different have
kernel languages that differ only in one concept
(e.g., this is the case for
declarative versus object-oriented programming).
General models covered include
declarative programming (functional and logic),
imperative programming (component-based and object-oriented),
and concurrent programming (both synchronous and asynchronous,
including dataflow, streams, lazy execution,
message passing, and shared state).
Specialized models covered include
graphical user interface programming,
distributed programming,
and constraint programming.
All models are fully implemented
for practical programming and
incorporate many of the latest research ideas.
The current trend in computer science education
is to restrict the student to one or two models.
The most extreme case is where
a single rather complex model and language,
namely object-oriented programming in Java,
is used as a general-purpose approach
with which all problems should be solved.
This trend is driven by market forces and
has no scientific basis.
One goal of the book is to be a counterweight to this trend,
to situate object-oriented programming in a more general context.
In addition to giving the student a deep insight,
this has immediate practical benefits.
Many problems that are hard to solve in Java
become simple when viewed in the proper computation model.
For example, both concurrent programming and graphical user interface
design are difficult in Java.
The book shows how these two areas can be much simplified.
History
The Mozart Board
The Mozart system is being actively developed by the Mozart
community, with the guidance and responsibility of a core group,
the Mozart Board.
The Mozart Programming System was originally developed
by Gert Smolka and his research group at Saarland University
in the early 1990s. At that time it was called DFKI Oz.
In 1999, development continued with an international group,
the Mozart Consortium, that consisted of Saarland University,
the Swedish Institute of Computer Science, and the Université
catholique de Louvain.
In 2005, the responsibility for managing Mozart development
was transferred to the Mozart Board, with the express purpose
of opening Mozart development to a larger community.
The authors
The authors have been collaborating closely since 1995.
They started writing the textbook in 1999.
Both have extensive experience in different
areas of computer science including
hardware and software systems,
programming language design and implementation,
parallel and distributed systems,
simulation,
logic and constraint programming,
and application development.