From: Kerry Koitzsch
Subject: Vendor-dependent defstruct access questions, and a table
Date: 
Message-ID: <1992Sep16.051904.9214@ads.com>
Hello LISP experts:

I'm in the process of making a table containing the vendor dependent
functions for accessing components of a defstruct definition. Some
vendors are easier than others: on the Symbolics one can examine the
source code, and in Allegro CL , AKCL, & CMU CL the relevant info is 
packaged in one object. I am able to extract the defstructs DESCRIPTOR
from the defstructs NAME with all vendors, and from this I derive the
defstructs attributes as shown below. Each  function (NAME,TYPE, etc.)
are essentially one-argument functions of the defstruct descriptor.
'!'s indicate ones I dont know how to do: if you can supply any of
the missing information (e.g., how to get the PRINT FUNCTION of
a defstruct named MYSTRUCT in Lucid or MCL) please email me the
info, I will summarize to the newsgroup if there is enough interest.
Mac Common Lisp info is especially valued since I don't have access
to MCL here. Then we can move on to defstruct slot descriptors....

thanks, ·····@ads.com
Note: the names of the 'functions' below have been changed for
simplicity: I am not really re-defining LENGTH or DOCUMENTATION!

====================================================================
Vendor ------------->   SYMBOLICS   LUCID    FRANZ  MCL  CMUCL  AKCL
Defstruct Attribute:    =========   =====    =====  ===  =====  ====
===================

o NAME                      *         *        *     *     *     *
o TYPE                      *         *        *     *     *     *
o PRINT-FUNCTION            *         !        *     !     *     *
o CONC-NAME                 *         !        *     !     *     *
o SLOT-DESCRIPTORS          *         *        *     *     *     *
o COPIER                    *         !        *     !     *     ! 
o PREDICATE                 *         !        *     !     *     !
o DOCUMENTATION             *         !        *     !     *     *
o INCLUDE                   *         *        *     !     *     *
o CONSTRUCTOR               *         *        *     !     *     *
o SLOT-DESCRIPTORS          *         *        *     *     *     *
o DESCRIPTOR                *         *        *     *     *     *
o LENGTH                    *         *        *     *     *     *
o STRUCTURE-INSTANCE-P      *         *        *     *     *     *
=====================================================================

NOTES:
------

'!' in the above table indicates "unknown".

SLOT-DESCRIPTORS returns a list of objects describing the defstructs
slots.

NAME and TYPE return symbols.

INCLUDE returns the included defstructs name as a symbol.

CONC-NAME, COPIER, PREDICATE, CONSTRUCTOR, and PRINT-FUNCTION return
a symbol which is the name of the function.

DOCUMENTATION returns the documentation string for the defstruct
'class', or "" if there is none.

STRUCTURE-INSTANCE-P, given a LISP object, returns T or NIL depending
on whether the object is a defstruct instance.

DESCRIPTOR, given the name of a defined defstruct, returns a LISP object
containing vendor-dependent info about that defstruct, or NIL if the
symbol does not name a defstruct.

LENGTH is the number of slots in the defstruct, including inherited ones.

Thanks,
kerry