This set of definitions, which are be used throughout this document, 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. Names in courier font refer to entities defined in the language.
A Class that by definition has no direct instances.
A method is applicable for a particular set of arguments if each element in its domain is a superclass of the class of the corresponding argument.
A location containing a value.
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.
Each class has a linearised list of all its super-classes, direct and indirect, beginning with the class itself and ending with the root of the inheritance graph, the class <object>. This list determines the specificity of slot and method inheritance. A class’s class precedence list may be accessed through the function class-precedence-list. The rules used to compute this list are determined by the class of the class through methods of the generic function compute-class-precedence-list.
A keyword and its associated value applying to a class appearingin a class definition form, for example: the predicate keyword and its value, which defines a predicate function for the class being defined.
A first-class function with free variables that are bound in the lexical environment. Such a function is said to be “closed over” its free variables. Example: the function returned by the expression (let ((x 1)) #’(lambda () x)) is a closure since it closes over the free variable x.
A constraint on the form of the lambda-list of a method, which requires it to have the same number of elements as the generic function to which it is to be attached.
A continuation is a function of one parameter which represents the rest of the program. For every point in a program there is the remainder of the program coming after that point; this can be viewed as a function of one argument awaiting the result of that point. The current continuation is the continuation that would be derived from the current point in a program’s execution, see let/cc.
The generic function associated with a class (the target) that is used to project an instance of another class (the source) to an instance of the target.
Any form or syntax expression expanding into a form whose operator is a defining operator.
One of defclass, defcondition, defconstant, defgeneric, deflocal, defsyntax, defun, or defglobal.
A direct instance of a class class1 is any object whose most specific class is class1.
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.
A direct superclass of a class class1 is any class for which class1 is a direct subclass.
The inner and top dynamic environment, taken together, are referred to as the dynamic environment.
A lifetime constraint, such that the entity is created on control entering an expression and destroyed when control exits the expression. Thus the entity only exists for the time between control entering and exiting the expression.
An access constraint, such that the scope of the entity is limited to the dynamic extent of the expression that created the entity.
That lifetime for which an entity exists. Extent is constrained to be either dynamic or indefinite.
First-class entities are those which can be passed as parameters, returned from functions, or assigned into a variables.
A function is either a continuation, a simple function or a 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.
An identifier is the syntactic representation of a variable.
A lifetime constraint, such that the entity exists for ever. In practice, this means for as long as the entity is accessible.
An indirect instance of a class class1 is any object whose class is an indirect subclass of class1.
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.
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.
8.28 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.
A keyword used 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 keyword may be declared for a slot in a class definition form using the keyword slot-option or the keywords class-option.
A form which is evaluated to produce a default initial slot value. Defaults are closed in their lexical environments and the resulting closure is called a default-function. A default may be declared for a slot in a class definition form using the default slot-option.
A function of no arguments whose result is used as the default value of a slot. default-functions capture the lexical environment of a default declaration in a class definition form.
A list of alternating keywords and values which describes some not-yet instantiated object. Generally the keywords correspond to the keywords of some class.
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 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.
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.
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 instantiation graph is a tree and <class> is the root.
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.
An access constraint, such that the scope of the entity is limited to the textual region of the form creating the entity. See also lexically closer and shadow.
A syntax operator is distinguished by when it is used: syntax operators are only used during the syntax expansion of modules to transform expressions.
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.
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.
A function which implements the behaviour of a particular method. Method functions have special restrictions which do not apply to all functions: their formal parameter bindings are immutable, and the special operators call-next-method and next-method? are only valid within the lexical scope of a method function.
A domain domain1 is more specific than another domain2 if the first class in domain1 is a subclass of the first class in domain2, or, if they are the same, the rest of domain1 is more specific than the rest of domain2.
A method which specializes on more than one argument.
A newly allocated instance, which is distinct, but can be isomorphic to other instances.
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.
That part of the extent in which a given variable is accessible. Scope is constrained to be lexical, dynamic or indefinite.
A class which is an instance of itself. In EULISP, <class> is the only example of a self-instantiated class.
The function associated with the function that accesses a place in an entity, which changes the value stored in that place.
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>.
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.
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-slots. A slot description can be either direct or inherited.
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.
A list of alternating keywords and values (starting with a keyword) which represents a not-yet-created slot description during class initialization.
Any form or syntax expression expanding into a form whose operator is a special operator. They are semantic primitives of the language and 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.
One of a-special-form, call-next-handler, call-next-method, dynamic, dynamic-let, dynamic-setq, if, letfuns, lambda, let/cc, next-method?, progn, quote, setq, unwind-protect, or with-handler.
A verbal form used to describe the creation of a more specific version of some entity. Normally applied to classes, slots and methods.
A verbal form used to describe relationship of methods and the classes specified in their domains.
The behaviour and structure defined by a class class1 are inherited by a set of classes which are termed subclasses of class1. A subclass can be either direct or indirect or itself.
A class1 is a superclass of class2 iff class2 is a subclass of class1. A superclass can be either direct or indirect or itself.
Top dynamic bindings are created by defglobal, referenced by dynamic and modified by dynamic-setq. There is only one top dynamic environment.
Top lexical bindings are created in the top lexical environment of a module by a defining form. All these bindings are immutable except those created by deflocal which 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.