[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Glossary (enclosed)
- To: rpg@sail.stanford.edu, lgd@sail.stanford.edu
- Subject: Glossary (enclosed)
- From: Sonya E. Keene <skeene@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Wed, 11 Mar 87 16:04 EST
- Cc: common-lisp-object-system@sail.stanford.edu
The Glossary would be helpful for the X3J13 audience. I've written one
up, by taking the definitions out of the text of the document, mostly
verbatim. In case you want to see where the definition came from, the
list below shows the page number of each definition.
Would you format the Glossary and have it copied in time for next week's
meeting? Please also write it to the standard places in the CLS,LSP
directory. I would do so myself, if only I knew the password.
-----------------------
Page References in CLOS Document for Glossary Entries
:after method 1-24
:around method 1-24
:before method 1-24
accessor 1-6
applicable method 1-21
auxiliary method 1-20
class 1-3
class precedence list 1-4
declarative method combination 1-25
default method 1-19 and Errata
direct subclass 1-4
direct superclass 1-4
effective method 1-21
generic function 1-3
instance 1-3
local precedence order 1-4
local slot 1-6
metaclass 1-4
method 1-3
method combination
parameter specializer 1-18, 1-19
parameter specializer name 1-18, 1-19
primary method 1-20
qualified method 1-19
qualifier 1-19
qualifiers 1-18
reader 1-6
setf generic functions 1-18 and Errata
setf methods 1-18 and Errata
shared slot 1-6
slot 1-5 and Errata
slot description 1-7, 2-17
slot specifier 1-7, 2-17
specialized lambda list 1-18 and Errata
standard method combination 1-26
standard-class 1-26
standard-generic-function 1-26
standard-type-class 1-26
structure-class 1-26
subclass 1-4
superclass 1-4
unqualified method 1-19
-----------------------------------------------------
\input macros
\def\bookline{\CLOS\ Specification}
\def\chapline{Glossary}
\beginChapter 4.{Common Lisp Object System Specification}%
{Glossary}{Glossary}
\endTitlePage
\beginSection{Introduction}
The terminology is introduced in this document the first time each term
is used. This section presents the terms in alphabetical order, for
easy reference.
\endSection%{Introduction}
\beginSection{Glossary}
{\bit Accessible slot\/}:
We say that a slot is accessible in an instance of a
class if the slot is defined by the class of the instance or
is inherited from a superclass of that class. At most one slot
of a given name can be accessible in an instance.
{\bit Accessor\/}:
When a slot has an accessor, this means it has two generic functions,
one for reading the value of the slot, and another for writing the value
of the slot. The mechanism for writing is to use {\bf setf} with the
reader generic function. {\bf defclass} has options for automatically
generating methods for slot accessors; these methods are implemented by
using {\bf slot-value} and are added to the appropriate generic
functions. It is possible to modify the behavior of these generic
functions by writing methods for them.
{\bit :after method\/}:
In standard method combination, an {\bf :after} method has the keyword
{\bf :after} as its only qualifier. An {\bf :after} method specifies
code that is to be run after the primary method.
{\bit Applicable method\/}:
Given a generic function and a set of arguments, the applicable methods
are all methods for that generic function whose parameter specializers
are satisfied by their corresponding arguments.
{\bit :around method\/}:
In standard method combination, an {\bf :around} method has the keyword
{\bf :around} as its only qualifier.
{\bit Auxiliary method\/}:
In standard method combination, a qualified method has the role of
auxiliary method; an auxiliary method modifies the main action of the
effective method in some way. Standard method combination allows zero
qualifiers or a single qualifier, which is one of: {\bf :after}, {\bf
:before}, or {\bf :around}.
{\bit :before method\/}:
In standard method combination, a {\bf :before} method has the keyword
{\bf :before} as its only qualifier. A {\bf :before} method specifies
code that is to be run before the primary method.
{\bit Class\/}:
An object that describes the structure and behavior of a set of objects,
which are called its instances. Every Lisp object is an instance of a
class, and can be queried for its class by using the {\bf class-of}
function. The class of an object determines the set of
operations that can be performed on the object. {\bf defclass} is
used to define new classes.
{\bit Class precedence list\/}:
A total ordering of the set of the given class and its superclasses.
The total ordering is expressed as a list ordered from most specific to
least specific. The class precedence list is used in several ways.
The method selection and combination process uses the class precedence
list to order methods from most specific to least specific. Similarly,
the process of determining slot characteristics uses the class
precedence list to order slot specifiers from most specific to least
specific.
{\bit Declarative method combination\/}:
The programmer can use the {\bf define-method-combination} macro to
define new forms of method combination. The method-combination type
controls the selection of methods, the order in which they are run, and
the values that are returned by the generic function.
There are two forms of {\bf define-method-combination}. The short form
is a simple facility for the cases that have been found to be most
commonly needed. The long form is more powerful but more verbose; it
allows arbitrary control structures to be implemented, and arbitrary
processing of method qualifiers.
{\bit Default method\/}:
A method all of whose parameter specializers are the class named {\bf t}
is a default method. Note that if a parameter has no specializer, it
is the same as having a parameter specializer of {\bf t}, since {\bf t}
is the class of all objects. A default method is always applicable, but
is often shadowed by a more specific method.
{\bit Defining a slot\/}:
We say that a class {\it defines\/} a slot with a given name
when the {\bf defclass} form for that class contains a slot
specifier with that name. Defining a local slot does not
immediately create a slot; it causes a slot to be created each
time an instance of the class is created. Defining a shared slot
creates a slot.
{\bit Direct superclass and subclass\/}:
The direct superclasses of a class are those classes that are included
explicitly in the superclass list in the {\bf defclass} form. Class A
is a direct subclass of class B if B is a direct superclass of A.
{\bit Effective method\/}:
When a generic function is called with particular arguments, it must
decide what code to execute. We call this code the effective method for
those arguments. The effective method can be one of the methods for the
generic function, or a combination of several of them.
{\bit Generic function\/}:
A function whose behavior depends on the classes or identities of the
arguments supplied to it. A generic function comprises a set of
methods, a lambda-list, a method-combination type, and possibly some
options. The methods define the class-specific behavior and operations
of the generic function. Thus, generic functions are objects that may
be specialized by defining methods to provide class-specific operations.
When a generic function is invoked, the classes of its required
arguments determine which methods will be invoked. The behavior of the
generic function results from which methods are selected for execution,
the order in which the selected methods are called, and how their values
are combined to produce the value or values of the generic function.
{\bit Instance\/}:
Every Lisp object is an instance of some class. The term instance is
used to describe the instance/class relationship of an object to its
class. {\bf make-instance} is used to create new instances of classes
which were defined by {\bf defclass}.
{\bit Local precedence order\/}:
When a class is defined, the order in which its direct superclasses are
mentioned in the defining form is important. Each class has a local
precedence order, which is a list consisting of the class followed by
its direct superclasses in the order mentioned in the defining form.
{\bit Local slot\/}:
A local slot is local to an individual instance. A local slot is
created by giving {\bf :instance} or {\bf :dynamic} as the value of the
{\bf defclass} {\bf :allocation} slot option, or by providing a slot
specifier that omits the {\bf :allocation} slot option (since {\bf
:instance} is the default).
{\bit Metaclass\/}:
Classes are represented by objects that are themselves
instances of classes. The class of the class of an object is termed
the metaclass of that object. The metaclass determines the form of
inheritance used by the classes that are its instances and the
representation of the instances of those classes. The \CLOS\ provides
a default metaclass that is appropriate for most programs; it is called
{\bf standard-class}. The meta-object protocol will allow for defining
and using new metaclasses.
{\bit Method\/}:
An object that defines the class-specific behavior and operations of the
generic function. Each required formal parameter of each method has an
associated parameter specializer, and the method is expected to be
invoked only on arguments that satisfy its parameter specializers. A
method object contains a method function, a set of parameter
specializers that specify when the given method is applicable, and a set
of qualifiers that are used by the method combination to distinguish
among methods.
{\bit Method combination\/}:
Each generic function contains a method-combination type, which controls
the selection of methods, the order in which they are run, and the
values that are returned by the generic function. The \CLOS\ offers a
default method combination type that is appropriate for most user
programs; it is called standard method combination. The \CLOS\ also
provides a facility for declaring new types of method combination for
programs that require them.
{\bit Parameter specializer\/}:
Each method has an ordered set of parameter specializers, that specify
when the given method is applicable. Only required parameters can be
specialized, and there must be a parameter specializer for each required
parameter. For notational simplicity, if some required parameter in a
specialized lambda-list is simply a variable name, its parameter
specializer defaults to the class named {\bf t}.
Parameter specializers are used in the functional interface ({\bf
make-method} and {\bf get-method}).
A parameter specializer name denotes a parameter specializer as follows:
Let $N$ be a parameter specializer name and $P$ be the corresponding
parameter specializer; if $N$ is a class name, then $P$ is the class with
that name; otherwise $N$ equals $P$.
{\bit Parameter specializer name\/}:
Parameter specializer names are used in macros intended as the
user-level interface ({\bf defmethod} and {\bf defmethod-setf}).
Every parameter specializer name is a Common Lisp type specifier, but
the only Common Lisp type specifiers that are valid as parameter
specializer names are: the name of any class, or a list of the form
{\tt ({\bf quote} {\it object\/})}.
{\bit Primary method\/}:
In standard method combination, an unqualified method has the role of
primary method; a primary method defines the main action of the
effective method. For types of method combination defined using the
short form of {\bf define-method-combination}, primary methods are
defined to include not only the unqualified methods, but certain others
as well.
{\bit Qualified method\/}:
A method that has one or more qualifiers is called a {\bit qualified\/}
method.
{\bit Qualifier\/}:
Each method has an ordered set of qualifiers that are used by the method
combination facility to distinguish among methods.
A qualifier is any object other than a list; in other words,
any non-{\bf nil} atom. By convention, qualifiers are usually keyword
symbols.
Standard method combination allows zero qualifiers or a single
qualifier, which is one of: {\bf :after}, {\bf :before}, or {\bf
:around}.
{\bit Reader generic function\/}:
A generic function that enables you to read the value of a slot. {\bf
defclass} has options for automatically generating methods for readers;
these methods are implemented by using {\bf slot-value} and are added to
the appropriate generic functions. It is possible to modify the
behavior of these generic functions by writing methods for them.
{\bit SETF generic function\/}:
A {\bf setf} generic function is called in an expression
such as: ({\bf setf} ({\it symbol arguments\/}) {\it
new-value\/}). One example of {\it symbol\/} is a slot
reader. The macro {\bf defgeneric-options-setf} is used to define
a {\bf setf} generic function.
{\bf setf} generic functions do not have names. The macros {\bf
defmethod-setf} and {\bf defgeneric-options-setf} use {\bf
get-setf-generic-function} to find the generic function they affect.
{\bit SETF method\/}:
A method for a {\bf setf} generic function. {\bf defmethod-setf} is
used to write a {\bf setf} method.
{\bit Shared slot\/}:
A shared slot is shared by all instances of a given class. A shared
slot is created by giving {\bf :class} as the value of the {\bf defclass}
{\bf :allocation} slot option.
{\bit Slot\/}:
An object has zero or more named slots. An object's set of slots is
determined by the object's class. Each slot can hold one value. There
are two kinds of slots: slots that are local to an individual instance
and slots that are shared by all instances of a given class. The {\bf
:allocation} slot option controls the kind of slot that is defined. If
the value of the {\bf :allocation} slot option is {\bf :instance} or
{\bf :dynamic}, a local slot is created. If the value of the {\bf
:allocation} slot option is {\bf :class}, a shared slot is created.
{\bit Slot description\/}:
Another term for slot specifier.
{\bit Slot specifier\/}:
A slot specifier is part of the syntax of {\bf defclass}. A slot
specifier contains the name of a slot, and zero or more slot-options.
{\bit Specialized lambda list\/}:
Each method has a specialized lambda-list, which determines
when that method can be selected. A specialized lambda-list is like
an ordinary lambda-list except that a specialized parameter may occur
instead of the name of a parameter.
{\bit Specialized parameter\/}:
A specialized parameter is a list,
{\tt ({\it variable-name parameter-specializer-name\/})}.
{\bit Standard method combination\/}:
Standard method combination is the name of the default method
combination type.
{\bit Standard-class\/}:
The class {\bf standard-class} is the default class of
classes defined by {\bf defclass}.
{\bit Standard-generic-function\/}:
The class {\bf standard-generic-function} is the default class of
generic functions defined by {\bf defmethod}, {\bf defmethod-setf},
{\bf defgeneric}, or {\bf defgeneric-setf}.
{\bit Standard-method\/}:
The class {\bf standard-method} is the default class of
methods defined by {\bf defmethod} or {\bf defmethod-setf}.
{\bit Standard-type-class\/}:
The class {\bf standard-type-class} is a metaclass of all the classes
that correspond to the standard Common Lisp types specified in {\it
Common Lisp: The Language\/} by Guy L. Steele Jr. The classes whose
metaclass is {\bf standard-type-class} are called standard-type-classes.
For example {\bf array} is a standard-type-class;
{\bf array} is the name of the class for objects of type {\bf array}.
It is not allowed to make an instance of a standard-type-class with {\bf
make-instance}, or to include a standard-type-class as a superclass of a
class.
{\bit Structure-class\/}:
The class {\bf structure-class} is a subclass of {\bf
standard-type-class}. All classes defined by means of {\bf defstruct}
are instances of {\bf structure-class} or a subclass of {\bf
structure-class}.
{\bit Subclass and superclass\/}:
A class whose definition refers to other classes for the purpose of
inheriting from them is said to be a {\bf subclass} of each of those
classes. The classes that are designated for purposes of inheritance
are said to be {\bf superclasses} of the inheriting class. Note that a
class is not considered a subclass nor a superclass of itself.
The set of subclasses of a class is the transitive closure of its direct
subclasses. The set of superclasses of a class is the transitive
closure of its direct superclasses.
{\bit T\/}:
There is a distinguished class named {\bit T\/}. It has no
superclasses, and is a superclass of every class except itself.
{\bit Unqualified method\/}:
A method that has no qualifiers is called an {\bit unqualified\/}
method.
\endSection%{Glossary}
\endSection
\endChapter
\bye