Representation of Other Sorts

Character and String sorts are represented as Lisp characters and strings, Nat and Integer as Lisp integers, lists are represented using Lisp lists, and Boolean true and false by the symbols T and NIL.

Sums are represented as the cons of the constructor name in keyword package and the fields of the constructor.

Binary products are implemented as cons cells (except for function arguments which are described in the previous section): CONS to construct and CAR and CDR to access the first and second fields. Non-binary products are implemented as vectors: constructed using VECTOR and the ith element accessed by (SVREF x i-1).

Records are implemented the same as products with the order of the fields being alphabetic in the field names.

Restrictions and comprehensions are implemented using their supersort.

A quotient is represented as as a vector of three elements: the quotient tag (which is the value of the Lisp variable SLANG-BUILT-IN::QUOTIENT-TAG), the representation of the quotient relation, and the actual value in the underlying sort.