apollo-paslsp.lpt 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. Utah Symbolic Computation Group December 1981
  2. Operating Note 60
  3. A PASCAL Based Standard LISP for the Apollo Domain A PASCAL Based Standard LISP for the Apollo Domain A PASCAL Based Standard LISP for the Apollo Domain
  4. by
  5. M. L. Griss and R. Ottenheimer
  6. Department of Computer Science
  7. University of Utah
  8. Salt Lake City, Utah 84112
  9. Preliminary Version Preliminary Version Preliminary Version
  10. Last Revision: 26 February 1982
  11. ABSTRACT ABSTRACT ABSTRACT
  12. This report describes an interim implementation of Standard LISP
  13. for the Apollo DOMAIN. This LISP is based upon the Standard LISP
  14. report, and a newly developing Portable Standard LISP. This
  15. interim implementation is designed to explore LISP
  16. implementations in PASCAL on the Apollo DOMAIN and similar
  17. machines. The system consists of a kernel, handcoded in PASCAL,
  18. with the rest of the system written in LISP and compiled to
  19. PASCAL.
  20. Work supported in part by the National Science Foundation under
  21. Grant No. MCS80-07034. Apollo Pascal LISP 26 February 1982 1
  22. 1. Introduction 1. Introduction 1. Introduction
  23. In this preliminary report, we describe an implementation of
  24. Standard LISP in PASCAL, PASLSP. Versions of PASLSP have been run
  25. on a number of machines, ranging from an LSI-11 based TERAK to
  26. Apollo and PERQ. This report concentrates on the Apollo DOMAIN
  27. implementation. This report is to be read in conjunction with the
  28. Standard LISP report [7]; we will highlight the differences from
  29. the functions documented in the Standard LISP, describe the
  30. implementation strategy, and discuss future work.
  31. PASLSP is based on a series of small and medium sized LISP
  32. interpreters that have been developed at the University of Utah
  33. to explore LISP implementations in higher level languages. Each
  34. of these LISP systems consists of a small kernel handcoded in
  35. some language, with the rest of the system written in LISP and
  36. compiled to the target language. We have used FORTRAN, PASCAL
  37. and assembly language as targets. The PASLSP series use PASCAL
  38. for the kernel, and have a LISP to PASCAL compiler for the rest
  39. of the system.
  40. Recent work has concentrated on reducing the size of the
  41. hand-coded kernel, and extending the compiler to handle systems
  42. level constructs. This has resulted in a new Portable Standard
  43. LISP, PSL, running on the DEC-20 and VAX-11/750 [1, 4]. An
  44. implementation of PSL for MC68000 is underway. The PSL system is
  45. a modern, efficient LISP, written entirely in itself; it uses an
  46. efficient LISP to machine code compiler to produce the kernel,
  47. and then the rest of LISP is loaded. In the future we hope to
  48. produce a complete PSL targeted at a higher level languages, such
  49. as PASCAL, C or ADA, and this will replace the current PASLSP.
  50. 1.1. History of PASLSP 1.1. History of PASLSP 1.1. History of PASLSP
  51. The system now called PASLSP was originally developed (by
  52. M. Griss and W. Galway), as a small LISP like kernel to support a
  53. small computer algebra system on an LSI-11 TERAK; this was to be
  54. used as an answer analysis module within a CAI system [2],
  55. written entirely in PASCAL. It was decided to hand-code a very
  56. small kernel, and compile additional functions written in LISP
  57. (LISP support functions, parser and simplifier) to PASCAL, using
  58. a modified Portable LISP compiler [3]. This version (call it V0)
  59. did not even have user defined functions, since space on the
  60. TERAK was at a premium.
  61. About June 1981, PASLSP came to the attention of a number
  62. people evaluating Apollo's and PERQ's, and it was suggested that
  63. we enhance V0 PASLSP for this purpose. During the space of a few Apollo Pascal LISP 26 February 1982 2
  64. days, features taken from the Standard LISP Report and newly
  65. developing PSL files were added to produce PASLSP-V1, running on
  66. a DEC-20 and Terak. This was a fairly complete LISP (including
  67. Catch and Throw), but lacked a few features (OPEN, CLOSE, RDS,
  68. WRS, PROG, GO, RETURN, COMPRESS, EXPLODE, Vectors and Strings,
  69. etc.). V1 PASLSP was adapted to a PERQ, VAX and Apollo by Paul
  70. Milazo of Schlumberge in the space of a few weeks (we did not
  71. have a PERQ or Apollo at that time).
  72. We subsequently obtained a PERQ and an Apollo, and recent work
  73. has been aimed at producing an enhanced PASLSP for these
  74. machines, maintaining all versions in one set of source files.
  75. The current system, PASLSP-V2, is produced from a single PASCAL
  76. kernel and set of LISP support files; the machine specific
  77. features are handled by a simple Source Code Conditionalizer,
  78. changing the definition of certain constants and data types. Only
  79. a few features of the Standard LISP report are missing, and there
  80. are a number of additions.
  81. 1.2. Acknowledgement 1.2. Acknowledgement 1.2. Acknowledgement
  82. We would like to acknowledge the contributions and support of
  83. Eric Benson, Dick Brandt, Will Galway, and Paul Milazo.
  84. 2. Features of PASLSP and relation to Standard LISP 2. Features of PASLSP and relation to Standard LISP 2. Features of PASLSP and relation to Standard LISP
  85. PASLSP as far as possible provides all the functions mentioned
  86. in the attached Standard LISP Report (note the hand-written
  87. comments added to this appendix); some of the functions are
  88. simply stubs, so that a Standard LISP Test-file can be run
  89. without major modification.
  90. PASLSP-V2 does not implement the following features of Standard
  91. LISP:
  92. a. VECTORS (only a simple garbage collector is used).
  93. b. Strings are implemented as identifiers (not garbage
  94. collected).
  95. c. Integers are limited in size (INTs and FIXNUMs, no
  96. BIGNUMs).
  97. d. FLOATING Point is not implemented.
  98. e. IDs can not be REMOB'ed or INTERN'd.
  99. f. Only 3 Input Channels and 2 Output Channels are
  100. available to OPEN, RDS, WRS, and CLOSE. Thus file
  101. input statements can not be nested very deeply in
  102. files. Apollo Pascal LISP 26 February 1982 3
  103. g. Line, Page and Character counting (POSN, LPOSN, etc)
  104. are not implemented.
  105. PASLSP-V2 provides some extensions over Standard LISP:
  106. a. (CATCH form) and (THROW form) and the tagged versions:
  107. (TCATCH tag form) and (TTHROW tag form) are used to
  108. implement error and errorset, and higher level control
  109. functions.
  110. b. Implicit PROGN in COND, and LAMBDA expressions.
  111. c. (WHILE pred action-1 action-2 ... action-n).
  112. d. (DSKIN 'filename) or (DSKIN "filename")
  113. PASLSP-V2 has not been extensively tested, and there may still
  114. be a number of bugs. While some effort has been spent in
  115. adjusting PASLSP to the Apollo DOMAIN, it is clear that the
  116. various heap sizes are not yet optimal. See appendix A for
  117. current list of functions, and appendix B for a copy of the
  118. Standard LISP Report annotated to reflect the current status of
  119. PASLSP.
  120. 3. Using PASLSP on the Apollo DOMAIN 3. Using PASLSP on the Apollo DOMAIN 3. Using PASLSP on the Apollo DOMAIN
  121. Initializing the system from the floppy looks like this:
  122. Create a directory (call it pl):
  123. crd /pl
  124. Mount the floppy:
  125. mtvol f 1 /f
  126. Copy the files of interest:
  127. cpt /f/pascallisp /pl
  128. The files copied will be: paslsp (executable file)
  129. paslsp.ini (initialization file)
  130. paslsp.tst (a test file)
  131. Run paslsp as you would any other file. If you get an error it
  132. is most likely because the paslsp.ini file couldn't be found. If
  133. this happens, locate paslsp.ini and try again. If it still
  134. hangs, try calling Ralph Ottenheimer at (801) 355-0226 or
  135. M. Griss at (801) 581-6542.
  136. Previously prepared files of LISP (e.g., library procedures)
  137. can be input by using the function "DSKIN". For Example, Apollo Pascal LISP 26 February 1982 4
  138. (DSKIN 'Paslsp!.tst) or (DSKIN "Paslsp.tst")
  139. would load the paslsp test file. The PASLSP test is adapted from
  140. an extensive test of Standard LISP (avoiding features not yet
  141. implemented). This is a good excercise, try it. [Note that if
  142. the filename is given as an ID, that special characters should be
  143. prefaced by an "escape character", ! . This is also the case for
  144. filenames in OPEN. Alternately the string form may be used, in
  145. that case special characters need not be escaped.]
  146. Paslsp is "case-sensitive" with regard to identifiers. All of
  147. the kernel procedures have upper-case identifiers associated with
  148. them. This means that ordinarily the expression (dskin
  149. 'paslsp!.tst) would not be recognized since "dskin" is in
  150. lowercase. However, there is a global flag !*RAISE which if true
  151. will convert all lower-case typin to upper-case. This Apollo
  152. DOMAIN paslsp implementation sets !*RAISE to T as a default by
  153. having (SETQ !*RAISE T) in the paslsp.ini file. You may put any
  154. special initialization code you like at the end of paslsp.ini as
  155. indicated by the comments in the file. Toggling would be
  156. accomplished by typing the following lisp-expressions:
  157. (ON !*RAISE) equivalent to (SETQ !*RAISE T)
  158. (OFF !*RAISE) equivalent to (SETQ !*RAISE NIL)
  159. Any Apollo DOMAIN filename (60 characters maximum)is allowable
  160. as a paslsp filename. Remember to prefix all special characters
  161. with an exclamation-mark: "!". Special characters include all
  162. non-alphanumerics. For example: !*RAISE goforit!! paslsp!.test
  163. !/login!/smith!/foo!.sl .
  164. If the global !*ECHO is not NIL (default is NIL), input will be
  165. echoed to the selected output channel. It is sometimes
  166. convienient to put:
  167. (SETQ !*ECHO T)
  168. at the beginning of a file to be read by DSKIN, and:
  169. (SETQ !*ECHO NIL)
  170. at the end. This will echo the file to the screen (or to a file)
  171. as it is read. Apollo Pascal LISP 26 February 1982 5
  172. Certain low level errors do not display any explanatory message
  173. but instead display a numeric code (such as *** # 2), below is a
  174. summary of these codes and their meanings:
  175. (* error codes. corresponding to tag = errtag. *)
  176. noprspace = 1; (* no more "pair space"--can't cons. *)
  177. notpair = 2; (* a pair operation attempted on a non-pair.*
  178. noidspace = 3; (* no more free identifiers *)
  179. undefined = 4; (* used to mark undefined function cells *)
  180. noint = 5; (* no free integer space after gc. *)
  181. notid = 6; (* id was expected *)
  182. 4. Implementation of PASLSP 4. Implementation of PASLSP 4. Implementation of PASLSP
  183. 4.1. Building PASLSP 4.1. Building PASLSP 4.1. Building PASLSP
  184. PASLSP is built in the following steps:
  185. ______ _____ Kernel files, PAS0.PRE, and trailer file (main program)
  186. PASN.PRE are run through a filter program to produce PAS0.PAS and
  187. PASN.PAS, tailored to the Apollo DOMAIN (appropriate Include
  188. files, Consts, etc). This kernel provides the Basic I/O (Token
  189. reading and printing), handcoded storage allocator and garbage
  190. collector, lowlevel arithmetic primitives, lowlevel calls (via
  191. Case statement) from LISP to kernel, etc.
  192. ____ __ ____ Rest of LISP, currently files PAS1.RED, PAS2.RED and PAS3.RED
  193. are compiled to PASCAL using a version of the Portable LISP
  194. Compiler (PLC) [3]. During compilation, a Symbol Table file,
  195. PASn.SYM is read in and written out. These files record (for
  196. "incremental" compilation) the names and ID table locations of
  197. each ID encountered, so that the compiler can refer to an ID by
  198. its offset in the ID table. LISP constants are also recorded in
  199. the PASn.SYM files. PAS0.SYM is modified by hand as the kernel is
  200. changed.
  201. The compilation model used is that of a Register Machine:
  202. Arguments to LISP functions are passed in registers (a PASCAL
  203. array), and the result returned in Register 1. Space is allocated
  204. on a software stack (not the PASCAL recursion stack), for any
  205. temporaries or save arguments required. Short functions usually
  206. do not require any stack. The reason for this choice was the
  207. existence of the PLC (targeted at comventional machines), and the
  208. fact that inline access to the register array compiles quite
  209. well, while a "PUSH/POP" stack would be much less efficient. Apollo Pascal LISP 26 February 1982 6
  210. ______________ Initialization. After the PAS0.PAS,..PASN.PAS are produced,
  211. the symbol table file (pas3.sym) is converted into a file
  212. PASLSP.INI, which contains the names of all ID's, the LISP
  213. constants used, and also ID's for all kernel functions that
  214. should be known to the user LISP level. Also produced is a file,
  215. EXEC.PAS, that contains a case statement associating each user
  216. callable kernel function with an integer. The PAS0.PAS ...
  217. PASN.PAS and EXEC.PAS are compiled and linked into an executable
  218. file. When this file is executed, PASLSP.INI is read in: each id
  219. is read and stored in the appropriate location in the
  220. symbol-table, the kernel function names have the associated Case
  221. index put into a function cell, and the LISP s-expressions are
  222. READ in. Finally, some s-expressions will be executed (with care,
  223. the user can add his own expressions, including requests to
  224. (DSKIN 'library), etc.
  225. 4.2. Internal data structures 4.2. Internal data structures 4.2. Internal data structures
  226. The data spaces (or heaps) in PASLSP are divided into 4
  227. sections: the pair space, id space (the oblist), string space and
  228. large integer (fixnum) space. These are all arrays of objects of
  229. the appropriate type (see declarations below). The system is
  230. fully tagged, that is, every LISP item has associated with it a
  231. tag field which denotes the type of the item and an 'info' field
  232. which either points to the item in an array (in the case of
  233. pairs, identifiers and fixnums), or contains the information
  234. itself (in the case of inums, character codes and error
  235. conditions). The info field of a code pointer contains the index
  236. into a case staement (see procedure 'execute') by means of which
  237. any LISP callable function may be invoked.
  238. itemref = RECORD
  239. tag: integer; (* Small integer denoting type. *)
  240. info: integer; (* Item or a pointer to it *)
  241. (* depending upon the type. *)
  242. END;
  243. pair = PACKED RECORD
  244. prcar: itemref;
  245. prcdr: itemref;
  246. END;
  247. ident = PACKED RECORD (* identifier *)
  248. idname: stringp;
  249. val: itemref; (* value *)
  250. plist: itemref; (* property list *)
  251. funcell: itemref; (* function cell *)
  252. idhlink: id_ptr; (* hash link *)
  253. END; Apollo Pascal LISP 26 February 1982 7
  254. 4.3. Adding user functions to the kernel 4.3. Adding user functions to the kernel 4.3. Adding user functions to the kernel
  255. It is fairly easy to add handcoded Pascal functions to the
  256. kernel so that they can be called from LISP. For example,
  257. consider adding the function SQR(x), that squares its integer
  258. argument. Since SQR is already the name of an existing PASCAL
  259. function, we will call it "Xsqr" in PASCAL, and SQR in LISP.
  260. The function Xsqr has to take its argument from R[1], check
  261. that it is an intege, square the information part, and retag as
  262. integer:
  263. PROCEDURE Xsqr;
  264. VAR i1 : longint;
  265. BEGIN
  266. int_val(r[1], i1); (* Test type and extract Info *)
  267. mkint(i1 * i1, 1) (* Square, retag, and put in R[1] *)
  268. END;
  269. Now procedure Xsqr needs be to be installed into the EXECUTE
  270. table, so that it can be found as the N'th code item. The number
  271. of defined procedures will have to be increased by 1 in the 3'rd
  272. line of procedure EXECUTE, (currently 201 defined), and an
  273. additional case added:
  274. 202: Xsqr;
  275. Note also that this table gives the Internal names of each
  276. available procedure, should one of these be required in your
  277. handcoded procedure. Finally, the Identifier SQR needs to be
  278. associated with case 202 in PASLSP.INI. Note that PASLAP.INI has
  279. 3 tables of objects, each prefixed by a count and terminated by a
  280. 0. The first is the Random ID table, consisting of special ID's
  281. used for messages etc. The second block is for S-expression
  282. constants, which get loaded into the base of the stack as
  283. Globals. The next batch are the names of LISP callable functions
  284. in the order corresponding to the EXECUTE procedure. Simply
  285. modify the count form 201 to 202 (or whatever), and add SQR at
  286. the end, just before the 0.
  287. In general, look for a sample procedure in the kernel if
  288. possible, or in the compiled part (although these are hard to
  289. follow), and adapt to the specific needs. Note the use of the
  290. ALLOC(n) and DEALLOC(n) procedures to allocate a block of
  291. temporaries on the stack. These should be used, rather than Apollo Pascal LISP 26 February 1982 8
  292. PASCAL VAR's, since the garbage collector may need to trace from
  293. one of the saved objects.
  294. 5. Future work on PASLSP 5. Future work on PASLSP 5. Future work on PASLSP
  295. PASLSP V2 is based on a fairly old model of a portable LISP,
  296. and has been used mainly to explore the capbilities of PASCAL as
  297. a target language. In particular, V2 PASCAL is not yet powerful
  298. enough to run the PLC compiler itself; instead, the PLC is run on
  299. our PSL system on the DEC-20. In order for the full benefits of
  300. PASLSP (or PSL) to be realized, the user should be able to
  301. compile his own LISP modules into PASCAL and link them with the
  302. kernel. In order to make the system even more adapatable, we
  303. would like to write even less of the kernel in PASCAL by hand.
  304. This goal has lead us to the development of PSL.
  305. 5.1. Goals of the Utah PSL Project 5.1. Goals of the Utah PSL Project 5.1. Goals of the Utah PSL Project
  306. The goal of the PSL project is to produce an efficient and
  307. transportable Standard LISP system that may be used to:
  308. a. Experimentally explore a variety of LISP
  309. implementation issues (storage management, binding,
  310. environments, etc.).
  311. b. Effectively support the REDUCE computer algebra
  312. system [6] on a number of machines.
  313. c. Provide the same, uniform, modern LISP programming
  314. environment on all of the machines that we use
  315. (DEC-20, VAX/750, PDP-11/45, PERQ, and Apollo), of the
  316. power and complexity of UCI-LISP, FranzLISP or
  317. MACLISP, with some extensions and enhancements derived
  318. from LISP Machine LISP or CommonLISP.
  319. entire entire The approach we have been using is to write the entire LISP
  320. system in PSL (using LISP extensions for dealing with machine
  321. words and operations), and to bootstrap it to the desired target
  322. machine in two steps:
  323. a. Cross compile an appropriate kernel to the assembly
  324. language of the target machine;
  325. b. Once the kernel is running, use a resident compiler
  326. and loader, or fast-loader, to build the rest of the
  327. system. Apollo Pascal LISP 26 February 1982 9
  328. The PASLSP system, and other early implementations, have the
  329. problem that the implementation language (PASCAL) is a distinct
  330. language from LISP, so that communication between "system" code
  331. and "LISP" code was difficult. We have incorporated all of the
  332. good features of the earlier work into a new efficient LISP-like
  333. systems language, SYSLISP, recoded all useful modules into
  334. SYSLISP, and proceeded from there. SYSLISP currently produces
  335. targeted assembly code; earlier verisions were targeted at
  336. high-level languages such as FORTRAN, PASCAL, C or ADA. The goal
  337. is a portability strategy that leads to an efficient enough
  338. system for a production quality, yet portable system. We
  339. currently think of the extensions to Standard LISP as having two
  340. levels: the SYSLISP level, dealing with words and bytes and
  341. machine operations, enabling us to write essentially all of the
  342. kernel in Standard LISP; and, the LISP level, incorporating all
  343. of the features that make PSL into a modern LISP. Both modes of
  344. PSL are compiled by an improved version of the Portable Standard
  345. LISP Compiler. The SYSLISP mode of the PSL compiler does
  346. compile-time folding of constants, and more comprehensive
  347. register allocation than the previous LISP-only version of the
  348. compiler.
  349. The current state of PSL is fully described in an "overview"
  350. document obtainable from the authors [5]. Currently PSL runs on
  351. the DEC-20 under TOPS-20, and on the DEC VAX-11/750 under Unix.
  352. We are now concentrating on the MC68000 PSL for the Apollo. All
  353. of the code-generators and assembler support is complete, and a
  354. number of large files have been compiled from LISP to assembly
  355. code, and correctly assembled and executed on the Apollo, testing
  356. basic I/O and arithmetic. We are now in the process of writing
  357. the PSL support code (small functions in LAP), and testing that
  358. various decisions about register and memory usage are correct.
  359. Based on the development history on the VAX, we are about 1-2
  360. months away from a preliminary PSL on the Apollo.
  361. 6. References 6. References 6. References
  362. [1] Benson, E. and Griss, M. L.
  363. _______ _ ________ ____ _____ _______ ______________ SYSLISP: A portable LISP based systems implementation
  364. ________ language.
  365. Utah Symbolic Computation Group, Report UCP-81, University
  366. of Utah, February, 1981.
  367. [2] Brandt, R. C. and Knapp, B. H.
  368. The University of Utah Video Computer Authoring System.
  369. ___________ __ ___ _________ __ ________ __________ In Proceedings of the Symposium on Learning Technology,
  370. pages 18-23. Orlando, Florida, Feb, 1981. Apollo Pascal LISP 26 February 1982 10
  371. [3] Griss, M. L.; Kessler, R. R.; and Maguire, G. Q. Jr.
  372. TLISP - A Portable LISP Implemented in P-code.
  373. ___________ __ _______ __ In Proceedings of EUROSAM 79, pages 490-502. ACM, June,
  374. 1979.
  375. [4] Griss, M. L. and Morrison, B.
  376. ___ ________ ________ ____ _____ ______ The Portable Standard LISP Users Manual.
  377. Utah Symbolic Computation Group, TR-10, University of
  378. Utah, March, 1981.
  379. [5] Griss, M. L.
  380. ________ ________ ____ _ _____ ________ Portable Standard LISP: A Brief Overview.
  381. Utah Symbolic Computation Group, Operating Note 58,
  382. University of Utah, October, 1981.
  383. [6] Hearn, A. C.
  384. ______ _ _____ ______ REDUCE 2 Users Manual.
  385. Utah Symbolic Computation Group UCP-19, University of Utah,
  386. 1973.
  387. [7] Marti, J. B., et al.
  388. Standard LISP Report.
  389. _______ _______ SIGPLAN Notices 14(10):48-68, October, 1979.
  390. APPENDIX A: A List of Current PASLSP Functions and Globals APPENDIX A: A List of Current PASLSP Functions and Globals APPENDIX A: A List of Current PASLSP Functions and Globals
  391. ____ ________ __________ ___ ________ ____ ______ Lisp Callable Functions, see Standard LISP Report
  392. !*FIRST!-PROCEDURE The top loop LISP reader
  393. ABS
  394. ADD1
  395. AND
  396. APPEND
  397. APPLY
  398. APPLY1 (APPLY f (LIST u))
  399. ASSOC
  400. ATOM
  401. ATSOC
  402. CAAAAR
  403. CAAADR
  404. CAAAR
  405. CAADAR
  406. CAADDR
  407. CAADR
  408. CAAR
  409. CADAAR
  410. CADADR
  411. CADAR
  412. CADDAR
  413. CADDDR Apollo Pascal LISP 26 February 1982 11
  414. CADDR
  415. CADR
  416. CAR
  417. CATCH
  418. CDAAAR
  419. CDAADR
  420. CDAAR
  421. CDADAR
  422. CDADDR
  423. CDADR
  424. CDAR
  425. CDDAAR
  426. CDDADR
  427. CDDAR
  428. CDDDAR
  429. CDDDDR
  430. CDDDR
  431. CDDR
  432. CDR
  433. CLOSE
  434. CODEP
  435. COMPRESS
  436. COND
  437. CONS
  438. CONSTANTP
  439. DE
  440. DEFLIST
  441. DELATQ (DELATQ 'X alist) deletes (X . any) from alist
  442. DELETE
  443. DELQ Efficient DELETE (using EQ)
  444. DF
  445. DIFFERENCE
  446. DIGIT
  447. DIVIDE
  448. DM
  449. DN
  450. DSKIN (DSKIN file-id)
  451. EOFP (EOFP channel)
  452. EQ
  453. EQCAR
  454. EQN
  455. EQUAL
  456. ERROR
  457. ERRORSET
  458. ERRPRT Prints message with *'s
  459. EVAL
  460. EVLAM Evaluates a LAMBDA expression
  461. EVLIS
  462. EXPAND
  463. EXPLODE
  464. EXPT
  465. FASTSTAT Prints RECLAIM message Apollo Pascal LISP 26 February 1982 12
  466. FIX
  467. FIXP
  468. FLAG
  469. FLAG1 (FLAG (LIST x) y)
  470. FLAGP
  471. FLOAT
  472. FLOATP
  473. FLUID
  474. FLUIDP
  475. FUNCELL Accesses function cell
  476. FUNCTION
  477. GENSYM
  478. GET
  479. GETD
  480. GETV
  481. GLOBAL
  482. GLOBALP
  483. GO
  484. GREATERP
  485. IDP
  486. INTERN
  487. LBIND1 Binds a single ID in LAMBDA
  488. LBINDN
  489. LENGTH
  490. LESSP
  491. LIST2 For efficent LIST compilation
  492. LIST3
  493. LIST4
  494. LIST5
  495. LITER
  496. MAP
  497. MAPC
  498. MAPCAN
  499. MAPCAR
  500. MAPCON
  501. MAPLIST
  502. MAX
  503. MAX2
  504. MEMBER
  505. MEMQ
  506. MIN
  507. MIN2
  508. MINUS
  509. MINUSP
  510. MKVECT
  511. MSGPRT
  512. NCONC
  513. NCONS
  514. NOT
  515. NULL
  516. NUMBERP
  517. ONEP Apollo Pascal LISP 26 February 1982 13
  518. OPEN
  519. OR
  520. ORDERP
  521. P!.N Evaluates Implicit PROGNs
  522. PAIR
  523. PAIRP
  524. PBIND1 PROG binding
  525. PBINDN
  526. PLIST Access full property list
  527. PLUS
  528. PLUS2
  529. PRIN1
  530. PRIN2
  531. PRIN2T
  532. PRIN2TL
  533. PRINC
  534. PRINT
  535. PROG
  536. PROG2
  537. PROGG0131
  538. PROGN
  539. PUT
  540. PUTC
  541. PUTD
  542. PUTL
  543. PUTV
  544. QUOTIENT
  545. RDEVPR A read-eval-print loop
  546. RDS
  547. RDTOK
  548. READ
  549. READCH
  550. RECLAIM
  551. REMAINDER
  552. REMD
  553. REMFLAG
  554. REMFLAG1
  555. REMOB
  556. REMPROP
  557. RETURN
  558. REV
  559. REVERSE
  560. REVX
  561. RLIST
  562. RPLACA
  563. RPLACD
  564. SASSOC
  565. SET
  566. SETFUNCELL
  567. SETPLIST
  568. SETVALUE
  569. STRINGP Equivalent to IDP Apollo Pascal LISP 26 February 1982 14
  570. SUB1
  571. SUBLIS
  572. SUBST
  573. TCATCH
  574. TERPRI
  575. THROW
  576. TIMES
  577. TIMES2
  578. TOKEN
  579. TTHROW
  580. UNBIND1
  581. UNBINDN
  582. UNBINDTO
  583. UNFLUID
  584. UPBV
  585. VALUE
  586. VECTORP
  587. WHILE
  588. WRS
  589. WRTOK
  590. XAPPLY
  591. XCONS
  592. ZEROP
  593. ___________ _______ Interesting Globals
  594. !*RAISE Raise lower case typing to upper case if not NIL
  595. !*ECHO Selected input to selected output if not NIL.
  596. BSTK!* Holds old values of rebound IDS
  597. EMSG!* Error message in most recent call on ERROR
  598. ENUM!* Error number in most recent call on ERROR.
  599. INITFORM!* First Expression EVAL'ed
  600. THROWING!* Indicates if throwing
  601. THROWTAG!* Indicates TAG in TTHROW
  602. TOK!* Holds last token scanned
  603. TOKTYPE Indicates type of token scanned:
  604. 1: integer
  605. 2: id
  606. 3: character Apollo Pascal LISP 26 February 1982 i
  607. Table of Contents Table of Contents Table of Contents
  608. 1. Introduction 1
  609. 1.1. History of PASLSP 1
  610. 1.2. Acknowledgement 2
  611. 2. Features of PASLSP and relation to Standard LISP 2
  612. 3. Using PASLSP on the Apollo DOMAIN 3
  613. 4. Implementation of PASLSP 5
  614. 4.1. Building PASLSP 5
  615. 4.2. Internal data structures 6
  616. 4.3. Adding user functions to the kernel 7
  617. 5. Future work on PASLSP 8
  618. 5.1. Goals of the Utah PSL Project 8
  619. 6. References 9
  620. APPENDIX A: A List of Current PASLSP Functions and Globals 10