Aldwych Tutorial

Matthew Huntbach

Department of Computer Science
Queen Mary, University of London

This is the first attempt at a tutorial for the concurrent object-oriented language Aldwych, which I have been developing. Aldwych compiles into the concurrent logic language KLIC, which in turn compiles into C. The language is object-oriented in the Actors usage of the word, rather than in the Smalltalk usage (that is, while it can be considered as creating a community of interacting objects, it does not have inheritance).

As a tutorial, this describes the language in a way in which the features can be gradually picked up by working through it rather than in a way that is more complete but harder to grasp step by step. As the language bears little resemblance to other languages (although it has features from a variety of paradigms), there are no models I have to work from to suggest the best order to present its features. The order used here is deliberately different from that used in various papers that describe the language. This is because previous papers have described it in terms of its implementation and origin rather than as a finished product.

The full intention of Aldwych is that it is a language which is naturally concurrent, but concurrency is not dealt with in this short tutorial. There have also been a few minor changes in the details of the language since this tutorial was written. Although the current version compiles into KLIC, a better implementation would compile into the core language of Aldwych, which is a subset of the language whose operation is completely defined by operational rules. KLIC is used because the core language is not yet implemented.

Contents

1) Introduction and simple input/output
2) Simple objects
3) Expressions and single rule procedures
4) Selection
5) Lists and Compound Rule Conditions
6) Functions
7) States and streams
8) Nested rule selection
9) Object behaviour change
10) Local procedures