Agent Programming in April

Keith L. Clark, Frank. G. McCabe


Abstract

This book is a tutorial introduction to programming internet distributed agent applications in April. A typical April application comprises a collection of publicly named processes, distributed over a network, communicating via message passing. Any April data value: symbol, string, number, list, record, closure or nested combination of such values, can be communicated. The communication is reliable, preserving order of communicated messages between any pair of proceses. It uses a special Internet-based protocol when the processes are in different April invocations, perhaps on different machines.

April processes are light weight and can be forked during a computation. The publically named processes, acting as agents, typically fork many auxilary local processes allowing intra-agent concurrency.

April is a pattern based language. April's patterns are an extension of and simplification of Prolog unification. In April we use pattern matching to select the appropriate message handling rule within a process, as a means of determining type correctness of the program, and, as a powerful extension to the basic list processing facilities. Pattern matching allows content based search of lists and the construction of new lists using logic based set expressions. Agent knowledge is represented as lists of tuples (the facts) augmented by recursive view functions defined using set expressions (the deduction rules).

April is a relatively small language with which to build multi-agent systems and other DAI applications. However, April is NOT an agent oriented programming language in the sense of Shoham. On the other hand, such a high-level language can be built as a language layer on top of April. April is more an object based concurrent language with active objects as processes which are sent messages invoking their methods. As argued by Gasser and Briot, this is a highly suitable base for extension to DAI and multi-agent application platforms.

April offers a simple and smooth interface to processes with code written in other programming languages such as ``C'' and Java.

The language had its origins in a European Research project on multi-agent systems in 1992. Since 1996 it has been jointly developed by Imperial College and Fujitsu Research Labs. The software and the reference manual can be downloaded and used under a GNU style open source licence from here .


L. Gasser and J-P. Briot, Object Based Concurrent Programming and DAI, in Distributed Artificial Intelligence: Theory and Praxis, eds. N. A. Avouris and L. Gasser, Kluwer, 1992.

Y. Shoham, Agent Oriented Programming, Artificial Intelligence, 60(1), 1993.


Draft of the first five chapters


Click here for a compressed PostScript version of the draft (apbook.ps.gz, 268944 bytes).