Definitions

This set of definitions, which are be used throughout this definition, is self-consistent but might not agree with notions accepted in other language definitions. The terms are defined in alphabetical rather than dependency order and where a definition uses a term defined elsewhere in this section it is written in italics. Some of the terms defined here are redundant. Names in typewriter font refer to entities defined in the language.

boolean: A boolean value is either false, which is represented by the empty list|written () and is also the value of ()|or true, which is represented by any other value than ().

class: A class is an object which describes the structure and behaviour of a set of objects which are its instances. A class object contains inheritance information and a set of slot descriptions which define the structure of its instances. A class object is an instance of a metaclass. All classes in EuLisp are subclasses of <object>, and all instances of <class> are classes.

defining form: Any form or any macro expression expanding into a form whose operator is one of defclass, defcondition, defconstant, defgeneric, deflocal, defmacro, defstruct, defun, or defvar.

direct instance: A direct instance of a class class1 is any object whose most specific class is class1 .

direct subclass: A class1 is a direct subclass of class2 if class1 is a subclass of class2 , class1 is not identical to class2 , and there is no other class3 which is a superclass of class1 and a subclass of class2 .

direct superclass: A direct superclass of a class class1 is any class for which class1 is a direct subclass.

dynamic environment: The inner and top dynamic environment, taken together, are referred to as the dynamic environment.

function: A function is either a continuation, a simple function or a generic function.

generic function: Generic functions are functions for which the method executed depends on the class of its arguments. A generic function is defined in terms of methods which describe the action of the generic function for a specific set of argument classes called the method's domain.

indirect instance: An indirect instance of a class class1 is any object whose class is an indirect subclass of class1 .

indirect subclass: A class1 is an indirect subclass of class2 if class1 is a subclass of class2 , class1 is not identical to class2 , and there is at least one other class3 which is a superclass of class1 and a subclass of class2 .

inheritance graph: A directed labelled acyclic graph whose nodes are classes and whose edges are defined by the direct subclass relations between the nodes. This graph has a distinguished root, the class <object>, which is a superclass of every class.

inherited slot description: A slot description is inherited for a class1 if the slot description is defined for another class2 which is a direct or indirect superclass of class1 .

initarg: A symbol used as a keyword in an initlist to mark the value of some slot or additional information. Used in conjunction with make and the other object initialization functions to initialize the object. An initarg may be declared for a slot in a class definition form using the initarg slot option or the initargs class option.

initform: A form which is evaluated to produce a default initial slot value. Initforms are closed in their lexical environments and the resulting closure is called an initfunction. An initform may be declared for a slot in a class definition form using the initform slot option.

initfunction: A function of no arguments whose result is used as the default value of a slot. Initfunctions capture the lexical environment of an initform declaration in a class definition form.

initlist: A list of alternating keywords and values which describes some not-yet instantiated object. Generally the keywords correspond to the initargs of some class.

inner dynamic: Inner dynamic bindings are created by dynamic-let, referenced by dynamic and modified by dynamic-setq. Inner dynamic bindings extend|and can shadow|the dynamically enclosing dynamic environment.

inner lexical: Inner lexical bindings are created by lambda and let/cc, referenced by variables and modified by setq. Inner lexical bindings extend|and can shadow|the lexically enclosing lexical environment. Note that let/cc creates an immutable binding.

instance: Every object is the instance of some class. An instance thus describes an object in relation to its class. An instance takes on the structure and behaviour described by its class. An instance can be either direct or indirect.

instantiation graph: A directed graph whose nodes are objects and whose edges are defined by the instance relations between the objects. This graph has only one cycle, an edge from <class> to itself. The instantation graph is a tree and <class> is the root.

lexical environment: The inner and top lexical environment of a module are together referred to as the lexical environment except when it is necessary to distinguish between them.

metaclass: A metaclass is a class object whose instances are themselves classes. All metaclasses in EuLisp are instances of <class>, which is an instance of itself. All metaclasses are also subclasses of <class>. <class> is a metaclass.

method: A method describes the action of a generic function for a particular list of argument classes called the method's domain. A method is thus said to add to the behaviour of each of the classes in its domain. Methods are not functions but objects which contain, among other information, a function representing the method's behaviour.

method specificity: A domain domain-1 is more specific than another domain-2 if the first class in domain-1 is a subclass of the first class in domain-2, or, if they are the same, the rest of domain-1 is more specific than the rest of domain-2.

multi-method: A method which specializes on more than one argument.

new instance: A newly allocated instance, which is distinct, but can be isomorphic to other instances.

reflective: A system which can examine and modify its own state is said to be reflective. EuLisp is reflective to the extent that it has explicit class objects and metaclasses, and user-extensible operations upon them.

self-instantiated class: A class which is an instance of itself. In EuLisp, <class> is the only example of a self-instantiated class.

setter function: The function associated with the function that accesses a place in an entity, which changes the value stored in that place.

simple function: A function comprises at least: an expression, a set of identifiers, which occur in the expression, called the parameters and the closure of the expression with respect to the lexical environment in which it occurs, less the parameter identifiers. Note: this is not a definition of the class <simple-function>.

slot: A named component of an object which can be accessed using the slot's accessor. Each slot of an object is described by a slot description associated with the class of the object. When we refer to the structure of an object, this usually means its set of slots.

slot description: A slot description describes a slot in the instances of a class. This description includes the slot's name, its logical position in instances, and a way to determine its default value. A class's slot descriptions may be accessed through the function class-slot-descriptions. A slot description can be either direct or inherited.

slot option: A keyword and its associated value applying to one of the slots appearing in a class definition form, for example: the accessor keyword and its value, which defines a function used to read or write the value of a particular slot.

slot specification: A list of alternating keywords and values (starting with a keyword) which represents a not-yet-created slot description during class initialization.

special form: A special form is a semantic primitive of the language. In consequence, any processor (for example, a compiler or a code-walker) need be able to process only the special forms of the language and compositions of them.

specialize: A verbal form used to describe the creation of a more specific version of some entity. Normally applied to classes, slot-descriptions and methods.

specialize on: A verbal form used to describe relationship of methods and the classes specified in their domains.

subclass: The behaviour and structure defined by a class class-1 are inherited by a set of classes which are termed subclasses of class-1. A subclass can be either direct or indirect or itself.

superclass: A class-1 is a superclass of class-2 iff class-2 is a subclass of class-1. A superclass can be either direct or indirect or itself.

top dynamic: Top dynamic bindings are created by defvar, referenced by dynamic and modified by dynamic-setq. There is only one top dynamic environment.

top lexical: Top lexical bindings are created in the top lexical environment of a module by defclass, defcondition, defconstant, defgeneric, defmacro, defstruct, defun. All these bindings are immutable. deflocal creates a mutable top-lexical binding. All such bindings are referenced by variables and those made by deflocal are modified by setq. Each module defines its own distinct top lexical environment.


Julian Padget, jap@maths.bath.ac.uk, this version December 21, 1994