Mechanising this notion — an idea which arose from the need to build simulations in my AI teaching, gives us SLP, a completely declarative way of building object-oriented programs. To describe a system using SLP, you need to specify three things:
The list above shows that SLP programs can be extremely modular. In essence, a program consists of little chunks of logic. Each chunk describes a particular object or interaction, and hence can be understood without knowledge of any other chunk. SLP's notion of modularisation goes further than this and allows the programmer to construct (for example) system ``skeletons'' which can be stored in files and later fetched back, filled in with the missing components, and run. In Model Master, for example, such a skeleton could act like a template describing the interaction between a set of companies and their customers and suppliers. The programmer could store this, and reuse it later, filled in with details of particular companies and markets.
I'm experimenting with SLP for building my AI courseware. Amongst other things, this involves the development of specification methods for abnormal behaviour of objects in simulations. [More details to be added]
It seems also that SLP can be used as a way of constructing agents, where the ``objects'' are behaviours, rather in the sense of Rodney Brooks' subsumption architecture. Some of the inheritance morphisms then correspond to subsumption. Using this notion, we can derive something rather like Nilsson's teleo-reactive agents, but can also integrate with planners and other not-necessarily reactive agents. Categorical methods will one day give us a general framework and language for unifying agent construction.
As a member of KB7, I'm also participating in the development of various SLP-based programming tools, including Model Master, Web-O-Matic, and an object-oriented logic-programming system.
Goguen's work on sheaves started in GST, as an investigation into the question of what is an object — in the everyday sense of the word, not just that of OOP — and of what it means for objects to be composed into systems. He shows, using ``sheaf semantics'', how any object's behaviour can be described using a particular mathematical formalism, similar to what physicists call a phase space trajectory. The interactions between objects can be described in the same way. Given this information, together with a specification of the shape of a system — what objects it contains, and which interactions they share — it is then possible to calculate a description of the entire system's behaviour. He has applied these ideas to explaining inheritance, deadlock, and other phenomena in systems of concurrent interacting objects. His formalism is so general that it applies not only to software, but also to electronic systems, systems of interacting differential equations, and many other non-computational systems.
To know how, we need another branch of mathematics, ``category theory''. For the non category-theorist, a category is a mathematical structure, in the same way that a group, set, or vector space is. There are operations for constructing new categories and parts of categories, from old. Categories can be studied as mathematical structures in their own right, but one can also use them as ``containers'' or ``workspaces'' which hold other mathematical or computational structures, such as logics, or — as here — object and system descriptions.
[More to be added. The defects of OOP, and the idea of methodless programming.]
13th January 1998.
[ Jocelyn Ireson-Paine's Home Page ]