American University Tour (Nov. 7-11, 2005)

During the week of Nov. 7, I visited five American universities and gave talks about our approach to teaching programming and about our approach to network-transparent distributed programming. The abstracts and slides of the talks are given below. The schedule was as follows:

Abstracts and slides of the talks

Teaching programming both broadly and deeply: the concepts-based approach

by Peter Van Roy


The purpose of this talk is to present our main insights and experience in teaching programming both broadly and deeply. By broadly we mean that it covers all major programming paradigms and concepts in a simple framework that shows exactly how they relate to each other. By deeply we mean that we give a simple formal semantics that covers the whole framework and that can be understood and used by second-year students to reason about programs. Our approach is practical as well: we use an interactive programming system that runs all the programs in the framework, so the students can build intuition as well as deep understanding. We start with a small language containing just a few concepts. We show how to design, write programs, and reason in this language. We then add concepts one by one to overcome limitations in expressiveness. In this way, we cover all major programming paradigms. We have been able to apply this approach more thoroughly than has been done before by drawing on results from a long-term research collaboration in programming language design and implementation done by an international group.

In this talk, we go into many of the details of our approach: we present the language concepts, how they were chosen (the creative extension principle), their semantics, some highlights (such as dataflow concurrency, objects versus abstract data types, and graphical user interfaces) and how we teach them, and the outlines of several courses that we have taught. We have published a comprehensive textbook with MIT Press in 2004, "Concepts, Techniques, and Models of Computer Programming", and we make available a high-quality programming platform, the Mozart Programming System, under an Open Source license at We have taught with the approach since 2001 in second-year through graduate courses, at the Royal Institute of Technology (KTH) in Sweden, the Université catholique de Louvain in Belgium, and the National University of Singapore. The approach is currently being used in more than a dozen universities in the United States and other countries.

Network-transparent distributed programming in Mozart: principles, practice, and protocols

by Peter Van Roy


Distributed programming is usually considered difficult; and it is indeed difficult with mainstream languages. We show how to greatly simplify distributed programming by starting with an appropriate language, Oz, and distributing it with network transparency. In the network-transparency approach, a program can be distributed over many nodes without changing its source code. The semantics of the program's execution does not depend on how the program is distributed. This can work well because the Oz language clearly distinguishes between stateless (immutable), stateful (mutable), and single assignment entities. We then choose a distributed protocol to implement each language entity. By choosing the protocol wisely, we can obtain an efficient and predictable network behavior.

For example, objects are an example of a stateful entity. They can be distributed in several ways: as stationary objects (the usual RMI style), as cached (mobile) objects, or as invalidation-based objects. Functions are an example of a stateless entity. They can simply be copied between nodes, using either an eager or a lazy protocol. The Oz language also supports dataflow and asynchronous execution. Since distributed systems are subject to partial failure (part of the system fails but the rest keeps running), we support fault detection in the language. This lets us build fault-tolerance abstractions (such as a transactional replicated object store) without leaving the language. We also support open distributed computing, in which independent computations can connect with each other.

I will conclude the talk with our plans for future work: factoring the distributed protocols out of the implementation, making the system reflective (allowing routing to be done at the Oz level), making the language and implementation capability secure, and combining structured overlay networks (which grew from peer-to-peer systems) with concurrent components. We have realized these ideas in the Mozart Programming System, which is available at under an Open Source license. We welcome new users and developers for the ongoing work on Mozart.