1\documentstyle[11pt]{report} 2 3\begin{document} 4 5\title{PSL 3.4 Release Notes} 6 7\author{Herbert Melenk, Winfried Neun} 8 9\section{Introduction} 10 11This document was derived to a large extent from 12"Unix PSL 3.4 Release Notes" by Shebs and ? 13(Opnote # 1987) Utah PASS Project, University of Utah. 14 15Portable Standard Lisp (PSL) 3.4 runs on a wide variety of platform,e.g. 16 17DEC Vax (under Ultrix or VMS), 18HP Series 9000 (300/400 and 700/800) HP-UX, 19SPARC and SUN 3 systems (Sun OS or Solaris), 20MIPS based systems (e.g. DECstation, CDC 4000 series, SGI Iris, Stardent), 21IBM RS/6000, 22IBM (and compatible) mainframe computers under MVS/XA and VM/XA, 23Fujitsu (Siemens) S400 systems under UXP/M 24Intel 386 or 486 based systems under MS-DOS, OS/2, Windows/NT and various 25Unixes 26MC 88000 systems (e.g. Data General AViiON) 27Cray X/Y computers running UNICOS, 28NeXT systems 29DEC Alpha systems under OSF/1 and OpenVMS 30Convex systems 31Intel i860 based systems 32 33PSL as a dialect of LISP is mainly used as a delivery vehicle for 34applications like e.g. the computer algebra system REDUCE. 35 36The COMMON LISP subset implementation 'PCLS' from the University of Utah 37is currently not supported. 38 39Although this document is written for a Unix environment, it applies to 40the VMS, MVS and DOS versions too, since the latter PSL versions 41use the same conventions for the operating system interface routines. 42The handling of the distribution tape and starting PSL is of course 43system specific and different for the various platforms 44and distribution media too. Please read the 45note "Installation of PSL 3.4" which accompanies these Release notes 46for the necessary steps to undump the distribution tapes (diskettes). 47 48Most people running PSL will not be interested in all of 49the files, and probably will not want to have them all on line. Only 50the executable programs, {\tt psl-names} and the files residing on the 51sub-directory {\tt dist/lap} (described below) must be on line to use 52PSL. Any other files may be deleted after the system is installed. 53The full distribution tape should be retained if you plan to delete 54files after installation. 55 56\section{DISCLAIMER} 57 58Please be aware that this is a research system, not a program product, 59and some of the files and documentation are not quite complete; 60we may also have forgotten some files, or sent incorrect versions. 61We are releasing this version to you at this time to enhance our 62collaborative research. 63 64For these reasons please: 65 66\begin{itemize} 67 68\item Make a note of ANY problems, concerns, suggestions you have, 69and send this information to us to aid in improving the system and 70this distribution mechanism. 71 72\item Please do not REDISTRIBUTE any of these files, listings or 73machine readable form to anyone. 74 75\end{itemize} 76 77\section{CONTENTS OF THE TAPE} 78 79Attached to this note is a listing of the files on the tape, produced 80as the tape was built. There is no list of files for diskette 81distributions though. 82The tape (or diskettes) contains the following files and directories 83(directories are indicated by {\tt */}). Some of the directories 84might be empty, but are included for compatibility with the full 85system. The c-shell variables (\$ variables) referencing these 86directories are indicated by {\tt [\$*]}. Some of the directories 87mention {\tt MACHINE}, which refers to the specific machine. 88 89\vskip 12pt 90\noindent 91EXECUTABLES: {\tt \$proot/bin/} (the bin directory is {\tt \$psys}) 92 93\begin{description} 94 95\item[{\tt bare-psl}:] The smallest executable used mostly for 96building other executables. 97 98\item[{\tt psl}:] {\tt bare-psl} with several modules loaded (see your 99installer or look at the {\tt psl} variable {\tt options*} to see which 100modules are loaded. 101 102\item[{\tt pslcomp}:] {\tt psl} with the compiler loaded. 103 104\end{description} 105 106\noindent 107SHELL SCRIPTS: {\tt \$proot/dist/} 108 109\begin{description} 110 111 112\item[{\tt psl-names}:] 113A file to be {\tt source}ed to define environment variables (such as 114{\tt \$pu} for {\tt util/}, {\tt \$pl} for {\tt lap/}, etc.) to aid in 115accessing the various PSL sub-directories. 116On a VMS system the equivalent file pslnames.com must be run a procedure 117e.g. started in your login.ini file. 118\end{description} 119 120\item[{\tt oload}:] 121A C shell script to to permit {\tt .o} files to be dynamically loaded. 122(This does not exist on all systems. We strongly recommend NOT to use 123oload.) 124 125\noindent 126DIRECTORIES: {\tt \$proot/dist/} 127 128\begin{description} 129 130\item[{\tt lap/}:] 131PSL binary ({\tt *.b}) files. Contains binary files needed to 132rebuild the executables plus binary files for optional loadable 133modules. PSL binary files are sometimes referred to as FASL (fast 134loading) files. [{\tt \$pl}] 135 136\item[{\tt kernel/}:] 137Machine-independent kernel sources. [{\tt \$pk}] 138 139\item[{\tt kernel/MACHINE/}:] 140Machine-specific kernel sources and object files. [{\tt \$pxk}] 141 142\item[{\tt nonkernel/}:] 143Files which are part of a standard {\tt bare-psl}, but not 144compiled in the kernel build. [{\tt \$pnk}] 145 146\item[{\tt nonkernel/MACHINE/}:] 147Machine-specific files which are part of a standard {\tt bare-psl}, but 148not compiled in the kernel build. [{\tt \$pxnk}] 149 150\item[{\tt comp/}:] 151Machine-independent compiler sources. [{\tt \$pc}] 152 153\item[{\tt comp/MACHINE/}:] 154Machine-specific compiler sources. [{\tt \$pxc}] 155 156\item[{\tt util/}:] 157Sources for machine-independent utilities. [{\tt \$pu}] 158 159\item[{\tt util/MACHINE/}:] 160Sources for machine-specific utilities. [{\tt \$pxu}] 161 162\item[{\tt distrib/}:] 163Scripts to help build and maintain the machine-independent parts of 164PSL. [{\tt \$pdist}] 165 166\item[{\tt distrib/MACHINE/}:] 167Scripts to help build and maintain the machine-specific parts of PSL. 168[{\tt \$pdist}] 169 170\item[{\tt lpt/}:] 171The PSL manual in printable form (has overprinting and underlining). 172 173\item[{\tt doc/}:] 174Versions of this document and the addendum to the PSL manual. We keep 175the source texts and printable versions in postscript ({\tt .ps}) and 176laserjet format ({\tt .jep}). 177 178\end{description} 179 180\bigskip 181 182 183\section{A SUGGESTION TO SYSTEM MANAGERS} 184 185PSL has a large heap (of which only half may be used at any 186given time if the copying garbage collector is being used, 187rather than the compacting collector). 188The default size of a running PSL core image is roughly 4.5 megabytes. 189Because of this, it is recommended 190that your system be configured with at least 32 megabytes of swap 191space. If this is too great a burden on your system, see the section 192on rebuilding the kernel for instructions on creating a version with 193a smaller heap. 194 195If a large number of people wish to run PSL simultaneously, either 196the swap space will have to be increased, or a smaller PSL should be built. 197 198\section{READING THE TAPE} 199 200This information depends very much on your specific combination of 201operating system and distribution media. Please find a separate note 202on undumping the distirbution tape attached to this note. 203 204Unless absolutely essential, we recommend that you use exactly the same 205directory structure as we do (relative to the root of the PSL tree), 206even though the system is set up to be installed according to local 207conventions. 208 209\section{INSTALLING PSL} 210 211\subsection{Update the Root Location} 212 213After reading the tape, you need to customize the files to reflect the 214root location of PSL. This can be accomplished with 215{\tt newroot.csh}. It takes one argument which is the fully rooted 216path of the PSL root directory. {\tt newroot.csh} will replace the root 217in {\tt psl-names} and all of the makefiles. For example, 218 219\begin{verbatim} 220 ./dist/distrib/newroot.csh /v/misc/psl 221\end{verbatim} 222 223\subsection{Adding the PSL Environment} 224 225Your {\tt .cshrc} file should be edited to {\tt source} the new 226{\tt psl-names}, and set up your search path. If you have previously 227installed a version of PSL, you should at this time make sure that 228your {\tt .cshrc} refers to this NEW {\tt psl-names}. 229 230To do this, insert the lines 231\begin{verbatim} 232 source $~psl/dist/psl-names # or equivalent 233 set path=(. $psys /usr/bin /bin ...) # plus any others 234\end{verbatim} 235into your {\tt .cshrc} file at an appropriate point. 236 237Now do 238\begin{verbatim} 239 source ~/.cshrc 240\end{verbatim} 241to set all paths to that of the new PSL. 242 243\subsection{Make links to executables} 244 245Do: 246 247\begin{verbatim} 248 make install 249\end{verbatim} 250 251to make symbolic links from your standard system directory to the 252executables in {\tt \$psys}. The default is {\tt /usr/site/bin/}. 253This makes it unnecessary for users of PSL to put {\tt \$psys} in the 254search path variables of their {\tt .login} files before they can use 255PSL. (For users on System V Unix or Apollos, this step does not work. 256Users must put {\tt \$psys} on their search path.) This default is 257defined in {\tt \$psl/Makefile} as the {\tt DESTDIR} variable. PSL 258users must still {\tt source psl-names} to use PSL if they intend to 259load modules from the {\tt lap/} directory or use {\tt oload} to load 260{\tt .o files}. 261 262\subsection{Delete unneeded directories} 263 264Only the {\tt lap/} subdirectory and the {\tt \$psl/psl-names} and 265{\tt \$xxx-names} files are necessary for running PSL 266programs. If you do not wish to keep the source files on-line, you 267may delete any other files after successfully testing PSL, and 268rebuilding any modules or binaries that you need to change. But DO 269retain the distribution tape! Many users of PSL find that on-line 270sources are useful tutorial and reference material, and we once again 271recommend that you retain the file structure as distributed. 272 273\subsection{Announce the system} 274 275You should only announce the system if there are users who are going 276to use PSL directly. Here is how to do it: 277 278Send out a message to all those interested in using PSL. The file 279{\tt \$psl/doc/bboard.msg} is a suggested start. In particular, make 280sure that you inform people of the exact path needed to place a 281{\tt source .../psl-names} in their {\tt .login} file, if they desire, since 282{\tt psl-names} facilitates reference to the PSL source directories. 283 284Edit as you see fit, but please REMIND people not to re-distribute the PSL 285system and sources. Note the [.....] blocks in which you are to insert 286the name of some person responsible to answer questions. 287 288You may also want to set the directory protection and limit access only to 289those that you feel should have access at this time. 290 291\section{REBUILDING PSL LOADABLE MODULES} 292 293All of the utilities, are kept as binary FASL files (with extensions 294{\tt .b}) on the {\tt lap/} subdirectory. After modifying a utility source 295file just connect to {\tt \$pu} and do {\tt make}. This will 296automatically detect which files need to be recompiled. Once 297recompiled it will place the binary version(s) on {\tt \$pl}, the 298directory from which the executables obtain loadable modules. 299 300\subsection{Using Pslcomp} 301 302{\tt pslcomp} can be used to compile a file, regardless of whether it is 303listed in one of the makefiles. Connect to the directory where the 304sources for file {\tt XXX} reside. Do 305\begin{verbatim} 306 pslcomp XXX 307\end{verbatim} 308This will compile the file {\tt XXX}, placing the binary (.b) file is 309placed in the directory to which you are connected. {\tt pslcomp} 310knows about {\tt .sl} and {\tt .l} extensions. 311 312\section{REBUILDING THE SYSTEM} 313 314It is not necessary to rebuild the system after reading the tape. The 315executables should run on your system. PSL determines the location of 316its tree (necessary for finding the {\tt lap/} directory, the {\tt 317oload} script, etc.) by checking the environment variables. That is 318why a user must source {\tt psl-names} to use PSL. If you do need to 319rebuild the system then this section explains the necessary steps. 320 321To rebuild the system, you must have read the entire contents of the 322tape. If you have then change your 323working directory to {\tt \$psl}, and do: 324\begin{verbatim} 325 make 326\end{verbatim} 327 328This will connect to several subdirectories of {\tt \$psl} and run 329make in those directories. These ``recursive'' makes will: 330 331\begin{itemize} 332 333\item Recompile C system interface routines used in the kernel. 334 335\item Recompile any out-of-date PSL system source files, putting their 336binary versions on {\tt \$pl} (none of the PSL source files should be 337out-of-date after first reading a tape). 338 339\item Rebuild {\tt bare-psl}, {\tt psl}, and {\tt pslcomp}, placing 340them on {\tt \$psys}. 341 342\end{itemize} 343 344\section{REBUILDING THE PSL KERNEL} 345 346A running {\tt xxx-cross} and {\tt pslcomp} are required to rebuild 347the kernel, since the entire system is written in PSL itself. The 348kernel modules are compiled to assembly code ({\tt as}) using {\tt 349xxx-cross}. They are then linked using the system loader {\tt ld}. 350After that, the rest of the system is compiled to {\tt .b} files, 351which are loaded into the kernel to produce the executables. You can 352modify any file in the PSL tree. Then connect to {\tt \$psl} and do 353{\tt make}. This will recompile any modified files and rebuild the 354executables. 355 356\subsection{Cleanup} 357 358{\tt cd \$psl; make cleanup} will remove log files, editor backup files, and 359backup copies of the executables. 360 361\subsection{Building PSL with different static sizes} 362 363PSL uses static sizes for Binary Program Space (BPS), whereas the heap 364size is adjustable. 365The BPS holds compiled code (both {\tt oload}ed C code and Lisp code), 366while the heap contains dynamic Lisp data. 367 368To determine how much bps space is left call {\tt (free-bps)}. The 369result is in words, so multiply by 4 to get total bytes left. The 370amount of available heap space can be determined by first running the 371garbage collector to compact memory and then calling {\tt gtheap} 372with a {\tt nil} argument: {\tt (gtheap nil)}. This also returns the 373number of words, so multiply by 4 to get bytes. The following shows 374an example of this: 375 376\begin{verbatim} 377PSL 3.4, 8-Sep-91 3781 lisp> (free-bps) 379216013 3802 lisp> (reclaim) 381*** Garbage collection starting 382+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 383NIL 3843 lisp> (gtheap nil) 385396538 3864 lisp> 387\end{verbatim} 388 389In order to change the amount of BPS space, do the following: 390 391\begin{enumerate} 392 393\item Connect to the {\tt \$pxk} directory. 394 395\item Edit {\tt Makefile} and change the value of the variable 396{\tt BPSSIZE}. This is the number of bytes. {\it It must be a 397multiple of four.} 398 399\item Connect to the {\tt \$psl} directory. 400 401\item Run ``{\tt make resize}''. 402 403\end{enumerate} 404 405\noindent For example: 406 407\begin{verbatim} 408% cd $pxk 409% vi Makefile ... make changes to this file 410% cd $psl 411% make resize 412\end{verbatim} 413 414In order to change the amount of Heap space, you must do the 415following: 416 417\begin{enumerate} 418 419\item If your system uses ``images'', i.e. all non UNIX systems and 420Unix versions where a file {\tt \$psys/.imago} exists, you can simply add 421or modify the memory size uses in the startup file {\tt \$psys/psl} 422e.g. if you want to run PSL with 800000 Bytes total system size: 423 424\begin{verbatim} 425#! /bin/csh -f 426$psys/bpsl -f $psys/psl.img -td 8000000 427\end{verbatim} 428 429Under VMS, you can simply start PSL with \$psl -td 8000000 . 430 431 432\item If your system does not use images, you can set the heap size 433by using the command set-heap-size, e.g. 434 435\begin{verbatim} 436(set-heap-size 8000000) 437\end{verbatim} 438 439If set-heap-size returns its argument the additional memory was allocated. 440 441\section{FUTURE UPDATES} 442 443It is currently envisioned that future updates will be complete 444releases. It is therefore suggested that you 445 446\begin{itemize} 447 448\item Retain this distribution tape in case you may have to compare files. 449 450\item Do not make any changes on these distributed directories. If you must 451make your own bug fixes, it is suggested that you put the changed 452files on some other directories, such as {\tt \$proot/local}, etc. We 453will not send any files on these directories, so that you can compare 454your local versions with our newer ones. 455 456\end{itemize} 457 458\section{BUG REPORTS} 459 460If you wish, you can send bug reports, suggestions, fixes, etc. to us. 461If you have Internet access, you can send email to {\tt 462neun@sc.ZIB-Berlin.de}. For those with BITNET access, use {\tt 463neun@sc.ZIB-Berlin.dbp.de}. 464 465\section{PSL init files} 466 467When {\tt psl} starts up it will attempt to read and evaluate a file named 468{\tt .pslrc} ({\tt PSL.INI} under VMS) from your home directory. 469Similarly, {\tt pslcomp} will use a 470{\tt .pslcomprc} ({\tt PSLCOMP.INI) init file. 471 472\section{UNIX specific PSL procedures} 473 474Following are some PSL procedures available in all UNIX versions of PSL. 475Most of them are available in all versions of PSL. 476 477\def \thing #1#2#3#4 {{\noindent {\tt(#1): #2} \hfill {\it #3}} 478 \begin{itemize}\item[] #4 479 \end{itemize}} 480 481\thing{cd S:string}{boolean}{expr}{Sets the current working directory to be 482the value of string. Returns {\tt t} if it is successful, otherwise 483{\tt nil}.} 484 485\thing{channelflush CHNL:inum}{(inum,0)}{expr}{Flush the existing channel 486CHNL so that all characters that have not actually been written 487to the channel are done so.} 488 489\thing{exitlisp}{Undefined}{expr}{Equivalent to {\tt quit} 490(Refer to {\tt quit}).} 491 492\thing{exit-with-status N:number}{Undefined}{expr}{Exit from PSL, 493returning the integer {\tt N} to the caller. This operation 494eventually calls the C library routine {\tt exit}}. 495 496\thing{filestatus FILENAME:string DOSTRINGS:string}{(list, nil)}{expr}{ 497Return system dependent information about the file FILENAME. The values 498returned are user, group, mode, size, creation time, access time, and 499modification time. The DOSTRINGS argument is a flag that turns 500on conversion of the information to string representation. If {\tt nil}, 501the information is returned in a system dependent manner.} 502 503\thing{flushstdoutputbuffer}{any}{expr}{Flush the standard output buffer 504so that any characters that have not been written, are done so. The 505buffer flushed is the one usually associated with {\tt stdout}. This 506operation only works when the terminal is in {\tt cooked} mode (see 507{\tt echoon}).} 508 509\thing{getenv S:string}{(string, nil)}{expr}{Getenv searches the environment 510for a string of the form S=value and returns the value if such a 511string is present, otherwise {\tt nil} is returned. This is equivalent, but 512not identical to the Unix operation of the same name.} 513 514\thing{getstartupname}{string}{expr}{Return the absolute path of the file 515that PSL was started from.} 516 517\thing{getunixargs}{(vector, nil)}{expr}{The arguments supplied on the 518command line to the PSL executable are placed in the vector stored in 519the PSL variable {\tt unixargs*}. The vector is a vector of strings.} 520 521\thing{init-file-string NAME:string}{string}{expr}{Construct a string 522containing the name of an initialization file in the user's home 523directory. The name of the file is constructed by prepending a ``.'' 524to NAME, and appending ``rc'' to NAME. For example, if the value of 525NAME was ``psl'', the initialization filename constructed would be 526``.pslrc''.} 527 528\thing{named-user-homedir NAME:string}{string}{expr}{Return the home 529directory path of the user named NAME.} 530 531\thing{pwd}{string}{expr}{Determine the current working directory and 532return the value as a string.} 533\section{Abstract} 534 535\thing{quit}{Undefined}{expr}{Exit from PSL, returning to the caller. 536If PSL is in a break loop, a non-zero status is returned.} 537 538\thing{setenv VAR:string VAL:string}{any}{expr}{Setenv searches the 539environment for a string of the form VAR=value and if it is not found, 540a string of the form VAR=VAL is added to the environment. If it is 541found, VAR=value is overwritten so that it is equal to VAR=VAL. This 542is equivalent, but not identical to the Unix operation of the same 543name.} 544 545\thing{system S:string}{string}{expr}{Executes S in a sub (Bourne) shell. 546Returns the exit status of the shell.} 547 548\thing{unix-time}{integer}{expr}{Returns the number of seconds since 549some arbitrary point. For most Unix systems, this is January 1, 1970.} 550 551\thing{unlink FILENAME:string}{any}{expr}{Remove the file FILENAME (works 552similar to {\tt rm}).} 553 554\thing{user-homedir-string}{string}{expr}{Return the home directory 555path of the user running PSL.} 556 557 558 SUN 3 16 MByte 559 SUN 386i 128 MByte 560 SUN 4 128 MByte 561 Mips Systems 256 MByte 562 563Since all systems use a two space copying garbage collector, one LISP 564item costs 8 byte of memory and the maximum amount of heap items varies 565between approx 1,5 M (Sun 3) and approx 30 M (Mips). 566 567 568In some rare cases a "Binding stack overflow" can occur. 569Normally this is due to a problem formulation which involves infinte 570recursion. For very big problems, a correct problem may exhaust the binding 571stack space, in this case the user may increase the size of the 572Binding stack by: (default is 2000) 573 574 PSL REDUCE 575 576 (set-bndstk-size nnnn) symbolic set!-bndstk!-size nnnn; 577 578 579 580The arithmetic and specially the infinite precision arithmetic for PSL 581and REDUCE was dramatically improved. This software benefits from the 582usage of hardware specific instructions for double precision arithmetic 583(if such instructions are provided by the processor). 584The load module is called nbig30, which is loaded into REDUCE by the 585usual build procedure and should be used in PSL instead of nbig. 586 587The floating point coprocessors of the systems are used for all 588floating point calculations. 589 590 591 592At the moment the overflow of the system stack is not handled gently. 593An overflow causes a 'Illegal Instruction' trap and a core dump (if 594not prevented by setting a limit to core files). We hope that later 595versions of PSL (and partially of Operating systems) 596will have an improved handling for that. 597 598 599For issueing commands to the operating system the "sytem" interface 600has been defined previously, e.g. 601 602 603 (system "ls") or system "ls"; 604 605 606will list the names of the files in the current working directory. 607The system command uses the system call "system" which creates a new 608(Bourne) shell to process the command enclosed in the string. 609Some operating system command are useful only is they are issued 610in the same shell as the running REDUCE or PSL run, e.g. 611 612 613 (system "cd hugo") or system "cd hugo"; 614 615 616will NOT change the current directory for the next REDUCE or PSL 617commands. To provide the user with such "built-in" system calls a 618number of Unix commands are available in REDUCE or PSL, e.g. 619 620 621 (cd "hugo") or symbolic cd "hugo"; 622 623 624will change the current directory for the next REDUCE or PSL commands, 625if "hugo" is a valid directory name. 626The most widely used "built-in" commands available in this version are: 627 628 (cd "dirname") symbolic cd "dirname"; 629 (getenv "string") or symbolic getenv "string"; (setenv "string" "string") symbolic setenv("string","string"); 630 631 632The code generated by the PSL compiler can be inspected by loading 633the utility disassemble (not yet for SUN386i) and calling the 634function 635 636\end{document} 637 638