clostrum
First-class global environments for Common Lisp.
Table of Contents
Most Common Lisp implementations have a single global environment, and it is spread out in various parts of the system. For example, the definition of a named function may be contained in a slot of the symbol representing the name, whereas the definition of a type might be in a hash table that is the value of a special variable.
In the paper First-class Global Environments in Common Lisp, presented at the European Lisp Symposium in 2015, we outlined a protocol for an alternative way of representing global environments, namely as first-class instances of a standard classes. This library is a concrete implementation of the ideas in that paper, though improved upon since.
We provide protocols and default implementations for the three kinds of global environments mentioned in the Common Lisp standard, namely the run-time environment, the evaluation environment and the compilation environment.
The use of a client parameter for our protocol generic functions allows client code to customize the functions defined here, either by extending them or by overriding them. Similarly, the classes defined here are designed to be possible to use as superclasses of client-specific environment classes.
API
The Clostrum API is divided into two parts, a "high level" package clostrum
, and a "low level" package clostrum-sys
. clostrum-sys
has generic functions that access environments directly and simply, without error checking, while clostrum
's generic functions mimic standard Common Lisp operators' more complex behavior and account for inheritance. clostrum
has default methods implemented in terms of clostrum-sys
, so environment implementation need only specialize the clostrum-sys
functions in order to make clostrum
's high level facilities available. Users (rather than implementors) of the Clostrum protocol should only need to use the clostrum
package.
High level interface
For operating on run-time environments, the clostrum
package makes available environment manipulation functions and accessors similar to those in the standard: fdefinition
, fboundp
, fmakunbound
, macro-function
, special-operator-p
for functions; symbol-value
, boundp
, makunbound
, symbol-plist
for variables; find-class
for classes; find-package
for packages; and macroexpand-1
, macroexpand
, and constantp
.
There are additional functions and accessors corresponding to some other Lisp operators. setf-expander
can be used for define-setf-expander
; make-variable
, make-parameter
, make-constant
, and make-symbol-macro
for defvar
, defparameter
, defconstant
, and define-symbol-macro
respectively; type-expander
for deftype
, along with type-expand-1
and type-expand
to work with type specifiers.
For proclamations, proclamation
can be used for declaration
or CLtL2's define-declaration
. variable-type
covers type
, and special
proclamations can be done with make-variable
. operator-ftype
handles ftype
and operator-inline
inline
. User-defined inlining data, such as a definition, can be associated with an operator through operator-inline-data
.
note-function
will declare an operator to be a function without needing a definition for said function. This is useful for the compile-time effect of defun
.
The package environment can be accessed via find-package
. New nicknames for a package can be installed via (setf find-package)
, and the list of all names for a package in an environment retrieved via package-names
. All packages in an environment can be iterated over with map-all-packages
. Additionally, the canonical name of a package is considered part of the environment as well, and can be accessed via package-name
.
Compilation environments
Compilation environments support a subset of the runtime environment operations. They lack package mappings, and functions only needed at runtime like (setf symbol-value)
are not implemented. macro-function
and make-constant
still work.
Cells
Each variable, operator, and type has a cell retrievable by name, and variables and operators have a status. The cell is an object of implementation-defined nature, accessed by -value
, -boundp
, and -makunbound
functions, that holds the value of a binding. Cells are an essential part of Clostrum's design and explained more in the paper. The status indicates what kind of binding a variable or operator has, e.g. as a variable or a constant, or a function or a macro. Some statuses can be read but not directly written (in the high-level API).
In the high level API, cells are retrieved by ensure-variable-cell
, etc. This will return a cell if it exists or make a new one to return if not. Undefining a variable etc. does not remove the cell, so they can be used for continued access regardless of boundedness.
Low-level API
The clostrum-sys
package contains the functions that must be implemented by environment objects for the high level functions to work. These consist of direct access to cells and statuses, along with additional functions for the non-cell properties such as a compiler macro functions. Additionally, a parent
function should be supported for inheritance, but the rest of the functions do not need to consult parent environments as this is handled by the high-level API.
Inheritance semantics
The Common Lisp standard mentions environments inheriting from each other in the context of compilation (CLHS 3.2.1) but does not describe the semantics in detail. Clostrum supports inherited environments, and the parent of an environment can be read by parent
; if an environment has no parent, parent
returns nil
.
The basic rule of inherited bindings Clostrum has adopted is as follows: The values in bindings are inherited from parent environments, but the bindings themselves are not. Mutating a binding or making it unbound has no effect on a parent environment; in fact, no operation on a child environment will mutate anything in the parent environment.
Since the standard only contemplates environment inheritance in the context of compilation, these inheritance semantics are designed to allow compile-file
operations to mutate an evaluation environment without mutating anything in the parent. For example, a function definition or redefinition within (eval-when (:compile-toplevel) ...)
can affect an evaluation environment, but after compile-file
returns, this evaluation environment is discarded, and the startup environment leaves no trace.
Basic
The clostrum-basic
system is the reference implementation of Clostrum. It implements the low level interface, and so the high level interface can be used with the basic environments.
Trucler
The clostrum-trucler
system implements the Trucler protocol for Clostrum environments. The system package has no exports, instead just specializing the Trucler protocol methods.
System Information
Definition Index
-
CLOSTRUM
No documentation provided.-
EXTERNAL CLASS COMPILATION-ENVIRONMENT
Abstract class of compilation environments, containing information for the compiler to use.
-
EXTERNAL CLASS ENVIRONMENT
Abstract parent class of all environments.
-
EXTERNAL CLASS RUN-TIME-ENVIRONMENT
Abstract class of run-time environments, containing actual definitions.
-
EXTERNAL CONDITION ATTEMPT-TO-DEFINE-A-SETF-EXPANDER-OF-NON-EXISTING-FUNCTION-OR-MACRO
No documentation provided. -
EXTERNAL CONDITION ATTEMPT-TO-DEFINE-CONSTANT-FOR-EXISTING-SPECIAL-VARIABLE
No documentation provided. -
EXTERNAL CONDITION ATTEMPT-TO-DEFINE-CONSTANT-FOR-EXISTING-SYMBOL-MACRO
No documentation provided. -
EXTERNAL CONDITION ATTEMPT-TO-DEFINE-SPECIAL-VARIABLE-FOR-EXISTING-CONSTANT
No documentation provided. -
EXTERNAL CONDITION ATTEMPT-TO-DEFINE-SPECIAL-VARIABLE-FOR-EXISTING-SYMBOL-MACRO
No documentation provided. -
EXTERNAL CONDITION ATTEMPT-TO-DEFINE-SYMBOL-MACRO-FOR-EXISTING-CONSTANT
No documentation provided. -
EXTERNAL CONDITION ATTEMPT-TO-DEFINE-SYMBOL-MACRO-FOR-EXISTING-SPECIAL-VARIABLE
No documentation provided. -
EXTERNAL CONDITION ATTEMPT-TO-NOTE-OPERATOR-AS-FUNCTION
No documentation provided. -
EXTERNAL CONDITION ATTEMPT-TO-REDEFINE-CONSTANT-INCOMPATIBLY
No documentation provided. -
EXTERNAL CONDITION ATTEMPT-TO-SET-CONSTANT-VALUE
No documentation provided. -
EXTERNAL CONDITION ATTEMPT-TO-SET-FTYPE-OF-NON-FUNCTION
No documentation provided. -
EXTERNAL CONDITION UNDEFINED-CLASS
No documentation provided. -
EXTERNAL FUNCTION VARIABLE-MACRO-EXPANDER
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
Retrieve the symbol macro function associated with VARIABLE-NAME if there is one, or else return NIL. The variable macro expander is a function of two arguments, a form and an environment.
-
EXTERNAL GENERIC-FUNCTION BOUNDP
- CLIENT
- ENV
- VARIABLE-NAME
As CL:BOUNDP. Return true iff VARIABLE-NAME has a global value in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION COMPILER-MACRO-FUNCTION
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
As CL:COMPILER-MACRO-FUNCTION, return the compiler macro function associated with OPERATOR-NAME, or NIL if there isn't one.
-
EXTERNAL GENERIC-FUNCTION (SETF COMPILER-MACRO-FUNCTION)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Set the compiler macro function associated with OPERATOR-NAME. If NEW is NIL, any previously associated compiler macro is removed.
-
EXTERNAL GENERIC-FUNCTION CONSTANTP
- CLIENT
- ENVIRONMENT
- FORM
As CL:CONSTANTP. Return true if the FORM is constant in ENVIRONMENT. Note that the default method on this function does _not_ check for CL:QUOTE forms, as CL:CONSTANTP must, because there is no way for Clostrum to know that CL:QUOTE has the same semantics in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION ENSURE-OPERATOR-CELL
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ENSURE-TYPE-CELL
- CLIENT
- ENVIRONMENT
- NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ENSURE-VARIABLE-CELL
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION FBOUNDP
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
As CL:FBOUNDP. Return true iff OPERATOR-NAME is fbound in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION FDEFINITION
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
As CL:FDEFINITION. Get the function definition for OPERATOR-NAME in ENVIRONMENT. If OPERATOR-NAME is not fbound in ENVIRONMENT, signal an UNDEFINED-FUNCTION error. If the operator names a macro, the object passed to (SETF MACRO-FUNCTION) will be returned. If the operator names a special operator, the object passed to MAKE-SPECIAL-OPERATOR will be returned.
-
EXTERNAL GENERIC-FUNCTION (SETF FDEFINITION)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
As (SETF CL:FDEFINITION). Set the function definition for OPERATOR-NAME in ENVIRONMENT, and make it defined as a function (rather than a macro or special operator).
-
EXTERNAL GENERIC-FUNCTION FIND-CLASS
- CLIENT
- ENVIRONMENT
- CLASS-NAME
- &OPTIONAL
- ERRORP
As CL:FIND-CLASS. Return the class named CLASS-NAME in ENVIRONMENT. If there is no such class, return NIL, unless ERRORP is true in which case an error of type ERROR is signaled.
-
EXTERNAL GENERIC-FUNCTION (SETF FIND-CLASS)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- CLASS-NAME
- &OPTIONAL
- ERRORP
As (SETF CL:FIND-CLASS). Set the class for CLASS-NAME in ENVIRONMENT. ERRORP is ignored.
-
EXTERNAL GENERIC-FUNCTION FIND-PACKAGE
- CLIENT
- ENVIRONMENT
- NAME
Find the package bound to NAME in ENVIRONMENT, or NIL if none has been defined.
-
EXTERNAL GENERIC-FUNCTION (SETF FIND-PACKAGE)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION FMAKUNBOUND
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
As CL:FMAKUNBOUND. Make OPERATOR-NAME have no function value in ENVIRONMENT. Returns OPERATOR-NAME.
-
EXTERNAL GENERIC-FUNCTION MACRO-FUNCTION
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
As CL:MACRO-FUNCTION. Return the macro function for OPERATOR-NAME in ENVIRONMENT, or NIL if it does not name a macro.
-
EXTERNAL GENERIC-FUNCTION (SETF MACRO-FUNCTION)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
As (SETF CL:MACRO-FUNCTION). Set the macro function for OPERATOR-NAME in ENVIRONMENT, and make it defined as a macro.
-
EXTERNAL GENERIC-FUNCTION MACROEXPAND
- CLIENT
- ENVIRONMENT
- FORM
As CL:MACROEXPAND. Repeatedly macroexpand FORM in ENVIRONMENT, and return the expansion and true, or the form and NIL if it was not a macro form.
-
EXTERNAL GENERIC-FUNCTION MACROEXPAND-1
- CLIENT
- ENVIRONMENT
- FORM
As CL:MACROEXPAND-1. Macroexpand FORM in ENVIRONMENT once, and return the expansion and true, or the form and NIL if it was not a macro form.
-
EXTERNAL GENERIC-FUNCTION MAKE-CONSTANT
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
- VALUE
Functional version of CL:DEFCONTANT. Make VARIABLE-NAME constant and set its global value to VALUE.
-
EXTERNAL GENERIC-FUNCTION MAKE-PARAMETER
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
- VALUE
Functional version of CL:DEFPARAMETER. Proclaim VARiABLE-NAME special, and set its global value to VALUE.
-
EXTERNAL GENERIC-FUNCTION MAKE-SPECIAL-OPERATOR
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
- NEW
Make OPERATOR-NAME a special operator in ENVIRONMENT. Future calls to FDEFINITION will return the object given as NEW.
-
EXTERNAL GENERIC-FUNCTION MAKE-SYMBOL-MACRO
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
- EXPANSION
Functional version of CL:DEFINE-SYMBOL-MACRO. Make VARIABLE-NAME a symbol macro and set its expansion to EXPANSION.
-
EXTERNAL GENERIC-FUNCTION MAKE-VARIABLE
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
- &OPTIONAL
- VALUE
Functional version of CL:DEFVAR. Proclaim VARIABLE-NAME special, and if it has no global value and VALUE is provided, set its global value to VALUE.
-
EXTERNAL GENERIC-FUNCTION MAKUNBOUND
- CLIENT
- ENV
- VARIABLE-NAME
As CL:MAKUNBOUND. Make VARIABLE-NAME have no global value in ENVIRONMENT. Returns VARIABLE-NAME.
-
EXTERNAL GENERIC-FUNCTION MAP-ALL-PACKAGES
- CLIENT
- ENVIRONMENT
- FUNCTION
No documentation provided. -
EXTERNAL GENERIC-FUNCTION MERGE-OPTIMIZE
- CLIENT
- NEW-OPTIMIZE
- OLD-OPTIMIZE
Compute an optimize proclamation from two optimize proclamations. NEW-OPTIMIZE is the new data dn OLD-OPTIMIZE is the old data. The default method assumes that optimize proclamation data is a list of qualities or (quality value) lists. It normalizes any quality symbols to (quality 3), and discards any qualities in OLD-OPTIMIZE that are present in NEW-OPTIMIZE. Nonstandard optimization qualities are discarded.
-
EXTERNAL GENERIC-FUNCTION MERGE-TYPES
- CLIENT
- TYPE1
- TYPE2
Given two types, compute their conjunction (i.e. the AND of their specifiers). Clients with custom type representations must specialize this method in order for type retrieval on environments with parents to work correctly. The default method assumes that types are represented by their specifiers, and so simply forms the list (AND TYPE1 TYPE2).
-
EXTERNAL GENERIC-FUNCTION NOTE-FUNCTION
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Make OPERATOR-NAME a function in ENVIRONMENT, without providing a definition. The name will not be fbound, but this information can be retrieved by OPERATOR-STATUS. This function is provided to implement the (optional) compile time side effect of DEFUN.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-CELL-BOUNDP
- CLIENT
- CELL
Return true iff CELL has a value. The CELL is an object returned by OPERATOR-CELL.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-CELL-MAKUNBOUND
- CLIENT
- CELL
Make CELL have no value. The CELL is an object returned by OPERATOR-CELL. The return values of this function are undefined.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-CELL-VALUE
- CLIENT
- CELL
Get the value stored in CELL. The CELL is an object returned by OPERATOR-CELL. If OPERATOR-CELL-BOUNDP is not true, a function signals UNDEFINED-FUNCTION when called with any arguments is returned.
-
EXTERNAL GENERIC-FUNCTION (SETF OPERATOR-CELL-VALUE)
- NEW-VALUE
- CLIENT
- CELL
Set the value stored in CELL. The CELL is an object returned by OPERATOR-CELL.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-FTYPE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION (SETF OPERATOR-FTYPE)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION OPERATOR-INLINE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION (SETF OPERATOR-INLINE)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION OPERATOR-INLINE-DATA
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION (SETF OPERATOR-INLINE-DATA)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION OPERATOR-STATUS
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION OPTIMIZE
- CLIENT
- ENVIRONMENT
Return the OPTIMIZE proclamation for ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION PACKAGE-NAME
- CLIENT
- ENVIRONMENT
- PACKAGE
No documentation provided. -
EXTERNAL GENERIC-FUNCTION (SETF PACKAGE-NAME)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- PACKAGE
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PACKAGE-NAMES
- CLIENT
- ENVIRONMENT
- PACKAGE
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PARENT
- CLIENT
- ENVIRONMENT
Given an environment, return the environment it inherits from, or NIL if there is no such parent.
-
EXTERNAL GENERIC-FUNCTION PROCLAIM-OPTIMIZE
- CLIENT
- ENVIRONMENT
- OPTIMIZE
Proclaim a new optimize proclamation for ENVIRONMENT. OPTIMIZE is merged with the existing proclamation by MERGE-OPTIMIZE, and this merged proclamation is stored in the environment. See MERGE-OPTIMIZE
-
EXTERNAL GENERIC-FUNCTION PROCLAMATION
- CLIENT
- ENVIRONMENT
- NAME
Find the proclamation associated with NAME in ENVIRONMENT. The nature of proclamations is client-defined. This mechanism is intended for implementing the DECLARATION declaration, or CLTL2's DEFINE-DECLARATION.
-
EXTERNAL GENERIC-FUNCTION (SETF PROCLAMATION)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- NAME
Set the proclamation associated with NAME in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION SETF-EXPANDER
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION (SETF SETF-EXPANDER)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION SPECIAL-OPERATOR-P
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
As CL:SPECIAL-OPERATOR-P. Return true iff OPERATOR-NAME names a special operator in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION SYMBOL-PLIST
- CLIENT
- ENVIRONMENT
- SYMBOL
As CL:SYMBOL-PLIST.
-
EXTERNAL GENERIC-FUNCTION (SETF SYMBOL-PLIST)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- SYMBOL
As (SETF CL:SYMBOL-PLIST).
-
EXTERNAL GENERIC-FUNCTION SYMBOL-VALUE
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
As CL:SYMBOL-VALUE. Return the global value of VARIABLE-NAME in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION (SETF SYMBOL-VALUE)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
As (SETF CL:SYMBOL-VALUE). Set the global value of VARIABLE-NAME in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION TYPE-CELL-BOUNDP
- CLIENT
- CELL
Return true iff CELL has a value. The CELL is an object returned by TYPE-CELL.
-
EXTERNAL GENERIC-FUNCTION TYPE-CELL-MAKUNBOUND
- CLIENT
- CELL
Make CELL have no value. The CELL is an object returned by TYPE-CELL. The return values of this function are undefined.
-
EXTERNAL GENERIC-FUNCTION TYPE-CELL-VALUE
- CLIENT
- CELL
Get the value stored in CELL. The CELL is an object returned by TYPE-CELL. If TYPE-CELL-BOUNDP is not true of the cell, the effects are undefined.
-
EXTERNAL GENERIC-FUNCTION (SETF TYPE-CELL-VALUE)
- NEW-VALUE
- CLIENT
- CELL
No documentation provided. -
EXTERNAL GENERIC-FUNCTION TYPE-EXPAND
- CLIENT
- ENVIRONMENT
- TYPE-SPECIFIER
Operator analogous to CL:MACROEXPAND, but for type specifiers. Given a type specifier and an environment, repeatedly expand the specifier as a derived type, and then return (values expansion true) if it was ever expanded, and otherwise (values specifier nil).
-
EXTERNAL GENERIC-FUNCTION TYPE-EXPAND-1
- CLIENT
- ENVIRONMENT
- TYPE-SPECIFIER
Operator analogous to CL:MACROEXPAND-1, but for type specifiers. Given a type specifier and an environment, return (values expansion true) if the type specifier is derived, otherwise (values specifier nil).
-
EXTERNAL GENERIC-FUNCTION TYPE-EXPANDER
- CLIENT
- ENVIRONMENT
- TYPE-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION (SETF TYPE-EXPANDER)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- TYPE-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VARIABLE-CELL-BOUNDP
- CLIENT
- CELL
Return true iff CELL has a value. The CELL is an object returned by VARIABLE-CELL.
-
EXTERNAL GENERIC-FUNCTION VARIABLE-CELL-MAKUNBOUND
- CLIENT
- CELL
Make CELL have no value. The CELL is an object returned by VARIABLE-CELL. The return values of this function are undefined.
-
EXTERNAL GENERIC-FUNCTION VARIABLE-CELL-VALUE
- CLIENT
- CELL
Get the value stored in CELL. The CELL is an object returned by VARIABLE-CELL. If VARIABLE-CELL-BOUNDP is not true of the cell, the effects are undefined.
-
EXTERNAL GENERIC-FUNCTION (SETF VARIABLE-CELL-VALUE)
- NEW-VALUE
- CLIENT
- CELL
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VARIABLE-STATUS
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VARIABLE-TYPE
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION (SETF VARIABLE-TYPE)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
No documentation provided.
-
-
CLOSTRUM-SYS
No documentation provided.-
EXTERNAL GENERIC-FUNCTION COMPILER-MACRO-FUNCTION
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Return the compiler macro function for OPERATOR-NAME in ENVIRONMENT. This is NIL if no function has been set, or else the object set by (SETF COMPILER-MACRO-FUNCTION).
-
EXTERNAL GENERIC-FUNCTION (SETF COMPILER-MACRO-FUNCTION)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Set the compiler macro function for OPERATOR-NAME in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION ENSURE-OPERATOR-CELL
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Ensure that OPERATOR-NAME has a cell in ENVIRONMENT, and return that cell. Calls to this function always retrieve the same cell given the same arguments, regardless of the operator being fbound or not.
-
EXTERNAL GENERIC-FUNCTION ENSURE-TYPE-CELL
- CLIENT
- ENVIRONMENT
- TYPE-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ENSURE-VARIABLE-CELL
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION FIND-PACKAGE
- CLIENT
- ENVIRONMENT
- NAME
Find the package bound to NAME in ENVIRONMENT, or NIL if none has been defined.
-
EXTERNAL GENERIC-FUNCTION (SETF FIND-PACKAGE)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- NAME
Set the package bound to NAME in ENVIRONMENT. This can be used to define both nicknames and the proper name.
-
EXTERNAL GENERIC-FUNCTION MAP-ALL-PACKAGES
- CLIENT
- ENVIRONMENT
- FUNCTION
Call FUNCTION on all PACKAGES in ENVIRONMENT, in some undefined order. This can be used for example to implement LIST-ALL-PACKAGES.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-CELL
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Retrieve the cell for OPERATOR-NAME's fbinding in ENVIRONMENT. The nature of the cell is implementation-defined, except that it must work with OPERATOR-CELL-VALUE, OPERATOR-CELL-BOUNDP, and OPERATOR-CELL-MAKUNBOUND. If no cell yet exists in this environment, NIL is returned. See ENSURE-OPERATOR-CELL
-
EXTERNAL GENERIC-FUNCTION OPERATOR-CELL-BOUNDP
- CLIENT
- CELL
Return true iff CELL has a value. The CELL is an object returned by OPERATOR-CELL.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-CELL-MAKUNBOUND
- CLIENT
- CELL
Make CELL have no value. The CELL is an object returned by OPERATOR-CELL. The return values of this function are undefined.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-CELL-VALUE
- CLIENT
- CELL
Get the value stored in CELL. The CELL is an object returned by OPERATOR-CELL. If OPERATOR-CELL-BOUNDP is not true, a function signals UNDEFINED-FUNCTION when called with any arguments is returned.
-
EXTERNAL GENERIC-FUNCTION (SETF OPERATOR-CELL-VALUE)
- NEW-VALUE
- CLIENT
- CELL
Set the value stored in CELL. The CELL is an object returned by OPERATOR-CELL.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-FTYPE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Return the proclaimed ftype for the given operator. Clostrum does not impose any kind of representation of types on clients, so using OPERATOR-FTYPE before an ftype is proclaimed (by (SETF OPERATOR-FTYPE)) may result in an error. Implementations are recommended to install a default type themselves to avoid this.
-
EXTERNAL GENERIC-FUNCTION (SETF OPERATOR-FTYPE)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Proclaim an ftype for the given operator. Clostrum does not impose any kind of representation of types on clients.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-INLINE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Return the inline proclamation for the given operator. This is either CL:INLINE, CL:NOTINLINE, or NIL, meaning no proclamation either way.
-
EXTERNAL GENERIC-FUNCTION (SETF OPERATOR-INLINE)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Set the inline proclamation for the given operator.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-INLINE-DATA
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Return the inline data for the given operator. The nature of this data is defined by the client.
-
EXTERNAL GENERIC-FUNCTION (SETF OPERATOR-INLINE-DATA)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Set the inline data for the given operator.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-INLINE-KNOWN-P
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Return true iff the inline proclamation for this operator has been set. This function exists so that the proclamation can be set to NIL in a child environment without the inheritance-aware high level API functions deciding to consult a parent instead.
-
EXTERNAL GENERIC-FUNCTION OPERATOR-STATUS
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Return the status of OPERATOR-NAME's fbinding in ENVIRONMENT. The status is either NIL, meaning not fbound, or :FUNCTION, :MACRO, or :SPECIAL-OPERATOR.
-
EXTERNAL GENERIC-FUNCTION (SETF OPERATOR-STATUS)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Set the status of OPERATOR-NAME's fbinding in ENVIRONMENT. The status is either NIL, meaning not fbound, or :FUNCTION, :MACRO, or :SPECIAL-OPERATOR.
-
EXTERNAL GENERIC-FUNCTION OPTIMIZE
- CLIENT
- ENVIRONMENT
Return the OPTIMIZE proclamation data for ENVIRONMENT. The nature of this data is client-defined. The default method expects OPTIMIZE proclamation data to be a list of optimize qualities or (quality value) lists, i.e. the CDR of an OPTIMIZE declaration specifier.
-
EXTERNAL GENERIC-FUNCTION (SETF OPTIMIZE)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
Set the OPTIMIZE proclamation data for ENVIRONMENT. The nature of this data is client-defined. The default method expects OPTIMIZE proclamation data to be a list of optimize qualities or (quality value) lists, i.e. the CDR of an OPTIMIZE declaration specifier.
-
EXTERNAL GENERIC-FUNCTION PACKAGE-NAME
- CLIENT
- ENVIRONMENT
- PACKAGE
Return the name of PACKAGE in ENVIRONMENT, or NIL if it has none.
-
EXTERNAL GENERIC-FUNCTION (SETF PACKAGE-NAME)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- PACKAGE
Set the name of PACKAGE in ENVIRONMENT. Note that this function does not necessarily establish the name for FIND-PACKAGE.
-
EXTERNAL GENERIC-FUNCTION PACKAGE-NAMES
- CLIENT
- ENVIRONMENT
- PACKAGE
Return a fresh list of all names of PACKAGE in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION PARENT
- CLIENT
- ENVIRONMENT
Given an environment, return the environment it inherits from, or NIL if there is no such parent.
-
EXTERNAL GENERIC-FUNCTION PROCLAMATION
- CLIENT
- ENVIRONMENT
- NAME
Find the proclamation associated with NAME in ENVIRONMENT. The nature of proclamations is client-defined. This mechanism is intended for implementing the DECLARATION declaration, or CLTL2's DEFINE-DECLARATION.
-
EXTERNAL GENERIC-FUNCTION (SETF PROCLAMATION)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- NAME
Set the proclamation associated with NAME in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION SETF-EXPANDER
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Return the setf expander for OPERATOR-NAME in ENVIRONMENT. This is NIL if no expander has been set, or else the object set by (SETF SETF-EXPANDER). The nature of a setf expander is otherwise implementation-defined. One choice would be to have it as a function of two arguments, a place and an environment, analogous to a macro expander, that returns the setf expansion.
-
EXTERNAL GENERIC-FUNCTION (SETF SETF-EXPANDER)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- OPERATOR-NAME
Set the setf expander for OPERATOR-NAME in ENVIRONMENT. OPERATOR-NAME must already be defined as a function or macro.
-
EXTERNAL GENERIC-FUNCTION SYMBOL-PLIST
- CLIENT
- ENVIRONMENT
- SYMBOL
Retrieve the plist attached to SYMBOL in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION (SETF SYMBOL-PLIST)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- SYMBOL
Set the plist attached to SYMBOL in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION SYMBOL-PLIST-KNOWN-P
- CLIENT
- ENVIRONMENT
- SYMBOL
Return true iff the symbol's plist in this environment has been set. This is used by the high-level API to disambiguate the situation in which a symbol plist has been set to NIL in one environment but set to something non-NIL in a parent.
-
EXTERNAL GENERIC-FUNCTION TYPE-CELL
- CLIENT
- ENVIRONMENT
- TYPE-NAME
Retrieve the cell for TYPE-NAME's class binding in ENVIRONMENT. The nature of the cell is implementation-defined, except that it must work with TYPE-CELL-VALUE, TYPE-CELL-BOUNDP, and TYPE-CELL-MAKUNBOUND. Calls to this function always retrieve the same cell given the same arguments, regardless of the operator being fbound or not.
-
EXTERNAL GENERIC-FUNCTION TYPE-CELL-BOUNDP
- CLIENT
- CELL
Return true iff CELL has a value. The CELL is an object returned by TYPE-CELL.
-
EXTERNAL GENERIC-FUNCTION TYPE-CELL-MAKUNBOUND
- CLIENT
- CELL
Make CELL have no value. The CELL is an object returned by TYPE-CELL. The return values of this function are undefined.
-
EXTERNAL GENERIC-FUNCTION TYPE-CELL-VALUE
- CLIENT
- CELL
Get the value stored in CELL. The CELL is an object returned by TYPE-CELL. If TYPE-CELL-BOUNDP is not true of the cell, the effects are undefined.
-
EXTERNAL GENERIC-FUNCTION (SETF TYPE-CELL-VALUE)
- NEW-VALUE
- CLIENT
- CELL
No documentation provided. -
EXTERNAL GENERIC-FUNCTION TYPE-EXPANDER
- CLIENT
- ENVIRONMENT
- TYPE-NAME
Return the type expander for TYPE-NAME in ENVIRONMENT. This is NIL if no expander has been set, or else the object set by (SETF TYPE-EXPANDER). The nature of a type expander is otherwise implementation-defined. One choice would be to have it as a function of two arguments, a type specifier and an environment, analogous to a macro expander, that returns the expanded type specifier.
-
EXTERNAL GENERIC-FUNCTION (SETF TYPE-EXPANDER)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- TYPE-NAME
Set the type expander for OPERATOR-NAME in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION VARIABLE-CELL
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
Retrieve the cell for VARIABLE-NAME's binding in ENVIRONMENT. The nature of the cell is implementation-defined, except that it must work with OPERATOR-CELL-VALUE, OPERATOR-CELL-BOUNDP, and OPERATOR-CELL-MAKUNBOUND. Calls to this function always retrieve the same cell given the same arguments, regardless of the operator being fbound or not.
-
EXTERNAL GENERIC-FUNCTION VARIABLE-CELL-BOUNDP
- CLIENT
- CELL
Return true iff CELL has a value. The CELL is an object returned by VARIABLE-CELL.
-
EXTERNAL GENERIC-FUNCTION VARIABLE-CELL-MAKUNBOUND
- CLIENT
- CELL
Make CELL have no value. The CELL is an object returned by VARIABLE-CELL. The return values of this function are undefined.
-
EXTERNAL GENERIC-FUNCTION VARIABLE-CELL-VALUE
- CLIENT
- CELL
Get the value stored in CELL. The CELL is an object returned by VARIABLE-CELL. If VARIABLE-CELL-BOUNDP is not true of the cell, the effects are undefined.
-
EXTERNAL GENERIC-FUNCTION (SETF VARIABLE-CELL-VALUE)
- NEW-VALUE
- CLIENT
- CELL
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VARIABLE-MACRO-EXPANDER
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
Get the symbol macro expander for VARIABLE-NAME in ENVIRONMENT. This is NIL if no expander has been set, or else the object set by (SETF VARIABLE-MACRO-EXPANDER).
-
EXTERNAL GENERIC-FUNCTION (SETF VARIABLE-MACRO-EXPANDER)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
Set the symbol macro expander for VARIABLE-NAME in ENVIRONMENT.
-
EXTERNAL GENERIC-FUNCTION VARIABLE-STATUS
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
Return the status of VARIABLE-NAME's definition in ENVIRONMENT. The status is either NIL, meaning not defined, or :SPECIAL, :CONSTANT, or :SYMBOL-MACRO. Note that a status of NIL or :SYMBOL-MACRO does not preclude the variable having a value, a set by (SETF SYMBOL-VALUE).
-
EXTERNAL GENERIC-FUNCTION (SETF VARIABLE-STATUS)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
Set the status of VARIABLE-NAME's definition in ENVIRONMENT. Note that a status of NIL or :SYMBOL-MACRO does not preclude the variable having a value, a set by (SETF SYMBOL-VALUE).
-
EXTERNAL GENERIC-FUNCTION VARIABLE-TYPE
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
Return the proclaimed type for the given variable. Clostrum does not impose any kind of representation of types on clients, so using VARIABLE-FTYPE before a type is proclaimed (by (SETF VARIABLE-TYPE)) may result in an error. Implementations are recommended to install a default type themselves to avoid this.
-
EXTERNAL GENERIC-FUNCTION (SETF VARIABLE-TYPE)
- NEW-VALUE
- CLIENT
- ENVIRONMENT
- VARIABLE-NAME
Proclaim a type for the given variable. Clostrum does not impose any kind of representation of types on clients.
-