Регистрация | Войти
Lisp — программируемый язык программирования

Таблица всех встроенных классов в CL их конструкторов и иерархии (некоторые типы могут быть недоступны из пакета "COMMON-LISP")1). Возможные спецификаторы:

(all-types

t :read-only ;; В CL T это супертип по умолчанию для всех типов

function :read-only ;; Функции

symbol ;; Символы

character :enumerable ;; Знаки

;; Числа
number ;; Суперкласс для всех чисел

  complex :inherits (number) ;; Комплексные числа
   complex-single-float :inherits (complex number)
    complex-double-float :inherits (complex number)
    complex-long-float :inherits (complex number)

  real :inherits (number)

    float :inherits (real number)
      single-float :inherits (float real number)
      double-float :inherits (float real number)
      long-float :inherits (float real number)

    rational :inherits (real number)

      ratio :inherits (rational real number)
      integer :inherits (rational real number)
        fixnum :inherits (integer rational real number)
        bignum :inherits (integer rational real number)

;; Массивы и вектора
array :prototype-form (make-array nil :adjustable t)

  simple-array :inherits (array)
               :prototype-form (make-array nil)

;; Последовательность
sequence :state :read-only

  vector :inherits (array sequence)

    simple-vector :inherits (vector simple-array array sequence)

    bit-vector :inherits (vector array sequence)
               :prototype-form (make-array 0 :element-type 'bit :fill-pointer t)

      simple-bit-vector :inherits (bit-vector vector simple-array array sequence)
                        :prototype-form (make-array 0 :element-type 'bit)

    simple-array-unsigned-byte-2  :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 2))
    simple-array-unsigned-byte-4  :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 4))
    simple-array-unsigned-byte-7  :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 7))
    simple-array-unsigned-byte-8  :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 8))
    simple-array-unsigned-byte-15 :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 15))
    simple-array-unsigned-byte-16 :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 16))
    simple-array-unsigned-byte-29 :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 29))
    simple-array-unsigned-byte-31 :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 31))
    simple-array-unsigned-byte-32 :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 32))
    simple-array-unsigned-byte-60 :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 60))
    simple-array-unsigned-byte-63 :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 63))
    simple-array-unsigned-byte-64 :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(unsigned-byte 64))
    simple-array-signed-byte-8    :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(signed-byte 8))
    simple-array-signed-byte-16   :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(signed-byte 16))
    simple-array-signed-byte-30   :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(signed-byte 30))
    simple-array-signed-byte-32   :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(signed-byte 32))
    simple-array-signed-byte-61   :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(signed-byte 61))
    simple-array-signed-byte-64   :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type '(signed-byte 64))
    simple-array-single-float     :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type 'single-float)
    simple-array-double-float     :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type 'double-float)
    simple-array-long-float       :inherits (vector simple-array array sequence)
                                  :prototype-form (make-array 0 :element-type 'long-float)
    simple-array-complex-single-float :inherits (vector simple-array array sequence)
                                      :prototype-form (make-array 0 :element-type '(complex single-float))
    simple-array-complex-double-float :inherits (vector simple-array array sequence)
                                      :prototype-form (make-array 0 :element-type '(complex double-float))
    simple-array-complex-long-float   :inherits (vector simple-array array sequence)
                                      :prototype-form (make-array 0 :element-type '(complex long-float))

    ;; Строки
   string :inherits (vector array sequence)

      simple-string :inherits (string vector simple-array array sequence)

      vector-nil :inherits (string vector array sequence)
                 :prototype-form (make-array 0 :element-type 'nil :fill-pointer t)

        simple-array-nil :inherits (vector-nil simple-string string vector simple-array array sequence)
                         :prototype-form (make-array 0 :element-type 'nil)

      base-string :inherits (string vector array sequence)
                  :prototype-form (make-array 0 :element-type 'base-char :fill-pointer t)

        simple-base-string :inherits (base-string simple-string string vector simple-array array sequence)
                           :prototype-form (make-array 0 :element-type 'base-char)

      character-string :inherits (string vector array sequence)
                       :prototype-form (make-array 0 :element-type 'character :fill-pointer t)

        simple-character-string :inherits (character-string simple-string string vector simple-array array sequence)
                                :prototype-form (make-array 0 :element-type 'character)

    ;; Списки
   list :inherits (sequence)

      cons :inherits (list sequence)
           :prototype-form (cons nil nil)

      null :inherits (symbol list sequence)
           :prototype-form 'nil

;; Потоки
stream :read-only

  file-stream :read-only
              :inherits (stream)

  string-stream :read-only
                :inherits (stream)

;; Специфичные системные типы

system-area-pointer
weak-pointer
code-component
lra
fdefn
random-class

)

1)основано на перечислении *built-in-classes* в SBCL, src/code/class.lisp
@2009-2013 lisper.ru