LISP and Symbolic Computation, 2(2)115-152

An Algebraic Specification of Method Combination for the Common Lisp Object System

Walter Olthoff, Hewlett-Packard Laboratories, 1501 Page Mill Road, Palo Alto, CA 94304
James Kempf, Sun Microsystems, 2550 Garcia Ave., MS 12-40, Mountain View, CA 94043

Abstract: The Common Lisp Object System (CLOS) is an extension of Common Lisp for object-oriented programming being designed as part of the ANSI X3J13 Common Lisp standardization process. This report describes an algebraic specification of the method combination and application component of CLOS. The specification is based on a draft of the standard presented to the ANSI committee in spring of 1987, and was done using an executable, typed functional programming language called Axis. The result suggests a logical mapping from the abstract datatypes and operations in the specification to the classes and methods which could become that part of the CLOS kernel (called the metaobject protocol) involved in method combination. In addition, the existence of a formal algebraic specification for CLOS allows the effects of changes in the language to be tested during the design phase, rather than during implementation. This is illustrated by showing how the language semantics change when the call-next-method function is allowed to take arguments, an extension proposed in the draft standard. Standardization documents like the CLOS standard are usually written in a semi-natural language, but if they are accompanied by an additional formal specification during their generation, the probability of undetected or lately discovered errors in the design decreases, and the specification also provides an unambiguous source of reference for implementors.

This article is not available online.
[picture of journal cover]

March 2003 - hosc@brics.dk