Page Numbers: Yes X: 306 Y: 1.0" First Page: 60
Margins: Top: 1.0" Bottom: 1.3"
Heading:
CS-370 (FALL 1982)3-LISP REFERENCE MANUALOctober 25, 1982
—————————————
13. General Procedure Index
—————————————
EXP111
EXP111
(= I1 I2 ... Ik)111
(+ N1 N2 ... Nk)111
(- N1 N2 ... Nk)111
(* N1 N2 ... Nk)111
(/ N1 N2 ... Nk)111
(< N1 N2 ... Nk)111
(> N1 N2 ... Nk)111
(<= N1 N2 ... Nk)111
(>= N1 N2 ... Nk)111
(1+ N)111
(1- N)111
(1ST VECTOR)111
(2ND VECTOR)111
(3RD VECTOR)111
(4TH VECTOR)111
(5TH VECTOR)111
(6TH VECTOR)111
(ABS N)111
(ACONS)111
(ADVISE PROC ADVICE)111
(ADVISE-ON-ENTRY PROC ADVICE)111
(ADVISE-ON-EXIT PROC ADVICE)111
(AND TV1 TV2 ... TVk)111
(APPEND V1 V2 ... Vk)111
(ATOM I)111
(BIND VAR ENV)111
(BINDING VAR ENVIRONMENT)111
(BLOCK EXP1 EXP2 ... EXPk)111
(BODY CLOSURE)111
(BOOLEAN I)111
(BREAK PROC)111
(CAR P)111
(CCONS TYPE ENV PATTERN BODY)111
(CDR P)111
(CLOSURE-ENV CLOSURE)111
(CHARACTER I)111
(CHARAT I)111
(CLOSURE I)111
(CONCATENATE V1 V2)111
(COND [PREMISE1 C1] ... [PREMISEk Ck])111
(COPY VECTOR)111
(DE-REFLECT CLOSURE)111
(DEFINE NAME FUNCTION)111
(DO [[V1 I1 F1] ... [Vk Ik Fk]]
[[TV
1 RET1] ... [TVj RETj]]
BODY
1 ... BODYm)111
(DOUBLE VECTOR)111
(DOWN I)111
(E-MACRO ENV PATTERN BODY)111
(E-REFLECT ENV PATTERN BODY)111
(EF PREMISE C1 C2)111
(EMPTY VECTOR)111
(ERROR DATA MESSAGE)111
(EVEN N)111
(EXTERNAL I)111
(EXTERNALISATION I)111
(FOOT VECTOR)111
(FUNCTION I)111
(HANDLE I)111
(HASH I)111
(ID EXP)111
(ID* EXP1 EXP2 ... EXPk)111
(IF PREMISE C1 C2)111
(INPUT STREAM)111
(INTERNAL I)111
(INTERNALISATION STRING)111
(ISOMORPHIC S1 S2 ... Sk)111
(LABELS [[NAME1 FUN1] ... [NAMEk FUNk]] BODY)111
(LAMBDA TYPE PATTERN BODY)111
(LENGTH VECTOR)111
(LET [[PATTERN1 BINDING1] ... [PATTERNk BINDINGk]] BODY)111
(LETSEQ [[PATTERN1 BINDING1] ... [PATTERNk BINDINGk]] BODY)111
(LEVEL)111
(LEVEL-QUIT)111
(MACRO ENV PATTERN BODY)111
(MAP FUN I1 I2 ... Ik)111
(MAX N1 N2 ... Nk)111
(MAXIMALLY REL VEC)111
(MEMBER E VEC)111
(MIN N1 N2 ... Nk)111
(MOD N1 N2)111
(MULTI-Y-OPERATOR FUNCTION)111
(NEGATIVE N)111
(NEWLINE)111
(NON-NEGATIVE N)111
(NORMAL S)111
(NORMAL-RAIL RAIL)111
(NORMALISE EXP ENV CONT)111
(NORMALISE-RAIL RAIL ENV CONT)111
(NOT TV)111
(NTH INDEX VECTOR)111
(NUMBER S)111
(NUMERAL S)111
(ODD N)111
(OR TV1 TV2 ... TVk)111
(OUTPUT I STREAM)111
(PAIR I)111
(PATTERN CLOSURE)111
(PCONS I1 I2)111
(POP STACK)111
(POSITIVE N)111
(PREP ELEMENT VECTOR)111
(PRIMITIVE PROC)111
(PRINT I STREAM)111
(PROCEDURE-TYPE I)111
(PROMPT S STREAM)111
(PUSH I STACK)111
(QUIT)111
(RAIL I)111
(RANDOM SEED)111
(RCONS I1 I2 ... Ik)111
(READ STREAM)111
(READ-NORMALISE-PRINT LEVEL ENV STREAM)111
(REBIND VAR1 BINDING ENVIRONMENT)111
(REDUCE PROC ARGS ENV CONT)111
(REFLECT ENV PATTERN BODY)111
(REFLECTIVE PROC)111
(REMAINDER N1 N2)111
(REPLACE I1 I2)111
(REPLY S STREAM)111
(REST VECTOR)111
(REVERSE VECTOR)111
(REVERSE-IN-PLACE VECTOR)111
(RPLACA I1 PAIR I2)111
(RPLACD I1 PAIR I2)111
(RPLACN INDEX RAIL I)111
(RPLACT INDEX RAIL I)111
(SCONS I1 I2 ... Ik)111
(SELECT INDEX [MATCH1 C1] ... [MATCHk Ck])111
(SELECTQ INDEX [MATCH1 C1] ... [MATCHk Ck])111
(SEQUENCE I)111
(SET PATTERN BINDING)111
(SETREF VAR BINDING)111
(SIMPLE ENV PATTERN BODY)111
(STREAM S)111
(STREAMER S)111
(TAIL INDEX VECTOR)111
(TRACE PROC)111
(TRUTH-VALUE I)111
(TYPE S)111
(UNIT VECTOR)111
(UP I)111
(VECTOR I)111
(VECTOR-CONSTRUCTOR TEMPLATE)111
(XCONS I1 I2 ... Ik)111
(Y-OPERATOR FUNCTION)111
(ZERO N)111
————————————————————————————————————————————
———————————
14. A 3-LISP Glossary
———————————
Accessible — An internal structure is accessible if it is the value of one of the 8 binary functions defined over the structural field (CAR, CDR, FIRST, REST, ENV, PATTERN, BODY, or REF) on some argument that in turn is accessible. In addition, the handles of all structures are accessible from their referents. Finally, the booleans, numerals, and charats are always accessible. The lexical internalisation function also makes a considerable number of atoms accessible (all those that have established names) by keeping an explicit representation of the name–atom pairings. When a so-called ‘new’ structure is generated (by RCONS, SCONS, ACONS, PCONS, or CCONS) it is guaranteed to be otherwise inaccessible, meaning that it cannot be accessed from any other accessible structure. Finally, a rail is considered to be completely inaccessible if it and all of its tails are inaccessible. Thus (RCONS ’A ’B ’C) returns as otherwise completely inaccessible rail, whereas if X is bound to ’[B C], then (PREP ’A X) returns an inaccessible (but not completely inaccessible) rail.
Apply — The relationship between an abstract (external) mathematical function and arguments to values (the application of the addition function to the platonic numbers 1 and 2 is the number 3).
Atom — A non-composite internal structure used as a environment-relative name.
Back-quote — A lexical notation operator (borrowed from MACLISP), designed to facilitate the construction of quoted structures with context-dependent insertions, as in the construction of macros. 3-LISP back-quotes are very much like Quine’s corner quotes <ref>. For example, ̀ (+ ,A ,B) abbreviates (PCONS ’+ (RCONS A B)), and will normalise to ’(+ 1 2) in an environment in which A is bound to ’1 and B to ’2. See section 4.c.
Boolean — One of two non-composite internal structures — canonical normal-form designators of Truth and Falsity, respectively. In the standard notation the two booleans are spelled ‘$T’ and ‘$F’.
C0, C1, C2, C3 — The four standard continuations engendered at each reflective level by the reflective processor. See sections 111.
Category Alignment — A correspondence between the categories of internal structure, procedural consequence, and declarative import.
Charat — A non-composite internal structure that is a normal-form canonical designator of a character. In the standard notation charats are notated with two characters: a sharp sign (‘#’) followed by the character designated; thus ‘#4’ notates the charat that designates the character ‘4’.
Closure — A primitive internal structure type: a composite, normal-form but not canonical designator of a function. Closures are constructed with CCONS (q.v. section 111). Closures, being internal structures, contain environments designators, patterns, and bodies, which may be accessed with the selector functions CENV, PATTERN, and BODY, respectively.
Completely Inaccessible — See ‘Accessible’.
Continuation — xxx
Declarative Import — The first coordinate of the full significance of a 3-LISP structure. The declarative import is our reconstruction of what a structure designates or refers to. For example, we take the numeral ‘144’ to designate the number that is the square of 12; thus we would say that 144 is the declarative import of that numeral.
Designate — The relationship between a symbol X and the object that is F(X). For example, the numeral 1 (i.e., the numeral notated with the character ‘1’) designates the number 1; the handle ’X designates the atom X; and the expression (LAMBDA SIMPLE [X] X) designates the identity function.
Environment — A theoretical entity the captures part of the processor state (the other is the continuation). Specifically, an environment is an external sequence of two-tuples of atoms and bindings; thus the environment designated by the 3-LISP structure [[’A ’3] [’ID ’{CLOSURE [] ’[X] X}] [’HANDLE ’’A]] contains bindings for three structures (A, ID, and HANDLE, bound respectively to the numeral 3, a closure designating the identity function, and the handle ’A). Note that all well-formed 3-LISP environments contain bindings for only atoms, and all bindings are normal-form structures.
Evaluate — We do not use the term ‘evaluate’, since it is ambiguously used as a function from expressions either onto their designata or onto co-designative simpler expressions.
Extensional — xxx
External Structure — xxx
Function — An external (abstract) mathematical object, that can be applied to arguments so as to yield values. Mathematicians typically treat functions as sets of ordered pairs; we don’t really care one way or another.
Handle — A non-composite internal structure that is a normal-form and canonical designator of another internal structure. Handles are notated with a single prefixed single-quote mark: thus the lexical expression ‘ ’A ’ notates the handle of the atom A.
Inaccessible — See ‘Accessible’.
Intensional — xxx
Internal Structures — Any of the ingredients in the 3-LISP structural field.
Macro — xxx
Meta-structural — xxx
Normal Form — Structures are defined to be in normal-form if they are context-independent (neither Y nor F depends on the environment or continuation), side-effect free (processing them engenders no side-effects), and stable (self-normalising). Of the eight 3-LISP structure types, five and a half are in normal-form: the handles, charats, numerals, booleans, closures, and some of the rails (those whose constituents are in normal form). See the table in section 111.
Normalise — A form of simplification in which expressions are converted into a normal-form codesignating expression.
Number — The standard mathematical notion (external, abstract, Platonic, whatever).
Numeral — A non-composite internal structure that is a normal-form and canonical designator of a number. The 3-LISP field is presumed to have an infinite number of numerals, one per number.
Pair — A "composite" internal structure, used to encode redexes (reducible expressions). Each pair has a CAR and a CDR; the pair designates the value of the function designated by the CAR applied to the arguments designated by the CDR (if the function is extensional).
Procedural Consequence — xxx
Procedure — xxx
Quotation — xxx
Rail — xxx
Redex — (Short for reducible expression) An internal structure that encodes designators of functions and arguments, capable of being reduced into normal-form.
Reduce — xxx
Referent — xxx
Reflect — xxx
Reflection — xxx
Semantically Rationalised — xxx
Sequence — The standard mathematical notion of an ordered set of objects. The same element may occur at different positions in the sequence (thus the sequence designated by [1 2 1] is of length 3 and contains two occurences of the number 1), but there is only one sequence with the same elements at each position. Sequences may be of null, finite, or infinite length.
Significance — xxx
Simple — xxx
Standard Notation — The internalisation function Q that maps from external lexical notation into internal structures can be changed by the user; it is not considered a primitive part of the language. Nonetheless there is a standard notation, which is used throughout this manual, and is translated by the version of Q that is provided with 3-LISP. It is documented in section 4.
Static Scoping — xxx
String — xxx
Structural Field — The full collection of internal structures, relationships defined over them, and accessbility relationships that, together with the 3-LISP processor, constitute the 3-LISP machine.
Tail-Recursive — A position within a composite structure is tail-recursive with respect to the overall structure if the processing of any structure in that position can be done with the same continuation as is used for the encompassing structure. Thus for example ... Also, a processor runs programs tail-recursively if it in fact processes program fragments that are in tail-recursive positions ...
Unsorted — xxx
Untyped — xxx
Value — The result of applying a mathematical function to its arguments. Thus the value of the addition function applied to the numbers 1 and 2 is the number 3. As opposed to normal-forms, values need not be internal structures.
Variable — xxx