diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 2875b50..246a25b 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -36,8 +36,8 @@ %% %% defun marks a function definition and adds it to the index %% -\newcommand{\defun}[1]{% e.g. \defun{functionname} -\subsection{defun #1}% +\newcommand{\defun}[2]{% e.g. \defun{functionname} +\subsection{defun #2}% \label{#1}% \index{#1}% \index{defun!#1}% @@ -56,7 +56,7 @@ %% %% defvar marks a var definition and adds it to the index %% -\newcommand{\defvar}[1]{% e.g. \def{functionname} +\newcommand{\defvar}[1]{% e.g. \defvar{varname} \subsection{defvar \${#1}}% \label{#1}% \index{#1}% @@ -276,6 +276,98 @@ November 10, 2003 ((iHy)) \eject \pagenumbering{arabic} \setcounter{chapter}{0} % Chapter 1 +\chapter{Credits} +Axiom has a very long history and many people have contributed to the +effort, some in large ways and some in small ways. Any and all effort +deserves recognition. There is no other criteria than contribution +of effort. We would like to acknowledge and thank the following people: +<>= +(defvar credits '( +"An alphabetical listing of contributors to AXIOM:" +"Cyril Alberga Roy Adler Christian Aistleitner" +"Richard Anderson George Andrews S.J. Atkins" +"Henry Baker Stephen Balzac Yurij Baransky" +"David R. Barton Gerald Baumgartner Gilbert Baumslag" +"Jay Belanger David Bindel Fred Blair" +"Vladimir Bondarenko Mark Botch" +"Alexandre Bouyer Peter A. Broadbery Martin Brock" +"Manuel Bronstein Stephen Buchwald Florian Bundschuh" +"Luanne Burns William Burge" +"Quentin Carpent Robert Caviness Bruce Char" +"Ondrej Certik Cheekai Chin David V. Chudnovsky" +"Gregory V. Chudnovsky Josh Cohen Christophe Conil" +"Don Coppersmith George Corliss Robert Corless" +"Gary Cornell Meino Cramer Claire Di Crescenzo" +"David Cyganski" +"Timothy Daly Sr. Timothy Daly Jr. James H. Davenport" +"Didier Deshommes Michael Dewar" +"Jean Della Dora Gabriel Dos Reis Claire DiCrescendo" +"Sam Dooley Lionel Ducos Martin Dunstan" +"Brian Dupee Dominique Duval" +"Robert Edwards Heow Eide-Goodman Lars Erickson" +"Richard Fateman Bertfried Fauser Stuart Feldman" +"Brian Ford Albrecht Fortenbacher George Frances" +"Constantine Frangos Timothy Freeman Korrinn Fu" +"Marc Gaetano Rudiger Gebauer Kathy Gerber" +"Patricia Gianni Samantha Goldrich Holger Gollan" +"Teresa Gomez-Diaz Laureano Gonzalez-Vega Stephen Gortler" +"Johannes Grabmeier Matt Grayson Klaus Ebbe Grue" +"James Griesmer Vladimir Grinberg Oswald Gschnitzer" +"Jocelyn Guidry" +"Steve Hague Satoshi Hamaguchi Mike Hansen" +"Richard Harke Vilya Harvey Martin Hassner" +"Arthur S. Hathaway Dan Hatton Waldek Hebisch" +"Karl Hegbloom Ralf Hemmecke Henderson" +"Antoine Hersen Gernot Hueber" +"Pietro Iglio" +"Alejandro Jakubi Richard Jenks" +"Kai Kaminski Grant Keady Tony Kennedy" +"Paul Kosinski Klaus Kusche Bernhard Kutzler" +"Tim Lahey Larry Lambe Franz Lehner" +"Frederic Lehobey Michel Levaud Howard Levy" +"Liu Xiaojun Rudiger Loos Michael Lucks" +"Richard Luczak" +"Camm Maguire Francois Maltey Alasdair McAndrew" +"Bob McElrath Michael McGettrick Ian Meikle" +"David Mentre Victor S. Miller Gerard Milmeister" +"Mohammed Mobarak H. Michael Moeller Michael Monagan" +"Marc Moreno-Maza Scott Morrison Joel Moses" +"Mark Murray" +"William Naylor C. Andrew Neff John Nelder" +"Godfrey Nolan Arthur Norman Jinzhong Niu" +"Michael O'Connor Summat Oemrawsingh Kostas Oikonomou" +"Humberto Ortiz-Zuazaga" +"Julian A. Padget Bill Page Susan Pelzel" +"Michel Petitot Didier Pinchon Ayal Pinkus" +"Jose Alfredo Portes" +"Claude Quitte" +"Arthur C. Ralfs Norman Ramsey Anatoly Raportirenko" +"Michael Richardson Renaud Rioboo Jean Rivlin" +"Nicolas Robidoux Simon Robinson Raymond Rogers" +"Michael Rothstein Martin Rubey" +"Philip Santas Alfred Scheerhorn William Schelter" +"Gerhard Schneider Martin Schoenert Marshall Schor" +"Frithjof Schulze Fritz Schwarz Nick Simicich" +"William Sit Elena Smirnova Jonathan Steinbach" +"Fabio Stumbo Christine Sundaresan Robert Sutor" +"Moss E. Sweedler Eugene Surowitz" +"Max Tegmark James Thatcher Balbir Thomas" +"Mike Thomas Dylan Thurston Barry Trager" +"Themos T. Tsikas" +"Gregory Vanuxem" +"Bernhard Wall Stephen Watt Jaap Weel" +"Juergen Weiss M. Weller Mark Wegman" +"James Wen Thorsten Werther Michael Wester" +"John M. Wiley Berhard Will Clifton J. Williamson" +"Stephen Wilson Shmuel Winograd Robert Wisbauer" +"Sandra Wityak Waldemar Wiwianka Knut Wolf" +"Clifford Yapp David Yun" +"Vadim Zhytnikov Richard Zippel Evelyn Zoernack" +"Bruno Zuercher Dan Zwillinger" +)) + +@ + \chapter{The Interpreter} The Axiom interpreter is a large common lisp program. It has several forms of interaction and run from @@ -285,7 +377,7 @@ pipe. \chapter{The Fundamental Data Structures} \chapter{Starting Axiom} Axiom starts by invoking a function value of the lisp symbol -[[*top-level-hook*]]. The function invocation path to from this +\verb|*top-level-hook*|. The function invocation path to from this point until the prompt is approximates (skipping initializations): \begin{verbatim} lisp -> restart @@ -297,14 +389,14 @@ point until the prompt is approximates (skipping initializations): -> |SpadInterpretStream| -> |intloopReadConsole| \end{verbatim} -The [[|intloopReadConsole|]] function does tail-recursive calls to +The |intloopReadConsole| function does tail-recursive calls to itself (don't break this) and never exits. \section{Variables Used} \section{Data Structures} \section{Functions} -\defun{set-restart-hook} +\defun{set-restart-hook}{set-restart-hook} When a lisp image containing code is reloaded there is a hook to -allow a function to be called. In our case it is the [[restart]] +allow a function to be called. In our case it is the restart function which is the entry to the Axiom interpreter. <>= (defun set-restart-hook () @@ -319,13 +411,13 @@ function which is the entry to the Axiom interpreter. The restart function is the real root of the world. It sets up memory if we are working in a GCL/akcl version of the system. -The [[compiler::*compile-verbose*]] flag has been set to nil globally. +The \verb|compiler::*compile-verbose*| flag has been set to nil globally. We do not want to know about the microsteps of GCL's compile facility. -The [[compiler::*suppress-compiler-warnings*]] flag has been set to t. +The \verb|compiler::*suppress-compiler-warnings*| flag has been set to t. We do not care that certain generated variables are not used. -The [[compiler::*suppress-compiler-notes*]] flag has been set to t. +The \verb|compiler::*suppress-compiler-notes*| flag has been set to t. We do not care that tail recursion occurs. It sets the @@ -373,6 +465,9 @@ information is initialized. <>= (defun restart () + (declare (special $openServerIfTrue $SpadServerName |$SpadServer| + |$IOindex| |$InteractiveFrame| |$printLoadMsgs| $current-directory + |$displayStartMsgs| |$currentLine|)) #+:akcl (init-memory-config :cons 500 :fixnum 200 :symbol 500 :package 8 :array 400 :string 500 :cfun 100 :cpages 3000 :rpages 1000 :hole 2000) @@ -401,7 +496,7 @@ information is initialized. (|spad|)) @ -\defun{spad} +\defun{spad}{spad} Starts the interpreter but does not read in profiles, etc. <>= (defun |spad| () @@ -414,10 +509,11 @@ Starts the interpreter but does not read in profiles, etc. '|EndOfSpad|)) @ -\defun{runspad} +\defun{runspad}{runspad} <>= (defun |runspad| () (prog (mode) + (declare (special |$quitTag|)) (return (seq (progn @@ -433,7 +529,8 @@ Starts the interpreter but does not read in profiles, etc. (setq mode (catch '|top_level| (|ncTopLevel|)))))))))))))) @ -\defun{ncTopLevel} +\chapter{Handling Input} +\defun{ncTopLevel}{ncTopLevel} Top-level read-parse-eval-print loop for the interpreter. Uses the Bill Burge's parser. <>= @@ -451,7 +548,7 @@ the Bill Burge's parser. (|ncIntLoop|))) @ -\defun{ncIntLoop} +\defun{ncIntLoop}{ncIntLoop} <>= (defun |ncIntLoop| () (let ((curinstream *standard-output*) @@ -460,19 +557,10 @@ the Bill Burge's parser. (|intloop|))) @ -\defun{intloop} -Note that the [[SpadInterpretStream]] function uses a list of +\defun{intloop}{intloop} +Note that the SpadInterpretStream function uses a list of three strings as an argument. The values in the list seem to have no use and can eventually be removed. -\begin{verbatim} -intloop () == - mode := $intRestart - while mode = $intRestart repeat - resetStackLimits() - mode := CATCH($intTopLevel, - SpadInterpretStream(1, ["TIM", "DALY", "?"], true)) - -\end{verbatim} <>= (defun |intloop| () (prog (mode) @@ -494,13 +582,13 @@ intloop () == (list 'tim 'daly '?) t))))))))))))) @ -\defun{SpadInterpretStream} -The [[SpadInterpretStream]] function takes three arguments +\defun{SpadInterpretStream}{SpadInterpretStream} +The SpadInterpretStream function takes three arguments \begin{list}{} -\item [[str]] This is passed as an argument to [[intloopReadConsole]] -\item [[source]] This is the name of a source file but appears not -to be used. It is set to the list [[(tim daly ?)]]. -\item [[interactive?]] If this is false then various messages are +\item str This is passed as an argument to intloopReadConsole +\item source This is the name of a source file but appears not +to be used. It is set to the list \verb|(tim daly ?)|. +\item \verb|interactive?| If this is false then various messages are suppressed and input does not use piles. If this is true then the library loading routines might output messages and piles are expected on input (as from a file). @@ -539,7 +627,7 @@ Thus, when a system command is entered this function is called. @ \section{The Read-Eval-Print Loop} -\defun{intloopReadConsole} +\defun{intloopReadConsole}{intloopReadConsole} Note that this function relies on the fact that lisp can do tail-recursion. The function recursively invokes itself. @@ -599,9 +687,9 @@ will end up as a recursive call to ourselves. @ \section{Helper Functions} -\defun{getenviron} +\defun{getenviron}{getenviron} <>= -(defun getenviron (shellvar) +(defun getenviron (var) #+allegro (sys::getenv (string var)) #+clisp (ext:getenv (string var)) #+(or cmu scl) @@ -615,7 +703,7 @@ will end up as a recursive call to ourselves. ) @ -\defun{init-memory-config} +\defun{init-memory-config}{init-memory-config} Austin-Kyoto Common Lisp (AKCL), now known as Gnu Common Lisp (GCL) requires some changes to the default memory setup to run Axiom efficently. This function performs those setup commands. @@ -657,11 +745,12 @@ of the {\bf AXIOM} shell variable at build time) if we can't. Called from \fnref{restart}. <>= (defun initroot (&optional (newroot (BOOT::|getEnv| "AXIOM"))) + (declare (special $spadroot)) (reroot (or newroot $spadroot (error "setenv AXIOM or (setq $spadroot)")))) @ -\defun{intloopPrefix?} +\defun{intloopPrefix?}{intloopPrefix?} If the prefix string is the same as the whole string initial characters (ignoring spaces in the whole string) then we return the whole string minus any leading spaces. @@ -675,22 +764,23 @@ minus any leading spaces. @ -\defun{make-absolute-filename} +\defun{make-absolute-filename}{make-absolute-filename} Prefix a filename with the {\bf AXIOM} shell variable. <>= (defun make-absolute-filename (name) + (declare (special $spadroot)) (concatenate 'string $spadroot name)) @ -\defun{makeInitialModemapFrame} +\defun{makeInitialModemapFrame}{makeInitialModemapFrame} <>= (defun |makeInitialModemapFrame| () (copy |$InitialModemapFrame|)) @ -\defun{ncloopEscaped} +\defun{ncloopEscaped}{ncloopEscaped} The ncloopEscaped function will return true if the last non-blank character of a line is an underscore, the Axiom line-continuation character. Otherwise, it returns nil. @@ -703,7 +793,7 @@ character. Otherwise, it returns nil. @ -\defun{reclaim} +\defun{reclaim}{reclaim} Call the garbage collector on various platforms. <>= #+abcl @@ -728,7 +818,7 @@ Call the garbage collector on various platforms. (defun reclaim () (sb-ext::gc)) @ -\defun{reroot} +\defun{reroot}{reroot} The reroot function is used to reset the important variables used by the system. In particular, these variables are sensitive to the {\bf AXIOM} shell variable. That variable is renamed internally to @@ -743,9 +833,12 @@ before compiling this file. A correct call looks like: (in-package "BOOT") (reroot "/spad/mnt/${SYS}") \end{verbatim} -where the [[${SYS}]] variable is the same one set at build time. +where the \verb|${SYS}| variable is the same one set at build time. <>= (defun reroot (dir) + (declare (special $spadroot $directory-list $relative-directory-list + $library-directory-list $relative-library-directory-list + |$defaultMsgDatabaseName| |$msgDatabaseName| $current-directory)) (setq $spadroot dir) (setq $directory-list (mapcar #'make-absolute-filename $relative-directory-list)) @@ -758,7 +851,7 @@ where the [[${SYS}]] variable is the same one set at build time. @ -\defun{setCurrentLine} +\defun{setCurrentLine}{setCurrentLine} Remember the current line. The cases are: \begin{itemize} \item If there is no \$currentLine set it to the input @@ -788,15 +881,6 @@ this is what the current code does so I won't change it. @ -\chapter{System Statistics} -\pagehead{statisticsInitialization}{statisticsInitialization} -<>= -(defun |statisticsInitialization| () - "initialize the garbage collection timer" - #+:akcl (system:gbc-time 0) - nil) - -@ \chapter{System Command Handling} \defdollar{systemCommands} The system commands are the top-level commands available in Axiom @@ -848,6 +932,7 @@ See:\\ \item The \fnref{zsystemdevelopment} command \end{itemize} +\section{Variables Used} \defdollar{systemCommands} <>= (defvar |$systemCommands| nil) @@ -930,7 +1015,8 @@ all kinds of input that will not be acceptable to the interpreter. ))) @ -\defun{handleNoParseCommands} +\section{Functions} +\defun{handleNoParseCommands}{handleNoParseCommands} The system commands given by the global variable \verb|$noParseCommands| require essentially no preprocessing/parsing of their arguments. Here we dispatch the functions which implement @@ -1104,7 +1190,7 @@ during a session are pushed onto this list for later lookup. @ -\defun{ncloopCommand} +\defun{ncloopCommand}{ncloopCommand} The \$systemCommandFunction is set in SpadInterpretStream to point to the function InterpExecuteSpadSystemCommand. The system commands are handled by the function kept in the ``hook'' @@ -1128,7 +1214,7 @@ for processing \verb|)read| of input files. @ -\defun{ncloopPrefix?} +\defun{ncloopPrefix?}{ncloopPrefix?} If we find the prefix string in the whole string starting at position zero we return the remainder of the string without the leading prefix. <>= @@ -1138,14 +1224,14 @@ we return the remainder of the string without the leading prefix. @ -\defun{selectOptionLC} +\defun{selectOptionLC}{selectOptionLC} <>= (defun |selectOptionLC| (x l errorFunction) (|selectOption| (downcase (|object2Identifier| x)) l errorFunction)) @ -\defun{selectOption} +\defun{selectOption}{selectOption} <>= (defun |selectOption| (x l errorfunction) (let (u y) @@ -1258,13 +1344,15 @@ constructor name {\tt VectorFunctions2} from the system: )abbreviation remove VectorFunctions2 \end{verbatim} -\defun{abbreviations} +\section{Variables Used} +\section{Functions} +\defun{abbreviations}{abbreviations} <>= (defun |abbreviations| (l) (|abbreviationsSpad2Cmd| l)) @ -\defun{abbreviationsSpad2Cmd} +\defun{abbreviationsSpad2Cmd}{abbreviationsSpad2Cmd} <>= (defun |abbreviationsSpad2Cmd| (arg) (let (abopts quiet opt key type constructor t2 a b al) @@ -1319,17 +1407,7 @@ constructor name {\tt VectorFunctions2} from the system: @ -\defun{listConstructorAbbreviations} -\begin{verbatim} -;listConstructorAbbreviations() == -; x := UPCASE queryUserKeyedMsg("S2IZ0056",NIL) -; MEMQ(STRING2ID_-N(x,1),'(Y YES)) => -; whatSpad2Cmd '(categories) -; whatSpad2Cmd '(domains) -; whatSpad2Cmd '(packages) -; sayKeyedMsg("S2IZ0057",NIL) -\end{verbatim} - +\defun{listConstructorAbbreviations}{listConstructorAbbreviations} <>= (defun |listConstructorAbbreviations| () (let (x) @@ -1370,6 +1448,8 @@ obtained by translating the BOOT code. \fnref{lisp}, \fnref{set}, and \fnref{system} +\section{Variables Used} +\section{Functions} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1557,6 +1637,8 @@ axServer is the domain vector which we supply ``by hand''. The socket can be supplied on the command line but defaults to 8085. Axiom supplies the arguments as a list. +\section{Variables Used} +\section{Functions} <>= (defun |browse| (socket) (let (axserv browser) @@ -1633,6 +1715,9 @@ this has the same syntax as the operating system {\tt cd} command. \fnref{read}, and \fnref{spool} +\section{Variables Used} +\section{Functions} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{clear} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1717,39 +1802,22 @@ system function and constructor caches. \fnref{frame}, and \fnref{undo} +\section{Variables Used} \defdollar{clearOptions} <>= (defvar |$clearOptions| '(|modes| |operations| |properties| |types| |values|)) @ -\defun{clear} +\section{Functions} +\defun{clear}{clear} <>= (defun |clear| (l) (|clearSpad2Cmd| l)) @ -\defun{clearSpad2Cmd} -\begin{verbatim} -;clearSpad2Cmd l == -; -- new version which changes the environment and updates history -; $clearExcept: local := nil -; if $options then $clearExcept := -; "and"/[selectOptionLC(opt,'(except),'optionError) = -; 'except for [opt,:.] in $options] -; null l => -; optList:= "append"/[ ['%l,'" ",x] for x in $clearOptions] -; sayKeyedMsg("S2IZ0010",[optList]) -; arg := selectOptionLC(first l,'(all completely scaches),NIL) -; arg = 'all => clearCmdAll() -; arg = 'completely => clearCmdCompletely() -; arg = 'scaches => clearCmdSortedCaches() -; $clearExcept => clearCmdExcept(l) -; clearCmdParts(l) -; updateCurrentInterpreterFrame() -\end{verbatim} - +\defun{clearSpad2Cmd}{clearSpad2Cmd} <>= (defun |clearSpad2Cmd| (l) (let (|$clearExcept| opt optlist arg) @@ -1797,15 +1865,7 @@ system function and constructor caches. @ -\defun{clearCmdSortedCaches} -\begin{verbatim} -;clearCmdSortedCaches() == -; $lookupDefaults: local := false -; for [.,.,:domain] in HGET($ConstructorCache,'SortedCache) repeat -; pair := compiledLookupCheck('clearCache,[$Void],domain) -; SPADCALL pair -\end{verbatim} - +\defun{clearCmdSortedCaches}{clearCmdSortedCaches} <>= (defun |clearCmdSortedCaches| () (let (|$lookupDefaults| domain pair) @@ -1823,33 +1883,13 @@ system function and constructor caches. @ -\defun{clearCmdCompletely} -\begin{verbatim} -;clearCmdCompletely() == -; clearCmdAll() -; $localExposureData := COPY_-SEQ $localExposureDataDefault -; $xdatabase := NIL -; $CatOfCatDatabase := NIL -; $DomOfCatDatabase := NIL -; $JoinOfCatDatabase := NIL -; $JoinOfDomDatabase := NIL -; $attributeDb := NIL -; $functionTable := NIL -; sayKeyedMsg("S2IZ0013",NIL) -; clearClams() -; clearConstructorCaches() -; $existingFiles := MAKE_-HASHTABLE 'UEQUAL -; sayKeyedMsg("S2IZ0014",NIL) -; RECLAIM() -; sayKeyedMsg("S2IZ0015",NIL) -; NIL -\end{verbatim} - +\defun{clearCmdCompletely}{clearCmdCompletely} <>= (defun |clearCmdCompletely| () (declare (special |$localExposureData| |$xdatabase| |$CatOfCatDatabase| |$DomOfCatDatabase| |$JoinOfCatDatabase| |$JoinOfDomDatabase| - |$attributeDb| |$functionTable| |$existingFiles|)) + |$attributeDb| |$functionTable| |$existingFiles| + |$localExposureDataDefault|)) (|clearCmdAll|) (setq |$localExposureData| (copy-seq |$localExposureDataDefault|)) (setq |$xdatabase| nil) @@ -1869,28 +1909,7 @@ system function and constructor caches. @ -\defun{clearCmdAll} -\begin{verbatim} -;clearCmdAll() == -; clearCmdSortedCaches() -; ------undo special variables------ -; $frameRecord := nil -; $previousBindings := nil -; $variableNumberAlist := nil -; untraceMapSubNames _/TRACENAMES -; $InteractiveFrame := LIST LIST NIL -; resetInCoreHist() -; if $useInternalHistoryTable -; then $internalHistoryTable := NIL -; else deleteFile histFileName() -; $IOindex := 1 -; updateCurrentInterpreterFrame() -; $currentLine := '")clear all" --restored 3/94; needed for undo (RDJ) -; clearMacroTable() -; if $frameMessages then sayKeyedMsg("S2IZ0011",[$interpreterFrameName]) -; else sayKeyedMsg("S2IZ0012",NIL) -\end{verbatim} - +\defun{clearCmdAll}{clearCmdAll} <>= (defun |clearCmdAll| () (declare (special |$frameRecord| |$previousBindings| |$variableNumberAlist| @@ -1916,7 +1935,7 @@ system function and constructor caches. @ -\defun{clearCmdExcept} +\defun{clearCmdExcept}{clearCmdExcept} Clear all the options except the argument. <>= (defun |clearCmdExcept| (arg) @@ -1928,50 +1947,7 @@ Clear all the options except the argument. @ -\defun{clearCmdParts} -\begin{verbatim} -;clearCmdParts(l is [opt,:vl]) == -; -- clears the bindings indicated by opt of all variables in vl -; option:= selectOptionLC(opt,$clearOptions,'optionError) -; option:= INTERN PNAME option -; -- the option can be plural but the key in the alist is sometimes -; -- singular -; option := -; option = 'types => 'mode -; option = 'modes => 'mode -; option = 'values => 'value -; option -; null vl => sayKeyedMsg("S2IZ0055",NIL) -; pmacs := getParserMacroNames() -; imacs := getInterpMacroNames() -; if vl='(all) then -; vl := ASSOCLEFT CAAR $InteractiveFrame -; vl := REMDUP(append(vl, pmacs)) -; $e : local := $InteractiveFrame -; for x in vl repeat -; clearDependencies(x,true) -; if option='properties and x in pmacs then clearParserMacro(x) -; if option='properties and x in imacs and ^(x in pmacs) then -; sayMessage ['" You cannot clear the definition of the system-defined macro ", -; fixObjectForPrinting x,"."] -; p1 := ASSOC(x,CAAR $InteractiveFrame) => -; option='properties => -; if isMap x then -; (lm := get(x,'localModemap,$InteractiveFrame)) => -; PAIRP lm => untraceMapSubNames [CADAR lm] -; NIL -; for p2 in CDR p1 repeat -; prop:= CAR p2 -; recordOldValue(x,prop,CDR p2) -; recordNewValue(x,prop,NIL) -; SETF(CAAR $InteractiveFrame,deleteAssoc(x,CAAR $InteractiveFrame)) -; p2:= ASSOC(option,CDR p1) => -; recordOldValue(x,option,CDR p2) -; recordNewValue(x,option,NIL) -; RPLACD(p2,NIL) -; nil -\end{verbatim} - +\defun{clearCmdParts}{clearCmdParts} <>= (defun |clearCmdParts| (arg) (let (|$e| (opt (car arg)) option pmacs imacs (vl (cdr arg)) p1 lm prop p2) @@ -2073,7 +2049,9 @@ the entire Axiom session. \fnref{quit} and \fnref{pquit} -\defun{queryClients} +\section{Variables Used} +\section{Functions} +\defun{queryClients}{queryClients} Returns the number of active scratchpad clients <>= (defun |queryClients| () @@ -2083,37 +2061,10 @@ Returns the number of active scratchpad clients @ -\defun{close} -\begin{verbatim} -;close args == -; $saturn => -; sayErrorly('"Obsolete system command", _ -; ['" The )close system command is obsolete in this version of AXIOM.", -; '" Please use Close from the File menu instead."]) -; quiet:local:= false -; null $SpadServer => -; throwKeyedMsg('"S2IZ0071", []) -; numClients := queryClients() -; numClients > 1 => -; sockSendInt($SessionManager, $CloseClient) -; sockSendInt($SessionManager, $currentFrameNum) -; closeInterpreterFrame(NIL) -; for [opt,:.] in $options repeat -; fullopt := selectOptionLC(opt, '(quiet), 'optionError) -; fullopt = 'quiet => -; quiet:=true -; quiet => -; sockSendInt($SessionManager, $CloseClient) -; sockSendInt($SessionManager, $currentFrameNum) -; closeInterpreterFrame(NIL) -; x := UPCASE queryUserKeyedMsg('"S2IZ0072", nil) -; MEMQ(STRING2ID_-N(x,1), '(YES Y)) => -; BYE() -; nil -\end{verbatim} - +\defun{close}{close} <>= (defun |close| (args) + (declare (ignore args)) (let (numClients opt fullopt quiet x) (declare (special |$SpadServer| |$SessionManager| |$CloseClient| |$currentFrameNum| |$options|)) @@ -2459,87 +2410,13 @@ The value of the {\tt )set break} variable then controls what happens. {\tt )edit}, and {\tt )library} -\defun{compiler} -\begin{verbatim} -;compiler args == -; $newConlist: local := nil --reset by compDefineLisplib and astran -; null args and null $options and null _/EDITFILE => helpSpad2Cmd '(compiler) -; if null args then args := [_/EDITFILE] -; -- first see if the user has explicitly specified the compiler -; -- to use. -; optlist := '(new old translate constructor) -; haveNew := nil -; haveOld := nil -; for opt in $options while ^(haveNew and haveOld) repeat -; [optname,:optargs] := opt -; fullopt := selectOptionLC(optname,optlist,nil) -; fullopt = 'new => haveNew := true -; fullopt = 'translate => haveOld := true -; fullopt = 'constructor => haveOld := true -; fullopt = 'old => haveOld := true -; haveNew and haveOld => throwKeyedMsg("S2IZ0081", nil) -; af := pathname args -; aft := pathnameType af -;-- Whats this for? MCD/PAB 21-9-95 -;-- if haveNew and (null(aft) or (aft = '"")) then -;-- af := pathname [af, '"as"] -;-- aft = '"as" -;-- if haveOld and (null(aft) or (aft = '"")) then -;-- af := pathname [af, '"spad"] -;-- aft = '"spad" -; haveNew or (aft = '"as") => -; not (af1 := $FINDFILE (af, '(as))) => -; throwKeyedMsg("S2IL0003",[NAMESTRING af]) -; compileAsharpCmd [af1] -; haveOld or (aft = '"spad") => -; not (af1 := $FINDFILE (af, '(spad))) => -; throwKeyedMsg("S2IL0003",[NAMESTRING af]) -; compileSpad2Cmd [af1] -; aft = '"lsp" => -; not (af1 := $FINDFILE (af, '(lsp))) => -; throwKeyedMsg("S2IL0003",[NAMESTRING af]) -; compileAsharpLispCmd [af1] -; aft = '"nrlib" => -; not (af1 := $FINDFILE (af, '(nrlib))) => -; throwKeyedMsg("S2IL0003",[NAMESTRING af]) -; compileSpadLispCmd [af1] -; aft = '"ao" => -; not (af1 := $FINDFILE (af, '(ao))) => -; throwKeyedMsg("S2IL0003",[NAMESTRING af]) -; compileAsharpCmd [af1] -; aft = '"al" => -- archive library of .ao files -; not (af1 := $FINDFILE (af, '(al))) => -; throwKeyedMsg("S2IL0003",[NAMESTRING af]) -; compileAsharpArchiveCmd [af1] -; -- see if we something with the appropriate file extension -; -- lying around -; af1 := $FINDFILE (af, '(as spad ao asy)) -; af1 and pathnameType(af1) = '"as" => compileAsharpCmd [af1] -; af1 and pathnameType(af1) = '"ao" => compileAsharpCmd [af1] -; af1 and pathnameType(af1) = '"spad" => compileSpad2Cmd [af1] -; af1 and pathnameType(af1) = '"asy" => compileAsharpArchiveCmd [af1] -; -- maybe /EDITFILE has some stuff that can help us -; ef := pathname _/EDITFILE -; ef := mergePathnames(af,ef) -; ef = af => throwKeyedMsg("S2IZ0039", nil) -; af := ef -; pathnameType(af) = '"as" => compileAsharpCmd args -; pathnameType(af) = '"ao" => compileAsharpCmd args -; pathnameType(af) = '"spad" => compileSpad2Cmd args -; -- see if we something with the appropriate file extension -; -- lying around -; af1 := $FINDFILE (af, '(as spad ao asy)) -; af1 and pathnameType(af1) = '"as" => compileAsharpCmd [af1] -; af1 and pathnameType(af1) = '"ao" => compileAsharpCmd [af1] -; af1 and pathnameType(af1) = '"spad" => compileSpad2Cmd [af1] -; af1 and pathnameType(af1) = '"asy" => compileAsharpArchiveCmd [af1] -; throwKeyedMsg("S2IZ0039", nil) -\end{verbatim} - +\section{Variables Used} +\section{Functions} +\defun{compiler}{compiler} <>= (defun |compiler| (args) (let (|$newConlist| optlist optname optargs havenew haveold aft ef af af1) - (declare (special |$newConlist| |$options|)) + (declare (special |$newConlist| |$options| /editfile)) (setq |$newConlist| nil) (cond ((and (null args) (null |$options|) (null /editfile)) @@ -2632,7 +2509,7 @@ The value of the {\tt )set break} variable then controls what happens. @ -\defun{compileAsharpCmd} +\defun{compileAsharpCmd}{compileAsharpCmd} <>= (defun |compileAsharpCmd| (args) (|compileAsharpCmd1| args) @@ -2641,95 +2518,13 @@ The value of the {\tt )set break} variable then controls what happens. @ -\defun{compileAsharpCmd1} -\begin{verbatim} -;compileAsharpCmd1 args == -; -- Assume we entered from the "compiler" function, so args ^= nil -; -- and is a file with file extension .as or .ao -; path := pathname args -; pathType := pathnameType path -; (pathType ^= '"as") and (pathType ^= '"ao") => throwKeyedMsg("S2IZ0083", nil) -; ^PROBE_-FILE path => throwKeyedMsg("S2IL0003",[namestring args]) -; SETQ(_/EDITFILE, path) -; updateSourceFiles path -; optList := '( _ -; new _ -; old _ -; translate _ -; onlyargs _ -; moreargs _ -; quiet _ -; nolispcompile _ -; noquiet _ -; library _ -; nolibrary _ -; ) -; beQuiet := false -- be verbose here -; doLibrary := true -- so a )library after compilation -; doCompileLisp := true -- do compile generated lisp code -; moreArgs := NIL -; onlyArgs := NIL -; for opt in $options repeat -; [optname,:optargs] := opt -; fullopt := selectOptionLC(optname,optList,nil) -; fullopt = 'new => nil -; fullopt = 'old => error "Internal error: compileAsharpCmd got )old" -; fullopt = 'translate => error "Internal error: compileAsharpCmd got )translate" -; fullopt = 'quiet => beQuiet := true -; fullopt = 'noquiet => beQuiet := false -; fullopt = 'nolispcompile => doCompileLisp := false -; fullopt = 'moreargs => moreArgs := optargs -; fullopt = 'onlyargs => onlyArgs := optargs -; fullopt = 'library => doLibrary := true -; fullopt = 'nolibrary => doLibrary := false -; throwKeyedMsg("S2IZ0036",[STRCONC('")",object2String optname)]) -; tempArgs := -; pathType = '"ao" => -; -- want to strip out -Fao -; (p := STRPOS('"-Fao", $asharpCmdlineFlags, 0, NIL)) => -; p = 0 => SUBSTRING($asharpCmdlineFlags, 5, NIL) -; STRCONC(SUBSTRING($asharpCmdlineFlags, 0, p), '" ", -; SUBSTRING($asharpCmdlineFlags, p+5, NIL)) -; $asharpCmdlineFlags -; $asharpCmdlineFlags -; asharpArgs := -; onlyArgs => -; s := "" -; for a in onlyArgs repeat -; s := STRCONC(s, '" ", object2String a) -; s -; moreArgs => -; s := tempArgs -; for a in moreArgs repeat -; s := STRCONC(s, '" ", object2String a) -; s -; tempArgs -; if ^beQuiet then sayKeyedMsg("S2IZ0038A",[namestring args, asharpArgs]) -; command := -; STRCONC(STRCONC(GETENV('"ALDORROOT"),'"/bin/"),_ -; "aldor ", asharpArgs, '" ", namestring args) -; rc := OBEY command -; if (rc = 0) and doCompileLisp then -; lsp := fnameMake('".", pathnameName args, '"lsp") -; if fnameReadable?(lsp) then -; if ^beQuiet then sayKeyedMsg("S2IZ0089", [namestring lsp]) -; compileFileQuietly(lsp) -; else -; sayKeyedMsg("S2IL0003", [namestring lsp]) -; if rc = 0 and doLibrary then -; -- do we need to worry about where the compilation output went? -; if ^beQuiet then sayKeyedMsg("S2IZ0090", [ pathnameName path ]) -; withAsharpCmd [ pathnameName path ] -; else if ^beQuiet then -; sayKeyedMsg("S2IZ0084", nil) -; extendLocalLibdb $newConlist -\end{verbatim} - +\defun{compileAsharpCmd1}{compileAsharpCmd1} <>= (defun |compileAsharpCmd1| (args) (let (path pathtype optlist optname optargs bequiet docompilelisp moreargs onlyargs dolibrary p tempargs s asharpargs command rc lsp) - (declare (special |$options| |$asharpCmdlineFlags||$newConlist|)) + (declare (special |$options| |$asharpCmdlineFlags| |$newConlist| + /editfile)) (setq path (|pathname| args)) (setq pathtype (|pathnameType| path)) (cond @@ -2821,52 +2616,7 @@ The value of the {\tt )set break} variable then controls what happens. @ -\defun{compileAsharpArchiveCmd} -\begin{verbatim} -;compileAsharpArchiveCmd args == -; -- Assume we entered from the "compiler" function, so args ^= nil -; -- and is a file with file extension .al. We also assume that -; -- the name is fully qualified. -; path := pathname args -; ^PROBE_-FILE path => throwKeyedMsg("S2IL0003",[namestring args]) -; -- here is the plan: -; -- 1. extract the file name and try to make a directory based -; -- on that name. -; -- 2. cd to that directory and ar x the .al file -; -- 3. for each .ao file that shows up, compile it -; -- 4. delete the generated .ao files -; -- First try to make the directory in the current directory -; dir := fnameMake('".", pathnameName path, '"axldir") -; exists := PROBE_-FILE dir -; isDir := directoryp namestring dir -; exists and isDir ^= 1=> -; throwKeyedMsg("S2IL0027",[namestring dir, namestring args]) -; if isDir ^= 1 then -; cmd := STRCONC('"mkdir ", namestring dir) -; rc := OBEY cmd -; rc ^= 0 => throwKeyedMsg("S2IL0027",[namestring dir, namestring args]) -; curDir := $CURRENT_-DIRECTORY -; -- cd to that directory and try to unarchive the .al file -; cd [ object2Identifier namestring dir ] -; cmd := STRCONC( '"ar x ", namestring path ) -; rc := OBEY cmd -; rc ^= 0 => -; cd [ object2Identifier namestring curDir ] -; throwKeyedMsg("S2IL0028",[namestring dir, namestring args]) -; -- Look for .ao files -; asos := DIRECTORY '"*.ao" -; null asos => -; cd [ object2Identifier namestring curDir ] -; throwKeyedMsg("S2IL0029",[namestring dir, namestring args]) -; -- Compile the .ao files -; for aso in asos repeat -; compileAsharpCmd1 [ namestring aso ] -; -- Reset the current directory -; cd [ object2Identifier namestring curDir ] -; terminateSystemCommand() -; spadPrompt() -\end{verbatim} - +\defun{compileAsharpArchiveCmd}{compileAsharpArchiveCmd} <>= (defun |compileAsharpArchiveCmd| (args) (let (path dir exists isdir curdir cmd rc asos) @@ -2898,62 +2648,25 @@ The value of the {\tt )set break} variable then controls what happens. (cons (|namestring| dir) (cons (|namestring| args) nil)))) (t (setq asos (directory (makestring "*.ao"))) - (cond - ((null asos) + (if (null asos) + (progn (|cd| (cons (|object2Identifier| (|namestring| curdir)) nil)) (|throwKeyedMsg| 's2il0029 (cons (|namestring| dir) (cons (|namestring| args) nil)))) - (t + (progn (dolist (aso asos) - (|compileAsharpCmd1| (list (|namestring| |aso|)))) + (|compileAsharpCmd1| (list (|namestring| aso)))) (|cd| (list (|object2Identifier| (|namestring| curdir)))) (|terminateSystemCommand|) (|spadPrompt|))))))))))) @ -\defun{compileAsharpLispCmd} -\begin{verbatim} -;compileAsharpLispCmd args == -; -- Assume we entered from the "compiler" function, so args ^= nil -; -- and is a file with file extension .lsp -; path := pathname args -; ^PROBE_-FILE path => throwKeyedMsg("S2IL0003",[namestring args]) -; optList := '( _ -; quiet _ -; noquiet _ -; library _ -; nolibrary _ -; ) -; beQuiet := false -- be verbose here -; doLibrary := true -- so a )library after compilation -; for opt in $options repeat -; [optname,:optargs] := opt -; fullopt := selectOptionLC(optname,optList,nil) -; fullopt = 'quiet => beQuiet := true -; fullopt = 'noquiet => beQuiet := false -; fullopt = 'library => doLibrary := true -; fullopt = 'nolibrary => doLibrary := false -; throwKeyedMsg("S2IZ0036",[STRCONC('")",object2String optname)]) -; lsp := fnameMake(pathnameDirectory path, pathnameName path, pathnameType path) -; if fnameReadable?(lsp) then -; if ^beQuiet then sayKeyedMsg("S2IZ0089", [namestring lsp]) -; compileFileQuietly(lsp) -; else -; sayKeyedMsg("S2IL0003", [namestring lsp]) -; if doLibrary then -; -- do we need to worry about where the compilation output went? -; if ^beQuiet then sayKeyedMsg("S2IZ0090", [ pathnameName path ]) -; withAsharpCmd [ pathnameName path ] -; else if ^beQuiet then -; sayKeyedMsg("S2IZ0084", nil) -; terminateSystemCommand() -; spadPrompt() -\end{verbatim} - +\defun{compileAsharpLispCmd}{compileAsharpLispCmd} <>= (defun |compileAsharpLispCmd| (args) (let (path optlist optname optargs bequiet dolibrary lsp) + (declare (special |$options|)) (setq path (|pathname| args)) (cond ((null (probe-file path)) @@ -2996,46 +2709,7 @@ The value of the {\tt )set break} variable then controls what happens. @ -\defun{compileSpadLispCmd} -\begin{verbatim} -;compileSpadLispCmd args == -; -- Assume we entered from the "compiler" function, so args ^= nil -; -- and is a file with file extension .nrlib -; path := pathname fnameMake(first args, '"code", '"lsp") -; ^PROBE_-FILE path => throwKeyedMsg("S2IL0003",[namestring args]) -; optList := '( _ -; quiet _ -; noquiet _ -; library _ -; nolibrary _ -; ) -; beQuiet := false -- be verbose here -; doLibrary := true -- so a )library after compilation -; for opt in $options repeat -; [optname,:optargs] := opt -; fullopt := selectOptionLC(optname,optList,nil) -; fullopt = 'quiet => beQuiet := true -; fullopt = 'noquiet => beQuiet := false -; fullopt = 'library => doLibrary := true -; fullopt = 'nolibrary => doLibrary := false -; throwKeyedMsg("S2IZ0036",[STRCONC('")",object2String optname)]) -; lsp := fnameMake(pathnameDirectory path, pathnameName path, pathnameType path) -; if fnameReadable?(lsp) then -; if ^beQuiet then sayKeyedMsg("S2IZ0089", [namestring lsp]) -; --compileFileQuietly(lsp) -; RECOMPILE_-LIB_-FILE_-IF_-NECESSARY lsp -; else -; sayKeyedMsg("S2IL0003", [namestring lsp]) -; if doLibrary then -; -- do we need to worry about where the compilation output went? -; if ^beQuiet then sayKeyedMsg("S2IZ0090", [ pathnameName path ]) -; LOCALDATABASE([ pathnameName first args ],[]) -; else if ^beQuiet then -; sayKeyedMsg("S2IZ0084", nil) -; terminateSystemCommand() -; spadPrompt() -\end{verbatim} - +\defun{compileSpadLispCmd}{compileSpadLispCmd} <>= (defun |compileSpadLispCmd| (args) (let (path optlist optname optargs beQuiet dolibrary lsp) @@ -3081,7 +2755,7 @@ The value of the {\tt )set break} variable then controls what happens. @ -\defun{withAsharpCmd} +\defun{withAsharpCmd}{withAsharpCmd} <>= (defun |withAsharpCmd| (args) (let (|$options|) @@ -3093,7 +2767,9 @@ The value of the {\tt )set break} variable then controls what happens. \cmdhead{copyright} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\defun{copyright} +\section{Variables Used} +\section{Functions} +\defun{copyright}{copyright} <>= (defun |copyright| () (obey (strconc "cat " (|getEnv| "AXIOM") "/lib/copyright"))) @@ -3104,9 +2780,12 @@ The value of the {\tt )set break} variable then controls what happens. \cmdhead{credits} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\defun{credits} +\section{Variables Used} +\section{Functions} +\defun{credits}{credits} <>= (defun |credits| () + (declare (special credits)) (mapcar #'(lambda (x) (princ x) (terpri)) credits)) @ @@ -3211,7 +2890,6 @@ To just show the value (and the type) of ``d'', issue \section{Variables Used} \defdollar{displayOptions} The current value of \$displayOptions is - <>= (defvar |$displayOptions| '(|abbreviations| |all| |macros| |modes| |names| |operations| @@ -3219,9 +2897,8 @@ The current value of \$displayOptions is @ -\section{Data Structures} \section{Functions} -\defun{display} +\defun{display}{display} This trivial function satisfies the standard pattern of making a user command match the name of the function which implements the command. That command immediatly invokes a ``Spad2Cmd'' version. @@ -3246,8 +2923,7 @@ to construct a list of strings for the sayMessage function and tell the user what options are available. <>= (defun displaySpad2Cmd (l) - (let ((|$e| |$EmptyEnvironment|) (opt (car l)) (vl (cdr l)) - option optList msg) + (let ((|$e| |$EmptyEnvironment|) (opt (car l)) (vl (cdr l)) option) (declare (special |$e| |$EmptyEnvironment| |$displayOptions|)) (if (and (pairp l) (not (eq opt '?))) (progn @@ -3279,7 +2955,7 @@ and tell the user what options are available. @ -\defun{abbQuery} +\defun{abbQuery}{abbQuery} <>= (defun |abbQuery| (x) (let (abb) @@ -3292,7 +2968,7 @@ and tell the user what options are available. (|sayKeyedMsg| 's2iz0003 (list x)))))) @ -\defun{displayOperations} +\defun{displayOperations}{displayOperations} This function takes a list of operation names. If the list is null we query the user to see if they want all operations printed. Otherwise we print the information for the requested symbols. @@ -3305,7 +2981,7 @@ we print the information for the requested symbols. (|sayKeyedMsg| 's2iz0059 nil)))) @ -\defun{yesanswer} +\defun{yesanswer}{yesanswer} This is a trivial function to simplify the logic of displaySpad2Cmd. If the user didn't supply an argument to the )display op command we ask if they wish to have all information about all Axiom operations @@ -3316,7 +2992,7 @@ displayed. If the answer is either Y or YES we return true else nil. @ -\defun{displayMacros} +\defun{displayMacros}{displayMacros} ;displayMacros names == ; imacs := getInterpMacroNames() ; pmacs := getParserMacroNames() @@ -3396,7 +3072,7 @@ displayed. If the answer is either Y or YES we return true else nil. @ -\subsection{sayExample} +\defun{sayExample}{sayExample} This function expects 2 arguments, the documentation string and the name of the operation. It searches the documentation string for \verb|++X| lines. These lines are examples lines for functions. @@ -3453,7 +3129,7 @@ If there is only one then we clean it up and print it. (|sayNewLine|)))) @ -\subsection{cleanupLine} +\defun{cleanupLine}{cleanupLine} This function expects example lines in internal format that has been partially processed to remove the prefix. Thus we get lines that look like: @@ -3558,16 +3234,19 @@ calls {\tt emacs} to edit the file. \fnref{compiler}, and \fnref{read} -\defun{edit} +\section{Variables Used} +\section{Functions} +\defun{edit}{edit} <>= (defun |edit| (l) (|editSpad2Cmd| l)) @ -\defun{editSpad2Cmd} +\defun{editSpad2Cmd}{editSpad2Cmd} <>= (defun |editSpad2Cmd| (l) (let (olddir filetypes ll rc) + (declare (special /editfile)) (setq l (cond ((null l) /editfile) (t (car l)))) (setq l (|pathname| l)) (setq olddir (|pathnameDirectory| l)) @@ -3613,6 +3292,9 @@ function call to Common Lisp. \fnref{pquit} and \fnref{quit} +\section{Variables Used} +\section{Functions} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -3796,7 +3478,7 @@ The parts of a frame and their initial, default values are: These could be macros but we wish to export them to the API code in the algebra so we keep them as functions. \subsection{0th Frame Component -- frameName} -\defun{frameName} +\defun{frameName}{frameName} <>= (defun frameName (frame) (car frame)) @@ -3857,10 +3539,9 @@ in the algebra so we keep them as functions. @ -\section{Variables Used} -\section{Data Structures} \section{Functions} -\subsection{Initializing the Interpreter Frame Ring} +\defun{initializeInterpreterFrameRing} +{Initializing the Interpreter Frame Ring} Now that we know what a frame looks like we need a function to initialize the list of frames. This function sets the initial frame @@ -3874,6 +3555,7 @@ initial values. <>= (defun |initializeInterpreterFrameRing| () + (declare (special |$interpreterFrameName| |$interpreterFrameRing|)) (setq |$interpreterFrameName| '|initial|) (setq |$interpreterFrameRing| (list (|emptyInterpreterFrame| |$interpreterFrameName|))) @@ -3881,22 +3563,23 @@ initial values. nil) @ -\subsection{Creating a List of all of the Frame Names} \defun{frameNames} +{Creating a List of all of the Frame Names} This function simply walks across the frame in the frame ring and returns a list of the name of each frame. <>= (defun |frameNames| () + (declare (special |$interpreterFrameRing|)) (mapcar #'frameName |$interpreterFrameRing|)) @ -\subsection{Get Named Frame Environment (aka Interactive)} +\defun{frameEnvironment} +{Get Named Frame Environment (aka Interactive)} If the frame is found we return the environment portion of the frame otherwise we construct an empty environment and return it. The initial values of an empty frame are created here. This function returns a single frame that will be placed in the frame ring. -\defun{frameEnvironment} <>= (defun |frameEnvironment| (fname) (let ((frame (|findFrameInRing| fname))) @@ -3905,44 +3588,35 @@ returns a single frame that will be placed in the frame ring. (list (list nil))))) @ -\defun{emptyInterpreterFrame} -\begin{verbatim} -emptyInterpreterFrame(name) == - LIST(name, -- frame name - LIST LIST NIL, -- environment - 1, -- $IOindex - $HiFiAccess, -- $HiFiAccess - $HistList, -- $HistList - $HistListLen, -- $HistListLen - $HistListAct, -- $HistListAct - $HistRecord, -- $HistRecord - NIL, -- $internalHistoryTable - COPY_-SEQ $localExposureDataDefault -- $localExposureData - ) -\end{verbatim} +\defun{emptyInterpreterFrame}{emptyInterpreterFrame} <>= (defun |emptyInterpreterFrame| (name) - (list name - (list (list nil)) - 1 - |$HiFiAccess| + (declare (special |$HiFiAccess| |$HistList| |$HistListLen| |$HistListAct| + |$HistRecord| |$localExposureDataDefault|)) + (list name ; frame name + (list (list nil)) ; environment + 1 ; $IOindex + |$HiFiAccess| |$HistList| |$HistListLen| |$HistListAct| |$HistRecord| - nil - (copy-seq |$localExposureDataDefault|))) + nil ; $internalHistoryTable + (copy-seq |$localExposureDataDefault|))) ; $localExposureData @ -\subsection{Collecting up the Environment into a Frame} +\defun{createCurrentInterpreterFrame} +{Collecting up the Environment into a Frame} We can collect up all the current environment information into one frame element with this call. It creates a list of the current values of the global variables and returns this as a frame element. -\defun{createCurrentInterpreterFrame} <>= (defun |createCurrentInterpreterFrame| () + (declare (special |$interpreterFrameName| |$InteractiveFrame| |$IOindex| + |$HiFiAccess| |$HistList| |$HistListLen| |$HistListAct| |$HistRecord| + |$internalHistoryTable| |$localExposureData|)) (list |$interpreterFrameName| |$InteractiveFrame| @@ -3956,34 +3630,18 @@ values of the global variables and returns this as a frame element. |$localExposureData|)) @ -\subsection{Updating from the Current Frame} +\defun{updateFromCurrentInterpreterFrame}{Updating from the Current Frame} The frames are kept on a circular list. The first element on that list is known as ``the current frame''. This will initialize all of the interesting interpreter data structures from that frame. - -\defun{updateFromCurrentInterpreterFrame} -\begin{verbatim} -updateFromCurrentInterpreterFrame() == - [$interpreterFrameName, _ - $InteractiveFrame, _ - $IOindex, _ - $HiFiAccess, _ - $HistList, _ - $HistListLen, _ - $HistListAct, _ - $HistRecord, _ - $internalHistoryTable, _ - $localExposureData _ - ] := first $interpreterFrameRing - if $frameMessages then - sayMessage ['" Current interpreter frame is called",:bright - $interpreterFrameName] - NIL -\end{verbatim} <>= (defun |updateFromCurrentInterpreterFrame| () (let (tmp1) + (declare (special |$interpreterFrameRing| |$interpreterFrameName| + |$InteractiveFrame| |$IOindex| |$HiFiAccess| |$HistList| |$HistListLen| + |$HistListAct| |$HistRecord| |$internalHistoryTable| |$localExposureData| + |$frameMessages|)) (setq tmp1 (first |$interpreterFrameRing|)) (setq |$interpreterFrameName| (nth 0 tmp1)) (setq |$InteractiveFrame| (nth 1 tmp1)) @@ -3997,50 +3655,36 @@ updateFromCurrentInterpreterFrame() == (setq |$localExposureData| (nth 9 tmp1)) (when |$frameMessages| (|sayMessage| - (cons " Current interpreter frame is called" |$interpreterFrameName|))))) + `(" Current interpreter frame is called" + ,#(|bright| |$interpreterFrameName|)))))) @ -\subsection{Find a Frame in the Frame Ring by Name} +\defun{findFrameInRing}{Find a Frame in the Frame Ring by Name} Each frame contains its name as the 0th element. We simply walk all the frames and if we find one we return it. -\defun{findFrameInRing} -\begin{verbatim} -findFrameInRing(name) == - val := NIL - for frame in $interpreterFrameRing repeat - CAR frame = name => - val := frame - return frame - val -\end{verbatim} <>= (defun |findFrameInRing| (name) - (block () + (let (result) + (declare (special |$interpreterFrameRing|)) (dolist (frame |$interpreterFrameRing|) - (when (boot-equal (frameName frame) name) (return frame))))) + (when (boot-equal (frameName frame) name) + (setq result frame))) + result)) @ -\subsection{Update the Current Interpreter Frame} +\defun{updateCurrentInterpreterFrame}{Update the Current Interpreter Frame} This function collects the normal contents of the world into a frame object, places it first on the frame list, and then sets the current values of the world from the frame object. - -\defun{updateCurrentInterpreterFrame} -\begin{verbatim} -updateCurrentInterpreterFrame() == - RPLACA($interpreterFrameRing,createCurrentInterpreterFrame()) - updateFromCurrentInterpreterFrame() - NIL -\end{verbatim} <>= (defun |updateCurrentInterpreterFrame| () + (declare (special |$interpreterFrameRing|)) (rplaca |$interpreterFrameRing| (|createCurrentInterpreterFrame|)) - (|updateFromCurrentInterpreterFrame|) - nil) + (|updateFromCurrentInterpreterFrame|)) @ -\defun{nextInterpreterFrame} +\defun{nextInterpreterFrame}{nextInterpreterFrame} This function updates the current frame to make sure all of the current information is recorded. If there are more frame elements @@ -4050,16 +3694,9 @@ this function will destructively change it to (2 3 1). Note: the nconc2 function destructively inserts the second list at the end of the first. -\begin{verbatim} -nextInterpreterFrame() == - updateCurrentInterpreterFrame() - null rest $interpreterFrameRing => NIL -- nothing to do - $interpreterFrameRing := - NCONC2(rest $interpreterFrameRing,[first $interpreterFrameRing]) - updateFromCurrentInterpreterFrame() -\end{verbatim} <>= (defun |nextInterpreterFrame| () + (declare (special |$interpreterFrameRing|)) (when (cdr |$interpreterFrameRing|) (setq |$interpreterFrameRing| (nconc2 (cdr |$interpreterFrameRing|) @@ -4067,71 +3704,34 @@ nextInterpreterFrame() == (|updateFromCurrentInterpreterFrame|))) @ -\defun{changeToNamedInterpreterFrame} -\begin{verbatim} -changeToNamedInterpreterFrame(name) == - updateCurrentInterpreterFrame() - frame := findFrameInRing(name) - null frame => NIL - $interpreterFrameRing := [frame,:NREMOVE($interpreterFrameRing, frame)] - updateFromCurrentInterpreterFrame() -\end{verbatim} +\defun{changeToNamedInterpreterFrame}{changeToNamedInterpreterFrame} <>= (defun |changeToNamedInterpreterFrame| (name) - (prog (frame) - (return - (progn - (|updateCurrentInterpreterFrame|) - (setq frame (|findFrameInRing| name)) - (cond - ((null frame) - nil) - (t - (setq |$interpreterFrameRing| - (cons frame (nremove |$interpreterFrameRing| frame))) - (|updateFromCurrentInterpreterFrame|))))))) + (let (frame) + (declare (special |$interpreterFrameRing|)) + (|updateCurrentInterpreterFrame|) + (setq frame (|findFrameInRing| name)) + (when frame + (setq |$interpreterFrameRing| + (cons frame (nremove |$interpreterFrameRing| frame))) + (|updateFromCurrentInterpreterFrame|)))) @ -\defun{previousInterpreterFrame} -\begin{verbatim} -previousInterpreterFrame() == - updateCurrentInterpreterFrame() - null rest $interpreterFrameRing => NIL -- nothing to do - [:b,l] := $interpreterFrameRing - $interpreterFrameRing := NCONC2([l],b) - updateFromCurrentInterpreterFrame() -\end{verbatim} +\defun{previousInterpreterFrame}{previousInterpreterFrame} <>= (defun |previousInterpreterFrame| () - (prog (tmp1 l b) - (return - (progn - (|updateCurrentInterpreterFrame|) - (cond - ((null (cdr |$interpreterFrameRing|)) - nil) - (t - (setq tmp1 (reverse |$interpreterFrameRing|)) - (setq l (car tmp1)) - (setq b (nreverse (cdr tmp1))) - (setq |$interpreterFrameRing| (nconc2 (cons l nil) b)) - (|updateFromCurrentInterpreterFrame|))))))) + (let (tmp1 l b) + (declare (special |$interpreterFrameRing|)) + (|updateCurrentInterpreterFrame|) + (when (cdr |$interpreterFrameRing|) + (setq tmp1 (reverse |$interpreterFrameRing|)) + (setq l (car tmp1)) + (setq b (nreverse (cdr tmp1))) + (setq |$interpreterFrameRing| (nconc2 (cons l nil) b)) + (|updateFromCurrentInterpreterFrame|)))) @ -\defun{addNewInterpreterFrame} -\begin{verbatim} -addNewInterpreterFrame(name) == - null name => throwKeyedMsg("S2IZ0018",NIL) - updateCurrentInterpreterFrame() - -- see if we already have one by that name - for f in $interpreterFrameRing repeat - name = frameName(f) => throwKeyedMsg("S2IZ0019",[name]) - initHistList() - $interpreterFrameRing := CONS(emptyInterpreterFrame(name), - $interpreterFrameRing) - updateFromCurrentInterpreterFrame() - _$ERASE histFileName() -\end{verbatim} +\defun{addNewInterpreterFrame}{addNewInterpreterFrame} <>= (defun |addNewInterpreterFrame| (name) (declare (special |$interpreterFrameRing|)) @@ -4149,26 +3749,7 @@ addNewInterpreterFrame(name) == ($erase (|histFileName|))))) @ -\defun{closeInterpreterFrame} -\begin{verbatim} -closeInterpreterFrame(name) == - -- if name = NIL then it means the current frame - null rest $interpreterFrameRing => - name and (name ^= $interpreterFrameName) => - throwKeyedMsg("S2IZ0020",[$interpreterFrameName]) - throwKeyedMsg("S2IZ0021",NIL) - if null name then $interpreterFrameRing := rest $interpreterFrameRing - else -- find the frame - found := nil - ifr := NIL - for f in $interpreterFrameRing repeat - found or (name ^= frameName(f)) => ifr := CONS(f,ifr) - found := true - not found => throwKeyedMsg("S2IZ0022",[name]) - _$ERASE makeHistFileName(name) - $interpreterFrameRing := nreverse ifr - updateFromCurrentInterpreterFrame() -\end{verbatim} +\defun{closeInterpreterFrame}{closeInterpreterFrame} <>= (defun |closeInterpreterFrame| (name) (declare (special |$interpreterFrameRing| |$interpreterFrameName|)) @@ -4196,13 +3777,7 @@ closeInterpreterFrame(name) == (|updateFromCurrentInterpreterFrame|))))) @ -\defun{displayFrameNames} -\begin{verbatim} -displayFrameNames() == - fs := "append"/[ ['%l,'" ",:bright frameName f] for f in - $interpreterFrameRing] - sayKeyedMsg("S2IZ0024",[fs]) -\end{verbatim} +\defun{displayFrameNames}{displayFrameNames} <>= (defun |displayFrameNames| () (declare (special |$interpreterFrameRing|)) @@ -4213,210 +3788,130 @@ displayFrameNames() == (|sayKeyedMsg| 's2iz0024 (list (apply #'append t1))))) @ -\defun{importFromFrame} -\begin{verbatim} -importFromFrame args == - -- args should have the form [frameName,:varNames] - if args and atom args then args := [args] - null args => throwKeyedMsg("S2IZ0073",NIL) - [fname,:args] := args - not member(fname,frameNames()) => - throwKeyedMsg("S2IZ0074",[fname]) - fname = frameName first $interpreterFrameRing => - throwKeyedMsg("S2IZ0075",NIL) - fenv := frameEnvironment fname - null args => - x := UPCASE queryUserKeyedMsg("S2IZ0076",[fname]) - MEMQ(STRING2ID_-N(x,1),'(Y YES)) => - vars := NIL - for [v,:props] in CAAR fenv repeat - v = "--macros" => - for [m,:.] in props repeat vars := cons(m,vars) - vars := cons(v,vars) - importFromFrame [fname,:vars] - sayKeyedMsg("S2IZ0077",[fname]) - for v in args repeat - plist := GETALIST(CAAR fenv,v) - plist => - -- remove anything with the same name in the current frame - clearCmdParts ['propert,v] - for [prop,:val] in plist repeat - putHist(v,prop,val,$InteractiveFrame) - (m := get("--macros--",v,fenv)) => - putHist("--macros--",v,m,$InteractiveFrame) - sayKeyedMsg("S2IZ0079",[v,fname]) - sayKeyedMsg("S2IZ0078",[fname]) -\end{verbatim} +\defun{importFromFrame}{importFromFrame} <>= (defun |importFromFrame| (args) (prog (temp1 fname fenv x v props vars plist prop val m) - (return - (seq - (progn - (when (and args (atom args)) - (setq args (cons args nil))) + (declare (special |$interpreterFrameRing|)) + (when (and args (atom args)) (setq args (cons args nil))) + (if (null args) + (|throwKeyedMsg| 'S2IZ0073 nil) ; missing frame name + (progn + (setq temp1 args) + (setq fname (car temp1)) + (setq args (cdr temp1)) (cond - ((null args) - (|throwKeyedMsg| 'S2IZ0073 nil)) ; missing frame name + ((null (|member| fname (|frameNames|))) + (|throwKeyedMsg| 'S2IZ0074 (cons fname nil))) ; not frame name + ((boot-equal fname (frameName (car |$interpreterFrameRing|))) + (|throwKeyedMsg| 'S2IZ0075 NIL)) ; cannot import from curr frame (t - (setq temp1 args) - (setq fname (car temp1)) - (setq args (cdr temp1)) + (setq fenv (|frameEnvironment| fname)) (cond - ((null (|member| fname (|frameNames|))) - (|throwKeyedMsg| 'S2IZ0074 (cons fname nil))) ; not frame name - ((boot-equal fname (frameName (car |$interpreterFrameRing|))) - (|throwKeyedMsg| 'S2IZ0075 NIL)) ; cannot import from curr frame - (t - (setq fenv (|frameEnvironment| fname)) + ((null args) + (setq x + (upcase (|queryUserKeyedMsg| 'S2IZ0076 (cons fname nil)))) + ; import everything? (cond - ((null args) - (setq x - (upcase (|queryUserKeyedMsg| 'S2IZ0076 (cons fname nil)))) - ; import everything? + ((memq (string2id-n x 1) '(y yes)) + (setq vars nil) + (do ((tmp0 (caar fenv) (cdr tmp0)) (tmp1 nil)) + ((or (atom tmp0) + (progn (setq tmp1 (car tmp0)) nil) + (progn + (progn + (setq v (car tmp1)) + (setq props (cdr tmp1)) + tmp1) + nil)) + nil) + (cond + ((eq v '|--macros|) + (do ((tmp2 props (cdr tmp2)) + (tmp3 nil)) + ((or (atom tmp2) + (progn (setq tmp3 (car tmp2)) nil) + (progn + (progn (setq m (car tmp3)) tmp3) + nil)) + nil) + (setq vars (cons m vars)))) + (t (setq vars (cons v vars))))) + (|importFromFrame| (cons fname vars))) + (t + (|sayKeyedMsg| 'S2IZ0077 (cons fname nil))))) + (t + (do ((tmp4 args (cdr tmp4)) (v nil)) + ((or (atom tmp4) (progn (setq v (car tmp4)) nil)) nil) + (seq + (exit + (progn + (setq plist (getalist (caar fenv) v)) (cond - ((memq (string2id-n x 1) '(y yes)) - (setq vars nil) - (do ((tmp0 (caar fenv) (cdr tmp0)) (tmp1 nil)) - ((or (atom tmp0) - (progn (setq tmp1 (car tmp0)) nil) + (plist + (|clearCmdParts| (cons '|propert| (cons v nil))) + (do ((tmp5 plist (cdr tmp5)) (tmp6 nil)) + ((or (atom tmp5) + (progn (setq tmp6 (car tmp5)) nil) + (progn (progn - (progn - (setq v (car tmp1)) - (setq props (cdr tmp1)) - tmp1) - nil)) + (setq prop (car tmp6)) + (setq val (cdr tmp6)) + tmp6) + nil)) nil) - (seq - (exit - (cond - ((eq v '|--macros|) - (do ((tmp2 props (cdr tmp2)) - (tmp3 nil)) - ((or (atom tmp2) - (progn (setq tmp3 (car tmp2)) nil) - (progn - (progn (setq m (car tmp3)) tmp3) - nil)) - nil) - (seq - (exit - (setq vars (cons m vars)))))) - (t (setq vars (cons v vars))))))) - (|importFromFrame| (cons fname vars))) - (t - (|sayKeyedMsg| 'S2IZ0077 (cons fname nil))))) - (t - (do ((tmp4 args (cdr tmp4)) (v nil)) - ((or (atom tmp4) (progn (setq v (car tmp4)) nil)) nil) - (seq - (exit - (progn - (setq plist (getalist (caar fenv) v)) - (cond - (plist - (|clearCmdParts| (cons '|propert| (cons v nil))) - (do ((tmp5 plist (cdr tmp5)) (tmp6 nil)) - ((or (atom tmp5) - (progn (setq tmp6 (car tmp5)) nil) - (progn - (progn - (setq prop (car tmp6)) - (setq val (cdr tmp6)) - tmp6) - nil)) - nil) - (seq - (exit (|putHist| v prop val |$InteractiveFrame|))))) - ((setq m (|get| '|--macros--| v fenv)) - (|putHist| '|--macros--| v m |$InteractiveFrame|)) - (t - (|sayKeyedMsg| 'S2IZ0079 ; frame not found - (cons v (cons fname nil))))))))) - (|sayKeyedMsg| 'S2IZ0078 ; import complete - (cons fname nil))))))))))))) + (seq + (exit (|putHist| v prop val |$InteractiveFrame|))))) + ((setq m (|get| '|--macros--| v fenv)) + (|putHist| '|--macros--| v m |$InteractiveFrame|)) + (t + (|sayKeyedMsg| 'S2IZ0079 ; frame not found + (cons v (cons fname nil))))))))) + (|sayKeyedMsg| 'S2IZ0078 ; import complete + (cons fname nil)))))))))) @ -\defun{frame} -\begin{verbatim} --- the system command - -frame l == frameSpad2Cmd l -\end{verbatim} +\defun{frame}{frame} <>= (defun |frame| (l) (|frameSpad2Cmd| l)) @ -\defun{frameSpad2Cmd} -\begin{verbatim} -frameSpad2Cmd args == - frameArgs := '(drop import last names new next) - $options => throwKeyedMsg("S2IZ0016",['")frame"]) - null(args) => helpSpad2Cmd ['frame] - arg := selectOptionLC(first args,frameArgs,'optionError) - args := rest args - if args is [a] then args := a - if ATOM args then args := object2Identifier args - arg = 'drop => - args and PAIRP(args) => throwKeyedMsg("S2IZ0017",[args]) - closeInterpreterFrame(args) - arg = 'import => importFromFrame args - arg = 'last => previousInterpreterFrame() - arg = 'names => displayFrameNames() - arg = 'new => - args and PAIRP(args) => throwKeyedMsg("S2IZ0017",[args]) - addNewInterpreterFrame(args) - arg = 'next => nextInterpreterFrame() - - NIL -\end{verbatim} +\defun{frameSpad2Cmd}{frameSpad2Cmd} <>= (defun |frameSpad2Cmd| (args) - (prog (frameArgs arg a) - (return - (progn - (setq frameArgs '(|drop| |import| |last| |names| |new| |next|)) - (cond - (|$options| - (|throwKeyedMsg| 'S2IZ0016 ; frame command does not take options - (cons ")frame" nil))) - ((null args) - (|helpSpad2Cmd| (cons '|frame| nil))) - (t - (setq arg - (|selectOptionLC| (car args) frameArgs '|optionError|)) - (setq args (cdr args)) - (cond - ((and (pairp args) - (eq (qcdr args) nil) - (progn (setq a (qcar args)) t)) - (setq args a))) - (when (atom args) - (setq args (|object2Identifier| args))) - (cond - ((eq arg '|drop|) - (cond - ((and args (pairp args)) - (|throwKeyedMsg| 'S2IZ0017 ; not a valid frame name - (cons args nil))) - (t (|closeInterpreterFrame| args)))) - ((eq arg '|import|) - (|importFromFrame| args)) - ((eq arg '|last|) - (|previousInterpreterFrame|)) - ((eq arg '|names|) - (|displayFrameNames|)) - ((eq arg '|new|) - (cond - ((and args (pairp args)) - (|throwKeyedMsg| 'S2IZ0017 ; not a valid frame name - (cons args nil))) - (t - (|addNewInterpreterFrame| args)))) - ((eq arg '|next|) - (|nextInterpreterFrame|)) - (t nil)))))))) + (let (frameArgs arg a) + (declare (special |$options|)) + (setq frameArgs '(|drop| |import| |last| |names| |new| |next|)) + (cond + (|$options| + (|throwKeyedMsg| 'S2IZ0016 ; frame command does not take options + (cons ")frame" nil))) + ((null args) (|helpSpad2Cmd| (cons '|frame| nil))) + (t + (setq arg (|selectOptionLC| (car args) frameArgs '|optionError|)) + (setq args (cdr args)) + (when (and (pairp args) + (eq (qcdr args) nil) + (progn (setq a (qcar args)) t)) + (setq args a)) + (when (atom args) (setq args (|object2Identifier| args))) + (case arg + (|drop| + (if (and args (pairp args)) + (|throwKeyedMsg| 'S2IZ0017 ; not a valid frame name + (cons args nil)) + (|closeInterpreterFrame| args))) + (|import| (|importFromFrame| args)) + (|last| (|previousInterpreterFrame|)) + (|names| (|displayFrameNames|)) + (|new| + (if (and args (pairp args)) + (|throwKeyedMsg| 'S2IZ0017 ; not a valid frame name + (cons args nil)) + (|addNewInterpreterFrame| args))) + (|next| (|nextInterpreterFrame|)) + (t nil)))))) @ \section{Frame File Messages} @@ -4506,14 +4001,16 @@ and in HyperDoc. In HyperDoc, choose the {\bf Commands} item from the {\bf Reference} menu. -\defun{help} +\section{Variables Used} +\section{Functions} +\defun{help}{help} <>= (defun |help| (l) (|helpSpad2Cmd| l)) @ -\defun{helpSpad2Cmd} +\defun{helpSpad2Cmd}{helpSpad2Cmd} <>= (defun |helpSpad2Cmd| (|args|) (unless (|newHelpSpad2Cmd| |args|) @@ -4521,76 +4018,39 @@ In HyperDoc, choose the {\bf Commands} item from the @ -\defun{newHelpSpad2Cmd} -\begin{verbatim} -;newHelpSpad2Cmd args == -; if null args then args := ["?"] -; # args > 1 => -; sayKeyedMsg("S2IZ0026",NIL) -; true -; sarg := PNAME first args -; if sarg = '"?" then args := ['help] -; else if sarg = '"%" then args := ['history] -; else if sarg = '"%%" then args := ['history] -; arg := selectOptionLC(first args,$SYSCOMMANDS,nil) -; if null arg then arg := first args -; if arg = 'compiler then arg := 'compile -; -- see if new help file exists -; narg := PNAME arg -; null (helpFile := MAKE_-INPUT_-FILENAME [narg,'HELPSPAD,'_*]) => NIL -; $useFullScreenHelp => -; OBEY STRCONC('"$AXIOM/lib/SPADEDIT ",namestring helpFile) -; true -; filestream := MAKE_-INSTREAM(helpFile) -; repeat -; line := read_-line(filestream,false) -; NULL line => -; SHUT filestream -; return true -; SAY line -; true -\end{verbatim} - +\defun{newHelpSpad2Cmd}{newHelpSpad2Cmd} <>= (defun |newHelpSpad2Cmd| (args) - (prog (sarg arg |narg| |helpFile| |filestream| |line|) - (return - (seq - (progn - (cond ((null args) (setq args (cons '? nil)))) - (cond - ((> (|#| args) 1) (|sayKeyedMsg| 's2iz0026 nil) t) - (t - (setq sarg (pname (car args))) - (cond - ((string= sarg "?") (setq args (cons '|help| nil))) - ((string= sarg "%") (setq args (cons '|history| nil))) - ((string= sarg "%%") (setq args (cons '|history| nil))) - (t nil)) - (setq arg (|selectOptionLC| (car args) $syscommands nil)) - (cond ((null arg) (setq arg (car args)))) - (cond ((eq arg '|compiler|) (setq arg '|compile|))) - (setq |narg| (pname arg)) - (cond - ((null - (setq |helpFile| - (make-input-filename - (cons |narg| (cons 'helpspad (cons '* nil)))))) - nil) - (|$useFullScreenHelp| - (obey (strconc "$AXIOM/lib/SPADEDIT " (|namestring| |helpFile|))) t) - (t - (setq |filestream| (make-instream |helpFile|)) - (do () - (nil nil) - (seq - (exit - (progn - (setq |line| (|read-line| |filestream| nil)) - (cond - ((null |line|) (shut |filestream|) (return t)) - (t (say |line|))))))) - t))))))))) + (let (sarg arg narg helpfile filestream line) + (declare (special $syscommands |$useFullScreenHelp|)) + (when (null args) (setq args (list '?))) + (if (> (|#| args) 1) + (|sayKeyedMsg| 's2iz0026 nil) + (progn + (setq sarg (pname (car args))) + (cond + ((string= sarg "?") (setq args (list '|help|))) + ((string= sarg "%") (setq args (list '|history|))) + ((string= sarg "%%") (setq args (list '|history|))) + (t nil)) + (setq arg (|selectOptionLC| (car args) $syscommands nil)) + (cond ((null arg) (setq arg (car args)))) + (cond ((eq arg '|compiler|) (setq arg '|compile|))) + (setq narg (pname arg)) + (cond + ((null + (setq helpfile + (make-input-filename + (cons narg (cons 'helpspad (cons '* nil)))))) + nil) + (|$useFullScreenHelp| + (obey (strconc "$AXIOM/lib/SPADEDIT " (|namestring| helpfile))) t) + (t + (setq filestream (make-instream helpfile)) + (do ((line (|read-line| filestream nil) (|read-line| filestream nil))) + ((null line) (shut filestream)) + (say line)))))) + t)) @ @@ -4782,95 +4242,84 @@ the contents. History recording is done in two different ways: \begin{itemize} \item all changes in variable bindings (i.e. previous values) are -written to [[$HistList]], which is a circular list -\item all new bindings (including the binding to [[%]]) are written to a -file called [[histFileName()]] -one older session is accessible via the file [[$oldHistFileName()]] +written to \verb|$HistList|, which is a circular list +\item all new bindings (including the binding to \verb|%|) are written to a +file called histFileName() +one older session is accessible via the file \verb|$oldHistFileName()| \end{itemize} -\section{Variables Used} +\section{Initialized history variables} The following global variables are used: \begin{list}{} -\item [[$HistList]], [[$HistListLen]] and [[$HistListAct]] which is the - actual number of ``undoable'' steps) -\item [[$HistRecord]] collects the input line, all variable bindings +\item \verb|$HistList|, \verb|$HistListLen| and \verb|$HistListAct| + which is the actual number of ``undoable'' steps) +\item \verb|$HistRecord| collects the input line, all variable bindings and the output of a step, before it is written to the file - [[histFileName()]]. -\item [[$HiFiAccess]] is a flag, which is reset by [[)history )off]] + histFileName(). +\item \verb|$HiFiAccess| is a flag, which is reset by )history )off \end{list} -The result of step n can be accessed by [[%n]], which is translated -into a call of [[fetchOutput(n)]]. The -[[updateHist]] is called after every interpreter step. The -[[putHist]] function records all changes in the environment to [[$HistList]] - and [[$HistRecord]] + +The result of step n can be accessed by \verb|%n|, which is translated +into a call of fetchOutput(n). The updateHist is called after every +interpreter step. The putHist function records all changes in the +environment to \verb|$HistList| and \verb|$HistRecord|. -\subsection{Initialized history variables} +\defdollar{oldHistoryFileName} <>= (defvar |$oldHistoryFileName| '|last| "vm/370 filename name component") + +@ +\defdollar{historyFileType} +<>= (defvar |$historyFileType| '|axh| "vm/370 filename type component") + +@ +\defdollar{historyDirectory} +<>= (defvar |$historyDirectory| 'A "vm/370 filename disk component") + +@ +\defdollar{HiFiAccess} +<>= (defvar |$HiFiAccess| t "t means turn on history mechanism") + +@ +\defdollar{useInternalHistoryTable} +<>= (defvar |$useInternalHistoryTable| t "t means keep history in core") @ \section{Data Structures} \section{Functions} -\defun{makeHistFileName} -\begin{verbatim} -makeHistFileName(fname) == - makePathname(fname,$historyFileType,$historyDirectory) -\end{verbatim} +\defun{makeHistFileName}{makeHistFileName} <>= (defun |makeHistFileName| (fname) (|makePathname| fname |$historyFileType| |$historyDirectory|)) @ -\defun{oldHistFileName} -\begin{verbatim} -oldHistFileName() == - makeHistFileName($oldHistoryFileName) -\end{verbatim} +\defun{oldHistFileName}{oldHistFileName} <>= (defun |oldHistFileName| () (|makeHistFileName| |$oldHistoryFileName|)) @ -\defun{histFileName} -\begin{verbatim} -histFileName() == - makeHistFileName($interpreterFrameName) -\end{verbatim} +\defun{histFileName}{histFileName} <>= (defun |histFileName| () + (declare (special |$interpreterFrameName|)) (|makeHistFileName| |$interpreterFrameName|)) @ -\defun{histInputFileName} -\begin{verbatim} -histInputFileName(fn) == - null fn => - makePathname($interpreterFrameName,'INPUT,$historyDirectory) - makePathname(fn,'INPUT,$historyDirectory) -\end{verbatim} +\defun{histInputFileName}{histInputFileName} <>= (defun |histInputFileName| (fn) + (declare (special |$interpreterFrameName| |$historyDirectory|)) (if (null fn) (|makePathname| |$interpreterFrameName| 'input |$historyDirectory|) (|makePathname| fn 'input |$historyDirectory|))) @ -\defun{initHist} -\begin{verbatim} -initHist() == - $useInternalHistoryTable => initHistList() - oldFile := oldHistFileName() - newFile := histFileName() - -- see if history directory is writable - histFileErase oldFile - if MAKE_-INPUT_-FILENAME newFile then $REPLACE(oldFile,newFile) - $HiFiAccess:= 'T - initHistList() -\end{verbatim} +\defun{initHist}{initHist} <>= (defun |initHist| () (prog (oldFile newFile) @@ -4888,239 +4337,138 @@ initHist() == (|initHistList|)))))) @ -\defun{initHistList} -\begin{verbatim} -initHistList() == - -- creates $HistList as a circular list of length $HistListLen - -- and $HistRecord - $HistListLen:= 20 - $HistList:= LIST NIL - li:= $HistList - for i in 1..$HistListLen repeat li:= CONS(NIL,li) - RPLACD($HistList,li) - $HistListAct:= 0 - $HistRecord:= NIL -\end{verbatim} +\defun{initHistList}{initHistList} <>= (defun |initHistList| () - (prog (li) - (return - (seq - (progn - (setq |$HistListLen| 20) - (setq |$HistList| (list nil)) - (setq li |$HistList|) - (do ((|i| 1 (qsadd1 |i|))) - ((qsgreaterp |i| |$HistListLen|) nil) - (seq - (exit - (setq li (cons nil li))))) - (rplacd |$HistList| li) - (setq |$HistListAct| 0) - (setq |$HistRecord| nil)))))) + (let (li) + (declare (special |$HistListLen| |$HistList| |$HistListAct| |$HistRecord|)) + (setq |$HistListLen| 20) + (setq |$HistList| (list nil)) + (setq li |$HistList|) + (do ((|i| 1 (qsadd1 |i|))) + ((qsgreaterp |i| |$HistListLen|) nil) + (setq li (cons nil li))) + (rplacd |$HistList| li) + (setq |$HistListAct| 0) + (setq |$HistRecord| nil))) @ -\defun{history} -\begin{verbatim} -history l == - l or null $options => sayKeyedMsg("S2IH0006",NIL) - historySpad2Cmd() -\end{verbatim} +\defun{history}{history} <>= (defun |history| (l) - (cond - ((or l (null |$options|)) - (|sayKeyedMsg| 'S2IH0006 nil)) ; syntax error - (t - (|historySpad2Cmd|)))) + (declare (special |$options|)) + (if (or l (null |$options|)) + (|sayKeyedMsg| 'S2IH0006 nil) ; syntax error + (|historySpad2Cmd|))) @ -\defun{historySpad2Cmd} -\begin{verbatim} -historySpad2Cmd() == - -- history is a system command which can call resetInCoreHist - -- and changeHistListLen, and restore last session - histOptions:= - '(on off yes no change reset restore write save show file memory) - opts:= [ [selectOptionLC(opt,histOptions,'optionError),:optargs] - for [opt,:optargs] in $options] - for [opt,:optargs] in opts repeat - opt in '(on yes) => - $HiFiAccess => sayKeyedMsg("S2IH0007",NIL) - $IOindex = 1 => -- haven't done anything yet - $HiFiAccess:= 'T - initHistList() - sayKeyedMsg("S2IH0008",NIL) - x := UPCASE queryUserKeyedMsg("S2IH0009",NIL) - MEMQ(STRING2ID_-N(x,1),'(Y YES)) => - histFileErase histFileName() - $HiFiAccess:= 'T - $options := nil - clearSpad2Cmd '(all) - sayKeyedMsg("S2IH0008",NIL) - initHistList() - sayKeyedMsg("S2IH0010",NIL) - opt in '(off no) => - null $HiFiAccess => sayKeyedMsg("S2IH0011",NIL) - $HiFiAccess:= NIL - disableHist() - sayKeyedMsg("S2IH0012",NIL) - opt = 'file => setHistoryCore NIL - opt = 'memory => setHistoryCore true - opt = 'reset => resetInCoreHist() - opt = 'save => saveHistory optargs - opt = 'show => showHistory optargs - opt = 'change => changeHistListLen first optargs - opt = 'restore => restoreHistory optargs - opt = 'write => writeInputLines(optargs,1) - 'done -\end{verbatim} +\defun{historySpad2Cmd}{historySpad2Cmd} <>= (defun |historySpad2Cmd| () - (prog (histOptions opts opt optargs x) - (return - (seq - (progn - (setq histOptions - '(|on| |off| |yes| |no| |change| |reset| |restore| |write| - |save| |show| |file| |memory|)) - (setq opts - (prog (tmp1) - (setq tmp1 nil) - (return - (do ((tmp2 |$options| (cdr tmp2)) (tmp3 nil)) - ((or (atom tmp2) - (progn - (setq tmp3 (car tmp2)) - nil) - (progn - (progn - (setq opt (car tmp3)) - (setq optargs (cdr tmp3)) - tmp3) - nil)) - (nreverse0 tmp1)) - (seq - (exit - (setq tmp1 - (cons - (cons - (|selectOptionLC| opt histOptions '|optionError|) - optargs) - tmp1)))))))) - (do ((tmp4 opts (cdr tmp4)) (tmp5 nil)) - ((or (atom tmp4) - (progn - (setq tmp5 (car tmp4)) + (let (histOptions opts opt optargs x) + (declare (special |$options| |$HiFiAccess| |$IOindex|)) + (setq histOptions + '(|on| |off| |yes| |no| |change| |reset| |restore| |write| + |save| |show| |file| |memory|)) + (setq opts + (prog (tmp1) + (setq tmp1 nil) + (return + (do ((tmp2 |$options| (cdr tmp2)) (tmp3 nil)) + ((or (atom tmp2) + (progn + (setq tmp3 (car tmp2)) nil) - (progn (progn - (setq opt (car tmp5)) - (setq optargs (cdr tmp5)) - tmp5) - nil)) - nil) - (seq - (exit - (cond - ((|member| opt '(|on| |yes|)) + (progn + (setq opt (car tmp3)) + (setq optargs (cdr tmp3)) + tmp3) + nil)) + (nreverse0 tmp1)) + (setq tmp1 + (cons + (cons + (|selectOptionLC| opt histOptions '|optionError|) + optargs) + tmp1)))))) + (do ((tmp4 opts (cdr tmp4)) (tmp5 nil)) + ((or (atom tmp4) + (progn + (setq tmp5 (car tmp4)) + nil) + (progn + (progn + (setq opt (car tmp5)) + (setq optargs (cdr tmp5)) + tmp5) + nil)) + nil) + (seq + (exit + (cond + ((|member| opt '(|on| |yes|)) + (cond + (|$HiFiAccess| + (|sayKeyedMsg| 'S2IH0007 nil)) ; history already on + ((eql |$IOindex| 1) + (setq |$HiFiAccess| t) + (|initHistList|) + (|sayKeyedMsg| 'S2IH0008 nil)) ; history now on + (t + (setq x ; really want to turn history on? + (upcase (|queryUserKeyedMsg| 'S2IH0009 nil))) (cond - (|$HiFiAccess| - (|sayKeyedMsg| 'S2IH0007 nil)) ; history already on - ((eql |$IOindex| 1) + ((memq (string2id-n x 1) '(Y YES)) + (|histFileErase| (|histFileName|)) (setq |$HiFiAccess| t) - (|initHistList|) - (|sayKeyedMsg| 'S2IH0008 nil)) ; history now on + (setq |$options| nil) + (|clearSpad2Cmd| '(|all|)) + (|sayKeyedMsg| 'S2IH0008 nil) ; history now on + (|initHistList|)) (t - (setq x ; really want to turn history on? - (upcase (|queryUserKeyedMsg| 'S2IH0009 nil))) - (cond - ((memq (string2id-n x 1) '(Y YES)) - (|histFileErase| (|histFileName|)) - (setq |$HiFiAccess| t) - (setq |$options| nil) - (|clearSpad2Cmd| '(|all|)) - (|sayKeyedMsg| 'S2IH0008 nil) ; history now on - (|initHistList|)) - (t - (|sayKeyedMsg| 'S2IH0010 nil)))))) ; history still off - ((|member| opt '(|off| |no|)) - (cond - ((null |$HiFiAccess|) - (|sayKeyedMsg| 'S2IH0011 nil)) ; history already off - (t - (setq |$HiFiAccess| nil) - (|disableHist|) - (|sayKeyedMsg| 'S2IH0012 nil)))) ; history now off - ((eq opt '|file|) - (|setHistoryCore| nil)) - ((eq opt '|memory|) - (|setHistoryCore| t)) - ((eq opt '|reset|) - (|resetInCoreHist|)) - ((eq opt '|save|) - (|saveHistory| optargs)) - ((eq opt '|show|) - (|showHistory| optargs)) - ((eq opt '|change|) - (|changeHistListLen| (CAR optargs))) - ((eq opt '|restore|) - (|restoreHistory| optargs)) - ((eq opt '|write|) - (|writeInputLines| optargs 1)))))) - '|done|))))) + (|sayKeyedMsg| 'S2IH0010 nil)))))) ; history still off + ((|member| opt '(|off| |no|)) + (cond + ((null |$HiFiAccess|) + (|sayKeyedMsg| 'S2IH0011 nil)) ; history already off + (t + (setq |$HiFiAccess| nil) + (|disableHist|) + (|sayKeyedMsg| 'S2IH0012 nil)))) ; history now off + ((eq opt '|file|) (|setHistoryCore| nil)) + ((eq opt '|memory|) (|setHistoryCore| t)) + ((eq opt '|reset|) (|resetInCoreHist|)) + ((eq opt '|save|) (|saveHistory| optargs)) + ((eq opt '|show|) (|showHistory| optargs)) + ((eq opt '|change|) (|changeHistListLen| (car optargs))) + ((eq opt '|restore|) (|restoreHistory| optargs)) + ((eq opt '|write|) (|writeInputLines| optargs 1)))))) + '|done|)) @ -\defun{setHistoryCore} -We [[case]] on the [[inCore]] argument value +\defun{setHistoryCore}{setHistoryCore} +We case on the inCore argument value \begin{list}{} \item If history is already on and is kept in the same location as requested (file or memory) then complain. \item If history is not in use then start using the file or memory as -requested. This is done by simply setting the [[$useInternalHistoryTable]] -to the requested value, where [[T]] means use memory and [[NIL]] means +requested. This is done by simply setting the \verb|$useInternalHistoryTable| +to the requested value, where T means use memory and NIL means use a file. We tell the user. -\item If history should be in memory, that is [[inCore]] is not [[NIL]], +\item If history should be in memory, that is inCore is not NIL, and the history file already contains information we read the information from the file, store it in memory, and erase the history file. We modify -[[$useInternalHistoryTable]] to [[T]] to indicate that we're maintining +\verb|$useInternalHistoryTable| to T to indicate that we're maintining the history in memory and tell the user. \item Otherwise history must be on and in memory. We erase any old history file and then write the in-memory history to a new file \end{list} -\begin{verbatim} -setHistoryCore inCore == - inCore = $useInternalHistoryTable => - sayKeyedMsg((inCore => "S2IH0030"; "S2IH0029"),NIL) - not $HiFiAccess => - $useInternalHistoryTable := inCore - inCore => sayKeyedMsg("S2IH0032",NIL) - sayKeyedMsg("S2IH0031",NIL) - inCore => - $internalHistoryTable := NIL - if $IOindex ^= 0 then - -- actually put something in there - l := LENGTH RKEYIDS histFileName() - for i in 1..l repeat - vec:= UNWIND_-PROTECT(readHiFi(i),disableHist()) - $internalHistoryTable := CONS([i,:vec],$internalHistoryTable) - histFileErase histFileName() - $useInternalHistoryTable := true - sayKeyedMsg("S2IH0032",NIL) - $HiFiAccess:= 'NIL - histFileErase histFileName() - str := RDEFIOSTREAM ['(MODE . OUTPUT),['FILE,:histFileName()]] - for [n,:rec] in reverse $internalHistoryTable repeat - SPADRWRITE(object2Identifier n,rec,str) - RSHUT str - $HiFiAccess:= 'T - $internalHistoryTable := NIL - $useInternalHistoryTable := NIL - sayKeyedMsg("S2IH0031",NIL) -\end{verbatim} <>= (defun |setHistoryCore| (inCore) - (prog (l vec str n rec) + (let (l vec str n rec) + (declare (special |$useInternalHistoryTable| |$internalHistoryTable| + |$HiFiAccess| |$IOindex|)) (cond ((boot-equal inCore |$useInternalHistoryTable|) (if inCore @@ -5138,13 +4486,10 @@ setHistoryCore inCore == (setq l (length (rkeyids (|histFileName|)))) (do ((|i| 1 (qsadd1 |i|))) ((qsgreaterp |i| l) nil) - (seq - (exit - (progn - (setq vec (unwind-protect (|readHiFi| |i|) (|disableHist|))) - (setq |$internalHistoryTable| - (cons (cons |i| vec) |$internalHistoryTable|)))))) - (|histFileErase| (|histFileName|)))) + (setq vec (unwind-protect (|readHiFi| |i|) (|disableHist|))) + (setq |$internalHistoryTable| + (cons (cons |i| vec) |$internalHistoryTable|))) + (|histFileErase| (|histFileName|)))) (setq |$useInternalHistoryTable| t) (|sayKeyedMsg| 'S2IH0032 nil)) ; use memory history (t @@ -5170,9 +4515,7 @@ setHistoryCore inCore == tmp1) nil)) nil) - (seq - (exit - (spadrwrite (|object2Identifier| n) rec str)))) + (spadrwrite (|object2Identifier| n) rec str)) (rshut str) (setq |$HiFiAccess| t) (setq |$internalHistoryTable| nil) @@ -5180,839 +4523,408 @@ setHistoryCore inCore == (|sayKeyedMsg| 'S2IH0031 nil))))) ; use file history @ -\defun{writeInputLines} -\begin{verbatim} -writeInputLines(fn,initial) == - -- writes all input lines into file histInputFileName() - not $HiFiAccess => sayKeyedMsg("S2IH0013",NIL) ; history not on - null fn => - throwKeyedMsg("S2IH0038", nil) ; missing file name - maxn := 72 - breakChars := [" ","+"] - for i in initial..$IOindex - 1 repeat - vecl := CAR readHiFi i - if STRINGP vecl then vecl := [vecl] - for vec in vecl repeat - n := SIZE vec - while n > maxn repeat - -- search backwards for a blank - done := nil - for j in 1..maxn while ^done repeat - k := 1 + maxn - j - MEMQ(vec.k,breakChars) => - svec := STRCONC(SUBSTRING(vec,0,k+1),UNDERBAR) - lineList := [svec,:lineList] - done := true - vec := SUBSTRING(vec,k+1,NIL) - n := SIZE vec - -- in case we can't find a breaking point - if ^done then n := 0 - lineList := [vec,:lineList] - file := histInputFileName(fn) - histFileErase file - inp:= DEFIOSTREAM(['(MODE . OUTPUT),['FILE,:file]],255,0) - for x in removeUndoLines NREVERSE lineList repeat WRITE_-LINE(x,inp) - -- see file "undo" for definition of removeUndoLines - if fn ^= 'redo then sayKeyedMsg("S2IH0014",[namestring file]) - SHUT inp - NIL -\end{verbatim} +\defdollar{underbar} +Also used in the output routines. +<>= +(defvar underbar "_") + +@ + +\defun{writeInputLines}{writeInputLines} <>= (defun |writeInputLines| (fn initial) - (prog (maxn breakChars vecl k svec done vec n lineList file inp) - (return - (seq - (cond - ((null |$HiFiAccess|) - (|sayKeyedMsg| 'S2IH0013 nil)) ; history is not on - ((null fn) - (|throwKeyedMsg| 'S2IH0038 nil)) ; missing file name - (t - (setq maxn 72) - (setq breakChars (cons '| | (cons '+ nil))) - (do ((tmp0 (spaddifference |$IOindex| 1)) - (|i| initial (+ |i| 1))) - ((> |i| tmp0) nil) - (seq - (exit - (progn - (setq vecl (car (|readHiFi| |i|))) - (cond - ((stringp vecl) (setq vecl (cons vecl nil)))) - (do ((tmp1 vecl (cdr tmp1)) (vec nil)) - ((or (atom tmp1) (progn (setq vec (car tmp1)) nil)) nil) - (seq - (exit - (progn - (setq n (size vec)) - (do () - ((null (> n maxn)) nil) - (seq - (exit - (progn - (setq done nil) - (do ((|j| 1 (qsadd1 |j|))) - ((or (qsgreaterp |j| maxn) (null (null done))) nil) - (seq - (exit - (progn - (setq k (spaddifference (plus 1 maxn) |j|)) - (cond - ((memq (ELT vec k) breakChars) - (progn - (setq svec (strconc - (substring vec 0 (plus k 1)) underbar)) - (setq lineList (cons svec lineList)) - (setq done t) - (setq vec (substring vec (plus k 1) nil)) - (setq n (size vec))))))))) - (cond - ((null done) (setq n 0)) - (t nil)))))) - (setq lineList (cons vec lineList)))))))))) - (setq file (|histInputFileName| fn)) - (|histFileErase| file) - (setq inp - (defiostream - (cons - '(mode . output) - (cons (cons 'file file) nil)) 255 0)) - (do ((tmp2 (|removeUndoLines| (nreverse lineList)) (cdr tmp2)) - (x nil)) - ((or (atom tmp2) - (progn - (setq x (car tmp2)) - nil)) - nil) - (seq - (exit - (write-line x inp)))) - (cond - ((nequal fn '|redo|) - (|sayKeyedMsg| 'S2IH0014 ; edit this file to see input lines - (cons (|namestring| file) nil)))) - (shut inp) - nil)))))) + (let (maxn breakChars vecl k svec done n lineList file inp) + (declare (special underbar)) + (cond + ((null |$HiFiAccess|) (|sayKeyedMsg| 'S2IH0013 nil)) ; history is not on + ((null fn) (|throwKeyedMsg| 'S2IH0038 nil)) ; missing file name + (t + (setq maxn 72) + (setq breakChars (cons '| | (cons '+ nil))) + (do ((tmp0 (spaddifference |$IOindex| 1)) + (|i| initial (+ |i| 1))) + ((> |i| tmp0) nil) + (setq vecl (car (|readHiFi| |i|))) + (when (stringp vecl) (setq vecl (cons vecl nil))) + (dolist (vec vecl) + (setq n (size vec)) + (do () + ((null (> n maxn)) nil) + (setq done nil) + (do ((|j| 1 (qsadd1 |j|))) + ((or (qsgreaterp |j| maxn) (null (null done))) nil) + (setq k (spaddifference (plus 1 maxn) |j|)) + (when (memq (ELT vec k) breakChars) + (setq svec (strconc (substring vec 0 (1+ k)) underbar)) + (setq lineList (cons svec lineList)) + (setq done t) + (setq vec (substring vec (1+ k) nil)) + (setq n (size vec)))) + (when done (setq n 0))) + (setq lineList (cons vec lineList)))) + (setq file (|histInputFileName| fn)) + (|histFileErase| file) + (setq inp + (defiostream + (cons + '(mode . output) + (cons (cons 'file file) nil)) 255 0)) + (dolist (x (|removeUndoLines| (nreverse lineList))) + (write-line x inp)) + (cond + ((nequal fn '|redo|) + (|sayKeyedMsg| 'S2IH0014 ; edit this file to see input lines + (cons (|namestring| file) nil)))) + (shut inp) + nil)))) @ -\defun{resetInCoreHist} -\begin{verbatim} -resetInCoreHist() == - -- removes all pointers from $HistList - $HistListAct:= 0 - for i in 1..$HistListLen repeat - $HistList:= CDR $HistList - RPLACA($HistList,NIL) -\end{verbatim} +\defun{resetInCoreHist}{resetInCoreHist} <>= (defun |resetInCoreHist| () - (seq - (progn - (setq |$HistListAct| 0) - (do ((|i| 1 (qsadd1 |i|))) - ((qsgreaterp |i| |$HistListLen|) nil) - (seq - (exit - (progn - (setq |$HistList| (cdr |$HistList|)) - (rplaca |$HistList| nil)))))))) + (declare (special |$HistListAct| |$HistListLen| |$HistList|)) + (setq |$HistListAct| 0) + (do ((|i| 1 (qsadd1 |i|))) + ((qsgreaterp |i| |$HistListLen|) nil) + (setq |$HistList| (cdr |$HistList|)) + (rplaca |$HistList| nil))) @ -\defun{changeHistListLen} -\begin{verbatim} -changeHistListLen(n) == - -- changes the length of $HistList. n must be nonnegative - NULL INTEGERP n => sayKeyedMsg("S2IH0015",[n]) - dif:= n-$HistListLen - $HistListLen:= n - l:= CDR $HistList - if dif > 0 then - for i in 1..dif repeat l:= CONS(NIL,l) - if dif < 0 then - for i in 1..-dif repeat l:= CDR l - if $HistListAct > n then $HistListAct:= n - RPLACD($HistList,l) - 'done -\end{verbatim} +\defun{changeHistListLen}{changeHistListLen} <>= (defun |changeHistListLen| (n) - (prog (dif l) - (return - (seq - (cond - ((null (integerp n)) - (|sayKeyedMsg| 'S2IH0015 (cons n nil))) ; only positive integers - (t - (setq dif (spaddifference n |$HistListLen|)) - (setq |$HistListLen| n) - (setq l (cdr |$HistList|)) - (cond - ((> dif 0) - (do ((|i| 1 (qsadd1 |i|))) - ((qsgreaterp |i| dif) nil) - (seq - (exit - (setq l (cons nil l))))))) - (cond - ((minusp dif) - (do ((tmp0 (spaddifference dif)) - (|i| 1 (qsadd1 |i|))) - ((qsgreaterp |i| tmp0) nil) - (seq - (exit - (setq l (cdr l))))) - (cond - ((> |$HistListAct| n) (setq |$HistListAct| n)) - (t nil)))) - (rplacd |$HistList| l) - '|done|)))))) + (let (dif l) + (declare (special |$HistListLen| |$HistList| |$HistListAct|)) + (if (null (integerp n)) + (|sayKeyedMsg| 'S2IH0015 (cons n nil)) ; only positive integers + (progn + (setq dif (spaddifference n |$HistListLen|)) + (setq |$HistListLen| n) + (setq l (cdr |$HistList|)) + (cond + ((> dif 0) + (do ((|i| 1 (qsadd1 |i|))) + ((qsgreaterp |i| dif) nil) + (seq + (exit + (setq l (cons nil l)))))) + ((minusp dif) + (do ((tmp0 (spaddifference dif)) + (|i| 1 (qsadd1 |i|))) + ((qsgreaterp |i| tmp0) nil) + (seq + (exit + (setq l (cdr l))))) + (cond + ((> |$HistListAct| n) (setq |$HistListAct| n)) + (t nil)))) + (rplacd |$HistList| l) + '|done|)))) @ -\defun{updateHist} -\begin{verbatim} -updateHist() == - -- updates the history file and calls updateInCoreHist - null $IOindex => nil - startTimingProcess 'history - updateInCoreHist() - if $HiFiAccess then - UNWIND_-PROTECT(writeHiFi(),disableHist()) - $HistRecord:= NIL - $IOindex:= $IOindex+1 - updateCurrentInterpreterFrame() - $mkTestInputStack := nil - $currentLine := nil - stopTimingProcess 'history -\end{verbatim} +\defun{updateHist}{updateHist} <>= (defun |updateHist| () - (cond - ((null |$IOindex|) nil) - (t - (|startTimingProcess| '|history|) - (|updateInCoreHist|) - (when |$HiFiAccess| - (unwind-protect (|writeHiFi|) (|disableHist|)) - (setq |$HistRecord| nil)) - (setq |$IOindex| (plus |$IOindex| 1)) - (|updateCurrentInterpreterFrame|) - (setq |$mkTestInputStack| nil) - (setq |$currentLine| nil) - (|stopTimingProcess| '|history|)))) - -@ -\defun{updateInCoreHist} -\begin{verbatim} -updateInCoreHist() == - -- updates $HistList and $IOindex - $HistList:= CDR($HistList) - RPLACA($HistList,NIL) - if $HistListAct < $HistListLen then $HistListAct:= $HistListAct+1 -\end{verbatim} + (declare (special |$IOindex| |$HiFiAccess| |$HistRecord| |$mkTestInputStack| + |$currentLine|)) + (when |$IOindex| + (|startTimingProcess| '|history|) + (|updateInCoreHist|) + (when |$HiFiAccess| + (unwind-protect (|writeHiFi|) (|disableHist|)) + (setq |$HistRecord| nil)) + (incf |$IOindex|) + (|updateCurrentInterpreterFrame|) + (setq |$mkTestInputStack| nil) + (setq |$currentLine| nil) + (|stopTimingProcess| '|history|))) + +@ +\defun{updateInCoreHist}{updateInCoreHist} <>= (defun |updateInCoreHist| () - (progn + (declare (special |$HistList| |$HistListLen| |$HistListAct|)) (setq |$HistList| (cdr |$HistList|)) (rplaca |$HistList| nil) - (COND - ((> |$HistListLen| |$HistListAct|) - (setq |$HistListAct| (plus |$HistListAct| 1))) - (t nil)))) + (when (> |$HistListLen| |$HistListAct|) + (setq |$HistListAct| (plus |$HistListAct| 1)))) @ -\defun{putHist} -\begin{verbatim} -putHist(x,prop,val,e) == - -- records new value to $HistRecord and old value to $HistList - -- then put is called with e - if not (x='%) then recordOldValue(x,prop,get(x,prop,e)) - if $HiFiAccess then recordNewValue(x,prop,val) - putIntSymTab(x,prop,val,e) -\end{verbatim} +\defun{putHist}{putHist} <>= (defun |putHist| (x prop val e) - (progn - (when (null (eq x '%)) - (|recordOldValue| x prop (|get| x prop e))) - (when |$HiFiAccess| - (|recordNewValue| x prop val)) - (|putIntSymTab| x prop val e))) + (declare (special |$HiFiAccess|)) + (when (null (eq x '%)) (|recordOldValue| x prop (|get| x prop e))) + (when |$HiFiAccess| (|recordNewValue| x prop val)) + (|putIntSymTab| x prop val e)) @ -\defun{recordNewValue} -\begin{verbatim} -recordNewValue(x,prop,val) == - startTimingProcess 'history - recordNewValue0(x,prop,val) - stopTimingProcess 'history -\end{verbatim} +\defun{recordNewValue}{recordNewValue} <>= (defun |recordNewValue| (x prop val) - (progn (|startTimingProcess| '|history|) (|recordNewValue0| x prop val) - (|stopTimingProcess| '|history|))) + (|stopTimingProcess| '|history|)) @ -\defun{recordNewValue0} -\begin{verbatim} -recordNewValue0(x,prop,val) == - -- writes (prop . val) into $HistRecord - -- updateHist writes this stuff out into the history file - p1:= ASSQ(x,$HistRecord) => - p2:= ASSQ(prop,CDR p1) => - RPLACD(p2,val) - RPLACD(p1,CONS(CONS(prop,val),CDR p1)) - p:= CONS(x,list CONS(prop,val)) - $HistRecord:= CONS(p,$HistRecord) -\end{verbatim} +\defun{recordNewValue0}{recordNewValue0} <>= (defun |recordNewValue0| (x prop val) - (prog (p1 p2 p) - (return - (cond - ((setq p1 (ASSQ x |$HistRecord|)) - (cond - ((setq p2 (assq prop (cdr p1))) (rplacd p2 val)) - (t (rplacd p1 (cons (cons prop val) (cdr p1)))))) - (t + (let (p1 p2 p) + (declare (special |$HistRecord|)) + (if (setq p1 (assq x |$HistRecord|)) + (if (setq p2 (assq prop (cdr p1))) + (rplacd p2 val) + (rplacd p1 (cons (cons prop val) (cdr p1)))) + (progn (setq p (cons x (list (cons prop val)))) - (setq |$HistRecord| (cons p |$HistRecord|))))))) + (setq |$HistRecord| (cons p |$HistRecord|)))))) @ -\defun{recordOldValue} -\begin{verbatim} -recordOldValue(x,prop,val) == - startTimingProcess 'history - recordOldValue0(x,prop,val) - stopTimingProcess 'history -\end{verbatim} +\defun{recordOldValue}{recordOldValue} <>= (defun |recordOldValue| (x prop val) - (progn (|startTimingProcess| '|history|) (|recordOldValue0| x prop val) - (|stopTimingProcess| '|history|))) + (|stopTimingProcess| '|history|)) @ -\defun{recordOldValue0} -\begin{verbatim} -recordOldValue0(x,prop,val) == - -- writes (prop . val) into $HistList - p1:= ASSQ(x,CAR $HistList) => - not ASSQ(prop,CDR p1) => - RPLACD(p1,CONS(CONS(prop,val),CDR p1)) - p:= CONS(x,list CONS(prop,val)) - RPLACA($HistList,CONS(p,CAR $HistList)) -\end{verbatim} +\defun{recordOldValue0}{recordOldValue0} <>= (defun |recordOldValue0| (x prop val) - (prog (p1 p) - (return - (seq - (when (setq p1 (assq x (car |$HistList|))) - (exit - (when (null (assq prop (cdr p1))) - (exit - (rplacd p1 (cons (cons prop val) (cdr p1))))))) - (setq p (cons x (list (cons prop val)))) - (rplaca |$HistList| (cons p (car |$HistList|))))))) + (let (p1 p) + (declare (special |$HistList|)) + (when (setq p1 (assq x (car |$HistList|))) + (when (null (assq prop (cdr p1))) + (rplacd p1 (cons (cons prop val) (cdr p1))))) + (setq p (cons x (list (cons prop val)))) + (rplaca |$HistList| (cons p (car |$HistList|))))) @ -\defun{undoInCore} -\begin{verbatim} -undoInCore(n) == - -- undoes the last n>0 steps using $HistList - -- resets $InteractiveFrame - li:= $HistList - for i in n..$HistListLen repeat li:= CDR li - undoChanges(li) - n:= $IOindex-n-1 - n>0 and - $HiFiAccess => - vec:= CDR UNWIND_-PROTECT(readHiFi(n),disableHist()) - val:= ( p:= ASSQ('%,vec) ) and ( p1:= ASSQ('value,CDR p) ) and - CDR p1 - sayKeyedMsg("S2IH0019",[n]) - $InteractiveFrame:= putHist('%,'value,val,$InteractiveFrame) - updateHist() -\end{verbatim} +\defun{undoInCore}{undoInCore} <>= (defun |undoInCore| (n) - (prog (li vec p p1 val) - (return - (seq - (progn - (setq li |$HistList|) - (do ((i n (+ i 1))) - ((> i |$HistListLen|) nil) - (seq - (exit - (setq li (cdr li))))) - (|undoChanges| li) - (setq n (spaddifference (spaddifference |$IOindex| n) 1)) - (and - (> n 0) - (cond - (|$HiFiAccess| - (setq vec - (cdr (unwind-protect (|readHiFi| n) (|disableHist|)))) - (setq val - (and - (setq p (assq '% vec)) - (setq p1 (assq '|value| (cdr p))) - (cdr p1)))) - (t - (|sayKeyedMsg| 'S2IH0019 (cons n nil))))) ; no history file - (setq |$InteractiveFrame| - (|putHist| '% '|value| val |$InteractiveFrame|)) - (|updateHist|)))))) + (let (li vec p p1 val) + (declare (special |$HistList| |$HistListLen| |$IOindex| |$HiFiAccess| + |$InteractiveFrame|)) + (setq li |$HistList|) + (do ((i n (+ i 1))) + ((> i |$HistListLen|) nil) + (setq li (cdr li))) + (|undoChanges| li) + (setq n (spaddifference (spaddifference |$IOindex| n) 1)) + (and + (> n 0) + (if |$HiFiAccess| + (progn + (setq vec (cdr (unwind-protect (|readHiFi| n) (|disableHist|)))) + (setq val + (and + (setq p (assq '% vec)) + (setq p1 (assq '|value| (cdr p))) + (cdr p1)))) + (|sayKeyedMsg| 'S2IH0019 (cons n nil)))) ; no history file + (setq |$InteractiveFrame| (|putHist| '% '|value| val |$InteractiveFrame|)) + (|updateHist|))) @ -\defun{undoChanges} -\begin{verbatim} -undoChanges(li) == - -- undoes all changes of list 'li' - if not CDR li = $HistList then undoChanges CDR li - for p1 in CAR li repeat - x:= CAR p1 - for p2 in CDR p1 repeat - putHist(x,CAR p2,CDR p2,$InteractiveFrame) -\end{verbatim} +\defun{undoChanges}{undoChanges} <>= (defun |undoChanges| (li) - (prog (x) - (return - (seq - (progn - (when (null (boot-equal (cdr li) |$HistList|)) - (|undoChanges| (cdr li))) - (do ((tmp0 (car li) (cdr tmp0)) (p1 nil)) - ((or (atom tmp0) (progn (setq p1 (car tmp0)) nil)) nil) - (seq - (exit - (progn - (setq x (car p1)) - (do ((tmp1 (cdr p1) (cdr tmp1)) (p2 nil)) - ((or (atom tmp1) (progn (setq p2 (car tmp1)) nil)) nil) - (seq - (exit - (|putHist| x (car p2) (cdr p2) |$InteractiveFrame|) - )))))))))))) + (let (x) + (declare (special |$HistList| |$InteractiveFrame|)) + (when (null (boot-equal (cdr li) |$HistList|)) (|undoChanges| (cdr li))) + (dolist (p1 (car li)) + (setq x (car p1)) + (dolist (p2 (cdr p1)) + (|putHist| x (car p2) (cdr p2) |$InteractiveFrame|))))) @ -\defun{undoFromFile} -\begin{verbatim} -undoFromFile(n) == - -- makes a clear and redoes all the assignments until step n - for [x,:varl] in CAAR $InteractiveFrame repeat - for p in varl repeat - [prop,:val]:= p - val => - if not (x='%) then recordOldValue(x,prop,val) - if $HiFiAccess then recordNewValue(x,prop,val) - RPLACD(p,NIL) - for i in 1..n repeat - vec:= UNWIND_-PROTECT(CDR readHiFi(i),disableHist()) - for p1 in vec repeat - x:= CAR p1 - for p2 in CDR p1 repeat - $InteractiveFrame:= putHist(x,CAR p2,CDR p2,$InteractiveFrame) - val:= ( p:= ASSQ('%,vec) ) and ( p1:= ASSQ('value,CDR p) ) and CDR p1 - $InteractiveFrame:= putHist('%,'value,val,$InteractiveFrame) - updateHist() -\end{verbatim} +\defun{undoFromFile}{undoFromFile} <>= (defun |undoFromFile| (n) - (prog (varl prop vec x p p1 val) - (return - (seq - (progn - (do ((tmp0 (caar |$InteractiveFrame|) (cdr tmp0)) (tmp1 nil)) - ((or (atom tmp0) - (progn (setq tmp1 (car tmp0)) nil) - (progn - (progn - (setq x (car tmp1)) - (setq varl (cdr tmp1)) - tmp1) - nil)) - nil) - (seq - (exit - (do ((tmp2 varl (cdr tmp2)) (p nil)) - ((or (atom tmp2) (progn (setq p (car tmp2)) nil)) nil) - (seq - (exit + (let (varl prop vec x p p1 val) + (declare (special |$InteractiveFrame| |$HiFiAccess|)) + (do ((tmp0 (caar |$InteractiveFrame|) (cdr tmp0)) (tmp1 nil)) + ((or (atom tmp0) + (progn (setq tmp1 (car tmp0)) nil) (progn - (setq prop (car p)) - (setq val (cdr p)) - (when val - (progn - (when (null (eq x '%)) - (|recordOldValue| x prop val)) - (when |$HiFiAccess| - (|recordNewValue| x prop val)) - (rplacd p nil)))))))))) - (do ((|i| 1 (qsadd1 |i|))) - ((qsgreaterp |i| n) nil) + (progn + (setq x (car tmp1)) + (setq varl (cdr tmp1)) + tmp1) + nil)) + nil) + (seq + (exit + (do ((tmp2 varl (cdr tmp2)) (p nil)) + ((or (atom tmp2) (progn (setq p (car tmp2)) nil)) nil) (seq (exit (progn - (setq vec - (unwind-protect (cdr (|readHiFi| |i|)) (|disableHist|))) - (do ((tmp3 vec (cdr tmp3)) (p1 nil)) - ((or (atom tmp3) (progn (setq p1 (car tmp3)) nil)) nil) - (seq - (exit - (progn - (setq x (car p1)) - (do ((tmp4 (cdr p1) (cdr tmp4)) (p2 nil)) - ((or (atom tmp4) (progn (setq p2 (car tmp4)) nil)) nil) - (seq - (exit - (setq |$InteractiveFrame| - (|putHist| x (car p2) (CDR p2) |$InteractiveFrame|) - )))))))))))) - (setq val - (and - (setq p (assq '% vec)) - (setq p1 (assq '|value| (cdr p))) - (cdr p1))) - (setq |$InteractiveFrame| - (|putHist| '% '|value| val |$InteractiveFrame|)) - (|updateHist|)))))) - -@ -\defun{saveHistory} -\begin{verbatim} -saveHistory(fn) == - $seen: local := MAKE_-HASHTABLE 'EQ - not $HiFiAccess => sayKeyedMsg("S2IH0016",NIL) - not $useInternalHistoryTable and - null MAKE_-INPUT_-FILENAME histFileName() => sayKeyedMsg("S2IH0022",NIL) - null fn => - throwKeyedMsg("S2IH0037", nil) - savefile := makeHistFileName(fn) - inputfile := histInputFileName(fn) - writeInputLines(fn,1) - histFileErase savefile - - if $useInternalHistoryTable - then - saveStr := RDEFIOSTREAM ['(MODE . OUTPUT),['FILE,:savefile]] - for [n,:rec] in reverse $internalHistoryTable repeat - val := SPADRWRITE0(object2Identifier n,rec,saveStr) - val = 'writifyFailed => - sayKeyedMsg("S2IH0035", [n, inputfile]) ; unable to save step - RSHUT saveStr - sayKeyedMsg("S2IH0018",[namestring(savefile)]) ; saved hist file named - nil -\end{verbatim} + (setq prop (car p)) + (setq val (cdr p)) + (when val + (progn + (when (null (eq x '%)) + (|recordOldValue| x prop val)) + (when |$HiFiAccess| + (|recordNewValue| x prop val)) + (rplacd p nil)))))))))) + (do ((|i| 1 (qsadd1 |i|))) + ((qsgreaterp |i| n) nil) + (seq + (exit + (progn + (setq vec + (unwind-protect (cdr (|readHiFi| |i|)) (|disableHist|))) + (do ((tmp3 vec (cdr tmp3)) (p1 nil)) + ((or (atom tmp3) (progn (setq p1 (car tmp3)) nil)) nil) + (seq + (exit + (progn + (setq x (car p1)) + (do ((tmp4 (cdr p1) (cdr tmp4)) (p2 nil)) + ((or (atom tmp4) (progn (setq p2 (car tmp4)) nil)) nil) + (seq + (exit + (setq |$InteractiveFrame| + (|putHist| x (car p2) (CDR p2) |$InteractiveFrame|) + )))))))))))) + (setq val + (and + (setq p (assq '% vec)) + (setq p1 (assq '|value| (cdr p))) + (cdr p1))) + (setq |$InteractiveFrame| (|putHist| '% '|value| val |$InteractiveFrame|)) + (|updateHist|))) + +@ +\defun{saveHistory}{saveHistory} <>= (defun |saveHistory| (fn) - (prog (|$seen| savefile inputfile saveStr n rec val) - (declare (special |$seen|)) - (return - (seq - (progn - (setq |$seen| (make-hashtable 'eq)) - (cond - ((null |$HiFiAccess|) - (|sayKeyedMsg| 'S2IH0016 nil)) ; the history file is not on - ((and (null |$useInternalHistoryTable|) - (null (make-input-filename (|histFileName|)))) - (|sayKeyedMsg| 'S2IH0022 nil)) ; no history saved yet - ((null fn) - (|throwKeyedMsg| 'S2IH0037 nil)) ; need to specify a history filename - (t - (setq savefile (|makeHistFileName| fn)) - (setq inputfile (|histInputFileName| fn)) - (|writeInputLines| fn 1) - (|histFileErase| savefile) - (when |$useInternalHistoryTable| - (setq saveStr - (rdefiostream - (cons '(mode . output) - (cons (cons 'file savefile) nil)))) - (do ((tmp0 (reverse |$internalHistoryTable|) (cdr tmp0)) - (tmp1 nil)) - ((or (atom tmp0) - (progn (setq tmp1 (car tmp0)) nil) - (progn - (progn - (setq n (car tmp1)) - (setq rec (cdr tmp1)) - tmp1) - nil)) - nil) - (seq - (exit - (progn - (setq val - (spadrwrite0 (|object2Identifier| n) rec saveStr)) - (when (eq val '|writifyFailed|) - (|sayKeyedMsg| 'S2IH0035 ; can't save the value of step - (cons n (cons inputfile nil)))))))) - (rshut saveStr)) - (|sayKeyedMsg| 'S2IH0018 ; saved history file is - (cons (|namestring| savefile) nil)) - nil))))))) - -@ -\defun{restoreHistory} -\begin{verbatim} -restoreHistory(fn) == - -- uses fn $historyFileType to recover an old session - -- if fn = NIL, then use $oldHistoryFileName - if null fn then fn' := $oldHistoryFileName - else if fn is [fn'] and IDENTP(fn') then fn' := fn' - else throwKeyedMsg("S2IH0023",[fn']) - restfile := makeHistFileName(fn') - null MAKE_-INPUT_-FILENAME restfile => - sayKeyedMsg("S2IH0024",[namestring(restfile)]) ; no history file - - -- if clear is changed to be undoable, this should be a reset-clear - $options: local := nil - clearSpad2Cmd '(all) - - curfile := histFileName() - histFileErase curfile - _$FCOPY(restfile,curfile) - - l:= LENGTH RKEYIDS curfile - $HiFiAccess:= 'T - oldInternal := $useInternalHistoryTable - $useInternalHistoryTable := NIL - if oldInternal then $internalHistoryTable := NIL - for i in 1..l repeat - vec:= UNWIND_-PROTECT(readHiFi(i),disableHist()) - if oldInternal then $internalHistoryTable := - CONS([i,:vec],$internalHistoryTable) - LINE:= CAR vec - for p1 in CDR vec repeat - x:= CAR p1 - for p2 in CDR p1 repeat - $InteractiveFrame:= putHist(x,CAR p2,CDR p2,$InteractiveFrame) - updateInCoreHist() - $e := $InteractiveFrame - for [a,:.] in CAAR $InteractiveFrame repeat - get(a,'localModemap,$InteractiveFrame) => - rempropI(a,'localModemap) - rempropI(a,'localVars) - rempropI(a,'mapBody) - $IOindex:= l+1 - $useInternalHistoryTable := oldInternal - sayKeyedMsg("S2IH0025",[namestring(restfile)]) - clearCmdSortedCaches() - nil -\end{verbatim} + (let (|$seen| savefile inputfile saveStr n rec val) + (declare (special |$seen| |$HiFiAccess| |$useInternalHistoryTable| + |$internalHistoryTable|)) + (setq |$seen| (make-hashtable 'eq)) + (cond + ((null |$HiFiAccess|) + (|sayKeyedMsg| 'S2IH0016 nil)) ; the history file is not on + ((and (null |$useInternalHistoryTable|) + (null (make-input-filename (|histFileName|)))) + (|sayKeyedMsg| 'S2IH0022 nil)) ; no history saved yet + ((null fn) + (|throwKeyedMsg| 'S2IH0037 nil)) ; need to specify a history filename + (t + (setq savefile (|makeHistFileName| fn)) + (setq inputfile (|histInputFileName| fn)) + (|writeInputLines| fn 1) + (|histFileErase| savefile) + (when |$useInternalHistoryTable| + (setq saveStr + (rdefiostream + (cons '(mode . output) + (cons (cons 'file savefile) nil)))) + (do ((tmp0 (reverse |$internalHistoryTable|) (cdr tmp0)) + (tmp1 nil)) + ((or (atom tmp0) + (progn (setq tmp1 (car tmp0)) nil) + (progn + (progn + (setq n (car tmp1)) + (setq rec (cdr tmp1)) + tmp1) + nil)) + nil) + (setq val (spadrwrite0 (|object2Identifier| n) rec saveStr)) + (when (eq val '|writifyFailed|) + (|sayKeyedMsg| 'S2IH0035 ; can't save the value of step + (cons n (cons inputfile nil))))) + (rshut saveStr)) + (|sayKeyedMsg| 'S2IH0018 ; saved history file is + (cons (|namestring| savefile) nil)) + nil)))) + +@ +\defun{restoreHistory}{restoreHistory} <>= (defun |restoreHistory| (fn) - (prog (|$options| fnq restfile curfile l oldInternal vec line x a) - (declare (special |$options|)) - (return - (seq - (progn - (cond - ((null fn) - (setq fnq |$oldHistoryFileName|)) - ((and (pairp fn) - (eq (qcdr fn) nil) + (let (|$options| fnq restfile curfile l oldInternal vec line x a) + (declare (special |$options| |$internalHistoryTable| |$HiFiAccess| |$e| + |$useInternalHistoryTable| |$InteractiveFrame| |$oldHistoryFileName|)) + (cond + ((null fn) (setq fnq |$oldHistoryFileName|)) + ((and (pairp fn) + (eq (qcdr fn) nil) + (progn + (setq fnq (qcar fn)) + t) + (identp fnq)) + (setq fnq fnq)) + (t (|throwKeyedMsg| 'S2IH0023 (cons fnq nil)))) ; invalid filename + (setq restfile (|makeHistFileName| fnq)) + (if (null (make-input-filename restfile)) + (|sayKeyedMsg| 'S2IH0024 ; file does not exist + (cons (|namestring| restfile) nil)) + (progn + (setq |$options| nil) + (|clearSpad2Cmd| '(|all|)) + (setq curfile (|histFileName|)) + (|histFileErase| curfile) + ($fcopy restfile curfile) + (setq l (length (rkeyids curfile))) + (setq |$HiFiAccess| t) + (setq oldInternal |$useInternalHistoryTable|) + (setq |$useInternalHistoryTable| nil) + (when oldInternal (setq |$internalHistoryTable| nil)) + (do ((|i| 1 (qsadd1 |i|))) + ((qsgreaterp |i| l) nil) + (setq vec (unwind-protect (|readHiFi| |i|) (|disableHist|))) + (when oldInternal + (setq |$internalHistoryTable| + (cons (cons |i| vec) |$internalHistoryTable|))) + (setq line (car vec)) + (dolist (p1 (cdr vec)) + (setq x (car p1)) + (do ((tmp1 (cdr p1) (cdr tmp1)) (p2 nil)) + ((or (atom tmp1) (progn (setq p2 (car tmp1)) nil)) nil) + (setq |$InteractiveFrame| + (|putHist| x + (car p2) (cdr p2) |$InteractiveFrame|)))) + (|updateInCoreHist|)) + (setq |$e| |$InteractiveFrame|) + (do ((tmp2 (caar |$InteractiveFrame|) (cdr tmp2)) (tmp3 nil)) + ((or (atom tmp2) + (progn + (setq tmp3 (car tmp2)) + nil) + (progn (progn - (setq fnq (qcar fn)) - t) - (identp fnq)) - (setq fnq fnq)) - (t (|throwKeyedMsg| 'S2IH0023 (cons fnq nil)))) ; invalid filename - (setq restfile (|makeHistFileName| fnq)) - (cond - ((null (make-input-filename restfile)) - (|sayKeyedMsg| 'S2IH0024 ; file does not exist - (cons (|namestring| restfile) nil))) - (t - (setq |$options| nil) - (|clearSpad2Cmd| '(|all|)) - (setq curfile (|histFileName|)) - (|histFileErase| curfile) - ($fcopy restfile curfile) - (setq l (length (rkeyids curfile))) - (setq |$HiFiAccess| t) - (setq oldInternal |$useInternalHistoryTable|) - (setq |$useInternalHistoryTable| nil) - (when oldInternal - (setq |$internalHistoryTable| nil)) - (do ((|i| 1 (qsadd1 |i|))) - ((qsgreaterp |i| l) nil) - (seq - (exit - (progn - (setq vec (unwind-protect (|readHiFi| |i|) (|disableHist|))) - (when oldInternal - (setq |$internalHistoryTable| - (cons (cons |i| vec) |$internalHistoryTable|))) - (setq line (car vec)) - (do ((tmp0 (cdr vec) (cdr tmp0)) (p1 nil)) - ((or (atom tmp0) (progn (setq p1 (car tmp0)) nil)) nil) - (seq - (exit - (progn - (setq x (car p1)) - (do ((tmp1 (cdr p1) (cdr tmp1)) (p2 nil)) - ((or (atom tmp1) (progn (setq p2 (car tmp1)) nil)) nil) - (seq - (exit - (setq |$InteractiveFrame| - (|putHist| x - (car p2) (cdr p2) |$InteractiveFrame|))))))))) - (|updateInCoreHist|))))) - (setq |$e| |$InteractiveFrame|) - (seq - (do ((tmp2 (caar |$InteractiveFrame|) (cdr tmp2)) (tmp3 nil)) - ((or (atom tmp2) - (progn - (setq tmp3 (car tmp2)) - nil) - (progn - (progn - (setq a (car tmp3)) - tmp3) - nil)) - nil) - (seq - (exit - (when (|get| a '|localModemap| |$InteractiveFrame|) - (exit - (progn - (|rempropI| a '|localModemap|) - (|rempropI| a '|localVars|) - (|rempropI| a '|mapBody|))))))) - (setq |$IOindex| (plus l 1)) - (setq |$useInternalHistoryTable| oldInternal) - (|sayKeyedMsg| 'S2IH0025 ; workspace restored - (cons (|namestring| restfile) nil)) - (|clearCmdSortedCaches|) - nil)))))))) - -@ -\defun{showHistory} -\begin{verbatim} --- the following used to be the show command when that was used to --- show history. -showHistory(arg) == - -- arg can be of form - -- NIL show at most last 20 input lines - -- (n) show at most last n input lines - -- (lit) where lit is an abbreviation for 'input or 'both - -- if 'input, same as NIL - -- if 'both, show last 5 input and outputs - -- (n lit) show last n input lines + last n output lines - -- if lit expands to 'both - $evalTimePrint: local:= 0 - $printTimeSum: local:= 0 - -- ugh!!! these are needed for timedEvaluateStream - -- displays the last n steps, default n=20 - not $HiFiAccess => sayKeyedMsg("S2IH0026",['show]) - showInputOrBoth := 'input - n := 20 - nset := nil - if arg then - arg1 := CAR arg - if INTEGERP arg1 then - n := arg1 - nset := true - KDR arg => arg1 := CADR arg - arg1 := NIL - arg1 => - arg2 := selectOptionLC(arg1,'(input both),nil) - if arg2 - then ((showInputOrBoth := arg2) = 'both) and (null nset) => n:= 5 - else sayMSG - concat('" ",bright arg1,'"is an invalid argument.") - if n >= $IOindex then n:= $IOindex-1 - mini:= $IOindex-n - maxi:= $IOindex-1 - showInputOrBoth = 'both => - UNWIND_-PROTECT(showInOut(mini,maxi),setIOindex(maxi+1)) - showInput(mini,maxi) -\end{verbatim} -<>= -(defun |showHistory| (arg) - (prog (|$evalTimePrint| |$printTimeSum| nset arg1 arg2 - showInputOrBoth n mini maxi) - (declare (special |$evalTimePrint| |$printTimeSum|)) - (return - (seq - (progn - (setq |$evalTimePrint| 0) - (setq |$printTimeSum| 0) - (cond - ((null |$HiFiAccess|) - (|sayKeyedMsg| 'S2IH0026 (cons '|show| nil))) ; history not on - (t - (setq showInputOrBoth '|input|) - (setq n 20) - (setq nset nil) - (when arg - (setq arg1 (car arg)) - (when (integerp arg1) - (setq n arg1) - (setq nset t) - (cond - ((kdr arg) (setq arg1 (cadr arg))) - (t (setq arg1 nil)))) - (when arg1 - (progn - (setq arg2 (|selectOptionLC| arg1 '(|input| |both|) nil)) - (seq - (cond - (arg2 - (when (and (eq (setq showInputOrBoth arg2) '|both|) - (null nset)) - (exit (setq n 5)))) - (t - (|sayMSG| - (|concat| - " " - (|bright| arg1) - "is an invalid argument.")))))))) - (when (>= n |$IOindex|) - (setq n (spaddifference |$IOindex| 1))) - (setq mini (spaddifference |$IOindex| n)) - (setq maxi (spaddifference |$IOindex| 1)) - (cond - ((eq showInputOrBoth '|both|) - (unwind-protect - (|showInOut| mini maxi) - (|setIOindex| (plus maxi 1)))) - (t (|showInput| mini maxi)))))))))) - + (setq a (car tmp3)) + tmp3) + nil)) + nil) + (when (|get| a '|localModemap| |$InteractiveFrame|) + (|rempropI| a '|localModemap|) + (|rempropI| a '|localVars|) + (|rempropI| a '|mapBody|))) + (setq |$IOindex| (plus l 1)) + (setq |$useInternalHistoryTable| oldInternal) + (|sayKeyedMsg| 'S2IH0025 ; workspace restored + (cons (|namestring| restfile) nil)) + (|clearCmdSortedCaches|) + nil)))) + @ -\defun{setIOindex} -\begin{verbatim} -setIOindex(n) == - -- set $IOindex to n - $IOindex:= n -\end{verbatim} + +\defun{setIOindex}{setIOindex} <>= (defun |setIOindex| (n) + (declare (special |$IOindex|)) (setq |$IOindex| n)) @ -\defun{showInput} -\begin{verbatim} -showInput(mini,maxi) == - -- displays all input lines from mini to maxi - for ind in mini..maxi repeat - vec:= UNWIND_-PROTECT(readHiFi(ind),disableHist()) - if ind<10 then TAB 2 else if ind<100 then TAB 1 - l := CAR vec - STRINGP l => - sayMSG ['" [",ind,'"] ",CAR vec] - sayMSG ['" [",ind,'"] " ] - for ln in l repeat - sayMSG ['" ", ln] -\end{verbatim} +\defun{showInput}{showInput} <>= (defun |showInput| (mini maxi) (prog (vec l) @@ -6050,18 +4962,7 @@ showInput(mini,maxi) == (cons " " (cons |ln| nil)))))))))))))))) @ -\defun{showInOut} -\begin{verbatim} -showInOut(mini,maxi) == - -- displays all steps from mini to maxi - for ind in mini..maxi repeat - vec:= UNWIND_-PROTECT(readHiFi(ind),disableHist()) - sayMSG [CAR vec] - Alist:= ASSQ('%,CDR vec) => - triple:= CDR ASSQ('value,CDR Alist) - $IOindex:= ind - spadPrint(objValUnwrap triple,objMode triple) -\end{verbatim} +\defun{showInOut}{showInOut} <>= (defun |showInOut| (mini maxi) (prog (vec Alist triple) @@ -6083,24 +4984,7 @@ showInOut(mini,maxi) == (|objValUnwrap| triple) (|objMode| triple))))))))))))) @ -\defun{fetchOutput} -\begin{verbatim} -fetchOutput(n) == - -- result is the output of step n - (n = -1) and (val := getI("%",'value)) => val - $HiFiAccess => - n:= - n < 0 => $IOindex+n - n - n >= $IOindex => throwKeyedMsg("S2IH0001",[n]) - n < 1 => throwKeyedMsg("S2IH0002",[n]) - vec:= UNWIND_-PROTECT(readHiFi(n),disableHist()) - Alist:= ASSQ('%,CDR vec) => - val:= CDR ASSQ('value,CDR Alist) => val - throwKeyedMsg("S2IH0003",[n]) - throwKeyedMsg("S2IH0003",[n]) - throwKeyedMsg("S2IH0004",NIL) -\end{verbatim} +\defun{fetchOutput}{fetchOutput} <>= (defun |fetchOutput| (n) (prog (vec Alist val) @@ -6132,71 +5016,42 @@ fetchOutput(n) == (t (|throwKeyedMsg| 'S2IH0004 nil)))))) ; history not on @ -\defun{readHiFi} -\begin{verbatim} -readHiFi(n) == - -- reads the file using index n - if $useInternalHistoryTable - then - pair := assoc(n,$internalHistoryTable) - ATOM pair => keyedSystemError("S2IH0034",NIL) - vec := QCDR pair - else - HiFi:= RDEFIOSTREAM ['(MODE . INPUT),['FILE,:histFileName()]] - vec:= SPADRREAD(object2Identifier n,HiFi) - RSHUT HiFi - vec -\end{verbatim} +\defun{readHiFi}{Read the history file using index n} <>= (defun |readHiFi| (n) - (prog (pair HiFi vec) - (return + (let (pair HiFi vec) + (declare (special |$useInternalHistoryTable| |$internalHistoryTable|)) + (if |$useInternalHistoryTable| (progn - (cond - (|$useInternalHistoryTable| - (setq pair (|assoc| n |$internalHistoryTable|)) - (cond - ((atom pair) - (|keyedSystemError| 'S2IH0034 nil)) ; missing element - (t - (setq vec (qcdr pair))))) - (t - (setq HiFi - (rdefiostream + (setq pair (|assoc| n |$internalHistoryTable|)) + (if (atom pair) + (|keyedSystemError| 's2ih0034 nil) ; missing element + (setq vec (qcdr pair)))) + (progn + (setq HiFi + (rdefiostream + (cons + '(mode . input) (cons - '(mode . input) - (cons - (cons 'file (|histFileName|)) nil)))) - (setq vec (spadrread (|object2Identifier| n) HiFi)) - (rshut HiFi))) - vec)))) + (cons 'file (|histFileName|)) nil)))) + (setq vec (spadrread (|object2Identifier| n) HiFi)) + (rshut HiFi))) + vec)) @ -\defun{writeHiFi} -\begin{verbatim} -writeHiFi() == - -- writes the information of the current step out to history file - if $useInternalHistoryTable - then - $internalHistoryTable := CONS([$IOindex,$currentLine,:$HistRecord], - $internalHistoryTable) - else - HiFi:= RDEFIOSTREAM ['(MODE . OUTPUT),['FILE,:histFileName()]] - SPADRWRITE(object2Identifier $IOindex, CONS($currentLine,$HistRecord),HiFi) - RSHUT HiFi -\end{verbatim} +\defun{writeHiFi}{Writes information of the current step to history file} <>= (defun |writeHiFi| () - (prog (HiFi) - (return - (cond - (|$useInternalHistoryTable| + (let (HiFi) + (declare (special |$useInternalHistoryTable| |$internalHistoryTable| + |$IOindex| |$HistRecord| |$currentLine|)) + (if |$useInternalHistoryTable| (setq |$internalHistoryTable| (cons (cons |$IOindex| (cons |$currentLine| |$HistRecord|)) - |$internalHistoryTable|))) - (t + |$internalHistoryTable|)) + (progn (setq HiFi (rdefiostream (cons @@ -6204,35 +5059,20 @@ writeHiFi() == (cons (cons 'file (|histFileName|)) nil)))) (spadrwrite (|object2Identifier| |$IOindex|) (cons |$currentLine| |$HistRecord|) HiFi) - (rshut HiFi)))))) + (rshut HiFi))))) @ -\defun{disableHist} -\begin{verbatim} -disableHist() == - -- disables the history mechanism if an error occurred in the protected - -- piece of code - not $HiFiAccess => histFileErase histFileName() - NIL -\end{verbatim} +\defun{disableHist}{Disable history if an error occurred} <>= (defun |disableHist| () + (declare (special |$HiFiAccess|)) (cond ((null |$HiFiAccess|) (|histFileErase| (|histFileName|))) (t nil))) @ -\defun{writeHistModesAndValues} -\begin{verbatim} -writeHistModesAndValues() == - for [a,:.] in CAAR $InteractiveFrame repeat - x := get(a,'value,$InteractiveFrame) => - putHist(a,'value,x,$InteractiveFrame) - x := get(a,'mode,$InteractiveFrame) => - putHist(a,'mode,x,$InteractiveFrame) - NIL -\end{verbatim} +\defun{writeHistModesAndValues}{writeHistModesAndValues} <>= (defun |writeHistModesAndValues| () (prog (a x) @@ -6261,18 +5101,11 @@ writeHistModesAndValues() == @ \section{Lisplib output transformations} ---% Lisplib output transformations --- Some types of objects cannot be saved by LISP/VM in lisplibs. --- These functions transform an object to a writable form and back. --- SMW -\defun{SPADRWRITE0} -\begin{verbatim} -SPADRWRITE0(vec, item, stream) == - val := safeWritify item - val = 'writifyFailed => val - rwrite(vec, val, stream) - item -\end{verbatim} +Lisplib output transformations + +Some types of objects cannot be saved by LISP/VM in lisplibs. +These functions transform an object to a writable form and back. +\defun{SPADRWRITE0}{SPADRWRITE0} <>= (defun spadrwrite0 (vec item stream) (prog (val) @@ -6284,14 +5117,7 @@ SPADRWRITE0(vec, item, stream) == (t (|rwrite| vec val stream) item)))))) @ -\defun{SPADRWRITE} -\begin{verbatim} -SPADRWRITE(vec, item, stream) == - val := SPADRWRITE0(vec, item, stream) - val = 'writifyFailed => - throwKeyedMsg("S2IH0036", nil) ; cannot save value to file - item -\end{verbatim} +\defun{SPADRWRITE}{SPADRWRITE} <>= (defun spadrwrite (vec item stream) (prog (val) @@ -6304,25 +5130,13 @@ SPADRWRITE(vec, item, stream) == (t item)))))) @ -\defun{SPADRREAD} -\begin{verbatim} -SPADRREAD(vec, stream) == - dewritify rread(vec, stream, nil) -\end{verbatim} +\defun{SPADRREAD}{SPADRREAD} <>= (defun spadrread (vec stream) (|dewritify| (|rread| vec stream nil))) @ -\defun{unwritable?} -\begin{verbatim} -unwritable? ob == - PAIRP ob or VECP ob => false -- first for speed - COMPILED_-FUNCTION_-P ob or HASHTABLEP ob => true - PLACEP ob or READTABLEP ob => true - FLOATP ob => true - false -\end{verbatim} +\defun{unwritable?}{unwritable?} <>= (defun |unwritable?| (ob) (cond @@ -6333,129 +5147,34 @@ unwritable? ob == (t nil))) @ -\defun{writifyComplain} -\begin{verbatim} --- Create a full isomorphic object which can be saved in a lisplib. --- Note that dewritify(writify(x)) preserves UEQUALity of hashtables. --- HASHTABLEs go both ways. --- READTABLEs cannot presently be transformed back. - -writifyComplain s == - $writifyComplained = true => nil - $writifyComplained := true - sayKeyedMsg("S2IH0027",[s]) -\end{verbatim} +\defun{writifyComplain}{writifyComplain} +Create a full isomorphic object which can be saved in a lisplib. +Note that {\tt dewritify(writify(x))} preserves UEQUALity of hashtables. +HASHTABLEs go both ways. +READTABLEs cannot presently be transformed back. <>= (defun |writifyComplain| (s) - (cond - ((eq |$writifyComplained| t) nil) - (t - (setq |$writifyComplained| t) - (|sayKeyedMsg| 'S2IH0027 (cons s nil))))) ; cannot save value + (declare (special |$writifyComplained|)) + (unless |$writifyComplained| + (setq |$writifyComplained| t) + (|sayKeyedMsg| 'S2IH0027 (cons s nil)))) ; cannot save value @ -\defun{safeWritify} -\begin{verbatim} -safeWritify ob == - CATCH('writifyTag, writify ob) -\end{verbatim} +\defun{safeWritify}{safeWritify} <>= (defun |safeWritify| (ob) (catch '|writifyTag| (|writify| ob))) @ -\defun{writify} -\begin{verbatim} -writify ob == - not ScanOrPairVec(function(unwritable?), ob) => ob - $seen: local := MAKE_-HASHTABLE 'EQ - $writifyComplained: local := false - - writifyInner ob where - writifyInner ob == - null ob => nil - (e := HGET($seen, ob)) => e - - PAIRP ob => - qcar := QCAR ob - qcdr := QCDR ob - (name := spadClosure? ob) => - d := writifyInner QCDR ob - nob := ['WRITIFIED_!_!, 'SPADCLOSURE, d, name] - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - nob - (ob is ['LAMBDA_-CLOSURE, ., ., x, :.]) and x => - THROW('writifyTag, 'writifyFailed) - nob := CONS(qcar, qcdr) - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - qcar := writifyInner qcar - qcdr := writifyInner qcdr - QRPLACA(nob, qcar) - QRPLACD(nob, qcdr) - nob - VECP ob => - isDomainOrPackage ob => - d := mkEvalable devaluate ob - nob := ['WRITIFIED_!_!, 'DEVALUATED, writifyInner d] - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - nob - n := QVMAXINDEX ob - nob := MAKE_-VEC(n+1) - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - for i in 0..n repeat - QSETVELT(nob, i, writifyInner QVELT(ob,i)) - nob - ob = 'WRITIFIED_!_! => - ['WRITIFIED_!_!, 'SELF] - -- In CCL constructors are also compiled functions, so we - -- need this line: - constructor? ob => ob - COMPILED_-FUNCTION_-P ob => - THROW('writifyTag, 'writifyFailed) - HASHTABLEP ob => - nob := ['WRITIFIED_!_!] - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - keys := HKEYS ob - QRPLACD(nob, - ['HASHTABLE, - HASHTABLE_-CLASS ob, - writifyInner keys, - [writifyInner HGET(ob,k) for k in keys]]) - nob - PLACEP ob => - nob := ['WRITIFIED_!_!, 'PLACE] - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - nob - -- The next three types cause an error on de-writifying. - -- Create an object of the right shape, nonetheless. - READTABLEP ob => - THROW('writifyTag, 'writifyFailed) - -- Default case: return the object itself. - STRINGP ob => - EQ(ob, $NullStream) => ['WRITIFIED_!_!, 'NULLSTREAM] - EQ(ob, $NonNullStream) => ['WRITIFIED_!_!, 'NONNULLSTREAM] - ob - FLOATP ob => - ob = READ_-FROM_-STRING STRINGIMAGE ob => ob - ['WRITIFIED_!_!, 'FLOAT, ob,: - MULTIPLE_-VALUE_-LIST INTEGER_-DECODE_-FLOAT ob] - ob -\end{verbatim} +\defun{writify}{writify} <>= (defun |writify,writifyInner| (ob) (prog (e name tmp1 tmp2 tmp3 x qcar qcdr d n keys nob) + (declare (special |$seen| |$NonNullStream| |$NullStream|)) (return (seq - (when (null ob) - (exit nil)) - (when (setq e (hget |$seen| ob)) - (exit e)) + (when (null ob) (exit nil)) + (when (setq e (hget |$seen| ob)) (exit e)) (when (pairp ob) (exit (seq @@ -6503,25 +5222,18 @@ writify ob == (exit (seq (when (|isDomainOrPackage| ob) - (exit - (seq - (setq d (|mkEvalable| (|devaluate| ob))) - (setq nob - (cons 'writified!! - (cons 'devaluated - (cons (|writify,writifyInner| d) nil)))) - (hput |$seen| ob nob) - (hput |$seen| nob nob) - (exit nob)))) + (setq d (|mkEvalable| (|devaluate| ob))) + (setq nob (list 'writified!! 'devaluated (|writify,writifyInner| d))) + (hput |$seen| ob nob) + (hput |$seen| nob nob) + (exit nob)) (setq n (qvmaxindex ob)) (setq nob (make-vec (plus n 1))) (hput |$seen| ob nob) (hput |$seen| nob nob) (do ((|i| 0 (qsadd1 |i|))) ((qsgreaterp |i| n) nil) - (seq - (exit - (qsetvelt nob |i| (|writify,writifyInner| (QVELT ob |i|)))))) + (qsetvelt nob |i| (|writify,writifyInner| (qvelt ob |i|)))) (exit nob)))) (when (eq ob 'writified!!) (exit @@ -6532,8 +5244,6 @@ writify ob == (exit (throw '|writifyTag| '|writifyFailed|))) (when (hashtablep ob) - (exit - (seq (setq nob (cons 'writified!! nil)) (hput |$seen| ob nob) (hput |$seen| nob nob) @@ -6555,21 +5265,15 @@ writify ob == (setq k (car tmp1)) nil)) (nreverse0 tmp0)) - (seq - (exit - (setq tmp0 - (cons - (|writify,writifyInner| (HGET ob k)) - tmp0))))))) + (setq tmp0 + (cons (|writify,writifyInner| (hget ob k)) tmp0))))) nil))))) - (exit nob)))) + (exit nob)) (when (placep ob) - (exit - (seq (setq nob (cons 'writified!! (cons 'place nil))) (hput |$seen| ob nob) (hput |$seen| nob nob) - (exit nob)))) + (exit nob)) (when (readtablep ob) (exit (throw '|writifyTag| '|writifyFailed|))) @@ -6610,123 +5314,32 @@ writify ob == (|writify,writifyInner| ob)))))) @ -\defun{spadClosure?} -\begin{verbatim} -spadClosure? ob == - fun := QCAR ob - not (name := BPINAME fun) => nil - vec := QCDR ob - not VECP vec => nil - name -\end{verbatim} +\defun{spadClosure?}{spadClosure?} <>= (defun |spadClosure?| (ob) - (prog (fun name vec) - (return - (progn - (setq fun (qcar ob)) - (cond - ((null (setq name (bpiname fun))) nil) - (t - (setq vec (qcdr ob)) - (cond - ((null (vecp vec)) nil) - (t name)))))))) + (let (fun name vec) + (setq fun (qcar ob)) + (cond + ((null (setq name (bpiname fun))) nil) + (t + (setq vec (qcdr ob)) + (cond + ((null (vecp vec)) nil) + (t name)))))) @ -\defun{dewritify} -\begin{verbatim} -dewritify ob == - (not ScanOrPairVec(function is?, ob) - where is? a == a = 'WRITIFIED_!_!) => ob - - $seen: local := MAKE_-HASHTABLE 'EQ - - dewritifyInner ob where - dewritifyInner ob == - null ob => nil - e := HGET($seen, ob) => e - - PAIRP ob and CAR ob = 'WRITIFIED_!_! => - type := ob.1 - type = 'SELF => - 'WRITIFIED_!_! - type = 'BPI => - oname := ob.2 - f := - INTP oname => EVAL GENSYMMER oname - SYMBOL_-FUNCTION oname - not COMPILED_-FUNCTION_-P f => - error '"A required BPI does not exist." - #ob > 3 and HASHEQ f ^= ob.3 => - error '"A required BPI has been redefined." - HPUT($seen, ob, f) - f - type = 'HASHTABLE => - nob := MAKE_-HASHTABLE ob.2 - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - for k in ob.3 for e in ob.4 repeat - HPUT(nob, dewritifyInner k, dewritifyInner e) - nob - type = 'DEVALUATED => - nob := EVAL dewritifyInner ob.2 - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - nob - type = 'SPADCLOSURE => - vec := dewritifyInner ob.2 - name := ob.3 - not FBOUNDP name => - error STRCONC('"undefined function: ", SYMBOL_-NAME name) - nob := CONS(SYMBOL_-FUNCTION name, vec) - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - nob - type = 'PLACE => - nob := READ MAKE_-INSTREAM NIL - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - nob - type = 'READTABLE => - error '"Cannot de-writify a read table." - type = 'NULLSTREAM => $NullStream - type = 'NONNULLSTREAM => $NonNullStream - type = 'FLOAT => - [fval, signif, expon, sign] := CDDR ob - fval := SCALE_-FLOAT( FLOAT(signif, fval), expon) - sign<0 => -fval - fval - error '"Unknown type to de-writify." - - PAIRP ob => - qcar := QCAR ob - qcdr := QCDR ob - nob := CONS(qcar, qcdr) - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - QRPLACA(nob, dewritifyInner qcar) - QRPLACD(nob, dewritifyInner qcdr) - nob - VECP ob => - n := QVMAXINDEX ob - nob := MAKE_-VEC(n+1) - HPUT($seen, ob, nob) - HPUT($seen, nob, nob) - for i in 0..n repeat - QSETVELT(nob, i, dewritifyInner QVELT(ob,i)) - nob - -- Default case: return the object itself. - ob -\end{verbatim} +\defun{dewritify,is?}{dewritify,is?} <>= (defun |dewritify,is?| (a) (eq a 'writified!!)) @ + +\defun{dewritify,dewritifyInner}{dewritify,dewritifyInner} <>= (defun |dewritify,dewritifyInner| (ob) (prog (e type oname f vec name tmp1 signif expon sign fval qcar qcdr n nob) + (declare (special |$seen| |$NullStream| |$NonNullStream|)) (return (seq (when (null ob) @@ -6853,6 +5466,8 @@ dewritify ob == (exit ob))))) @ + +\defun{dewritify}{dewritify} <>= (defun |dewritify| (ob) (prog (|$seen|) @@ -6866,130 +5481,70 @@ dewritify ob == (|dewritify,dewritifyInner| ob)))))) @ -\defun{ScanOrPairVec} -\begin{verbatim} -ScanOrPairVec(f, ob) == - $seen: local := MAKE_-HASHTABLE 'EQ - - CATCH('ScanOrPairVecAnswer, ScanOrInner(f, ob)) where - ScanOrInner(f, ob) == - HGET($seen, ob) => nil - PAIRP ob => - HPUT($seen, ob, true) - ScanOrInner(f, QCAR ob) - ScanOrInner(f, QCDR ob) - nil - VECP ob => - HPUT($seen, ob, true) - for i in 0..#ob-1 repeat ScanOrInner(f, ob.i) - nil - FUNCALL(f, ob) => - THROW('ScanOrPairVecAnswer, true) - nil -\end{verbatim} -<>= + +\defun{ScanOrPairVec,ScanOrInner}{ScanOrPairVec,ScanOrInner} +<>= (defun |ScanOrPairVec,ScanOrInner| (f ob) - (seq - (when (hget |$seen| ob) - (exit nil)) + (declare (special |$seen|)) + (when (hget |$seen| ob) nil) (when (pairp ob) - (exit - (seq - (hput |$seen| ob t) - (|ScanOrPairVec,ScanOrInner| f (qcar ob)) - (|ScanOrPairVec,ScanOrInner| f (qcdr ob)) - (exit nil)))) + (hput |$seen| ob t) + (|ScanOrPairVec,ScanOrInner| f (qcar ob)) + (|ScanOrPairVec,ScanOrInner| f (qcdr ob))) (when (vecp ob) - (exit - (seq (hput |$seen| ob t) (do ((tmp0 (spaddifference (|#| ob) 1)) (|i| 0 (qsadd1 |i|))) ((qsgreaterp |i| tmp0) nil) - (seq - (exit (|ScanOrPairVec,ScanOrInner| f (elt ob |i|))))) - (exit nil)))) - (when (funcall f ob) - (exit - (throw '|ScanOrPairVecAnswer| t))) - (exit nil))) + (|ScanOrPairVec,ScanOrInner| f (elt ob |i|)))) + (when (funcall f ob) (throw '|ScanOrPairVecAnswer| t)) + nil) +@ + +\defun{ScanOrPairVec}{ScanOrPairVec} +<>= (defun |ScanOrPairVec| (f ob) - (prog (|$seen|) + (let (|$seen|) (declare (special |$seen|)) - (return - (progn - (setq |$seen| (make-hashtable 'eq)) - (catch '|ScanOrPairVecAnswer| (|ScanOrPairVec,ScanOrInner| f ob)))))) + (setq |$seen| (make-hashtable 'eq)) + (catch '|ScanOrPairVecAnswer| (|ScanOrPairVec,ScanOrInner| f ob)))) @ -\defun{gensymInt} -\begin{verbatim} -gensymInt g == - not GENSYMP g => error '"Need a GENSYM" - p := PNAME g - n := 0 - for i in 2..#p-1 repeat n := 10 * n + charDigitVal p.i - n -\end{verbatim} +\defun{gensymInt}{gensymInt} <>= (defun |gensymInt| (g) - (prog (p n) - (return - (seq - (cond - ((null (gensymp g)) - (|error| "Need a GENSYM")) - (t - (setq p (pname g)) - (setq n 0) - (do ((tmp0 (spaddifference (|#| p) 1)) (|i| 2 (qsadd1 |i|))) - ((qsgreaterp |i| tmp0) nil) - (seq - (exit - (setq n (plus (times 10 n) (|charDigitVal| (elt p |i|))))))) - n)))))) + (let (p n) + (cond + ((null (gensymp g)) (|error| "Need a GENSYM")) + (t + (setq p (pname g)) + (setq n 0) + (do ((tmp0 (spaddifference (|#| p) 1)) (|i| 2 (qsadd1 |i|))) + ((qsgreaterp |i| tmp0) nil) + (setq n (plus (times 10 n) (|charDigitVal| (elt p |i|))))) + n)))) @ -\defun{charDigitVal} -\begin{verbatim} -charDigitVal c == - digits := '"0123456789" - n := -1 - for i in 0..#digits-1 while n < 0 repeat - if c = digits.i then n := i - n < 0 => error '"Character is not a digit" - n -\end{verbatim} +\defun{charDigitVal}{charDigitVal} <>= (defun |charDigitVal| (c) - (prog (digits n) - (return - (seq - (progn - (setq digits "0123456789") - (setq n (spaddifference 1)) - (do ((tmp0 (spaddifference (|#| digits) 1)) (|i| 0 (qsadd1 |i|))) - ((or (qsgreaterp |i| tmp0) (null (minusp n))) nil) - (seq - (exit - (cond - ((boot-equal c (elt digits |i|)) (setq n |i|)) - (t nil))))) - (cond - ((minusp n) (|error| "Character is not a digit")) - (t n))))))) + (let (digits n) + (setq digits "0123456789") + (setq n (spaddifference 1)) + (do ((tmp0 (spaddifference (|#| digits) 1)) (|i| 0 (qsadd1 |i|))) + ((or (qsgreaterp |i| tmp0) (null (minusp n))) nil) + (if (char= c (elt digits |i|)) + (setq n |i|) + nil)) + (cond + ((minusp n) (|error| "Character is not a digit")) + (t n)))) @ -\defun{histFileErase} -\begin{verbatim} -histFileErase file == - --OBEY STRCONC('"rm -rf ", file) - PROBE_-FILE(file) and DELETE_-FILE(file) -\end{verbatim} +\defun{histFileErase}{histFileErase} <>= (defun |histFileErase| (file) - (when (probe-file file) - (delete-file file))) + (when (probe-file file) (delete-file file))) @ \section{History File Messages} @@ -7095,7 +5650,9 @@ The \verb|)include| command can be used in \verb|.input| files to place the contents of another file inline with the current file. The path can be an absolute or relative pathname. -\defun{ncloopInclude1} +\section{Variables Used} +\section{Functions} +\defun{ncloopInclude1}{ncloopInclude1} <>= (defun |ncloopInclude1| (name n) (let (a) @@ -7104,7 +5661,7 @@ The path can be an absolute or relative pathname. n))) @ -\defun{ncloopIncFileName} +\defun{ncloopIncFileName}{ncloopIncFileName} Returns the first non-blank substring of the given string. <>= (defun |ncloopIncFileName| (string) @@ -7115,7 +5672,7 @@ Returns the first non-blank substring of the given string. @ -\defun{ncloopInclude} +\defun{ncloopInclude}{ncloopInclude} Open the file and read it in. The ncloopInclude0 function is part of the parser and lives in int-top.boot. <>= @@ -7124,7 +5681,7 @@ of the parser and lives in int-top.boot. @ -\defun{incFileName} +\defun{incFileName}{incFileName} Given a string we return the first token from the string which is the first non-blank substring. <>= @@ -7133,7 +5690,7 @@ the first non-blank substring. @ -\defun{incBiteOff} +\defun{incBiteOff}{incBiteOff} Takes a sequence and returns the a list of the first token and the remaining string characters. If there are no remaining string characters the second string is of length 0. Effectively it "bites off" the first @@ -7216,6 +5773,8 @@ command was called {\tt )local} and {\tt )with} before the name \fnref{frame}, and \fnref{set} +\section{Variables Used} +\section{Functions} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{lisp} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -7246,6 +5805,8 @@ command may be used to drop out of Axiom into Common Lisp. \fnref{boot}, and \fnref{fin} +\section{Variables Used} +\section{Functions} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{load} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -7255,6 +5816,8 @@ command may be used to drop out of Axiom into Common Lisp. This command is obsolete. Use {\tt )library} instead. +\section{Variables Used} +\section{Functions} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{ltrace} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -7278,6 +5841,8 @@ It is not supported for general use. \fnref{lisp}, and \fnref{trace} +\section{Variables Used} +\section{Functions} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{pquit} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -7334,13 +5899,15 @@ will be displayed and, indeed, Axiom would still be running. \fnref{quit}, and \fnref{system} -\defun{pquit} +\section{Variables Used} +\section{Functions} +\defun{pquit}{pquit} <>= (defun |pquit| () (|pquitSpad2Cmd|)) @ -\defun{pquitSpad2Cmd} +\defun{pquitSpad2Cmd}{pquitSpad2Cmd} <>= (defun |pquitSpad2Cmd| () (let ((|$quitCommandType| '|protected|)) @@ -7400,14 +5967,17 @@ executed when you press, say, a function key. \fnref{pquit}, and \fnref{system} -\defun{quit} +\section{Variables Used} +\section{Functions} +\defun{quit}{quit} <>= (defun |quit| () (|quitSpad2Cmd|)) @ -\defun{quitSpad2Cmd} +\defun{quitSpad2Cmd}{quitSpad2Cmd} <>= (defun |quitSpad2Cmd| () + (declare (special |$quitCommandType|)) (if (eq |$quitCommandType| '|protected|) (let (x) (setq x (upcase (|queryUserKeyedMsg| 's2iz0031 nil))) @@ -7419,7 +5989,7 @@ executed when you press, say, a function key. @ -\defun{leaveScratchpad} +\defun{leaveScratchpad}{leaveScratchpad} <>= (defun |leaveScratchpad| () (bye)) @@ -7464,6 +6034,8 @@ The {\tt )quiet} option suppresses output while the file is being read. \fnref{edit}, and \fnref{history} +\section{Variables Used} +\section{Functions} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{savesystem} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -7497,6 +6069,8 @@ were already loaded when the system was saved. There is currently a restriction that only systems started with the command "AXIOMsys" may be saved. +\section{Variables Used} +\section{Functions} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{set} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -7594,8 +6168,9 @@ For example, issue )set system to see what the options are for system. For more information, issue )help set . \end{verbatim} -\section{)set list functions} -\defun{initializeSetVariables} +\section{Variables Used} +\section{Functions} +\defun{initializeSetVariables}{initializeSetVariables} The argument settree is initially the \verb|$setOption| variable. The fourth element is a union-style switch symbol. The fifth element is usually a variable to set. @@ -7608,8 +6183,9 @@ explanations see the list structure section \ref{Theliststructure}. (case (fourth setdata) (FUNCTION (if (functionp (fifth setdata)) - (funcall (fifth setdata) '|%initialize%|)) - (|sayMSG| " Function not implemented.")) + (funcall (fifth setdata) '|%initialize%|) + (|sayMSG| (concatenate 'string " Function not implemented. " + (package-name *package*) ":" (string (fifth setdata)))))) (INTEGER (set (fifth setdata) (seventh setdata))) (STRING (set (fifth setdata) (seventh setdata))) (LITERALS @@ -7618,9 +6194,16 @@ explanations see the list structure section \ref{Theliststructure}. @ -\defun{resetWorkspaceVariables} +\defun{resetWorkspaceVariables}{resetWorkspaceVariables} <>= (defun |resetWorkspaceVariables| () + (declare (special /countlist /editfile /sourcefiles |$sourceFiles| /pretty + /spacelist /timerlist |$existingFiles| |$functionTable| $boot + |$compileMapFlag| |$echoLineStack| |$operationNameList| |$slamFlag| + |$CommandSynonymAlist| |$InitialCommandSynonymAlist| + |$UserAbbreviationsAlist| |$msgAlist| |$msgDatabase| |$msgDatabaseName| + |$dependeeClosureAlist| |$IOindex| |$coerceIntByMapCounter| |$e| |$env| + |$setOptions|)) (setq /countlist nil) (setq /editfile nil) (setq /sourcefiles nil) @@ -7649,7 +6232,7 @@ explanations see the list structure section \ref{Theliststructure}. @ -\defun{displaySetOptionInformation} +\defun{displaySetOptionInformation}{displaySetOptionInformation} <>= (defun |displaySetOptionInformation| (arg setdata) (let (current) @@ -7695,7 +6278,7 @@ explanations see the list structure section \ref{Theliststructure}. @ -\defun{displaySetVariableSettings} +\defun{displaySetVariableSettings}{displaySetVariableSettings} <>= (defun |displaySetVariableSettings| (settree label) (let (setoption opt subtree subname) @@ -7759,7 +6342,7 @@ explanations see the list structure section \ref{Theliststructure}. @ -\defun{translateYesNo2TrueFalse} +\defun{translateYesNo2TrueFalse}{translateYesNo2TrueFalse} <>= (defun |translateYesNo2TrueFalse| (x) (cond @@ -7769,7 +6352,7 @@ explanations see the list structure section \ref{Theliststructure}. @ -\defun{translateTrueFalse2YesNo} +\defun{translateTrueFalse2YesNo}{translateTrueFalse2YesNo} <>= (defun |translateTrueFalse2YesNo| (x) (cond @@ -7858,6 +6441,7 @@ These commands are restricted to keep the user from causing damage. (|nobreak| |break| |query| |resume| |fastlinks|) |nobreak|) ; needed to avoid possible startup looping @ +\section{Variables Used} \section{compiler} \begin{verbatim} Current Values of compiler Variables @@ -7883,7 +6467,7 @@ args arguments for compiling AXIOM code <> )) @ -\subsection{output} +\section{compiler output} \begin{verbatim} ---------------------- The output Option ---------------------- @@ -7900,10 +6484,13 @@ args arguments for compiling AXIOM code |htSetOutputLibrary| ) @ -\defun{setOutputLibrary} +\section{Variables Used} +\section{Functions} +\defun{setOutputLibrary}{setOutputLibrary} <>= (defun |setOutputLibrary| (arg) (let (fn) + (declare (special |$outputLibraryName|)) (cond ((eq arg '|%initialize%|) (setq |$outputLibraryName| nil)) ((eq arg '|%display%|) (or |$outputLibraryName| "user.lib")) @@ -7916,7 +6503,7 @@ args arguments for compiling AXIOM code @ -\defun{describeOutputLibraryArgs} +\defun{describeOutputLibraryArgs}{describeOutputLibraryArgs} <>= (defun |describeOutputLibraryArgs| () (|sayBrightly| (list @@ -7929,7 +6516,7 @@ args arguments for compiling AXIOM code @ -\defun{openOutputLibrary} +\defun{openOutputLibrary}{openOutputLibrary} The input-libraries and output-library are now truename based. <>= (defun |openOutputLibrary| (lib) @@ -7940,7 +6527,7 @@ The input-libraries and output-library are now truename based. @ -\subsection{input} +\section{compiler input} \begin{verbatim} ---------------------- The input Option ----------------------- @@ -7962,7 +6549,9 @@ The input-libraries and output-library are now truename based. |htSetInputLibrary|) @ -\defun{setInputLibrary} +\section{Variables Used} +\section{Functions} +\defun{setInputLibrary}{setInputLibrary} The input-libraries is now maintained as a list of truenames. <>= (defun |setInputLibrary| (arg) @@ -7990,7 +6579,7 @@ The input-libraries is now maintained as a list of truenames. @ -\defun{describeInputLibraryArgs} +\defun{describeInputLibraryArgs}{describeInputLibraryArgs} <>= (defun |describeInputLibraryArgs| () (|sayBrightly| (list @@ -8008,7 +6597,7 @@ The input-libraries is now maintained as a list of truenames. @ -\defun{addInputLibrary} +\defun{addInputLibrary}{addInputLibrary} The input-libraries variable is now maintained as a list of truenames. <>= (defun |addInputLibrary| (lib) @@ -8018,7 +6607,7 @@ The input-libraries variable is now maintained as a list of truenames. @ -\defun{dropInputLibrary} +\defun{dropInputLibrary}{dropInputLibrary} <>= (defun |dropInputLibrary| (lib) (declare (special input-libraries)) @@ -8026,7 +6615,7 @@ The input-libraries variable is now maintained as a list of truenames. @ -\subsection{args} +\section{compiler args} \begin{verbatim} ----------------------- The args Option ----------------------- @@ -8055,9 +6644,12 @@ The input-libraries variable is now maintained as a list of truenames. NIL) @ -\defun{setAsharpArgs} +\section{Variables Used} +\section{Functions} +\defun{setAsharpArgs}{setAsharpArgs} <>= (defun |setAsharpArgs| (arg) + (declare (special |$asharpCmdlineFlags|)) (cond ((eq arg '|%initialize%|) (setq |$asharpCmdlineFlags| @@ -8069,9 +6661,10 @@ The input-libraries variable is now maintained as a list of truenames. @ -\defun{describeAsharpArgs} +\defun{describeAsharpArgs}{describeAsharpArgs} <>= (defun |describeAsharpArgs| () + (declare (special |$asharpCmdlineFlags|)) (|sayBrightly| (list '|%b| ")set compiler args " '|%d| "is used to tell AXIOM how to invoke the library compiler " @@ -8125,7 +6718,9 @@ The input-libraries variable is now maintained as a list of truenames. |htSetExpose|) @ -\defun{setExpose} +\section{Variables Used} +\section{Functions} +\defun{setExpose}{setExpose} <>= (defun |setExpose| (arg) (let (fnargs fn) @@ -8153,7 +6748,7 @@ The input-libraries variable is now maintained as a list of truenames. @ -\defun{setExposeAdd} +\defun{setExposeAdd}{setExposeAdd} <>= (defun |setExposeAdd| (arg) (declare (special $linelength)) @@ -8178,7 +6773,7 @@ The input-libraries variable is now maintained as a list of truenames. @ -\defun{setExposeAddGroup} +\defun{setExposeAddGroup}{setExposeAddGroup} Note that \verb|$localExposureData| is a vector of lists. It consists of [exposed groups,exposed constructors,hidden constructors] <>= @@ -8223,7 +6818,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] @ -\defun{setExposeAddConstr} +\defun{setExposeAddConstr}{setExposeAddConstr} <>= (defun |setExposeAddConstr| (arg) (declare (special $linelength |$localExposureData| |$interpreterFrameName|)) @@ -8251,7 +6846,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] @ -\defun{setExposeDrop} +\defun{setExposeDrop}{setExposeDrop} <>= (defun |setExposeDrop| (arg) (declare (special $linelength)) @@ -8274,7 +6869,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] @ -\defun{setExposeDropGroup} +\defun{setExposeDropGroup}{setExposeDropGroup} <>= (defun |setExposeDropGroup| (arg) (declare (special $linelength |$localExposureData| |$interpreterFrameName| @@ -8305,11 +6900,11 @@ It consists of [exposed groups,exposed constructors,hidden constructors] (|clearClams|) (|sayKeyedMsg| 's2iz0049s (list x |$interpreterFrameName| ))) ((getalist |$globalExposureGroupAlist| x) - (|sayKeyedMsg| 's2iz0049i) (list x |$interpreterFrameName| )) + (|sayKeyedMsg| 's2iz0049i (list x |$interpreterFrameName| ))) (t (|sayKeyedMsg| 's2iz0049h (list x ))))))) @ -\defun{setExposeDropConstr} +\defun{setExposeDropConstr}{setExposeDropConstr} <>= (defun |setExposeDropConstr| (arg) (declare (special $linelength |$localExposureData| |$interpreterFrameName|)) @@ -8341,7 +6936,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] @ -\defun{displayExposedGroups} +\defun{displayExposedGroups}{displayExposedGroups} <>= (defun |displayExposedGroups| () (declare (special |$interpreterFrameName| |$localExposureData|)) @@ -8353,7 +6948,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] @ -\defun{displayExposedConstructors} +\defun{displayExposedConstructors}{displayExposedConstructors} <>= (defun |displayExposedConstructors| () (declare (special |$localExposureData|)) @@ -8365,7 +6960,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] @ -\defun{displayHiddenConstructors} +\defun{displayHiddenConstructors}{displayHiddenConstructors} <>= (defun |displayHiddenConstructors| () (declare (special |$localExposureData|)) @@ -8399,7 +6994,7 @@ recurrence specially compile recurrence relations on <> )) @ -\subsection{cache} +\section{functions cache} \begin{verbatim} ---------------------- The cache Option ----------------------- @@ -8430,8 +7025,142 @@ recurrence specially compile recurrence relations on NIL |htSetCache|) @ -\subsection{compile} -Per suggestion by Bill Page this has been defaulted to [[on]]. +\section{Variables Used} +\section{Functions} +\defun{setFunctionsCache}{setFunctionsCache} +\begin{verbatim} +<>= +(defun |setFunctionsCache| (arg) + (let (|$options| n) + (declare (special |$options| |$cacheCount| |$cacheAlist|)) + (cond + ((eq arg '|%initialize%|) + (setq |$cacheCount| 0) + (setq |$cacheAlist| nil)) + ((eq arg '|%display%|) + (if (null |$cacheAlist|) + (|object2String| |$cacheCount|) + "...")) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeSetFunctionsCache|) + (terpri) + (|sayAllCacheCounts|)) + (t + (setq n (car arg)) + (cond + ((and (nequal n '|all|) (or (null (fixp n)) (minusp n))) + (|sayMessage| + `("Your value of" ,@(|bright| n) "is invalid because ...")) + (|describeSetFunctionsCache|) + (|terminateSystemCommand|)) + (t + (when (cdr arg) (list (cons '|vars| (cdr arg)))) + (|countCache| n))))))) + +@ + +\defun{countCache}{countCache} +<>= +(defun |countCache| (n) + (let (tmp1 l cachecountname) + (declare (special |$options| |$cacheAlist| |$cacheCount|)) + (cond + (|$options| + (cond + ((and (pairp |$options|) + (eq (qcdr |$options|) nil) + (progn + (spadlet tmp1 (qcar |$options|)) + (and (pairp tmp1) + (eq (qcar tmp1) '|vars|) + (progn (setq l (qcdr tmp1)) t)))) + (dolist (x l) + (if (null (identp x)) + (|sayKeyedMsg| 's2if0007 (list x)) + (progn + (setq |$cacheAlist| (|insertAlist| x n |$cacheAlist|)) + (setq cachecountname (internl x ";COUNT")) + (set cachecountname n) + (|sayCacheCount| x n))))) + (t (|optionError| (caar |$options|) nil)))) + (t + (|sayCacheCount| nil (setq |$cacheCount| n)))))) + +@ + +\defun{describeSetFunctionsCache}{describeSetFunctionsCache} +<>= +(defun |describeSetFunctionsCache| () + (|sayBrightly| (list + '|%b| ")set functions cache" + '|%d| "is used to tell AXIOM how many" + '|%l| " values computed by interpreter functions should be saved. This" + '|%l| " can save quite a bit of time in recursive functions, though one" + '|%l| " must consider that the cached values will take up (perhaps" + '|%l| " valuable) room in the workspace." + '|%l| + '|%l| " The value given after" + '|%b| "cache" + '|%d| "must either be the word" + '|%b| "all" + '|%d| "or a positive integer." + '|%l| " This may be followed by any number of function names whose cache" + '|%l| " sizes you wish to so set. If no functions are given, the default" + '|%l| " cache size is set." + '|%l| + '|%l| " Examples:" + '|%l| " )set fun cache all )set fun cache 10 f g Legendre"))) + +@ + +\defun{sayAllCacheCounts}{sayAllCacheCounts} +<>= +(defun |sayAllCacheCounts| () + (let (x n) + (declare (special |$cacheCount| |$cacheAlist|)) + (|sayCacheCount| NIL |$cacheCount|) + (when |$cacheAlist| + (do ((t0 |$cacheAlist| (cdr t0)) (t1 NIL)) + ((or (atom t0) + (progn (setq t1 (car t0)) NIL) + (progn + (progn (setq x (car t1)) (setq n (cdr t1)) t1) + nil)) + nil) + (when (nequal n |$cacheCount|) (|sayCacheCount| x n)))))) + +@ + +\defun{sayCacheCount}{sayCacheCount} +<>= +(defun |sayCacheCount| (fn n) + (let (prefix phrase) + (setq prefix + (cond + (fn (cons '|function| (|bright| (|linearFormatName| fn)))) + ((eql n 0) (list '|interpreter functions |)) + (t (list '|In general, interpreter functions |)))) + (cond + ((eql n 0) + (cond + (fn + (|sayBrightly| + `(" Caching for " ,prefix "is turned off"))) + (t + (|sayBrightly| " In general, functions will cache no returned values." + )))) + (t + (setq phrase + (cond + ((eq n '|all|) `(,@(|bright| '|all|) |values.|)) + ((eql n 1) (list '| only the last value.|)) + (t `(| the last| ,@(|bright| n) |values.|)))) + (|sayBrightly| + `(" " ,@prefix "will cache" ,@phrase)))))) + +@ + +\section{functions compile} \begin{verbatim} --------------------- The compile Option ---------------------- @@ -8454,7 +7183,7 @@ Per suggestion by Bill Page this has been defaulted to [[on]]. (|on| |off|) |on|) @ -\subsection{recurrence} +\section{functions recurrence} \begin{verbatim} -------------------- The recurrence Option -------------------- @@ -8818,10 +7547,11 @@ linker linker arguments (e.g. libraries to search) -lxlf NIL) @ -\defun{setFortTmpDir} +\defun{setFortTmpDir}{setFortTmpDir} <>= (defun |setFortTmpDir| (arg) (let (mode) + (declare (special |$fortranTmpDir|)) (cond ((eq arg '|%initialize%|) (setq |$fortranTmpDir| "/tmp/")) ((eq arg '|%display%|) @@ -8839,7 +7569,7 @@ linker linker arguments (e.g. libraries to search) -lxlf @ -\defun{validateOutputDirectory} +\defun{validateOutputDirectory}{validateOutputDirectory} <>= (defun |validateOutputDirectory| (x) (let ((dirname (car x))) @@ -8848,9 +7578,10 @@ linker linker arguments (e.g. libraries to search) -lxlf @ -\defun{describeSetFortTmpDir} +\defun{describeSetFortTmpDir}{describeSetFortTmpDir} <>= (defun |describeSetFortTmpDir| () + (declare (special |$fortranTmpDir|)) (|sayBrightly| (list '|%b| ")set fortran calling tempfile" '|%d| " is used to tell AXIOM where" @@ -8898,7 +7629,7 @@ linker linker arguments (e.g. libraries to search) -lxlf NIL) @ -\defun{setFortDir} +\defun{setFortDir}{setFortDir} <>= (defun |setFortDir| (arg) (declare (special |$fortranDirectory|)) @@ -8919,7 +7650,7 @@ linker linker arguments (e.g. libraries to search) -lxlf (t (setq |$fortranDirectory| mode))))) @ -\defun{describeSetFortDir} +\defun{describeSetFortDir}{describeSetFortDir} <>= (defun |describeSetFortDir| () (declare (special |$fortranDirectory|)) @@ -8970,7 +7701,7 @@ linker linker arguments (e.g. libraries to search) -lxlf ) @ -\defun{setLinkerArgs} +\defun{setLinkerArgs}{setLinkerArgs} <>= (defun |setLinkerArgs| (arg) (declare (special |$fortranLibraries|)) @@ -8985,7 +7716,7 @@ linker linker arguments (e.g. libraries to search) -lxlf @ -\defun{describeSetLinkerArgs} +\defun{describeSetLinkerArgs}{describeSetLinkerArgs} <>= (defun |describeSetLinkerArgs| () (declare (special |$fortranLibraries|)) @@ -9055,6 +7786,37 @@ command: NIL |htSetKernelWarn|) @ +\defun{protectedSymbolsWarning}{protectedSymbolsWarning} +<>= +(defun |protectedSymbolsWarning| (arg) + (let (v) + (cond + ((eq arg '|%initialize%|) (protected-symbol-warn nil)) + ((eq arg '|%display%|) + (setq v (protected-symbol-warn t)) + (protected-symbol-warn v) + (if v "on" "off")) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeProtectedSymbolsWarning|)) + (t (protected-symbol-warn (|translateYesNo2TrueFalse| (car arg))))))) + +@ + +\defun{describeProtectedSymbolsWarning}{describeProtectedSymbolsWarning} +<>= +(defun |describeProtectedSymbolsWarning| () + (|sayBrightly| (list + "Some AXIOM library functions are compiled into the kernel for efficiency" + '|%l| "reasons. To prevent them being re-defined when loaded from a library" + '|%l| + "they are specially protected. If a user wishes to know when an attempt" + '|%l| + "is made to re-define such a function, he or she should issue the command:" + '|%l| " )set kernel warn on" + '|%l| "To restore the default behaviour, he or she should issue the command:" + '|%l| " )set kernel warn off"))) + +@ \subsection{kernelprotect} \begin{verbatim} --------------------- The protect Option ---------------------- @@ -9079,6 +7841,37 @@ command: NIL |htSetKernelProtect|) @ + +\defun{protectSymbols}{protectSymbols} +<>= +(defun |protectSymbols| (arg) + (let (v) + (cond + ((eq arg '|%initialize%|) (protect-symbols t)) + ((eq arg '|%display%|) + (setq v (protect-symbols t)) + (protect-symbols v) + (if v "on" "off")) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeProtectSymbols|)) + (t (protect-symbols (|translateYesNo2TrueFalse| (car arg))))))) + +@ +\defun{describeProtectSymbols}{describeProtectSymbols} +<>= +(defun |describeProtectSymbols| () + (|sayBrightly| (list + "Some AXIOM library functions are compiled into the kernel for efficiency" + '|%l| + "reasons. To prevent them being re-defined when loaded from a library" + '|%l| "they are specially protected. If a user wishes to re-define these" + '|%l| "functions, he or she should issue the command:" + '|%l| " )set kernel protect off" + '|%l| + "To restore the default behaviour, he or she should issue the command:" + '|%l| " )set kernel protect on"))) + +@ \section{hyperdoc} \begin{verbatim} Current Values of hyperdoc Variables @@ -9307,11 +8100,12 @@ naglink show NAGLink messages on (|autoload| "print file auto-load messages" |interpreter| - FUNCTION - |printLoadMessages| + LITERALS + |$printLoadMsgs| (|on| |off|) |on|) @ + \subsection{bottomup} \begin{verbatim} --------------------- The bottomup Option --------------------- @@ -9864,6 +8658,36 @@ double enforce DOUBLE PRECISION ASPs on "localhost")) NIL) @ + +\defun{setNagHost}{setNagHost} +<>= +(defun |setNagHost| (|arg|) + (declare (special |$nagHost|)) + (cond + ((eq |arg| '|%initialize%|) (setq |$nagHost| "localhost")) + ((eq |arg| '|%display%|) (|object2String| |$nagHost|)) + ((or (null |arg|) (eq |arg| '|%describe%|) (eq (car |arg|) '?)) + (|describeSetNagHost|)) + (t (setq |$nagHost| (|object2String| |arg|))))) + +@ + +\defun{describeSetNagHost}{describeSetNagHost} +<>= +(defun |describeSetNagHost| () + (declare (special |$nagHost|)) + (|sayBrightly| (list + '|%b| ")set naglink host" + '|%d| "is used to tell AXIOM which host to contact for" + '|%l| " a NAGLink request. An Internet address should be supplied. The host" + '|%l| " specified must be running the NAGLink daemon." + '|%l| + '|%l| " The current setting is" + '|%b| |$nagHost| + '|%d|))) + +@ + \subsection{persistence} \begin{verbatim} ------------------- The persistence Option -------------------- @@ -9890,6 +8714,49 @@ double enforce DOUBLE PRECISION ASPs on 10)) NIL) @ + +\defun{setFortPers}{setFortPers} +<>= +(defun |setFortPers| (arg) + (let (n) + (declare (special |$fortPersistence|)) + (cond + ((eq arg '|%initialize%|) (setq |$fortPersistence| 1)) + ((eq arg '|%display%|) |$fortPersistence|) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeFortPersistence|)) + (t + (setq n (car arg)) + (cond + ((or (null (fixp n)) (minusp n)) + (|sayMessage| + `("Your value of" ,@(|bright| n) "is invalid because ...")) + (|describeFortPersistence|) + (|terminateSystemCommand|)) + (t (setq |$fortPersistence| (car arg)))))))) + +@ + +\defun{describeFortPersistence}{describeFortPersistence} +<>= +(defun |describeFortPersistence| () + (declare (special |$fortPersistence|)) + (|sayBrightly| (list + '|%b| ")set naglink persistence" + '|%d| "is used to tell the " + '|%b| '|nagd| + '|%d| '| daemon how many ASP| + '|%l| + " source and object files to keep around in case you reuse them. This helps" + '|%l| " to avoid needless recompilations. The number specified should be a " + '|%l| " non-negative integer." + '|%l| + '|%l| " The current setting is" + '|%b| |$fortPersistence| + '|%d|))) + +@ + \subsection{messages} \begin{verbatim} --------------------- The messages Option --------------------- @@ -10052,6 +8919,125 @@ The current setting is: On:CONSOLE "console")) NIL) @ + +\defun{setOutputAlgebra}{setOutputAlgebra} +<>= +(defun |setOutputAlgebra| (arg) + (let (label tmp1 tmp2 ptype fn ft fm filename teststream) + (declare (special |$algebraOutputStream| |$algebraOutputFile| + |$algebraFormat|)) + (cond + ((eq arg '|%initialize%|) + (setq |$algebraOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$algebraOutputFile| "CONSOLE") + (setq |$algebraFormat| t)) + ((eq arg '|%display%|) + (if |$algebraFormat| + (setq label "On:") + (setq label "Off:")) + (strconc label |$algebraOutputFile|)) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeSetOutputAlgebra|)) + (t + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t) + (|member| fn '(y n ye yes no o on of off console + |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|))) + '|ok|) + (t (setq arg (list fn '|spout|)))) + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t)) + (cond + ((|member| (upcase fn) '(y n ye o of)) + (|sayKeyedMsg| 's2iv0002 '(|algebra| |algebra|))) + ((|member| (upcase fn) '(no off)) (setq |$algebraFormat| nil)) + ((|member| (upcase fn) '(yes on)) (setq |$algebraFormat| t)) + ((eq (upcase fn) 'console) + (shut |$algebraOutputStream|) + (setq |$algebraOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$algebraOutputFile| "CONSOLE")))) + ((or + (and (pairp arg) + (progn + (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (eq (qcdr tmp1) nil) + (progn (setq ft (qcar tmp1)) t)))) + (and (pairp arg) + (progn (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (progn (setq ft (qcar tmp1)) + (setq tmp2 (qcdr tmp1)) + (and (pairp tmp2) + (eq (qcdr tmp2) nil) + (progn + (setq fm (qcar tmp2)) + t))))))) + (when (setq ptype (|pathnameType| fn)) + (setq fn (strconc (|pathnameDirectory| fn) (|pathnameName| fn))) + (setq ft ptype)) + (unless fm (setq fm 'a)) + (setq filename ($filep fn ft fm)) + (cond + ((null filename) + (|sayKeyedMsg| 's2iv0003 (list fn ft fm))) + ((setq teststream (make-outstream filename 255 0)) + (shut |$algebraOutputStream|) + (setq |$algebraOutputStream| teststream) + (setq |$algebraOutputFile| (|object2String| filename)) + (|sayKeyedMsg| 's2iv0004 (list "Algebra" |$algebraOutputFile|))) + (t (|sayKeyedMsg| 's2iv0003 (list fn ft fm))))) + (t + (|sayKeyedMsg| 's2iv0005 nil) + (|describeSetOutputAlgebra|))))))) +@ + +\defun{describeSetOutputAlgebra}{describeSetOutputAlgebra} +<>= +(defun |describeSetOutputAlgebra| () + (|sayBrightly| (list + '|%b| ")set output algebra" + '|%d| "is used to tell AXIOM to turn algebra-style output" + '|%l| "printing on and off, and where to place the output. By default, the" + '|%l| "destination for the output is the screen but printing is turned off." + '|%l| + '|%l| "Syntax: )set output algebra " + '|%l| " where arg can be one of" + '|%l| " on turn algebra printing on (default state)" + '|%l| " off turn algebra printing off" + '|%l| " console send algebra output to screen (default state)" + '|%l| " fp<.fe> send algebra output to file with file prefix fp" + '|%l| + " and file extension .fe. If not given, .fe defaults to .spout." + '|%l| + '|%l| + "If you wish to send the output to a file, you may need to issue this command" + '|%l| "twice: once with" + '|%b| "on" + '|%d| "and once with the file name. For example, to send" + '|%l| "algebra output to the file" + '|%b| "polymer.spout," + '|%d| "issue the two commands" + '|%l| + '|%l| " )set output algebra on" + '|%l| " )set output algebra polymer" + '|%l| + '|%l| "The output is placed in the directory from which you invoked AXIOM or" + '|%l| "the one you set with the )cd system command." + '|%l| "The current setting is: " + '|%b| (|setOutputAlgebra| '|%display%|) + '|%d|))) + +@ + \subsection{characters} \begin{verbatim} -------------------- The characters Option -------------------- @@ -10088,6 +9074,61 @@ The current setting is: On:CONSOLE NIL |htSetOutputCharacters|) @ + +\defun{setOutputCharacters}{setOutputCharacters} +<>= +(defun |setOutputCharacters| (arg) + (let (current char s l fn) + (declare (special |$specialCharacters| |$plainRTspecialCharacters| + |$RTspecialCharacters| |$specialCharacterAlist|)) + (if (eq arg '|%initialize%|) + (setq |$specialCharacters| |$plainRTspecialCharacters|) + (progn + (setq current + (cond + ((eq |$specialCharacters| |$RTspecialCharacters|) "default") + ((eq |$specialCharacters| |$plainRTspecialCharacters|) "plain") + (t "unknown"))) + (cond + ((eq arg '|%display%|) current) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|sayMessage| + `(" The" ,@(|bright| "characters") + "option may be followed by any one of the following:")) + (dolist (name '("default" "plain")) + (if (string= (string current) name) + (|sayBrightly| `(" ->" ,@(|bright| name))) + (|sayBrightly| (list " " name)))) + (terpri) + (|sayBrightly| + " The current setting is indicated within the list. This option determines ") + (|sayBrightly| + " the special characters used for algebraic output. This is what the") + (|sayBrightly| + " current choice of special characters looks like:") + (do ((t1 |$specialCharacterAlist| (CDR t1)) (t2 nil)) + ((or (atom t1) + (progn (setq t2 (car t1)) nil) + (progn (progn (setq char (car t2)) t2) nil)) nil) + (setq s + (strconc " " (pname char) " is shown as " + (pname (|specialChar| char)))) + (setq l (cons s l))) + (|sayAsManyPerLineAsPossible| (reverse l))) + ((and (pairp arg) + (eq (qcdr arg) NIL) + (progn (spadlet fn (qcar arg)) t) + (setq fn (downcase fn))) + (cond + ((eq fn '|default|) + (setq |$specialCharacters| |$RTspecialCharacters|)) + ((eq fn '|plain|) + (setq |$specialCharacters| |$plainRTspecialCharacters|)) + (t (|setOutputCharacters| nil)))) + (t (|setOutputCharacters| nil))))))) + +@ + \subsection{fortran} \begin{verbatim} --------------------- The fortran Option ---------------------- @@ -10141,6 +9182,137 @@ The current setting is: Off:CONSOLE "console")) NIL) @ + +\defun{setOutputFortran}{setOutputFortran} +<>= +(defun |setOutputFortran| (arg) + (let (label APPEND quiet tmp1 tmp2 ptype fn ft fm filename teststream) + (declare (special |$fortranOutputStream| |$fortranOutputFile| + |$fortranFormat|)) + (cond + ((eq arg '|%initialize%|) + (setq |$fortranOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$fortranOutputFile| "CONSOLE") + (setq |$fortranFormat| nil)) + ((eq arg '|%display%|) + (if |$fortranFormat| + (setq label "On:") + (setq label "Off:")) + (strconc label |$fortranOutputFile|)) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeSetOutputFortran|)) + (t + (DO () + ((null (and (listp arg) + (|member| (upcase (car arg)) '(append quiet)))) + nil) + (cond + ((eq (upcase (car arg)) 'append) (setq append t)) + ((eq (upcase (car arg)) 'quiet) (setq quiet t)) + (t nil)) + (setq arg (cdr arg))) + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t) + (|member| fn '(Y N YE YES NO O ON OF OFF CONSOLE + |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|))) + '|ok|) + (t (setq arg (list fn '|sfort|)))) + (cond + ((and (pairp arg) (eq (qcdr arg) nil) (progn (setq fn (qcar arg)) t)) + (cond + ((|member| (upcase fn) '(y n ye o of)) + (|sayKeyedMsg| 's2iv0002 '(fortran |fortran|))) + ((|member| (upcase fn) '(no off)) (setq |$fortranFormat| nil)) + ((|member| (upcase fn) '(yes on)) (setq |$fortranFormat| t)) + ((eq (upcase fn) 'console) + (shut |$fortranOutputStream|) + (setq |$fortranOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$fortranOutputFile| "CONSOLE")))) + ((or + (and (pairp arg) + (progn + (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (eq (qcdr tmp1) nil) + (progn (setq ft (qcar tmp1)) t)))) + (and (pairp arg) + (progn + (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (progn + (setq ft (qcar tmp1)) + (setq tmp2 (qcdr tmp1)) + (and (pairp tmp2) + (eq (qcdr tmp2) nil) + (progn (setq fm (qcar tmp2)) t))))))) + (when (setq ptype (|pathnameType| fn)) + (setq fn (strconc (|pathnameDirectory| fn) (|pathnameName| fn))) + (setq ft ptype)) + (unless fm (setq fm 'a)) + (setq filename ($filep fn ft fm)) + (cond + ((null filename) + (|sayKeyedMsg| 'S2IV0003 (list fn ft fm))) + ((setq teststream (|makeStream| append filename 255 0)) + (SHUT |$fortranOutputStream|) + (setq |$fortranOutputStream| teststream) + (setq |$fortranOutputFile| (|object2String| filename)) + (unless quiet + (|sayKeyedMsg| 'S2IV0004 (list 'fortran |$fortranOutputFile|)))) + ((null quiet) + (|sayKeyedMsg| 'S2IV0003 (list fn ft fm))) + (t nil))) + (t + (unless quiet (|sayKeyedMsg| 'S2IV0005 nil)) + (|describeSetOutputFortran|))))))) + +@ + +\defun{describeSetOutputFortran}{describeSetOutputFortran} +<>= +(defun |describeSetOutputFortran| () + (|sayBrightly| (list + '|%b| ")set output fortran" + '|%d| "is used to tell AXIOM to turn FORTRAN-style output" + '|%l| "printing on and off, and where to place the output. By default, the" + '|%l| "destination for the output is the screen but printing is turned off." + '|%l| + '|%l| "Also See: )set fortran" + '|%l| + '|%l| "Syntax: )set output fortran " + '|%l| " where arg can be one of" + '|%l| " on turn FORTRAN printing on" + '|%l| " off turn FORTRAN printing off (default state)" + '|%l| " console send FORTRAN output to screen (default state)" + '|%l| + " fp<.fe> send FORTRAN output to file with file prefix fp and file" + '|%l| " extension .fe. If not given, .fe defaults to .sfort." + '|%l| + '|%l| "If you wish to send the output to a file, you must issue this command" + '|%l| "twice: once with" + '|%b| "on" + '|%d| "and once with the file name. For example, to send" + '|%l| "FORTRAN output to the file" + '|%b| "polymer.sfort," + '|%d| "issue the two commands" + '|%l| + '|%l| " )set output fortran on" + '|%l| " )set output fortran polymer" + '|%l| + '|%l| "The output is placed in the directory from which you invoked AXIOM or" + '|%l| "the one you set with the )cd system command." + '|%l| "The current setting is: " + '|%b| (|setOutputFortran| '|%display%|) + '|%d|))) + +@ + \subsection{fraction} \begin{verbatim} --------------------- The fraction Option --------------------- @@ -10235,6 +9407,124 @@ The current setting is: Off:CONSOLE NIL) @ + +\defun{setOutputMathml}{setOutputMathml} +<>= +(defun |setOutputMathml| (arg) + (let (label tmp1 tmp2 ptype fn ft fm filename teststream) + (declare (special |$mathmlOutputStream| |$mathmlOutputFile| |$mathmlFormat|)) + (cond + ((eq arg '|%initialize%|) + (setq |$mathmlOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$mathmlOutputFile| "CONSOLE") + (setq |$mathmlFormat| nil)) + ((eq arg '|%display%|) + (if |$mathmlFormat| + (setq label "On:") + (setq label "Off:")) + (strconc label |$mathmlOutputFile|)) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeSetOutputMathml|)) + (t + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t) + (|member| fn '(y n ye yes no o on of off console + |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|))) + '|ok|) + (t (setq arg (list fn '|smml|)))) + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t)) + (cond + ((|member| (upcase fn) '(y n ye o of)) + (|sayKeyedMsg| 's2iv0002 '(|MathML| |mathml|))) + ((|member| (upcase fn) '(no off)) (setq |$mathmlFormat| nil)) + ((|member| (upcase fn) '(yes on)) (setq |$mathmlFormat| t)) + ((eq (upcase fn) 'console) + (shut |$mathmlOutputStream|) + (setq |$mathmlOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$mathmlOutputFile| "CONSOLE")))) + ((or + (and (pairp arg) + (progn + (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (eq (qcdr tmp1) nil) + (progn (setq ft (qcar tmp1)) t)))) + (and (pairp arg) + (progn (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (progn + (setq ft (qcar tmp1)) + (setq tmp2 (qcdr tmp1)) + (and (pairp tmp2) + (eq (qcdr tmp2) nil) + (progn + (setq fm (qcar tmp2)) + t))))))) + (when (setq ptype (|pathnameType| fn)) + (setq fn + (strconc (|pathnameDirectory| fn) (|pathnameName| fn))) + (setq ft ptype)) + (unless fm (setq fm 'a)) + (setq filename ($filep fn ft fm)) + (cond + ((null filename) (|sayKeyedMsg| 's2iv0003 (list fn ft fm))) + ((setq teststream (make-outstream filename 255 0)) + (shut |$mathmlOutputStream|) + (setq |$mathmlOutputStream| teststream) + (setq |$mathmlOutputFile| (|object2String| filename)) + (|sayKeyedMsg| 's2iv0004 (list "MathML" |$mathmlOutputFile|))) + (t (|sayKeyedMsg| 's2iv0003 (list fn ft fm))))) + (t + (|sayKeyedMsg| 's2iv0005 nil) + (|describeSetOutputMathml|))))))) + +@ + +\defun{describeSetOutputMathml}{describeSetOutputMathml} +<>= +(defun |describeSetOutputMathml| () + (|sayBrightly| (LIST + '|%b| ")set output mathml" + '|%d| "is used to tell AXIOM to turn MathML-style output" + '|%l| "printing on and off, and where to place the output. By default, the" + '|%l| "destination for the output is the screen but printing is turned off." + '|%l| + '|%l| "Syntax: )set output mathml " + '|%l| " where arg can be one of" + '|%l| " on turn MathML printing on" + '|%l| " off turn MathML printing off (default state)" + '|%l| " console send MathML output to screen (default state)" + '|%l| " fp<.fe> send MathML output to file with file prefix fp and file" + '|%l| " extension .fe. If not given, .fe defaults to .stex." + '|%l| + '|%l| "If you wish to send the output to a file, you must issue this command" + '|%l| "twice: once with" + '|%b| "on" + '|%d| "and once with the file name. For example, to send" + '|%l| "MathML output to the file" + '|%b| "polymer.smml," + '|%d| "issue the two commands" + '|%l| + '|%l| " )set output mathml on" + '|%l| " )set output mathml polymer" + '|%l| + '|%l| "The output is placed in the directory from which you invoked AXIOM or" + '|%l| "the one you set with the )cd system command." + '|%l| "The current setting is: " + '|%b| (|setOutputMathml| '|%display%|) + '|%d|))) + +@ + \subsection{openmath} \begin{verbatim} ----------------------- The openmath Option ------------------------ @@ -10286,6 +9576,124 @@ The current setting is: Off:CONSOLE "console")) NIL) @ + +\defun{setOutputOpenMath}{setOutputOpenMath} +<>= +(defun |setOutputOpenMath| (arg) + (let (label tmp1 tmp2 ptype fn ft fm filename teststream) + (declare (special |$openMathOutputStream| |$openMathFormat| + |$openMathOutputFile|)) + (cond + ((eq arg '|%initialize%|) + (setq |$openMathOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$openMathOutputFile| "CONSOLE") + (setq |$openMathFormat| NIL)) + ((eq arg '|%display%|) + (if |$openMathFormat| + (setq label "On:") + (setq label "Off:")) + (strconc label |$openMathOutputFile|)) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeSetOutputOpenMath|)) + (t + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t) + (|member| fn '(y n ye yes no o on of off console + |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|))) + '|ok|) + (t (setq arg (list fn '|som|)))) + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t)) + (cond + ((|member| (upcase fn) '(y n ye o of)) + (|sayKeyedMsg| 's2iv0002 '(|OpenMath| |openmath|))) + ((|member| (upcase fn) '(no off)) (setq |$openMathFormat| nil)) + ((|member| (upcase fn) '(yes on)) (setq |$openMathFormat| t)) + ((eq (upcase fn) 'console) + (shut |$openMathOutputStream|) + (setq |$openMathOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$openMathOutputFile| "CONSOLE")))) + ((or + (and (pairp arg) + (progn (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (eq (qcdr tmp1) nil) + (progn (setq ft (qcar tmp1)) t)))) + (and (pairp arg) + (progn + (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (progn (setq ft (qcar tmp1)) + (setq tmp2 (qcdr tmp1)) + (and (pairp tmp2) + (eq (qcdr tmp2) nil) + (progn (setq fm (qcar tmp2)) t))))))) + (when (setq ptype (|pathnameType| fn)) + (setq fn (strconc (|pathnameDirectory| fn) (|pathnameName| fn))) + (setq ft ptype)) + (unless fm (setq fm 'a)) + (setq filename ($filep fn ft fm)) + (cond + ((null filename) + (|sayKeyedMsg| 's2iv0003 (list fn ft fm))) + ((setq teststream (make-outstream filename 255 0)) + (shut |$openMathOutputStream|) + (setq |$openMathOutputStream| teststream) + (setq |$openMathOutputFile| (|object2String| filename)) + (|sayKeyedMsg| 's2iv0004 (list "OpenMath" |$openMathOutputFile|))) + (t + (|sayKeyedMsg| 's2iv0003 (list fn ft fm))))) + (t + (|sayKeyedMsg| 's2iv0005 nil) + (|describeSetOutputOpenMath|))))))) + +@ + +\defun{describeSetOutputOpenMath}{describeSetOutputOpenMath} +<>= +(defun |describeSetOutputOpenMath| () + (|sayBrightly| (list + '|%b| ")set output openmath" + '|%d| "is used to tell AXIOM to turn OpenMath output" + '|%l| "printing on and off, and where to place the output. By default, the" + '|%l| "destination for the output is the screen but printing is turned off." + '|%l| + '|%l| "Syntax: )set output openmath " + '|%l| " where arg can be one of" + '|%l| " on turn OpenMath printing on" + '|%l| " off turn OpenMath printing off (default state)" + '|%l| " console send OpenMath output to screen (default state)" + '|%l| + " fp<.fe> send OpenMath output to file with file prefix fp and file" + '|%l| " extension .fe. If not given, .fe defaults to .som." + '|%l| + '|%l| "If you wish to send the output to a file, you must issue this command" + '|%l| "twice: once with" + '|%b| "on" + '|%d| "and once with the file name. For example, to send" + '|%l| "OpenMath output to the file" + '|%b| "polymer.som," + '|%d| "issue the two commands" + '|%l| + '|%l| " )set output openmath on" + '|%l| " )set output openmath polymer" + '|%l| + '|%l| "The output is placed in the directory from which you invoked AXIOM or" + '|%l| "the one you set with the )cd system command." + '|%l| "The current setting is: " + '|%b| (|setOutputOpenMath| '|%display%|) + '|%d|))) + +@ + \subsection{script} \begin{verbatim} ---------------------- The script Option ---------------------- @@ -10339,6 +9747,125 @@ The current setting is: Off:CONSOLE "console")) NIL) @ + +\defun{setOutputFormula}{setOutputFormula} +<>= +(defun |setOutputFormula| (arg) + (let (label tmp1 tmp2 ptype fn ft fm filename teststream) + (declare (special |$formulaOutputStream| |$formulaOutputFile| + |$formulaFormat|)) + (cond + ((eq arg '|%initialize%|) + (setq |$formulaOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$formulaOutputFile| "CONSOLE") + (setq |$formulaFormat| nil)) + ((eq arg '|%display%|) + (if |$formulaFormat| + (setq label "On:") + (setq label "Off:")) + (strconc label |$formulaOutputFile|)) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeSetOutputFormula|)) + (t + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t) + (|member| fn '(y n ye yes no o on of off console + |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|))) + '|ok|) + (t (setq arg (list fn '|sform|)))) + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t)) + (cond + ((|member| (upcase fn) '(y n ye o of)) + (|sayKeyedMsg| 's2iv0002 '(|script| |script|))) + ((|member| (upcase fn) '(no off)) (setq |$formulaFormat| nil)) + ((|member| (upcase fn) '(yes on)) (setq |$formulaFormat| t)) + ((eq (upcase fn) 'console) + (SHUT |$formulaOutputStream|) + (setq |$formulaOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$formulaOutputFile| "CONSOLE")))) + ((or + (and (pairp arg) + (progn (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (eq (qcdr tmp1) nil) + (progn (setq ft (qcar tmp1)) t)))) + (and (pairp arg) + (progn (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (progn (setq ft (qcar tmp1)) + (setq tmp2 (qcdr tmp1)) + (and (pairp tmp2) + (eq (qcdr tmp2) nil) + (progn + (setq fm (qcar tmp2)) t))))))) + (if (setq ptype (|pathnameType| fn)) + (setq fn (strconc (|pathnameDirectory| fn) (|pathnameName| fn))) + (setq ft ptype)) + (unless fm (setq fm 'a)) + (setq filename ($filep fn ft fm)) + (cond + ((null filename) (|sayKeyedMsg| 's2iv0003 (list fn ft fm))) + ((setq teststream (make-outstream filename 255 0)) + (shut |$formulaOutputStream|) + (setq |$formulaOutputStream| teststream) + (setq |$formulaOutputFile| (|object2String| filename)) + (|sayKeyedMsg| 's2iv0004 + (list "IBM Script formula" |$formulaOutputFile| ))) + (t + (|sayKeyedMsg| 's2iv0003 (list fn ft fm))))) + (t + (|sayKeyedMsg| 's2iv0005 nil) + (|describeSetOutputFormula|))))))) + +@ +\defun{describeSetOutputFormula}{describeSetOutputFormula} +<>= +(defun |describeSetOutputFormula| () + (|sayBrightly| (list + '|%b| ")set output script" + '|%d| "is used to tell AXIOM to turn IBM Script formula-style" + '|%l| + "output printing on and off, and where to place the output. By default, the" + '|%l| "destination for the output is the screen but printing is turned off." + '|%l| + '|%l| "Syntax: )set output script " + '|%l| " where arg can be one of" + '|%l| " on turn IBM Script formula printing on" + '|%l| " off turn IBM Script formula printing off (default state)" + '|%l| " console send IBM Script formula output to screen (default state)" + '|%l| + " fp<.fe> send IBM Script formula output to file with file prefix fp" + '|%l| + " and file extension .fe. If not given, .fe defaults to .sform." + '|%l| + '|%l| "If you wish to send the output to a file, you must issue this command" + '|%l| "twice: once with" + '|%b| "on" + '|%d| "and once with the file name. For example, to send" + '|%l| "IBM Script formula output to the file" + '|%b| "polymer.sform," + '|%d| "issue the two commands" + '|%l| + '|%l| " )set output script on" + '|%l| " )set output script polymer" + '|%l| + '|%l| "The output is placed in the directory from which you invoked AXIOM or" + '|%l| "the one you set with the )cd system command." + '|%l| "The current setting is: " + '|%b| (|setOutputFormula| '|%display%|) + '|%d|))) + +@ + \subsection{scripts} \begin{verbatim} --------------------- The scripts Option ---------------------- @@ -10437,6 +9964,118 @@ The current setting is: Off:CONSOLE "console")) NIL) @ + +\defun{setOutputTex}{setOutputTex} +<>= +(defun |setOutputTex| (arg) + (let (label tmp1 tmp2 ptype fn ft fm filename teststream) + (declare (special |$texOutputStream| |$texOutputFile| |$texFormat|)) + (cond + ((eq arg '|%initialize%|) + (setq |$texOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$texOutputFile| "CONSOLE") + (setq |$texFormat| nil)) + ((eq arg '|%display%|) + (if |$texFormat| + (setq label "On:") + (setq label "Off:")) + (strconc label |$texOutputFile|)) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeSetOutputTex|)) + (t + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t) + (|member| fn '(y n ye yes no o on of off console + |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|))) + '|ok|) + (t (setq arg (list fn '|stex| nil)))) + (cond + ((and (pairp arg) + (eq (qcdr arg) nil) + (progn (setq fn (qcar arg)) t)) + (cond + ((|member| (upcase fn) '(y n ye o of)) + (|sayKeyedMsg| 's2iv0002 '(|TeX| |tex|))) + ((|member| (upcase fn) '(no off)) (setq |$texFormat| nil)) + ((|member| (upcase fn) '(yes on)) (setq |$texFormat| t)) + ((eq (upcase fn) 'console) + (shut |$texOutputStream|) + (setq |$texOutputStream| + (defiostream '((mode . output) (device . console)) 255 0)) + (setq |$texOutputFile| "CONSOLE")))) + ((or + (and (pairp arg) + (progn (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (eq (qcdr tmp1) nil) + (progn (setq ft (qcar tmp1)) t)))) + (and (pairp arg) + (progn (setq fn (qcar arg)) + (setq tmp1 (qcdr arg)) + (and (pairp tmp1) + (progn (setq ft (qcar tmp1)) + (setq tmp2 (qcdr tmp1)) + (and (pairp tmp2) + (eq (qcdr tmp2) nil) + (progn (setq fm (qcar tmp2)) t))))))) + (when (setq ptype (|pathnameType| fn)) + (setq fn (strconc (|pathnameDirectory| fn) (|pathnameName| fn))) + (setq ft ptype)) + (unless fm (setq fm 'A)) + (setq filename ($filep fn ft fm)) + (cond + ((null filename) (|sayKeyedMsg| 's2iv0003 (list fn ft fm ))) + ((setq teststream (make-outstream filename 255 0)) + (shut |$texOutputStream|) + (setq |$texOutputStream| teststream) + (setq |$texOutputFile| (|object2String| filename)) + (|sayKeyedMsg| 's2iv0004 (list "TeX" |$texOutputFile|))) + (t (|sayKeyedMsg| 'S2IV0003 (list fn ft fm ))))) + (t + (|sayKeyedMsg| 's2iv0005 nil) + (|describeSetOutputTex|))))))) + +@ + +\defun{describeSetOutputTex}{describeSetOutputTex} +<>= +(defun |describeSetOutputTex| () + (|sayBrightly| (list + '|%b| ")set output tex" + '|%d| "is used to tell AXIOM to turn TeX-style output" + '|%l| "printing on and off, and where to place the output. By default, the" + '|%l| "destination for the output is the screen but printing is turned off." + '|%l| + '|%l| "Syntax: )set output tex " + '|%l| " where arg can be one of" + '|%l| " on turn TeX printing on" + '|%l| " off turn TeX printing off (default state)" + '|%l| " console send TeX output to screen (default state)" + '|%l| " fp<.fe> send TeX output to file with file prefix fp and file" + '|%l| " extension .fe. If not given, .fe defaults to .stex." + '|%l| + '|%l| "If you wish to send the output to a file, you must issue this command" + '|%l| "twice: once with" + '|%b| "on" + '|%d| "and once with the file name. For example, to send" + '|%l| "TeX output to the file" + '|%b| "polymer.stex," + '|%d| "issue the two commands" + '|%l| + '|%l| " )set output tex on" + '|%l| " )set output tex polymer" + '|%l| + '|%l| "The output is placed in the directory from which you invoked AXIOM or" + '|%l| "the one you set with the )cd system command." + '|%l| "The current setting is: " + '|%b| (|setOutputTex| '|%display%|) + '|%d|))) + +@ \section{quit} \begin{verbatim} ----------------------- The quit Option ----------------------- @@ -10507,6 +10146,37 @@ showall display all stream elements computed off 10)) NIL) @ + +\defun{setStreamsCalculate}{setStreamsCalculate} +<>= +(defun |setStreamsCalculate| (arg) + (let (n) + (declare (special |$streamCount|)) + (cond + ((eq arg '|%initialize%|) (setq |$streamCount| 10)) + ((eq arg '|%display%|) (|object2String| |$streamCount|)) + ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) + (|describeSetStreamsCalculate|)) + (t + (setq n (car arg)) + (cond + ((and (nequal n '|all|) (or (null (fixp n)) (minusp n))) + (|sayMessage| + `("Your value of" ,@(|bright| n) "is invalid because ...")) + (|describeSetStreamsCalculate|) + (|terminateSystemCommand|)) + (t (setq |$streamCount| n))))))) + +@ + +\defun{describeSetStreamsCalculate}{describeSetStreamsCalculate} +<>= +(defun |describeSetStreamsCalculate| () + (declare (special |$streamCount|)) + (|sayKeyedMsg| 's2iv0001 (list |$streamCount|))) + +@ + \subsection{showall} \begin{verbatim} --------------------- The showall Option ---------------------- @@ -10684,13 +10354,14 @@ prettyprint prettyprint BOOT func's as they compile off \section{Set code} -\defun{set} +\defun{set}{set} <>= (defun |set| (l) + (declare (special |$setOptions|)) (|set1| l |$setOptions|)) @ -\defun{set1} +\defun{set1}{set1} This function will be called with the top level arguments to )set. For instance, given the command \begin{verbatim} @@ -10717,7 +10388,7 @@ which gets called with \verb|%describe%| <>= (defun |set1| (l settree) (let (|$setOptionNames| arg setdata st setfunarg num upperlimit arg2) - (declare (special |$setOptionNames|)) + (declare (special |$setOptionNames| |$UserLevel| |$displaySetValue|)) (cond ((null l) (|displaySetVariableSettings| settree '||)) (t @@ -10744,7 +10415,8 @@ which gets called with \verb|%describe%| (kdr l))) (if (functionp (fifth setdata)) (funcall (fifth setdata) setfunarg) - (|sayMSG| " Function not implemented.")) + (|sayMSG| (concatenate 'string " Function not implemented. " + (string (fifth setdata))))) (when |$displaySetValue| (|displaySetOptionInformation| arg setdata)) NIL) @@ -10916,9 +10588,10 @@ Axiom or is the directory you specified using the \cmdhead{summary} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\defun{summary} +\defun{summary}{summary} <>= (defun |summary| (l) + (declare (ignore l)) (obey (strconc "cat " (|getEnv| "AXIOM") "/lib/summary"))) @ @@ -11336,25 +11009,18 @@ This reports the traced functions @ -\defun{trace} +\defun{trace}{trace} <>= (defun |trace| (l) (|traceSpad2Cmd| l)) @ -\defun{traceSpad2Cmd} -\begin{verbatim} -;traceSpad2Cmd l == -; if l is ['Tuple, l1] then l := l1 -; $mapSubNameAlist:= getMapSubNames(l) -; trace1 augmentTraceNames(l,$mapSubNameAlist) -; traceReply() -\end{verbatim} - +\defun{traceSpad2Cmd}{traceSpad2Cmd} <>= (defun |traceSpad2Cmd| (l) (let (tmp1 l1) + (declare (special |$mapSubNameAlist|)) (cond ((and (pairp l) (eq (qcar l) '|Tuple|) @@ -11367,91 +11033,19 @@ This reports the traced functions t)))) (setq l l1))) (setq |$mapSubNameAlist| (|getMapSubNames| l)) - (|trace1| (|augmentTraceNames| l |$mapSubNameAlist|)) + (|trace1| (|augmentTraceNames| l)) (|traceReply|))) @ -\defun{trace1} -\begin{verbatim} -;trace1 l == -; $traceNoisely: local := NIL -; if hasOption($options,'nonquietly) then $traceNoisely := true -; hasOption($options,'off) => -; (ops := hasOption($options,'ops)) or -; (lops := hasOption($options,'local)) => -; null l => throwKeyedMsg("S2IT0019",NIL) -; constructor := unabbrev -; atom l => l -; null rest l => -; atom first l => first l -; first first l -; NIL -; not(isFunctor constructor) => throwKeyedMsg("S2IT0020",NIL) -; if ops then -; ops := getTraceOption ops -; NIL -; if lops then -; lops := rest getTraceOption lops -; untraceDomainLocalOps(constructor,lops) -; (1 < # $options) and not hasOption($options,'nonquietly) => -; throwKeyedMsg("S2IT0021",NIL) -; untrace l -; hasOption($options,'stats) => -; (1 < # $options) => -; throwKeyedMsg("S2IT0001",['")trace ... )stats"]) -; [.,:opt] := CAR $options -; -- look for )trace )stats to list the statistics -; -- )trace )stats reset to reset them -; null opt => -- list the statistics -; centerAndHighlight('"Traced function execution times",78,"-") -; ptimers () -; SAY '" " -; centerAndHighlight('"Traced function execution counts",78,"-") -; pcounters () -; selectOptionLC(first opt,'(reset),'optionError) -; resetSpacers() -; resetTimers() -; resetCounters() -; throwKeyedMsg("S2IT0002",NIL) -; a:= hasOption($options,'restore) => -; null(oldL:= $lastUntraced) => nil -; newOptions:= DELETE(a,$options) -; null l => trace1 oldL -; for x in l repeat -; x is [domain,:opList] and VECP domain => -; sayKeyedMsg("S2IT0003",[devaluate domain]) -; $options:= [:newOptions,:LASSOC(x,$optionAlist)] -; trace1 LIST x -; null l => nil -; l is ["?"] => _?t() -; traceList:= [transTraceItem x for x in l] or return nil -; for x in traceList repeat $optionAlist:= -; ADDASSOC(x,$options,$optionAlist) -; optionList:= getTraceOptions $options -; argument:= -; domainList:= LASSOC("of",optionList) => -; LASSOC("ops",optionList) => -; throwKeyedMsg("S2IT0004",NIL) -; opList:= -; traceList => LIST ["ops",:traceList] -; nil -; varList:= -; y:= LASSOC("vars",optionList) => LIST ["vars",:y] -; nil -; [:domainList,:opList,:varList] -; optionList => [:traceList,:optionList] -; traceList -; _/TRACE_,0 [funName for funName in argument] -; saveMapSig [funName for funName in argument] -\end{verbatim} - +\defun{trace1}{trace1} <>= (defun |trace1| (arg) - (prog (|$traceNoisely| constructor |ops| |lops| temp1 opt a - |oldL| |newOptions| |domain| |traceList| |optionList| |domainList| - |opList| y |varList| |argument|) - (declare (special |$traceNoisely|)) + (prog (|$traceNoisely| constructor ops lops temp1 opt a + oldl newoptions domain tracelist optionlist domainlist + oplist y varlist argument) + (declare (special |$traceNoisely| |$options| |$lastUntraced| + |$optionAlist|)) (return (seq (progn @@ -11462,8 +11056,8 @@ This reports the traced functions (cond ((|hasOption| |$options| '|off|) (cond - ((or (setq |ops| (|hasOption| |$options| '|ops|)) - (setq |lops| (|hasOption| |$options| '|local|))) + ((or (setq ops (|hasOption| |$options| 'ops)) + (setq lops (|hasOption| |$options| '|local|))) (cond ((null arg) (|throwKeyedMsg| 's2it0019 nil)) (t @@ -11480,11 +11074,11 @@ This reports the traced functions ((null (|isFunctor| constructor)) (|throwKeyedMsg| 's2it0020 nil)) (t - (cond (|ops| (setq |ops| (|getTraceOption| |ops|)) nil)) + (cond (ops (setq ops (|getTraceOption| ops)) nil)) (cond - (|lops| - (setq |lops| (cdr (|getTraceOption| |lops|))) - (|untraceDomainLocalOps| constructor |lops|)) + (lops + (setq lops (cdr (|getTraceOption| lops))) + (|untraceDomainLocalOps|)) (t nil))))))) ((and (qslessp 1 (|#| |$options|)) (null (|hasOption| |$options| '|nonquietly|))) @@ -11511,33 +11105,26 @@ This reports the traced functions (|resetCounters|) (|throwKeyedMsg| 's2it0002 nil)))))) ((setq a (|hasOption| |$options| '|restore|)) - (cond - ((null (setq |oldL| |$lastUntraced|)) nil) - (t - (setq |newOptions| (|delete| a |$options|)) - (cond - ((null arg) (|trace1| |oldL|)) - (t - (do ((t0 arg (cdr t0)) (xl nil)) - ((or (atom t0) (progn (setq x (car t0)) nil)) nil) - (seq - (exit - (cond - ((and (pairp x) - (progn - (setq |domain| (qcar x)) - (setq |opList| (qcdr x)) - t) - (vecp |domain|)) - (|sayKeyedMsg| 's2it0003 (cons (|devaluate| |domain|) nil))) - (t - (setq |$options| - (append |newOptions| (lassoc x |$optionAlist|))) - (|trace1| (list x)))))))))))) + (unless (setq oldl |$lastUntraced|) + (setq newoptions (|delete| a |$options|)) + (if (null arg) + (|trace1| oldl) + (progn + (dolist (x arg) + (if (and (pairp x) + (progn + (setq domain (qcar x)) + (setq oplist (qcdr x)) + t) + (vecp domain)) + (|sayKeyedMsg| 's2it0003 (cons (|devaluate| domain) nil)) + (progn + (setq |$options| (append newoptions (lassoc x |$optionAlist|))) + (|trace1| (list x))))))))) ((null arg) nil) ((and (pairp arg) (eq (qcdr arg) nil) (eq (qcar arg) '?)) (|?t|)) (t - (setq |traceList| + (setq tracelist (or (prog (t1) (setq t1 nil) @@ -11550,36 +11137,36 @@ This reports the traced functions (exit (setq t1 (cons (|transTraceItem| x) t1))))))) (return nil))) - (do ((t3 |traceList| (cdr t3)) (x nil)) + (do ((t3 tracelist (cdr t3)) (x nil)) ((or (atom t3) (progn (setq x (car t3)) nil)) nil) (seq (exit (setq |$optionAlist| (addassoc x |$options| |$optionAlist|))))) - (setq |optionList| (|getTraceOptions| |$options|)) - (setq |argument| + (setq optionlist (|getTraceOptions| |$options|)) + (setq argument (cond - ((setq |domainList| (lassoc '|of| |optionList|)) + ((setq domainlist (lassoc '|of| optionlist)) (cond - ((lassoc '|ops| |optionList|) + ((lassoc 'ops optionlist) (|throwKeyedMsg| 's2it0004 nil)) (t - (setq |opList| + (setq oplist (cond - (|traceList| (list (cons '|ops| |traceList|))) + (tracelist (list (cons 'ops tracelist))) (t nil))) - (setq |varList| + (setq varlist (cond - ((setq y (lassoc '|vars| |optionList|)) + ((setq y (lassoc '|vars| optionlist)) (list (cons '|vars| y))) (t nil))) - (append |domainList| (append |opList| |varList|))))) - (|optionList| (append |traceList| |optionList|)) - (t |traceList|))) + (append domainlist (append oplist varlist))))) + (optionlist (append tracelist optionlist)) + (t tracelist))) (|/TRACE,0| (prog (t4) (setq t4 nil) (return - (do ((t5 |argument| (cdr t5)) (|funName| nil)) + (do ((t5 argument (cdr t5)) (|funName| nil)) ((or (atom t5) (progn (setq |funName| (car t5)) nil)) (nreverse0 t4)) @@ -11590,7 +11177,7 @@ This reports the traced functions (prog (t6) (setq t6 nil) (return - (do ((t7 |argument| (cdr t7)) (|funName| nil)) + (do ((t7 argument (cdr t7)) (|funName| nil)) ((or (atom t7) (progn (setq |funName| (car t7)) nil)) (nreverse0 t6)) @@ -11600,29 +11187,16 @@ This reports the traced functions @ -\defun{getTraceOptions} -\begin{verbatim} -;getTraceOptions options == -; $traceErrorStack: local := nil -; optionList:= [getTraceOption x for x in options] -; $traceErrorStack => -; null rest $traceErrorStack => -; [key,parms] := first $traceErrorStack -; throwKeyedMsg(key,['"",:parms]) -; throwListOfKeyedMsgs("S2IT0017",[# $traceErrorStack], -; NREVERSE $traceErrorStack) -; optionList -\end{verbatim} - +\defun{getTraceOptions}{getTraceOptions} <>= (defun |getTraceOptions| (|options|) - (prog (|$traceErrorStack| |optionList| temp1 key |parms|) + (prog (|$traceErrorStack| optionlist temp1 key |parms|) (declare (special |$traceErrorStack|)) (return (seq (progn (setq |$traceErrorStack| nil) - (setq |optionList| + (setq optionlist (prog (t0) (setq t0 nil) (return @@ -11643,19 +11217,11 @@ This reports the traced functions (|throwListOfKeyedMsgs| 's2it0017 (cons (|#| |$traceErrorStack|) nil) (nreverse |$traceErrorStack|))))) - (t |optionList|))))))) + (t optionlist))))))) @ -\defun{saveMapSig} -\begin{verbatim} -;saveMapSig(funNames) == -; for name in funNames repeat -; map:= RASSOC(name,$mapSubNameAlist) => -; $tracedMapSignatures:= ADDASSOC(name,getMapSig(map,name), -; $tracedMapSignatures) -\end{verbatim} - +\defun{saveMapSig}{saveMapSig} <>= (defun |saveMapSig| (|funNames|) (prog (|map|) @@ -11674,15 +11240,7 @@ This reports the traced functions @ -\defun{getMapSig} -\begin{verbatim} -;getMapSig(mapName,subName) == -; lmms:= get(mapName,'localModemap,$InteractiveFrame) => -; for mm in lmms until sig repeat -; CADR mm = subName => sig:= CDAR mm -; sig -\end{verbatim} - +\defun{getMapSig}{getMapSig} <>= (defun |getMapSig| (|mapName| |subName|) (prog (|lmms| |sig|) @@ -11704,58 +11262,7 @@ This reports the traced functions @ -\defun{getTraceOption} -\begin{verbatim} -;getTraceOption (x is [key,:l]) == -; key:= selectOptionLC(key,$traceOptionList,'traceOptionError) -; x := [key,:l] -; MEMQ(key,'(nonquietly timer nt)) => x -; key='break => -; null l => ['break,'before] -; opts := [selectOptionLC(y,'(before after),NIL) for y in l] -; and/[IDENTP y for y in opts] => ['break,:opts] -; stackTraceOptionError ["S2IT0008",NIL] -; key='restore => -; null l => x -; stackTraceOptionError ["S2IT0009",[STRCONC('")",object2String key)]] -; key='only => ['only,:transOnlyOption l] -; key='within => -; l is [a] and IDENTP a => x -; stackTraceOptionError ["S2IT0010",['")within"]] -; MEMQ(key,'(cond before after)) => -; key:= -; key="cond" => "when" -; key -; l is [a] => [key,:l] -; stackTraceOptionError ["S2IT0011",[STRCONC('")",object2String key)]] -; key='depth => -; l is [n] and FIXP n => x -; stackTraceOptionError ["S2IT0012",['")depth"]] -; key='count => -; (null l) or (l is [n] and FIXP n) => x -; stackTraceOptionError ["S2IT0012",['")count"]] -; key="of" => -; ["of",:[hn y for y in l]] where -; hn x == -; atom x and not UPPER_-CASE_-P (STRINGIMAGE x).(0) => -; isDomainOrPackage EVAL x => x -; stackTraceOptionError ["S2IT0013",[x]] -; g:= domainToGenvar x => g -; stackTraceOptionError ["S2IT0013",[x]] -; MEMQ(key,'(local ops vars)) => -; null l or l is ["all"] => [key,:"all"] -; isListOfIdentifiersOrStrings l => x -; stackTraceOptionError ["S2IT0015",[STRCONC('")",object2String key)]] -; key='varbreak => -; null l or l is ["all"] => ["varbreak",:"all"] -; isListOfIdentifiers l => x -; stackTraceOptionError ["S2IT0016",[STRCONC('")",object2String key)]] -; key='mathprint => -; null l => x -; stackTraceOptionError ["S2IT0009",[STRCONC('")",object2String key)]] -; key => throwKeyedMsg("S2IT0005",[key]) -\end{verbatim} - +\defun{getTraceOption}{getTraceOption} <>= (defun |getTraceOption,hn| (x) (prog (|g|) @@ -11881,7 +11388,7 @@ This reports the traced functions (seq (exit (setq t5 (cons (|getTraceOption,hn| y) t5))))))))) - ((memq key '(|local| |ops| |vars|)) + ((memq key '(|local| ops |vars|)) (cond ((or (null l) (and (pairp l) (eq (qcdr l) nil) (eq (qcar l) '|all|))) @@ -11915,13 +11422,7 @@ This reports the traced functions @ -\defun{traceOptionError} -\begin{verbatim} -;traceOptionError(opt,keys) == -; null keys => stackTraceOptionError ["S2IT0007",[opt]] -; commandAmbiguityError("trace option",opt,keys) -\end{verbatim} - +\defun{traceOptionError}{traceOptionError} <>= (defun |traceOptionError| (opt |keys|) (cond @@ -11932,13 +11433,7 @@ This reports the traced functions @ -\defun{resetTimers} -\begin{verbatim} -;resetTimers () == -; for timer in _/TIMERLIST repeat -; SET(INTERN STRCONC(timer,'"_,TIMER"),0) -\end{verbatim} - +\defun{resetTimers}{resetTimers} <>= (defun |resetTimers| () (seq @@ -11950,30 +11445,15 @@ This reports the traced functions @ -\defun{resetSpacers} -\begin{verbatim} -;resetSpacers () == -; for spacer in _/SPACELIST repeat -; SET(INTERN STRCONC(spacer,'"_,SPACE"),0) -\end{verbatim} - +\defun{resetSpacers}{resetSpacers} <>= (defun |resetSpacers| () - (seq - (do ((t0 /spacelist (cdr t0)) (|spacer| nil)) - ((or (atom t0) (progn (setq |spacer| (car t0)) nil)) nil) - (seq - (exit - (set (intern (strconc |spacer| ",SPACE")) 0)))))) + (declare (special /spacelist)) + (dolist (spacer /spacelist) + (set (intern (strconc spacer ",SPACE")) 0))) @ -\defun{resetCounters} -\begin{verbatim} -;resetCounters () == -; for k in _/COUNTLIST repeat -; SET(INTERN STRCONC(k,'"_,COUNT"),0) -\end{verbatim} - +\defun{resetCounters}{resetCounters} <>= (defun |resetCounters| () (seq @@ -11985,18 +11465,10 @@ This reports the traced functions @ -\defun{ptimers} -\begin{verbatim} -;ptimers() == -; null _/TIMERLIST => sayBrightly '" no functions are timed" -; for timer in _/TIMERLIST repeat -; sayBrightly [" ",:bright timer,'_:,'" ", -; EVAL(INTERN STRCONC(timer,'"_,TIMER")) / float $timerTicksPerSecond,'" sec."] -\end{verbatim} - +\defun{ptimers}{ptimers} <>= (defun |ptimers| () - (seq + (declare (special /timerlist |$timerTicksPerSecond|)) (cond ((null /timerlist) (|sayBrightly| " no functions are timed")) (t @@ -12014,50 +11486,24 @@ This reports the traced functions (quotient (eval (intern (strconc |timer| ",TIMER"))) (|float| |$timerTicksPerSecond|)) - (cons " sec." nil)))))))))))))) + (cons " sec." nil))))))))))))) @ -\defun{pspacers} -\begin{verbatim} -;pspacers() == -; null _/SPACELIST => sayBrightly '" no functions have space monitored" -; for spacer in _/SPACELIST repeat -; sayBrightly [" ",:bright spacer,'_:,'" ", -; EVAL INTERN STRCONC(spacer,'"_,SPACE"),'" bytes"] -\end{verbatim} - +\defun{pspacers}{pspacers} <>= (defun |pspacers| () - (seq - (cond - ((null /spacelist) (|sayBrightly| " no functions have space monitored")) - (t - (do ((t0 /spacelist (cdr t0)) (|spacer| nil)) - ((or (atom t0) (progn (setq |spacer| (car t0)) nil)) nil) - (seq - (exit - (|sayBrightly| - (cons " " - (append - (|bright| |spacer|) - (cons '|:| - (cons " " - (cons - (eval (intern (strconc |spacer| ",SPACE"))) - (cons " bytes" nil)))))))))))))) + (declare (special /spacelist)) + (if (null /spacelist) + (|sayBrightly| " no functions have space monitored") + (dolist (spacer /spacelist) + (|sayBrightly| + `(" " ,@(|bright| spacer) |: | + ,(eval (intern (strconc spacer ",SPACE"))) " bytes"))))) @ -\defun{pcounters} -\begin{verbatim} -;pcounters() == -; null _/COUNTLIST => sayBrightly '" no functions are being counted" -; for k in _/COUNTLIST repeat -; sayBrightly [" ",:bright k,'_:,'" ", -; EVAL INTERN STRCONC(k,'"_,COUNT"),'" times"] -\end{verbatim} - +\defun{pcounters}{pcounters} <>= (defun |pcounters| () (seq @@ -12080,17 +11526,7 @@ This reports the traced functions @ -\defun{transOnlyOption} -\begin{verbatim} -;transOnlyOption l == -; l is [n,:y] => -; FIXP n => [n,:transOnlyOption y] -; MEMQ(n:= UPCASE n,'(V A C)) => [n,:transOnlyOption y] -; stackTraceOptionError ["S2IT0006",[n]] -; transOnlyOption y -; nil -\end{verbatim} - +\defun{transOnlyOption}{transOnlyOption} <>= (defun |transOnlyOption| (arg) (prog (y |n|) @@ -12111,20 +11547,16 @@ This reports the traced functions @ -\defun{stackTraceOptionError} +\defun{stackTraceOptionError}{stackTraceOptionError} <>= (defun |stackTraceOptionError| (x) + (declare (special |$traceErrorStack|)) (push x |$traceErrorStack|) nil) @ -\defun{removeOption} -\begin{verbatim} -;removeOption(op,options) == -; [optEntry for (optEntry:=[opt,:.]) in options | opt ^= op] -\end{verbatim} - +\defun{removeOption}{removeOption} <>= (defun |removeOption| (|op| |options|) (prog (opt) @@ -12145,16 +11577,7 @@ This reports the traced functions @ -\defun{domainToGenvar} -\begin{verbatim} -;domainToGenvar x == -; $doNotAddEmptyModeIfTrue: local:= true -; (y:= unabbrevAndLoad x) and GETDATABASE(opOf y,'CONSTRUCTORKIND) = 'domain => -; g:= genDomainTraceName y -; SET(g,evalDomain y) -; g -\end{verbatim} - +\defun{domainToGenvar}{domainToGenvar} <>= (defun |domainToGenvar| (arg) (prog (|$doNotAddEmptyModeIfTrue| y |g|) @@ -12171,95 +11594,43 @@ This reports the traced functions @ -\defun{genDomainTraceName} -\begin{verbatim} -;genDomainTraceName y == -; u:= LASSOC(y,$domainTraceNameAssoc) => u -; g:= GENVAR() -; $domainTraceNameAssoc:= [ [y,:g],:$domainTraceNameAssoc] -; g -\end{verbatim} - +\defun{genDomainTraceName}{genDomainTraceName} <>= (defun |genDomainTraceName| (y) - (prog (u g) - (return + (let (u g) + (declare (special |$domainTraceNameAssoc|)) (cond ((setq u (lassoc y |$domainTraceNameAssoc|)) u) (t (setq g (genvar)) - (setq |$domainTraceNameAssoc| - (cons (cons y g) |$domainTraceNameAssoc|)) - g))))) + (setq |$domainTraceNameAssoc| (cons (cons y g) |$domainTraceNameAssoc|)) + g)))) @ -\defun{untrace} -\begin{verbatim} -;--this is now called from trace with the )off option -;untrace l == -; $lastUntraced:= -; null l => COPY _/TRACENAMES -; l -; untraceList:= [transTraceItem x for x in l] -; _/UNTRACE_,0 [lassocSub(funName,$mapSubNameAlist) for -; funName in untraceList] -; removeTracedMapSigs untraceList -\end{verbatim} - +\defun{untrace}{untrace} <>= (defun |untrace| (arg) - (prog (|untraceList|) - (return - (seq - (progn - (setq |$lastUntraced| (cond ((null arg) (copy /tracenames)) (t arg))) - (setq |untraceList| - (prog (t0) - (setq t0 nil) - (return - (do ((t1 arg (cdr t1)) (x nil)) - ((or (atom t1) (progn (setq x (car t1)) nil)) (nreverse0 t0)) - (seq - (exit - (setq t0 (cons (|transTraceItem| x) t0)))))))) - (|/UNTRACE,0| - (prog (t2) - (setq t2 nil) - (return - (do ((t3 |untraceList|l (cdr t3)) (|funName| nil)) - ((or (atom t3) - (progn (setq |funName| (car t3)) nil)) - (nreverse0 t2)) - (seq - (exit - (setq t2 (cons (|lassocSub| |funName| |$mapSubNameAlist|) t2)))))))) - (|removeTracedMapSigs| |untraceList|)))))) - -@ - -\defun{transTraceItem} -\begin{verbatim} -;transTraceItem x == -; $doNotAddEmptyModeIfTrue: local:=true -; atom x => -; (value:=get(x,"value",$InteractiveFrame)) and -; (objMode value in '((Mode) (Domain) (SubDomain (Domain)))) => -; x := objVal value -; (y:= domainToGenvar x) => y -; x -; UPPER_-CASE_-P (STRINGIMAGE x).(0) => -; y := unabbrev x -; constructor?(y) => y -; PAIRP(y) and constructor?(CAR y) => CAR y -; (y:= domainToGenvar x) => y -; x -; x -; VECP first x => transTraceItem devaluate first x -; y:= domainToGenvar x => y -; throwKeyedMsg("S2IT0018",[x]) -\end{verbatim} - + (let (untracelist) + (declare (special |$lastUntraced| /tracenames |$mapSubNameAlist|)) + (if arg + (setq |$lastUntraced| arg) + (setq |$lastUntraced| (copy /tracenames))) + (setq untracelist + (do ((t1 arg (cdr t1)) (x nil) (t0 nil)) + ((or (atom t1) (progn (setq x (car t1)) nil)) + (nreverse0 t0)) + (push (|transTraceItem| x) t0))) + (|/UNTRACE,0| + (do ((t3 untracelist (cdr t3)) (|funName| nil) (t2 nil)) + ((or (atom t3) (progn (setq |funName| (car t3)) nil)) + (nreverse0 t2)) + (push (|lassocSub| |funName| |$mapSubNameAlist|) t2))) + (|removeTracedMapSigs| untracelist))) + +@ + +\defun{transTraceItem}{transTraceItem} <>= (defun |transTraceItem| (x) (prog (|$doNotAddEmptyModeIfTrue| |value| y) @@ -12291,13 +11662,7 @@ This reports the traced functions @ -\defun{removeTracedMapSigs} -\begin{verbatim} -;removeTracedMapSigs untraceList == -; for name in untraceList repeat -; REMPROP(name,$tracedMapSignatures) -\end{verbatim} - +\defun{removeTracedMapSigs}{removeTracedMapSigs} <>= (defun |removeTracedMapSigs| (|untraceList|) (seq @@ -12309,123 +11674,79 @@ This reports the traced functions @ -\defun{coerceTraceArgs2E} -\begin{verbatim} -;coerceTraceArgs2E(traceName,subName,args) == -; MEMQ(name:= subName,$mathTraceList) => -; SPADSYSNAMEP PNAME name => coerceSpadArgs2E(reverse CDR reverse args) -; [ ["=",name,objValUnwrap coerceInteractive(objNewWrap(arg,type),$OutputForm)] -; for name in '(arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 arg16 arg17 arg18 arg19 ) -; for arg in args for type in CDR LASSOC(subName, -; $tracedMapSignatures)] -; SPADSYSNAMEP PNAME name => reverse CDR reverse args -; args -\end{verbatim} - +\defun{coerceTraceArgs2E}{coerceTraceArgs2E} <>= -(defun |coerceTraceArgs2E| (|traceName| |subName| args) - (prog (|name|) - (return - (seq - (cond - ((memq (setq |name| |subName|) |$mathTraceList|) - (cond - ((spadsysnamep (pname |name|)) - (|coerceSpadArgs2E| (reverse (cdr (reverse args))))) - (t - (prog (t0) - (setq t0 nil) - (return - (do ((t1 '(|arg1| |arg2| |arg3| |arg4| |arg5| |arg6| |arg7| |arg8| - |arg9| |arg10| |arg11| |arg12| |arg13| |arg14| |arg15| - |arg16| |arg17| |arg18| |arg19|) (cdr t1)) - (|name| nil) - (t2 args (cdr t2)) - (arg nil) - (t3 (cdr (lassoc |subName| |$tracedMapSignatures|)) (cdr t3)) - (type nil)) - ((or (atom t1) - (progn (setq |name| (car t1)) nil) - (atom t2) - (progn (setq arg (car t2)) nil) - (atom t3) - (progn (setq type (car t3)) nil)) - (nreverse0 t0)) - (seq - (exit - (setq t0 - (cons - (cons '= - (cons |name| - (cons (|objValUnwrap| - (|coerceInteractive| - (|objNewWrap| arg type) |$OutputForm|)) - nil))) - t0)))))))))) - ((spadsysnamep (pname |name|)) (reverse (cdr (reverse args)))) - (t args)))))) +(defun |coerceTraceArgs2E| (tracename subname args) + (declare (ignore tracename)) + (let (name) + (declare (special |$OutputForm| |$mathTraceList| |$tracedMapSignatures|)) + (cond + ((memq (setq name subname) |$mathTraceList|) + (if (spadsysnamep (pname name)) + (|coerceSpadArgs2E| (reverse (cdr (reverse args)))) + (do ((t1 '(|arg1| |arg2| |arg3| |arg4| |arg5| |arg6| |arg7| |arg8| + |arg9| |arg10| |arg11| |arg12| |arg13| |arg14| |arg15| + |arg16| |arg17| |arg18| |arg19|) (cdr t1)) + (name nil) + (t2 args (cdr t2)) + (arg nil) + (t3 (cdr (lassoc subname |$tracedMapSignatures|)) (cdr t3)) + (type nil) + (t0 nil)) + ((or (atom t1) + (progn (setq name (car t1)) nil) + (atom t2) + (progn (setq arg (car t2)) nil) + (atom t3) + (progn (setq type (car t3)) nil)) + (nreverse0 t0)) + (setq t0 + (cons + (list '= name + (|objValUnwrap| + (|coerceInteractive| + (|objNewWrap| arg type) |$OutputForm|))) t0))))) + ((spadsysnamep (pname name)) (reverse (cdr (reverse args)))) + (t args)))) @ -\defun{coerceSpadArgs2E} -\begin{verbatim} -;coerceSpadArgs2E(args) == -; -- following binding is to prevent forcing calculation of stream elements -; $streamCount:local := 0 -; [ ["=",name,objValUnwrap coerceInteractive(objNewWrap(arg,type),$OutputForm)] -; for name in '(arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 arg16 arg17 arg18 arg19 ) -; for arg in args for type in CDR $tracedSpadModemap] -\end{verbatim} - +\defun{coerceSpadArgs2E}{coerceSpadArgs2E} <>= (defun |coerceSpadArgs2E| (args) - (prog (|$streamCount|) - (declare (special |$streamCount|)) - (return - (seq - (progn - (setq |$streamCount| 0) - (prog (t0) - (setq t0 nil) - (return - (do ((t1 '(|arg1| |arg2| |arg3| |arg4| |arg5| |arg6| |arg7| |arg8| - |arg9| |arg10| |arg11| |arg12| |arg13| |arg14| |arg15| - |arg16| |arg17| |arg18| |arg19|) (cdr t1)) - (name nil) - (t2 args (cdr t2)) - (arg nil) - (t3 (cdr |$tracedSpadModemap|) (cdr t3)) - (type nil)) - ((or (atom t1) - (progn (setq name (car t1)) nil) - (atom t2) - (progn (setq arg (car t2)) nil) - (atom t3) - (progn (setq type (car t3)) nil)) - (nreverse0 t0)) - (seq - (exit - (setq t0 - (cons - (cons '= - (cons name - (cons (|objValUnwrap| - (|coerceInteractive| - (|objNewWrap| arg type) - |$OutputForm|)) nil))) - t0)))))))))))) + (let ((|$streamCount| 0)) + (declare (special |$streamCount| |$OutputForm|)) + (do ((t1 '(|arg1| |arg2| |arg3| |arg4| |arg5| |arg6| |arg7| |arg8| + |arg9| |arg10| |arg11| |arg12| |arg13| |arg14| |arg15| + |arg16| |arg17| |arg18| |arg19|) (cdr t1)) + (name nil) + (t2 args (cdr t2)) + (arg nil) + (t3 (cdr |$tracedSpadModemap|) (cdr t3)) + (type nil) + (t0 nil)) + ((or (atom t1) + (progn (setq name (car t1)) nil) + (atom t2) + (progn (setq arg (car t2)) nil) + (atom t3) + (progn (setq type (car t3)) nil)) + (nreverse0 t0)) + (seq + (exit + (setq t0 + (cons + (cons '= + (cons name + (cons (|objValUnwrap| + (|coerceInteractive| + (|objNewWrap| arg type) + |$OutputForm|)) nil))) + t0))))))) @ -\defun{subTypes} -\begin{verbatim} -;subTypes(mm,sublist) == -; ATOM mm => -; (s:= LASSOC(mm,sublist)) => s -; mm -; [subTypes(m,sublist) for m in mm] -\end{verbatim} - +\defun{subTypes}{subTypes} <>= (defun |subTypes| (|mm| |sublist|) (prog (s) @@ -12446,63 +11767,36 @@ This reports the traced functions @ -\defun{coerceTraceFunValue2E} -\begin{verbatim} -;coerceTraceFunValue2E(traceName,subName,value) == -; MEMQ(name:= subName,$mathTraceList) => -; SPADSYSNAMEP PNAME traceName => coerceSpadFunValue2E(value) -; (u:=LASSOC(subName,$tracedMapSignatures)) => -; objValUnwrap coerceInteractive(objNewWrap(value,CAR u),$OutputForm) -; value -; value -\end{verbatim} - +\defun{coerceTraceFunValue2E}{coerceTraceFunValue2E} <>= -(defun |coerceTraceFunValue2E| (|traceName| |subName| |value|) - (prog (name u) - (return - (cond - ((memq (setq name |subName|) |$mathTraceList|) - (cond - ((spadsysnamep (pname |traceName|)) (|coerceSpadFunValue2E| |value|)) - ((setq u (lassoc |subName| |$tracedMapSignatures|)) - (|objValUnwrap| - (|coerceInteractive| - (|objNewWrap| |value| (CAR u)) - |$OutputForm|))) - (t |value|))) - (t |value|))))) +(defun |coerceTraceFunValue2E| (tracename subname |value|) + (let (name u) + (declare (special |$tracedMapSignatures| |$OutputForm|)) + (if (memq (setq name subname) |$mathTraceList|) + (cond + ((spadsysnamep (pname tracename)) (|coerceSpadFunValue2E| |value|)) + ((setq u (lassoc subname |$tracedMapSignatures|)) + (|objValUnwrap| + (|coerceInteractive| (|objNewWrap| |value| (car u)) |$OutputForm|))) + (t |value|)) + |value|))) @ -\defun{coerceSpadFunValue2E} -\begin{verbatim} -;coerceSpadFunValue2E(value) == -; -- following binding is to prevent forcing calculation of stream elements -; $streamCount:local := 0 -; objValUnwrap coerceInteractive(objNewWrap(value,CAR $tracedSpadModemap), -; $OutputForm) -\end{verbatim} - +\defun{coerceSpadFunValue2E}{coerceSpadFunValue2E} <>= (defun |coerceSpadFunValue2E| (|value|) - (prog (|$streamCount|) - (declare (special |$streamCount|)) - (return - (progn - (setq |$streamCount| 0) - (|objValUnwrap| - (|coerceInteractive| - (|objNewWrap| |value| (CAR |$tracedSpadModemap|)) - |$OutputForm|)))))) + (let (|$streamCount|) + (declare (special |$streamCount| |$tracedSpadModemap| |$OutputForm|)) + (setq |$streamCount| 0) + (|objValUnwrap| + (|coerceInteractive| + (|objNewWrap| |value| (car |$tracedSpadModemap|)) + |$OutputForm|)))) @ -\defun{isListOfIdentifiers} -\begin{verbatim} -;isListOfIdentifiers l == and/[IDENTP x for x in l] -\end{verbatim} - +\defun{isListOfIdentifiers}{isListOfIdentifiers} <>= (defun |isListOfIdentifiers| (arg) (prog () @@ -12519,11 +11813,7 @@ This reports the traced functions @ -\defun{isListOfIdentifiersOrStrings} -\begin{verbatim} -;isListOfIdentifiersOrStrings l == and/[IDENTP x or STRINGP x for x in l] -\end{verbatim} - +\defun{isListOfIdentifiersOrStrings}{isListOfIdentifiersOrStrings} <>= (defun |isListOfIdentifiersOrStrings| (arg) (prog () @@ -12540,17 +11830,7 @@ This reports the traced functions @ -\defun{getMapSubNames} -\begin{verbatim} -;getMapSubNames(l) == -; subs:= nil -; for mapName in l repeat -; lmm:= get(mapName,'localModemap,$InteractiveFrame) => -; subs:= APPEND([ [mapName,:CADR mm] for mm in lmm],subs) -; UNION(subs,getPreviousMapSubNames UNIONQ(_/TRACENAMES, -; $lastUntraced)) -\end{verbatim} - +\defun{getMapSubNames}{getMapSubNames} <>= (defun |getMapSubNames| (arg) (prog (|lmm| |subs|) @@ -12584,18 +11864,7 @@ This reports the traced functions @ -\defun{getPreviousMapSubNames} -\begin{verbatim} -;getPreviousMapSubNames(traceNames) == -; subs:= nil -; for mapName in ASSOCLEFT CAAR $InteractiveFrame repeat -; lmm:= get(mapName,'localModemap,$InteractiveFrame) => -; MEMQ(CADAR lmm,traceNames) => -; for mm in lmm repeat -; subs:= [ [mapName,:CADR mm],:subs] -; subs -\end{verbatim} - +\defun{getPreviousMapSubNames}{getPreviousMapSubNames} <>= (defun |getPreviousMapSubNames| (|traceNames|) (prog (|lmm| |subs|) @@ -12626,13 +11895,7 @@ This reports the traced functions @ -\defun{lassocSub} -\begin{verbatim} -;lassocSub(x,subs) == -; y:= LASSQ(x,subs) => y -; x -\end{verbatim} - +\defun{lassocSub}{lassocSub} <>= (defun |lassocSub| (x |subs|) (prog (y) @@ -12643,13 +11906,7 @@ This reports the traced functions @ -\defun{rassocSub} -\begin{verbatim} -;rassocSub(x,subs) == -; y:= RASSOC(x,subs) => y -; x -\end{verbatim} - +\defun{rassocSub}{rassocSub} <>= (defun |rassocSub| (x |subs|) (prog (y) @@ -12660,13 +11917,7 @@ This reports the traced functions @ -\defun{isUncompiledMap} -\begin{verbatim} -;isUncompiledMap(x) == -; y:= get(x,'value,$InteractiveFrame) => -; (CAAR y) = 'MAP and null get(x,'localModemap,$InteractiveFrame) -\end{verbatim} - +\defun{isUncompiledMap}{isUncompiledMap} <>= (defun |isUncompiledMap| (x) (prog (y) @@ -12681,13 +11932,7 @@ This reports the traced functions @ -\defun{isInterpOnlyMap} -\begin{verbatim} -;isInterpOnlyMap(map) == -; x:= get(map,'localModemap,$InteractiveFrame) => -; (CAAAR x) = 'interpOnly -\end{verbatim} - +\defun{isInterpOnlyMap}{isInterpOnlyMap} <>= (defun |isInterpOnlyMap| (map) (prog (x) @@ -12700,82 +11945,47 @@ This reports the traced functions @ -\defun{augmentTraceNames} -\begin{verbatim} -;augmentTraceNames(l,mapSubNames) == -; res:= nil -; for traceName in l repeat -; mml:= get(traceName,'localModemap,$InteractiveFrame) => -; res:= APPEND([CADR mm for mm in mml],res) -; res:= [traceName,:res] -; res -\end{verbatim} - +\defun{augmentTraceNames}{augmentTraceNames} <>= -(defun |augmentTraceNames| (arg |mapSubNames|) - (prog (|mml| |res|) - (return - (seq - (progn - (setq |res| nil) - (do ((t0 arg (cdr t0)) (|traceName| nil)) - ((or (atom t0) (progn (setq |traceName| (car t0)) nil)) nil) - (seq - (exit - (cond - ((setq |mml| - (|get| |traceName| '|localModemap| |$InteractiveFrame|)) - (setq |res| - (append - (prog (t1) - (setq t1 nil) - (return - (do ((t2 |mml| (cdr t2)) (|mm| nil)) - ((or (atom t2) - (progn (setq |mm| (CAR t2)) nil)) - (nreverse0 t1)) - (seq - (exit - (setq t1 (cons (cadr |mm|) t1))))))) - |res|))) - (t (setq |res| (cons |traceName| |res|))))))) - |res|))))) -@ +(defun |augmentTraceNames| (arg) + (let (mml res) + (declare (special |$InteractiveFrame|)) + (dolist (tracename arg) + (if (setq mml (|get| tracename '|localModemap| |$InteractiveFrame|)) + (setq res + (append + (prog (t1) + (setq t1 nil) + (return + (do ((t2 mml (cdr t2)) (|mm| nil)) + ((or (atom t2) + (progn (setq |mm| (CAR t2)) nil)) + (nreverse0 t1)) + (setq t1 (cons (cadr |mm|) t1))))) + res)) + (setq res (cons tracename res)))) + res)) -\defun{isSubForRedundantMapName} -\begin{verbatim} -;isSubForRedundantMapName(subName) == -; mapName:= rassocSub(subName,$mapSubNameAlist) => -; tail:=MEMBER([mapName,:subName],$mapSubNameAlist) => -; MEMQ(mapName,CDR ASSOCLEFT tail) -\end{verbatim} +@ +\defun{isSubForRedundantMapName}{isSubForRedundantMapName} <>= -(defun |isSubForRedundantMapName| (|subName|) +(defun |isSubForRedundantMapName| (subname) (prog (|mapName| |tail|) (return (seq (cond - ((setq |mapName| (|rassocSub| |subName| |$mapSubNameAlist|)) + ((setq |mapName| (|rassocSub| subname |$mapSubNameAlist|)) (exit (cond ((setq |tail| - (|member| (cons |mapName| |subName|) |$mapSubNameAlist|)) + (|member| (cons |mapName| subname) |$mapSubNameAlist|)) (exit (memq |mapName| (cdr (assocleft |tail|))))))))))))) @ -\defun{untraceMapSubNames} -\begin{verbatim} -;untraceMapSubNames traceNames == -; null($mapSubNameAlist:local:= getPreviousMapSubNames traceNames) => nil -; for name in (subs:= ASSOCRIGHT $mapSubNameAlist) -; | MEMQ(name,_/TRACENAMES) repeat -; _/UNTRACE_,2(name,nil) -; $lastUntraced:= SETDIFFERENCE($lastUntraced,subs) -\end{verbatim} - +\defun{untraceMapSubNames}{untraceMapSubNames} <>= (defun |untraceMapSubNames| (|traceNames|) (prog (|$mapSubNameAlist| |subs|) @@ -12802,12 +12012,6 @@ This reports the traced functions @ \defmacro{funfind} -\begin{verbatim} -;funfind("functor","opname") == -; ops:= isFunctor functor -; [u for u in ops | u is [[ =opname,:.],:.]] -\end{verbatim} - <>= (defun |funfind,LAM| (functor opname) (prog (ops tmp1) @@ -12839,12 +12043,7 @@ This reports the traced functions @ -\defun{isDomainOrPackage} -\begin{verbatim} -;isDomainOrPackage dom == -; REFVECP dom and #dom>0 and isFunctor opOf dom.(0) -\end{verbatim} - +\defun{isDomainOrPackage}{isDomainOrPackage} <>= (defun |isDomainOrPackage| (dom) (and @@ -12854,78 +12053,14 @@ This reports the traced functions @ -\defun{isTraceGensym} +\defun{isTraceGensym}{isTraceGensym} <>= (defun |isTraceGensym| (x) (gensymp x)) @ -\defun{spadTrace} -\begin{verbatim} -;spadTrace(domain,options) == -; $fromSpadTrace:= true -; $tracedModemap:local:= nil -; PAIRP domain and REFVECP CAR domain and (CAR domain).0 = 0 => -; aldorTrace(domain,options) -; not isDomainOrPackage domain => userError '"bad argument to trace" -; listOfOperations:= -; [g x for x in getOption("OPS",options)] where -; g x == -; STRINGP x => INTERN x -; x -; if listOfVariables := getOption("VARS",options) then -; options := removeOption("VARS",options) -; if listOfBreakVars := getOption("VARBREAK",options) then -; options := removeOption("VARBREAK",options) -; anyifTrue:= null listOfOperations -; domainId:= opOf domain.(0) -; currentEntry:= ASSOC(domain,_/TRACENAMES) -; currentAlist:= KDR currentEntry -; opStructureList:= flattenOperationAlist getOperationAlistFromLisplib domainId -; sigSlotNumberAlist:= -; [triple -; --new form is ( ) -; for [op,sig,n,.,kind] in opStructureList | kind = 'ELT -; and (anyifTrue or MEMQ(op,listOfOperations)) and -; FIXP n and -; isTraceable(triple:= [op,sig,n],domain)] where -; isTraceable(x is [.,.,n,:.],domain) == -; atom domain.n => nil -; functionSlot:= first domain.n -; GENSYMP functionSlot => -; (reportSpadTrace("Already Traced",x); nil) -; null (BPINAME functionSlot) => -; (reportSpadTrace("No function for",x); nil) -; true -; if listOfVariables then -; for [.,.,n] in sigSlotNumberAlist repeat -; fn := first domain.n -; $letAssoc := AS_-INSERT(BPINAME fn, -; listOfVariables,$letAssoc) -; if listOfBreakVars then -; for [.,.,n] in sigSlotNumberAlist repeat -; fn := first domain.n -; $letAssoc := AS_-INSERT(BPINAME fn, -; [["BREAK",:listOfBreakVars]],$letAssoc) -; for (pair:= [op,mm,n]) in sigSlotNumberAlist repeat -; alias:= spadTraceAlias(domainId,op,n) -; $tracedModemap:= subTypes(mm,constructSubst(domain.0)) -; traceName:= BPITRACE(first domain.n,alias, options) -; NCONC(pair,[listOfVariables,first domain.n,traceName,alias]) -; RPLAC(first domain.n,traceName) -; sigSlotNumberAlist:= [x for x in sigSlotNumberAlist | CDDDR x] -; if $reportSpadTrace then -; if $traceNoisely then printDashedLine() -; for x in orderBySlotNumber sigSlotNumberAlist repeat -; reportSpadTrace("TRACING",x) -; if $letAssoc then SETLETPRINTFLAG true -; currentEntry => -; RPLAC(rest currentEntry,[:sigSlotNumberAlist,:currentAlist]) -; SETQ(_/TRACENAMES,[ [domain,:sigSlotNumberAlist],:_/TRACENAMES]) -; spadReply() -\end{verbatim} - +\defun{spadTrace,g}{spadTrace,g} <>= (defun |spadTrace,g| (x) (seq @@ -12934,6 +12069,7 @@ This reports the traced functions @ +\defun{spadTrace,isTraceable}{spadTrace,isTraceable} <>= (defun |spadTrace,isTraceable| (x |domain|) (prog (|n| |functionSlot|) @@ -12956,12 +12092,13 @@ This reports the traced functions @ +\defun{spadTrace}{spadTrace} <>= (defun |spadTrace| (|domain| |options|) (prog (|$tracedModemap| |listOfOperations| |listOfVariables| |listOfBreakVars| |anyifTrue| |domainId| |currentEntry| - |currentAlist| |opStructureList| |sig| |kind| |triple| |fn| |op| - |mm| |n| |alias| |traceName| |sigSlotNumberAlist|) + |currentAlist| |opStructureList| |sig| |kind| |triple| fn |op| + |mm| |n| |alias| tracename |sigSlotNumberAlist|) (declare (special |$tracedModemap|)) (return (seq @@ -13032,9 +12169,9 @@ This reports the traced functions (seq (exit (progn - (setq |fn| (car (elt |domain| |n|))) + (setq fn (car (elt |domain| |n|))) (setq |$letAssoc| - (as-insert (bpiname |fn|) |listOfVariables| |$letAssoc|)))))))) + (as-insert (bpiname fn) |listOfVariables| |$letAssoc|)))))))) (cond (|listOfBreakVars| (do ((t7 |sigSlotNumberAlist| (cdr t7)) (t8 nil)) @@ -13045,9 +12182,9 @@ This reports the traced functions (seq (exit (progn - (setq |fn| (car (elt |domain| |n|))) + (setq fn (car (elt |domain| |n|))) (setq |$letAssoc| - (as-insert (bpiname |fn|) + (as-insert (bpiname fn) (cons (cons 'break |listOfBreakVars|) nil) |$letAssoc|)))))))) (do ((t9 |sigSlotNumberAlist| (cdr t9)) (|pair| nil)) ((or (atom t9) @@ -13066,13 +12203,13 @@ This reports the traced functions (setq |alias| (|spadTraceAlias| |domainId| |op| |n|)) (setq |$tracedModemap| (|subTypes| |mm| (|constructSubst| (elt |domain| 0)))) - (setq |traceName| + (setq tracename (bpitrace (car (elt |domain| |n|)) |alias| |options|)) (nconc |pair| (cons |listOfVariables| (cons (car (elt |domain| |n|)) - (cons |traceName| (cons |alias| nil))))) - (rplac (car (elt |domain| |n|)) |traceName|))))) + (cons tracename (cons |alias| nil))))) + (rplac (car (elt |domain| |n|)) tracename))))) (setq |sigSlotNumberAlist| (prog (t10) (setq t10 nil) @@ -13103,110 +12240,23 @@ This reports the traced functions @ -\defun{traceDomainLocalOps} -\begin{verbatim} -;traceDomainLocalOps(dom,lops,options) == -; sayMSG ['" ",'"The )local option has been withdrawn"] -; sayMSG ['" ",'"Use )ltr to trace local functions."] -; NIL -\end{verbatim} - +\defun{traceDomainLocalOps}{traceDomainLocalOps} <>= -(defun |traceDomainLocalOps| (|dom| |lops| |options|) - (progn - (|sayMSG| (cons " " (cons "The )local option has been withdrawn" nil))) - (|sayMSG| (cons " " (cons "Use )ltr to trace local functions." nil))) - nil)) +(defun |traceDomainLocalOps| () + (|sayMSG| '(" The )local option has been withdrawn")) + (|sayMSG| '(" Use )ltr to trace local functions."))) @ -\defun{untraceDomainLocalOps} -\begin{verbatim} -;-- abb := abbreviate dom -;-- loadLibIfNotLoaded abb -;-- actualLops := getLocalOpsFromLisplib abb -;-- null actualLops => -;-- sayMSG ['" ",:bright abb,'"has no local functions to trace."] -;-- lops = 'all => _/TRACE_,1(actualLops,options) -;-- l := NIL -;-- for lop in lops repeat -;-- internalName := INTERN STRCONC(PNAME abb,'";",PNAME lop) -;-- not MEMQ(internalName,actualLops) => -;-- sayMSG ['" ",:bright abb,'"does not have a local", -;-- '" function called",:bright lop] -;-- l := cons(internalName,l) -;-- l => _/TRACE_,1(l,options) -;-- nil -;untraceDomainLocalOps(dom,lops) == -; sayMSG ['" ",:bright abb,'"has no local functions to untrace."] -; NIL -\end{verbatim} - +\defun{untraceDomainLocalOps}{untraceDomainLocalOps} <>= -(defun |untraceDomainLocalOps| (|dom| |lops|) - (progn - (|sayMSG| - (cons " " - (append (|bright| |abb|) (cons "has no local functions to untrace." nil)))) - nil)) +(defun |untraceDomainLocalOps| () + (|sayMSG| '(" The )local option has been withdrawn")) + (|sayMSG| '(" Use )ltr to trace local functions."))) @ -\defun{untraceAllDomainLocalOps} -\begin{verbatim} -;-- lops = "all" => untraceAllDomainLocalOps(dom) -;-- abb := abbreviate dom -;-- loadLibIfNotLoaded abb -;-- actualLops := getLocalOpsFromLisplib abb -;-- null actualLops => -;-- sayMSG ['" ",:bright abb,'"has no local functions to untrace."] -;-- l := NIL -;-- for lop in lops repeat -;-- internalName := INTERN STRCONC(PNAME abb,'";",PNAME lop) -;-- not MEMQ(internalName,actualLops) => -;-- sayMSG ['" ",:bright abb,'"does not have a local", -;-- '" function called",:bright lop] -;-- l := cons(internalName,l) -;-- l => untrace l -;-- nil -;untraceAllDomainLocalOps(dom) == NIL -\end{verbatim} - -<>= -(defun |untraceAllDomainLocalOps| (|dom|) nil) - -@ - -\defun{traceDomainConstructor} -\begin{verbatim} -;-- abb := abbreviate dom -;-- actualLops := getLocalOpsFromLisplib abb -;-- null (l := INTERSECTION(actualLops,_/TRACENAMES)) => NIL -;-- _/UNTRACE_,1(l,NIL) -;-- NIL -;traceDomainConstructor(domainConstructor,options) == -; -- Trace all domains built with the given domain constructor, -; -- including all presently instantiated domains, and all future -; -- instantiations, while domain constructor is traced. -; loadFunctor domainConstructor -; listOfLocalOps := getOption("LOCAL",options) -; if listOfLocalOps then -; traceDomainLocalOps(domainConstructor,listOfLocalOps, -; [opt for opt in options | opt isnt ['LOCAL,:.]]) -; listOfLocalOps and not getOption("OPS",options) => NIL -; for [argl,.,:domain] in HGET($ConstructorCache,domainConstructor) -; repeat spadTrace(domain,options) -; SETQ(_/TRACENAMES,[domainConstructor,:_/TRACENAMES]) -; innerDomainConstructor := INTERN STRCONC(domainConstructor,'";") -; if FBOUNDP innerDomainConstructor then domainConstructor := innerDomainConstructor -; EMBED(domainConstructor, -; ['LAMBDA, ['_&REST, 'args], -; ['PROG, ['domain], -; ['SETQ,'domain,['APPLY,domainConstructor,'args]], -; ['spadTrace,'domain,MKQ options], -; ['RETURN,'domain]]] ) -\end{verbatim} - +\defun{traceDomainConstructor}{traceDomainConstructor} <>= (defun |traceDomainConstructor| (|domainConstructor| |options|) (prog (|listOfLocalOps| |argl| |domain| |innerDomainConstructor|) @@ -13215,19 +12265,7 @@ This reports the traced functions (progn (|loadFunctor| |domainConstructor|) (setq |listOfLocalOps| (|getOption| 'local |options|)) - (cond - (|listOfLocalOps| - (|traceDomainLocalOps| |domainConstructor| |listOfLocalOps| - (prog (t0) - (setq t0 nil) - (return - (do ((t1 |options| (cdr t1)) (opt nil)) - ((or (atom t1) (progn (setq opt (car t1)) nil)) (nreverse0 t0)) - (seq - (exit - (cond - ((null (and (pairp opt) (eq (qcar opt) 'local))) - (setq t0 (cons opt t0)))))))))))) + (when |listOfLocalOps| (|traceDomainLocalOps|)) (cond ((and |listOfLocalOps| (null (|getOption| 'ops |options|))) nil) (t @@ -13274,25 +12312,7 @@ This reports the traced functions @ -\defun{untraceDomainConstructor} -\begin{verbatim} -;untraceDomainConstructor domainConstructor == -; --untrace all the domains in domainConstructor, and unembed it -; SETQ(_/TRACENAMES, -; [df for df in _/TRACENAMES | keepTraced?(df, domainConstructor)]) where -; keepTraced?(df, domainConstructor) == -; (df is [dc,:.]) and (isDomainOrPackage dc) and -; ((KAR devaluate dc) = domainConstructor) => -; _/UNTRACE_,0 [dc] -; false -; true -; untraceAllDomainLocalOps domainConstructor -; innerDomainConstructor := INTERN STRCONC(domainConstructor,'";") -; if FBOUNDP innerDomainConstructor then UNEMBED innerDomainConstructor -; else UNEMBED domainConstructor -; SETQ(_/TRACENAMES,DELETE(domainConstructor,_/TRACENAMES)) -\end{verbatim} - +\defun{untraceDomainConstructor}{untraceDomainConstructor} <>= (defun |untraceDomainConstructor,keepTraced?| (|df| |domainConstructor|) (prog (|dc|) @@ -13325,7 +12345,6 @@ This reports the traced functions (cond ((|untraceDomainConstructor,keepTraced?| |df| |domainConstructor|) (setq t0 (cons |df| t0)))))))))) - (|untraceAllDomainLocalOps| |domainConstructor|) (setq |innerDomainConstructor| (intern (strconc |domainConstructor| ";"))) (cond @@ -13335,15 +12354,7 @@ This reports the traced functions @ -\defun{flattenOperationAlist} -\begin{verbatim} -;flattenOperationAlist(opAlist) == -; res:= nil -; for [op,:mmList] in opAlist repeat -; res:=[:res,:[[op,:mm] for mm in mmList]] -; res -\end{verbatim} - +\defun{flattenOperationAlist}{flattenOperationAlist} <>= (defun |flattenOperationAlist| (|opAlist|) (prog (|op| |mmList| |res|) @@ -13375,14 +12386,7 @@ This reports the traced functions @ -\defun{mapLetPrint} -\begin{verbatim} -;mapLetPrint(x,val,currentFunction) == -; x:= getAliasIfTracedMapParameter(x,currentFunction) -; currentFunction:= getBpiNameIfTracedMap currentFunction -; letPrint(x,val,currentFunction) -\end{verbatim} - +\defun{mapLetPrint}{mapLetPrint} <>= (defun |mapLetPrint| (x val currentFunction) (setq x (|getAliasIfTracedMapParameter| x currentFunction)) @@ -13391,26 +12395,7 @@ This reports the traced functions @ -\defun{letPrint} -\begin{verbatim} -;-- This is the version for use when we have no idea -;-- what print representation to use for the data object -;letPrint(x,val,currentFunction) == -; if $letAssoc and -; ((y:= LASSOC(currentFunction,$letAssoc)) or (y:= LASSOC("all",$letAssoc))) then -; if (y="all" or MEMQ(x,y)) and -; not (IS__GENVAR(x) or isSharpVarWithNum(x) or GENSYMP x) then -; sayBrightlyNT [:bright x,": "] -; PRIN0 shortenForPrinting val -; TERPRI() -; if (y:= hasPair("BREAK",y)) and -; (y="all" or MEMQ(x,y) and -; (not MEMQ((PNAME x).(0),'($ _#)) and not GENSYMP x)) then -; break [:bright currentFunction,'"breaks after",:bright x,'":= ", -; shortenForPrinting val] -; val -\end{verbatim} - +\defun{letPrint}{letPrint} <>= (defun |letPrint| (x |val| |currentFunction|) (prog (y) @@ -13446,28 +12431,7 @@ This reports the traced functions @ -\defun{letPrint2} -\begin{verbatim} -;-- This is the version for use when we have already -;-- converted the data into type "Expression" -;letPrint2(x,printform,currentFunction) == -; $BreakMode:local := nil -; if $letAssoc and -; ((y:= LASSOC(currentFunction,$letAssoc)) or (y:= LASSOC("all",$letAssoc))) then -; if (y="all" or MEMQ(x,y)) and -; not (IS__GENVAR(x) or isSharpVarWithNum(x) or GENSYMP x) then -; $BreakMode:='letPrint2 -; flag:=nil -; CATCH('letPrint2,mathprint ["=",x,printform],flag) -; if flag='letPrint2 then print printform -; if (y:= hasPair("BREAK",y)) and -; (y="all" or MEMQ(x,y) and -; (not MEMQ((PNAME x).(0),'($ _#)) and not GENSYMP x)) then -; break [:bright currentFunction,'"breaks after",:bright x,":= ", -; printform] -; x -\end{verbatim} - +\defun{letPrint2}{letPrint2} <>= (defun |letPrint2| (x |printform| |currentFunction|) (prog (|$BreakMode| |flag| y) @@ -13508,28 +12472,9 @@ This reports the traced functions @ -\defun{letPrint3} -\begin{verbatim} -;-- This is the version for use when we have our hands on a function -;-- to convert the data into type "Expression" -;letPrint3(x,xval,printfn,currentFunction) == -; $BreakMode:local := nil -; if $letAssoc and -; ((y:= LASSOC(currentFunction,$letAssoc)) or (y:= LASSOC("all",$letAssoc))) then -; if (y="all" or MEMQ(x,y)) and -; not (IS__GENVAR(x) or isSharpVarWithNum(x) or GENSYMP x) then -; $BreakMode:='letPrint2 -; flag:=nil -; CATCH('letPrint2,mathprint ["=",x,SPADCALL(xval,printfn)],flag) -; if flag='letPrint2 then print xval -; if (y:= hasPair("BREAK",y)) and -; (y="all" or MEMQ(x,y) and -; (not MEMQ((PNAME x).(0),'($ _#)) and not GENSYMP x)) then -; break [:bright currentFunction,'"breaks after",:bright x,'":= ", -; xval] -; x -\end{verbatim} - +\defun{letPrint3}{letPrint3} +This is the version for use when we have our hands on a function +to convert the data into type "Expression" <>= (defun |letPrint3| (x |xval| |printfn| |currentFunction|) (prog (|$BreakMode| |flag| y) @@ -13572,15 +12517,7 @@ This reports the traced functions x)))) @ -\defun{getAliasIfTracedMapParameter} -\begin{verbatim} -;getAliasIfTracedMapParameter(x,currentFunction) == -; isSharpVarWithNum x => -; aliasList:= get(currentFunction,'alias,$InteractiveFrame) => -; aliasList.(STRING2PINT_-N(SUBSTRING(PNAME x,1,NIL),1)-1) -; x -\end{verbatim} - +\defun{getAliasIfTracedMapParameter}{getAliasIfTracedMapParameter} <>= (defun |getAliasIfTracedMapParameter| (x |currentFunction|) (prog (|aliasList|) @@ -13599,14 +12536,7 @@ This reports the traced functions @ -\defun{getBpiNameIfTracedMap} -\begin{verbatim} -;getBpiNameIfTracedMap(name) == -; lmm:= get(name,'localModemap,$InteractiveFrame) => -; MEMQ(bpiName:= CADAR lmm,_/TRACENAMES) => bpiName -; name -\end{verbatim} - +\defun{getBpiNameIfTracedMap}{getBpiNameIfTracedMap} <>= (defun |getBpiNameIfTracedMap| (name) (prog (|lmm| |bpiName|) @@ -13621,14 +12551,7 @@ This reports the traced functions @ -\defun{hasPair} -\begin{verbatim} -;hasPair(key,l) == -; atom l => nil -; l is [ [ =key,:a],:.] => a -; hasPair(key,rest l) -\end{verbatim} - +\defun{hasPair}{hasPair} <>= (defun |hasPair| (key arg) (prog (tmp1 a) @@ -13646,13 +12569,7 @@ This reports the traced functions @ -\defun{shortenForPrinting} -\begin{verbatim} -;shortenForPrinting val == -; isDomainOrPackage val => devaluate val -; val -\end{verbatim} - +\defun{shortenForPrinting}{shortenForPrinting} <>= (defun |shortenForPrinting| (|val|) (if (|isDomainOrPackage| |val|) @@ -13661,24 +12578,14 @@ This reports the traced functions @ -\defun{spadTraceAlias} -\begin{verbatim} -;spadTraceAlias(domainId,op,n) == -; INTERNL(domainId,".",op,",",STRINGIMAGE n) -\end{verbatim} - +\defun{spadTraceAlias}{spadTraceAlias} <>= (defun |spadTraceAlias| (|domainId| |op| |n|) (internl |domainId| (intern "." "boot") |op| '|,| (stringimage |n|))) @ -\defun{getOption} -\begin{verbatim} -;getOption(opt,l) == -; y:= ASSOC(opt,l) => rest y -\end{verbatim} - +\defun{getOption}{getOption} <>= (defun |getOption| (opt l) (prog (y) @@ -13688,19 +12595,7 @@ This reports the traced functions @ -\defun{reportSpadTrace} -\begin{verbatim} -;reportSpadTrace(header,[op,sig,n,:t]) == -; null $traceNoisely => nil -; msg:= [header,'%b,op,":",'%d,rest sig," -> ",first sig," in slot ",n] -; namePart:= nil --(t is (.,.,name,:.) => (" named ",name); NIL) -; tracePart:= -; t is [y,:.] and not null y => -; (y="all" => ['%b,"all",'%d,"vars"]; [" vars: ",y]) -; NIL -; sayBrightly [:msg,:namePart,:tracePart] -\end{verbatim} - +\defun{reportSpadTrace}{reportSpadTrace} <>= (defun |reportSpadTrace| (|header| t0) (prog (|op| |sig| |n| |t| |msg| |namePart| y |tracePart|) @@ -13737,12 +12632,7 @@ This reports the traced functions @ -\defun{orderBySlotNumber} -\begin{verbatim} -;orderBySlotNumber l == -; ASSOCRIGHT orderList [ [n,:x] for (x:= [.,.,n,:.]) in l] -\end{verbatim} - +\defun{orderBySlotNumber}{orderBySlotNumber} <>= (defun |orderBySlotNumber| (arg) (prog (|n|) @@ -13764,20 +12654,11 @@ This reports the traced functions @ -\defun{/tracereply} -\begin{verbatim} -;_/TRACEREPLY() == -; null _/TRACENAMES => MAKESTRING '" Nothing is traced." -; for x in _/TRACENAMES repeat -; x is [d,:.] and isDomainOrPackage d => -; domainList:= [devaluate d,:domainList] -; functionList:= [x,:functionList] -; [:functionList,:domainList,"traced"] -\end{verbatim} - +\defun{/tracereply}{/tracereply} <>= (defun /tracereply () - (prog (|d| |domainList| |functionList|) + (prog (|d| domainlist |functionList|) + (declare (special /tracenames)) (return (seq (cond @@ -13791,23 +12672,15 @@ This reports the traced functions ((and (pairp x) (progn (setq |d| (qcar x)) t) (|isDomainOrPackage| |d|)) - (setq |domainList| (cons (|devaluate| |d|) |domainList|))) + (setq domainlist (cons (|devaluate| |d|) domainlist))) (t (setq |functionList| (cons x |functionList|))))))) (append |functionList| - (append |domainList| (cons '|traced| nil))))))))) + (append domainlist (cons '|traced| nil))))))))) @ -\defun{spadReply} -\begin{verbatim} -;spadReply() == -; [printName x for x in _/TRACENAMES] where -; printName x == -; x is [d,:.] and isDomainOrPackage d => devaluate d -; x -\end{verbatim} - +\defun{spadReply}{spadReply} <>= (defun |spadReply,printName| (x) (prog (|d|) @@ -13836,35 +12709,11 @@ This reports the traced functions @ -\defun{spadUntrace} -\begin{verbatim} -;spadUntrace(domain,options) == -; not isDomainOrPackage domain => userError '"bad argument to untrace" -; anyifTrue:= null options -; listOfOperations:= getOption("ops:",options) -; domainId := devaluate domain -; null (pair:= ASSOC(domain,_/TRACENAMES)) => -; sayMSG ['" No functions in", -; :bright prefix2String domainId,'"are now traced."] -; sigSlotNumberAlist:= rest pair -; for (pair:= [op,sig,n,lv,bpiPointer,traceName,alias]) in sigSlotNumberAlist | -; anyifTrue or MEMQ(op,listOfOperations) repeat -; BPIUNTRACE(traceName,alias) -; RPLAC(first domain.n,bpiPointer) -; RPLAC(CDDDR pair,nil) -; if assocPair:=ASSOC(BPINAME bpiPointer,$letAssoc) then -; $letAssoc := REMOVER($letAssoc,assocPair) -; if null $letAssoc then SETLETPRINTFLAG nil -; newSigSlotNumberAlist:= [x for x in sigSlotNumberAlist | CDDDR x] -; newSigSlotNumberAlist => RPLAC(rest pair,newSigSlotNumberAlist) -; SETQ(_/TRACENAMES,DELASC(domain,_/TRACENAMES)) -; spadReply() -\end{verbatim} - +\defun{spadUntrace}{spadUntrace} <>= (defun |spadUntrace| (|domain| |options|) (prog (|anyifTrue| |listOfOperations| |domainId| |pair| |sigSlotNumberAlist| - |op| |sig| |n| |lv| |bpiPointer| |traceName| |alias| |assocPair| + |op| |sig| |n| |lv| |bpiPointer| tracename |alias| |assocPair| |newSigSlotNumberAlist|) (return (seq @@ -13894,7 +12743,7 @@ This reports the traced functions (setq |n| (caddr |pair|)) (setq |lv| (cadddr |pair|)) (setq |bpiPointer| (car (cddddr |pair|))) - (setq |traceName| (cadr (cddddr |pair|))) + (setq tracename (cadr (cddddr |pair|))) (setq |alias| (caddr (cddddr |pair|))) |pair|) nil)) @@ -13904,7 +12753,7 @@ This reports the traced functions (cond ((or |anyifTrue| (memq |op| |listOfOperations|)) (progn - (bpiuntrace |traceName| |alias|) + (bpiuntrace tracename |alias|) (rplac (car (elt |domain| |n|)) |bpiPointer|) (rplac (cdddr |pair|) nil) (cond @@ -13932,15 +12781,7 @@ This reports the traced functions (|spadReply|))))))))))) @ -\defun{prTraceNames} -\begin{verbatim} -;prTraceNames() == -; (for x in _/TRACENAMES repeat PRINT fn x; nil) where -; fn x == -; x is [d,:t] and isDomainOrPackage d => [devaluate d,:t] -; x -\end{verbatim} - +\defun{prTraceNames,fn}{prTraceNames,fn} <>= (defun |prTraceNames,fn| (x) (prog (|d| |t|) @@ -13954,6 +12795,7 @@ This reports the traced functions @ +\defun{prTraceNames}{prTraceNames} <>= (defun |prTraceNames| () (seq @@ -13966,51 +12808,7 @@ This reports the traced functions @ -\defun{traceReply} -\begin{verbatim} -;traceReply() == -; $domains: local:= nil -; $packages: local:= nil -; $constructors: local:= nil -; null _/TRACENAMES => -; sayMessage '" Nothing is traced now." -; sayBrightly '" " -; for x in _/TRACENAMES repeat -; x is [d,:.] and (isDomainOrPackage d) => addTraceItem d -; atom x => -; isFunctor x => addTraceItem x -; (IS__GENVAR x => -; addTraceItem EVAL x; functionList:= [x,:functionList]) -; userError '"bad argument to trace" -; functionList:= "append"/[ [rassocSub(x,$mapSubNameAlist),'" "] -; for x in functionList | ^isSubForRedundantMapName x] -; if functionList then -; 2 = #functionList => -; sayMSG [" Function traced: ",:functionList] -; (22 + sayBrightlyLength functionList) <= $LINELENGTH => -; sayMSG [" Functions traced: ",:functionList] -; sayBrightly " Functions traced:" -; sayBrightly flowSegmentedMsg(functionList,$LINELENGTH,6) -; if $domains then -; displayList:= concat(prefix2String first $domains, -; [:concat('",",'" ",prefix2String x) for x in rest $domains]) -; if atom displayList then displayList:= [displayList] -; sayBrightly '" Domains traced: " -; sayBrightly flowSegmentedMsg(displayList,$LINELENGTH,6) -; if $packages then -; displayList:= concat(prefix2String first $packages, -; [:concat(", ",prefix2String x) for x in rest $packages]) -; if atom displayList then displayList:= [displayList] -; sayBrightly '" Packages traced: " -; sayBrightly flowSegmentedMsg(displayList,$LINELENGTH,6) -; if $constructors then -; displayList:= concat(abbreviate first $constructors, -; [:concat(", ",abbreviate x) for x in rest $constructors]) -; if atom displayList then displayList:= [displayList] -; sayBrightly '" Parameterized constructors traced:" -; sayBrightly flowSegmentedMsg(displayList,$LINELENGTH,6) -\end{verbatim} - +\defun{traceReply}{traceReply} <>= (defun |traceReply| () (prog (|$domains| |$packages| |$constructors| |d| |functionList| @@ -14124,16 +12922,10 @@ This reports the traced functions @ -\defun{addTraceItem} -\begin{verbatim} -;addTraceItem d == -; constructor? d => $constructors:=[d,:$constructors] -; isDomain d => $domains:= [devaluate d,:$domains] -; isDomainOrPackage d => $packages:= [devaluate d,:$packages] -\end{verbatim} - +\defun{addTraceItem}{addTraceItem} <>= (defun |addTraceItem| (|d|) + (declare (special |$constructors| |$domains| |$packages|)) (cond ((|constructor?| |d|) (setq |$constructors| (cons |d| |$constructors|))) @@ -14144,171 +12936,93 @@ This reports the traced functions @ -\defun{?t} -\begin{verbatim} -;_?t() == -; null _/TRACENAMES => sayMSG bright '"nothing is traced" -; for x in _/TRACENAMES | atom x and not IS__GENVAR x repeat -; if llm:= get(x,'localModemap,$InteractiveFrame) then -; x:= (LIST (CADAR llm)) -; sayMSG ['"Function",:bright rassocSub(x,$mapSubNameAlist),'"traced"] -; for x in _/TRACENAMES | x is [d,:l] and isDomainOrPackage d repeat -; suffix:= -; isDomain d => '"domain" -; '"package" -; sayBrightly ['" Functions traced in ",suffix,'%b,devaluate d,'%d,":"] -; for x in orderBySlotNumber l repeat reportSpadTrace(" ",take(4,x)) -; TERPRI() -\end{verbatim} - +\defun{?t}{?t} <>= (defun |?t| () - (prog (|llm| x |d| l |suffix|) - (return - (seq - (cond - ((null /tracenames) (|sayMSG| (|bright| "nothing is traced"))) - (t - (do ((t0 /tracenames (cdr t0)) (x nil)) - ((or (atom t0) (progn (setq x (car t0)) nil)) nil) - (seq - (exit - (cond - ((and (atom x) (null (is_genvar x))) - (progn - (cond - ((setq |llm| (|get| x '|localModemap| |$InteractiveFrame|)) - (setq x (list (cadar |llm|))))) - (|sayMSG| - (cons "Function" - (append - (|bright| (|rassocSub| x |$mapSubNameAlist|)) - (cons "traced" nil)))))))))) - (do ((t1 /tracenames (cdr t1)) (x nil)) - ((or (atom t1) (progn (setq x (car t1)) nil)) nil) - (seq - (exit - (cond - ((and (pairp x) - (progn (setq |d| (qcar x)) (setq l (qcdr x)) t) - (|isDomainOrPackage| |d|)) - (progn - (setq |suffix| (cond ((|isDomain| |d|) "domain") (t "package"))) - (|sayBrightly| - (cons " Functions traced in " - (cons |suffix| - (cons '|%b| - (cons (|devaluate| |d|) - (cons '|%d| - (cons ":" nil))))))) - (do ((t2 (|orderBySlotNumber| l) (cdr t2)) (x nil)) - ((or (atom t2) (progn (setq x (car t2)) nil)) nil) - (seq - (exit - (|reportSpadTrace| '| | (TAKE 4 x))))) - (terpri))))))))))))) + (let (llm d suffix l) + (declare (special /tracenames |$InteractiveFrame| |$mapSubNameAlist|)) + (if (null /tracenames) + (|sayMSG| (|bright| "nothing is traced")) + (progn + (dolist (x /tracenames) + (cond + ((and (atom x) (null (is_genvar x))) + (progn + (cond + ((setq llm (|get| x '|localModemap| |$InteractiveFrame|)) + (setq x (list (cadar llm))))) + (|sayMSG| + `("Function" ,@(|bright| (|rassocSub| x |$mapSubNameAlist|)) + "traced")))))) + (dolist (x /tracenames) + (cond + ((and (pairp x) + (progn (setq d (qcar x)) (setq l (qcdr x)) t) + (|isDomainOrPackage| d)) + (progn + (setq suffix (cond ((|isDomain| d) "domain") (t "package"))) + (|sayBrightly| + `(" Functions traced in " ,suffix |%b| ,(|devaluate| d) |%d| ":")) + (dolist (x (|orderBySlotNumber| l)) + (|reportSpadTrace| '| | (TAKE 4 x))) + (terpri))))))))) @ -\defun{tracelet} -\begin{verbatim} -;tracelet(fn,vars) == -; if GENSYMP fn and stupidIsSpadFunction EVAL fn then -; fn := EVAL fn -; if COMPILED_-FUNCTION_-P fn then fn:=BPINAME fn -; fn = 'Undef => nil -; vars:= -; vars="all" => "all" -; l:= LASSOC(fn,$letAssoc) => UNION(vars,l) -; vars -; $letAssoc:= [ [fn,:vars],:$letAssoc] -; if $letAssoc then SETLETPRINTFLAG true -; $TRACELETFLAG : local := true -; $QuickLet : local := false -; ^MEMQ(fn,$traceletFunctions) and ^IS__GENVAR fn and COMPILED_-FUNCTION_-P SYMBOL_-FUNCTION fn -; and not stupidIsSpadFunction fn and not GENSYMP fn => -; ($traceletFunctions:= [fn,:$traceletFunctions]; compileBoot fn ; -; $traceletFunctions:= DELETE(fn,$traceletFunctions) ) -\end{verbatim} - +\defun{tracelet}{tracelet} <>= -(defun |tracelet| (|fn| |vars|) +(defun |tracelet| (fn |vars|) (prog ($traceletflag |$QuickLet| l) (declare (special $traceletflag |$QuickLet|)) (return (progn (cond - ((and (gensymp |fn|) (|stupidIsSpadFunction| (eval |fn|))) - (setq |fn| (eval |fn|)) + ((and (gensymp fn) (|stupidIsSpadFunction| (eval fn))) + (setq fn (eval fn)) (cond - ((compiled-function-p |fn|) (setq |fn| (bpiname |fn|))) + ((compiled-function-p fn) (setq fn (bpiname fn))) (t nil)))) (cond - ((eq |fn| '|Undef|) nil) + ((eq fn '|Undef|) nil) (t (setq |vars| (cond ((eq |vars| '|all|) '|all|) - ((setq l (lassoc |fn| |$letAssoc|)) (|union| |vars| l)) + ((setq l (lassoc fn |$letAssoc|)) (|union| |vars| l)) (t |vars|))) - (setq |$letAssoc| (cons (cons |fn| |vars|) |$letAssoc|)) + (setq |$letAssoc| (cons (cons fn |vars|) |$letAssoc|)) (cond (|$letAssoc| (setletprintflag t))) (setq $traceletflag t) (setq |$QuickLet| nil) (cond - ((and (null (memq |fn| |$traceletFunctions|)) - (null (is_genvar |fn|)) - (compiled-function-p (symbol-function |fn|)) - (null (|stupidIsSpadFunction| |fn|)) - (null (gensymp |fn|))) + ((and (null (memq fn |$traceletFunctions|)) + (null (is_genvar fn)) + (compiled-function-p (symbol-function fn)) + (null (|stupidIsSpadFunction| fn)) + (null (gensymp fn))) (progn - (setq |$traceletFunctions| (cons |fn| |$traceletFunctions|)) - (|compileBoot| |fn|) + (setq |$traceletFunctions| (cons fn |$traceletFunctions|)) + (|compileBoot| fn) (setq |$traceletFunctions| - (|delete| |fn| |$traceletFunctions|))))))))))) + (|delete| fn |$traceletFunctions|))))))))))) @ -\defun{breaklet} -\begin{verbatim} -;breaklet(fn,vars) == -; --vars is "all" or a list of variables -; --$letAssoc ==> (.. (=fn .. (BREAK . all))) OR (.. (=fn .. (BREAK . vl))) -; if GENSYMP fn and stupidIsSpadFunction EVAL fn then -; fn := EVAL fn -; if COMPILED_-FUNCTION_-P fn then fn:= BPINAME fn -; fn = "Undef" => nil -; fnEntry:= LASSOC(fn,$letAssoc) -; vars:= -; pair:= ASSOC("BREAK",fnEntry) => UNION(vars,rest pair) -; vars -; $letAssoc:= -; null fnEntry => [[fn,:LIST ["BREAK",:vars]],:$letAssoc] -; pair => (RPLACD(pair,vars); $letAssoc) -; if $letAssoc then SETLETPRINTFLAG true -; $QuickLet:local := false -; ^MEMQ(fn,$traceletFunctions) and not stupidIsSpadFunction fn -; and not GENSYMP fn => -; $traceletFunctions:= [fn,:$traceletFunctions] -; compileBoot fn -; $traceletFunctions:= DELETE(fn,$traceletFunctions) -\end{verbatim} - -;;; *** |breaklet| REDEFINED +\defun{breaklet}{breaklet} <>= -(defun |breaklet| (|fn| |vars|) +(defun |breaklet| (fn |vars|) (prog (|$QuickLet| |fnEntry| |pair|) (declare (special |$QuickLet|)) (return (progn (cond - ((and (gensymp |fn|) (|stupidIsSpadFunction| (eval |fn|))) - (setq |fn| (eval |fn|)) + ((and (gensymp fn) (|stupidIsSpadFunction| (eval fn))) + (setq fn (eval fn)) (cond - ((compiled-function-p |fn|) (setq |fn| (bpiname |fn|))) + ((compiled-function-p fn) (setq fn (bpiname fn))) (t nil)))) (cond - ((eq |fn| '|Undef|) nil) + ((eq fn '|Undef|) nil) (t - (setq |fnEntry| (lassoc |fn| |$letAssoc|)) + (setq |fnEntry| (lassoc fn |$letAssoc|)) (setq |vars| (cond ((setq |pair| (|assoc| 'break |fnEntry|)) @@ -14317,67 +13031,46 @@ This reports the traced functions (setq |$letAssoc| (cond ((null |fnEntry|) - (cons (cons |fn| (list (cons 'break |vars|))) |$letAssoc|)) + (cons (cons fn (list (cons 'break |vars|))) |$letAssoc|)) (|pair| (rplacd |pair| |vars|) |$letAssoc|))) (cond (|$letAssoc| (setletprintflag t))) (setq |$QuickLet| nil) (cond - ((and (null (memq |fn| |$traceletFunctions|)) - (null (|stupidIsSpadFunction| |fn|)) - (null (gensymp |fn|))) + ((and (null (memq fn |$traceletFunctions|)) + (null (|stupidIsSpadFunction| fn)) + (null (gensymp fn))) (progn - (setq |$traceletFunctions| (cons |fn| |$traceletFunctions|)) - (|compileBoot| |fn|) + (setq |$traceletFunctions| (cons fn |$traceletFunctions|)) + (|compileBoot| fn) (setq |$traceletFunctions| - (|delete| |fn| |$traceletFunctions|))))))))))) + (|delete| fn |$traceletFunctions|))))))))))) @ -\defun{stupidIsSpadFunction} -\begin{verbatim} -;stupidIsSpadFunction fn == -; -- returns true if the function pname has a semi-colon in it -; -- eventually, this will use isSpadFunction from luke boot -; STRPOS('"_;",PNAME fn,0,NIL) -\end{verbatim} - +\defun{stupidIsSpadFunction}{stupidIsSpadFunction} <>= -(defun |stupidIsSpadFunction| (|fn|) - (strpos ";" (pname |fn|) 0 nil)) +(defun |stupidIsSpadFunction| (fn) + (strpos ";" (pname fn) 0 nil)) @ -\defun{break} -\begin{verbatim} -;break msg == -; condition:= MONITOR_,EVALTRAN(_/BREAKCONDITION,nil) -; -- The next line is to try to deal with some reported cases of unwanted -; -- backtraces appearing, MCD. -; ENABLE_-BACKTRACE(nil) -; EVAL condition => -; sayBrightly msg -; INTERRUPT() -\end{verbatim} - -;;; *** |break| REDEFINED - +\defun{break}{break} <>= -(defun |break| (|msg|) - (prog (|condition|) +(defun |break| (msg) + (prog (condition) + (declare (special /breakcondition)) (return (progn - (setq |condition| (|MONITOR,EVALTRAN| /breakcondition nil)) + (setq condition (|MONITOR,EVALTRAN| /breakcondition nil)) (enable-backtrace nil) - (cond ((eval |condition|) (progn (|sayBrightly| |msg|) (interrupt)))))))) + (when (eval condition) + (|sayBrightly| msg) + (interrupt)))))) @ -\defun{compileBoot} -\begin{verbatim} -;compileBoot fn == _/D_,1(LIST fn,'(_/COMP),nil,nil) -\end{verbatim} - +\defun{compileBoot}{compileBoot} <>= -(defun |compileBoot| (|fn|) - (|/D,1| (list |fn|) '(/comp) nil nil)) +(defun |compileBoot| (fn) + (|/D,1| (list fn) '(/comp) nil nil)) @ @@ -14456,28 +13149,28 @@ The command {\tt )history )write} will eliminate the ``undone'' command lines of your program. \section{Variables Used} \section{Data Structures} -[[$frameRecord = [delta1, delta2,... ] ]] where -[[delta(i)]] contains changes in the ``backwards'' direction. -Each [[delta(i)]] has the form [[((var . proplist)...)]] where +\verb|$frameRecord = [delta1, delta2,... ]| where +delta(i) contains changes in the ``backwards'' direction. +Each delta(i) has the form \verb|((var . proplist)...)| where proplist denotes an ordinary proplist. For example, an entry -of the form [[((x (value) (mode (Integer)))...)]] indicates that -to undo 1 step, [[x]]'s value is cleared and its mode should be set -to [[(Integer)]]. +of the form \verb|((x (value) (mode (Integer)))...)| indicates that +to undo 1 step, x's value is cleared and its mode should be set +to (Integer). -A [[delta(i)]] of the form [[(systemCommand . delta)]] is a special +A delta(i) of the form (systemCommand . delta) is a special delta indicating changes due to system commands executed between the last command and the current command. By recording these deltas separately, it is possible to undo to either BEFORE or AFTER -the command. These special [[delta(i)]]s are given ONLY when a +the command. These special delta(i)s are given ONLY when a a system command is given which alters the environment. -Note: [[recordFrame('system)]] is called before a command is executed, and -[[recordFrame('normal)]] is called after (see processInteractive1). +Note: recordFrame('system) is called before a command is executed, and +recordFrame('normal) is called after (see processInteractive1). If no changes are found for former, no special entry is given. -The [[$previousBindings]] is a copy of the -[[CAAR $InteractiveFrame]]. This is used to -compute the [[delta(i)]]s stored in [[$frameRecord]]. +The \verb|$previousBindings| is a copy of the +\verb|CAAR $InteractiveFrame|. This is used to +compute the delta(i)s stored in \verb|$frameRecord|. \section{Functions} \subsection{Initial Undo Variables} \begin{verbatim} @@ -14491,78 +13184,40 @@ $previousBindings := nil (defvar |$previousBindings| nil "a copy of Interactive Frame info for undo") (defvar |$reportUndo| nil "t means we report the steps undo takes") @ -\defun{undo} -\begin{verbatim} -undo(l) == ---undo takes one option ")redo" which simply reads "redo.input", --- a file created by every normal )undo command (see below) - undoWhen := 'after - if $options is [[key]] then - stringPrefix?(s := PNAME key,'"redo") => - $options := nil --clear $options so that "read" won't see them - read '(redo_.input) - not stringPrefix?(s,'"before") => - userError '"only option to undo is _")redo_"" - undoWhen := 'before - n := - null l => -1 - first l - if IDENTP n then - n := PARSE_-INTEGER PNAME n - if not FIXP n then userError '"undo argument must be an integer" - $InteractiveFrame := undoSteps(undoCount n,undoWhen) - nil -\end{verbatim} +\defun{undo}{undo} <>= (defun |undo| (l) - (prog (tmp1 key s undoWhen n) - (return - (progn - (setq undoWhen '|after|) - (when - (and (pairp |$options|) - (eq (qcdr |$options|) nil) - (progn - (setq tmp1 (qcar |$options|)) - (and (pairp tmp1) - (eq (qcdr tmp1) nil) - (progn (setq key (qcar tmp1)) t))) - (cond - ((|stringPrefix?| (setq s (pname key)) "redo") - (setq |$options| nil) - (|read| '(|redo.input|))) - ((null (|stringPrefix?| s "before")) - (|userError| "only option to undo is \")redo\"")) - (t - (setq undoWhen '|before|))))) - (if (null l) - (setq n (spaddifference 1)) - (setq n (car l))) - (when (identp n) - (setq n (parse-integer (pname n))) - (cond - ((null (fixp n)) - (|userError| "undo argument must be an integer")) - (t - nil))) - (setq |$InteractiveFrame| (|undoSteps| (|undoCount| n) undoWhen)) - nil)))) - -@ -\defun{recordFrame} -\begin{verbatim} -recordFrame(systemNormal) == - null $undoFlag => nil --do nothing if facility is turned off - currentAlist := KAR $frameRecord - delta := diffAlist(CAAR $InteractiveFrame,$previousBindings) - if systemNormal = 'system then - null delta => return nil --do not record - delta := ['systemCommand,:delta] - $frameRecord := [delta,:$frameRecord] - $previousBindings := --copy all but the individual properties - [CONS(CAR x,[CONS(CAR y,CDR y) for y in CDR x]) for x in CAAR $InteractiveFrame] - first $frameRecord -\end{verbatim} + (let (tmp1 key s undoWhen n) + (declare (special |$options| |$InteractiveFrame|)) + (setq undoWhen '|after|) + (when + (and (pairp |$options|) + (eq (qcdr |$options|) nil) + (progn + (setq tmp1 (qcar |$options|)) + (and (pairp tmp1) + (eq (qcdr tmp1) nil) + (progn (setq key (qcar tmp1)) t))) + (cond + ((|stringPrefix?| (setq s (pname key)) "redo") + (setq |$options| nil) + (|read| '(|redo.input|))) + ((null (|stringPrefix?| s "before")) + (|userError| "only option to undo is \")redo\"")) + (t + (setq undoWhen '|before|))))) + (if (null l) + (setq n (spaddifference 1)) + (setq n (car l))) + (when (identp n) + (setq n (parse-integer (pname n))) + (unless (fixp n) + (|userError| "undo argument must be an integer"))) + (setq |$InteractiveFrame| (|undoSteps| (|undoCount| n) undoWhen)) + nil)) + +@ +\defun{recordFrame}{recordFrame} <>= (defun |recordFrame| (systemNormal) (prog (currentAlist delta) @@ -14610,7 +13265,7 @@ recordFrame(systemNormal) == (car |$frameRecord|))))))) @ -\defun{diffAlist} +\defun{diffAlist}{diffAlist} \begin{verbatim} diffAlist(new,old) == --record only those properties which are different @@ -14752,8 +13407,8 @@ diffAlist(new,old) == (exit res))))))) @ -\defun{reportUndo} -This function is enabled by setting [[|$reportUndo]] to a non-nil value. +\defun{reportUndo}{reportUndo} +This function is enabled by setting \verb|$reportUndo| to a non-nil value. An example of the output generated is: \begin{verbatim} r := binary(22/7) @@ -14771,17 +13426,6 @@ Properties of r :: \end{verbatim} -\begin{verbatim} -reportUndo acc == - for [name,:proplist] in acc repeat - sayBrightly STRCONC("Properties of ",PNAME name,'" ::") - curproplist := LASSOC(name,CAAR $InteractiveFrame) - for [prop,:value] in proplist repeat - sayBrightlyNT ['" ",prop,'" was: "] - pp value - sayBrightlyNT ['" ",prop,'" is: "] - pp LASSOC(prop,curproplist) -\end{verbatim} <>= (defun |reportUndo| (acc) (prog (name proplist curproplist prop value) @@ -14824,34 +13468,16 @@ reportUndo acc == (|pp| (lassoc prop curproplist)))))))))))))) @ -\defun{clearFrame} -\begin{verbatim} -clearFrame() == - clearCmdAll() - $frameRecord := nil - $previousBindings := nil -\end{verbatim} +\defun{clearFrame}{clearFrame} <>= (defun |clearFrame| () - (progn + (declare (special |$frameRecord| |$previousBindings|)) (|clearCmdAll|) (setq |$frameRecord| nil) - (setq |$previousBindings| nil))) + (setq |$previousBindings| nil)) @ -\defun{undoCount} -\begin{verbatim} ---======================================================================= --- Undoing previous m commands ---======================================================================= -undoCount(n) == --computes the number of undo's, given $IOindex ---pp ["IOindex = ",$IOindex] - m := - n >= 0 => $IOindex - n - 1 - -n - m >= $IOindex => userError STRCONC('"Magnitude of undo argument must be less than step number (",STRINGIMAGE $IOindex,'").") - m -\end{verbatim} +\defun{undoCount}{Undo previous n commands} <>= (defun |undoCount| (n) (prog (m) @@ -14869,9 +13495,8 @@ undoCount(n) == --computes the number of undo's, given $IOindex (t m)))))) @ -\defun{undoSteps} +\defun{undoSteps}{undoSteps} \begin{verbatim} -undoSteps(m,beforeOrAfter) == -- undoes m previous commands; if )before option, then undo one extra at end --Example: if $IOindex now is 6 and m = 2 then general layout of $frameRecord, -- after the call to recordFrame below will be: @@ -14886,60 +13511,40 @@ undoSteps(m,beforeOrAfter) == -- up to, but not including . -- An "undo 3 )before" will additionally restore . -- Thus, the later requires one extra undo at the end. - writeInputLines('redo,$IOindex - m) - recordFrame('normal) --do NOT mark this as a system command change - --do this undo FIRST (i=0 case) - env := COPY CAAR $InteractiveFrame - for i in 0..m for framelist in tails $frameRecord repeat - env := undoSingleStep(first framelist,env) - framelist is [.,['systemCommand,:systemDelta],:.] => --- pp '"===============> AHA <=============" - framelist := rest framelist --undoing system commands given - env := undoSingleStep(systemDelta,env) -- before command line - lastTailSeen := framelist - if beforeOrAfter = 'before then --do one additional undo for )before - env := undoSingleStep(first rest lastTailSeen,env) - $frameRecord := rest $frameRecord --flush the effect of extra recordFrame - $InteractiveFrame := LIST LIST env \end{verbatim} <>= (defun |undoSteps| (m beforeOrAfter) - (prog (tmp1 tmp2 systemDelta framelist lastTailSeen env) - (return - (seq - (progn - (|writeInputLines| '|redo| (spaddifference |$IOindex| m)) - (|recordFrame| '|normal|) - (setq env (copy (caar |$InteractiveFrame|))) - (do ((|i| 0 (qsadd1 |i|)) (framelist |$frameRecord| (cdr framelist))) - ((or (qsgreaterp |i| m) (atom framelist)) nil) - (seq - (exit - (progn - (setq env (|undoSingleStep| (CAR framelist) env)) - (cond - ((and (pairp framelist) - (progn - (setq tmp1 (qcdr framelist)) - (and (pairp tmp1) - (progn - (setq tmp2 (qcar tmp1)) - (and (pairp tmp2) - (eq (qcar tmp2) '|systemCommand|) - (progn - (setq systemDelta (qcdr tmp2)) - t)))))) - (setq framelist (cdr framelist)) - (setq env (|undoSingleStep| systemDelta env))) - (t (setq lastTailSeen framelist))))))) - (cond - ((eq beforeOrAfter '|before|) - (setq env (|undoSingleStep| (car (cdr lastTailSeen)) env)))) - (setq |$frameRecord| (cdr |$frameRecord|)) - (setq |$InteractiveFrame| (list (list env)))))))) + (let (tmp1 tmp2 systemDelta lastTailSeen env) + (declare (special |$IOindex| |$InteractiveFrame| |$frameRecord|)) + (|writeInputLines| '|redo| (spaddifference |$IOindex| m)) + (|recordFrame| '|normal|) + (setq env (copy (caar |$InteractiveFrame|))) + (do ((|i| 0 (qsadd1 |i|)) (framelist |$frameRecord| (cdr framelist))) + ((or (qsgreaterp |i| m) (atom framelist)) nil) + (setq env (|undoSingleStep| (CAR framelist) env)) + (if (and (pairp framelist) + (progn + (setq tmp1 (qcdr framelist)) + (and (pairp tmp1) + (progn + (setq tmp2 (qcar tmp1)) + (and (pairp tmp2) + (eq (qcar tmp2) '|systemCommand|) + (progn + (setq systemDelta (qcdr tmp2)) + t)))))) + (progn + (setq framelist (cdr framelist)) + (setq env (|undoSingleStep| systemDelta env))) + (setq lastTailSeen framelist))) + (cond + ((eq beforeOrAfter '|before|) + (setq env (|undoSingleStep| (car (cdr lastTailSeen)) env)))) + (setq |$frameRecord| (cdr |$frameRecord|)) + (setq |$InteractiveFrame| (list (list env))))) @ -\defun{undoSingleStep} +\defun{undoSingleStep}{undoSingleStep} \begin{verbatim} undoSingleStep(changes,env) == --Each change is a name-proplist pair. For each change: @@ -14949,18 +13554,6 @@ undoSingleStep(changes,env) == -- (2) add change to the front of env -- pp '"----Undoing 1 step--------" -- pp changes - for (change := [name,:changeList]) in changes repeat - if LASSOC('localModemap,changeList) then - changeList := undoLocalModemapHack changeList - pairlist := ASSQ(name,env) => - proplist := CDR pairlist => - for (pair := [prop,:value]) in changeList repeat - node := ASSQ(prop,proplist) => RPLACD(node,value) - RPLACD(proplist,[CAR proplist,:CDR proplist]) - RPLACA(proplist,pair) - RPLACD(pairlist,changeList) - env := [change,:env] - env \end{verbatim} <>= (defun |undoSingleStep| (changes env) @@ -15012,13 +13605,7 @@ undoSingleStep(changes,env) == env))))) @ -\defun{undoLocalModemapHack} -\begin{verbatim} -undoLocalModemapHack changeList == - [newPair for (pair := [name,:value]) in changeList | newPair] where newPair == - name = 'localModemap => [name] - pair -\end{verbatim} +\defun{undoLocalModemapHack}{undoLocalModemapHack} <>= (defun |undoLocalModemapHack| (changeList) (prog (name value) @@ -15050,59 +13637,11 @@ undoLocalModemapHack changeList == (t pair)) tmp0))))))))))))) @ -\defun{removeUndoLines} -Removing undo lines from [[)hist )write linelist]] -\begin{verbatim} -removeUndoLines u == --called by writeInputLines - xtra := - STRINGP $currentLine => [$currentLine] - REVERSE $currentLine - xtra := [x for x in xtra | not stringPrefix?('")history",x)] - u := [:u, :xtra] - not (or/[stringPrefix?('")undo",x) for x in u]) => u - --(1) reverse the list - --(2) walk down the (reversed) list: when >n appears remove: - -- (a) system commands - -- (b) if n > 0: (replace n by n-1; remove a command; repeat (a-b)) - savedIOindex := $IOindex --save value - $IOindex := 1 - for y in tails u repeat - (x := first y).0 = char '_) => - stringPrefix?('")undo",s := trimString x) => --parse "undo )option" - s1 := trimString SUBSTRING(s,5,nil) - if s1 ^= '")redo" then - m := charPosition(char '_),s1,0) - code := - m < MAXINDEX s1 => s1.(m + 1) - char 'a - s2 := trimString SUBSTRING(s1,0,m) - n := - s1 = '")redo" => 0 - s2 ^= '"" => undoCount PARSE_-INTEGER s2 - -1 - RPLACA(y,CONCAT('">",code,STRINGIMAGE n)) - nil - $IOindex := $IOindex + 1 --referenced by undoCount - acc := nil - for y in tails NREVERSE u repeat - (x := first y).0 = char '_> => - code := x . 1 --code = a,b, or r - n := PARSE_-INTEGER SUBSTRING(x,2,nil) --n = number of undo steps - y := rest y --kill >n line - while y repeat - c := first y - c.0 = char '_) or c.0 = char '_> => y := rest y --kill system commands - n = 0 => return nil --including undos - n := n - 1 - y := rest y --kill command - y and code^= char 'b => acc := [c,:acc] --add last unless )before - acc := [x,:acc] - $IOindex := savedIOindex - acc -\end{verbatim} +\defun{removeUndoLines}{Remove undo lines from hist write} +Removing undo lines from \verb|)hist )write linelist| <>= (defun |removeUndoLines| (u) - (prog (xtra savedIOindex s s1 m s2 x code c n y acc) + (prog (xtra savedIOindex s s1 m s2 x code c n acc) (return (seq (progn @@ -15302,46 +13841,14 @@ The command synonym {\tt )apropos} is equivalent to @ -\defun{what} -\begin{verbatim} -what l == whatSpad2Cmd l -\end{verbatim} +\defun{what}{what} <>= (defun |what| (l) (|whatSpad2Cmd| l)) @ -\defun{whatSpad2Cmd} -\begin{verbatim} -whatSpad2Cmd l == - $e:local := $EmptyEnvironment - null l => reportWhatOptions() - [key0,:args] := l - key := selectOptionLC(key0,$whatOptions,nil) - null key => sayKeyedMsg("S2IZ0043",NIL) - args := [fixpat p for p in args] where - fixpat x == - x is [x',:.] => DOWNCASE x' - DOWNCASE x - key = 'things => - for opt in $whatOptions repeat - not MEMQ(opt,'(things)) => whatSpad2Cmd [opt,:args] - key = 'categories => - filterAndFormatConstructors('category,'"Categories",args) - key = 'commands => - whatCommands(args) - key = 'domains => - filterAndFormatConstructors('domain,'"Domains",args) - key = 'operations => - apropos args - key = 'packages => - filterAndFormatConstructors('package,'"Packages",args) - key = 'synonyms => - printSynonyms(args) -\end{verbatim} - -\defun{whatSpad2Cmd,fixpat} +\defun{whatSpad2Cmd,fixpat}{whatSpad2Cmd,fixpat} <>= (defun |whatSpad2Cmd,fixpat| (x) (prog (|x'|) @@ -15353,7 +13860,7 @@ whatSpad2Cmd l == @ -\defun{whatSpad2Cmd} +\defun{whatSpad2Cmd}{whatSpad2Cmd} <>= (defun |whatSpad2Cmd| (arg) (prog (|$e| |key0| key args) @@ -15407,26 +13914,12 @@ whatSpad2Cmd l == @ -\defun{filterAndFormatConstructors} -\begin{verbatim} -filterAndFormatConstructors(constrType,label,patterns) == - centerAndHighlight(label,$LINELENGTH,specialChar 'hbar) - l := filterListOfStringsWithFn(patterns,whatConstructors constrType, - function CDR) - if patterns then - null l => - sayMessage ['" No ",label,'" with names matching patterns:", - '%l,'" ",'%b,:blankList patterns,'%d] - sayMessage [label,'" with names matching patterns:", - '%l,'" ",'%b,:blankList patterns,'%d] - l => pp2Cols l -\end{verbatim} - +\defun{filterAndFormatConstructors}{filterAndFormatConstructors} <>= -(defun |filterAndFormatConstructors| (|constrType| |label| |patterns|) +(defun |filterAndFormatConstructors| (|constrType| label |patterns|) (prog (l) (return - (progn (|centerAndHighlight| |label| $linelength + (progn (|centerAndHighlight| label $linelength (|specialChar| '|hbar|)) (setq l (|filterListOfStringsWithFn| |patterns| @@ -15437,7 +13930,7 @@ filterAndFormatConstructors(constrType,label,patterns) == ((null l) (|sayMessage| (cons " No " - (cons |label| + (cons label (cons " with names matching patterns:" (cons '|%l| (cons " " @@ -15446,7 +13939,7 @@ filterAndFormatConstructors(constrType,label,patterns) == (cons '|%d| nil)))))))))) (t (|sayMessage| - (cons |label| + (cons label (cons " with names matching patterns:" (cons '|%l| (cons " " @@ -15457,15 +13950,7 @@ filterAndFormatConstructors(constrType,label,patterns) == @ -\defun{whatConstructors} -\begin{verbatim} -whatConstructors constrType == - -- here constrType should be one of 'category, 'domain, 'package - MSORT [CONS(GETDATABASE(con,'ABBREVIATION), STRING(con)) - for con in allConstructors() - | GETDATABASE(con,'CONSTRUCTORKIND) = constrType] -\end{verbatim} - +\defun{whatConstructors}{whatConstructors} <>= (defun |whatConstructors| (|constrType|) (prog nil @@ -15491,29 +13976,16 @@ whatConstructors constrType == @ -\defun{apropos} -\begin{verbatim} -apropos l == - -- l is a list of operation name fragments - -- this displays all operation names containing these fragments - ops := - null l => allOperations() - filterListOfStrings([(DOWNCASE STRINGIMAGE p) for p in l],allOperations()) - ops => - sayMessage '"Operations whose names satisfy the above pattern(s):" - sayAsManyPerLineAsPossible MSORT ops - sayKeyedMsg("S2IF0011",[first ops]) - sayMessage '" There are no operations containing those patterns" - NIL -\end{verbatim} - +\defun{apropos}{Display all operation names containing the fragment} +Argument l is a list of operation name fragments. +This displays all operation names containing these fragments <>= (defun |apropos| (arg) - (prog (|ops|) + (prog (ops) (return (seq (progn - (setq |ops| + (setq ops (cond ((null arg) (|allOperations|)) (t @@ -15527,10 +13999,10 @@ apropos l == (seq (exit (setq t0 (cons (downcase (stringimage p)) t0))))))) (|allOperations|))))) (cond - (|ops| + (ops (|sayMessage| "Operations whose names satisfy the above pattern(s):") - (|sayAsManyPerLineAsPossible| (msort |ops|)) - (|sayKeyedMsg| 's2if0011 (cons (car |ops|) nil))) + (|sayAsManyPerLineAsPossible| (msort ops)) + (|sayKeyedMsg| 's2if0011 (cons (car ops) nil))) (t (|sayMessage| " There are no operations containing those patterns") nil))))))) @@ -15544,7 +14016,7 @@ apropos l == ; )library top level command -- soon to be obsolete -\defun{with} +\defun{with}{with} <>= (defun |with| (args) (|library| args)) @@ -15554,279 +14026,429 @@ apropos l == %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{workfiles} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\defun{workfiles} -\begin{verbatim} -workfiles l == workfilesSpad2Cmd l -\end{verbatim} +\defun{workfiles}{workfiles} <>= (defun |workfiles| (l) (|workfilesSpad2Cmd| l)) @ -\defun{workfilesSpad2Cmd} -\begin{verbatim} -workfilesSpad2Cmd args == - args => throwKeyedMsg("S2IZ0047",NIL) - deleteFlag := nil - for [type,:.] in $options repeat - type1 := selectOptionLC(type,'(boot lisp meta delete),nil) - null type1 => throwKeyedMsg("S2IZ0048",[type]) - type1 = 'delete => deleteFlag := true - for [type,:flist] in $options repeat - type1 := selectOptionLC(type,'(boot lisp meta delete),nil) - type1 = 'delete => nil - for file in flist repeat - fl := pathname [file,type1,'"*"] - deleteFlag => SETQ($sourceFiles,DELETE(fl,$sourceFiles)) - null (MAKE_-INPUT_-FILENAME fl) => sayKeyedMsg("S2IZ0035",[namestring fl]) - updateSourceFiles fl - SAY " " - centerAndHighlight(" User-specified work files ",$LINELENGTH,specialChar 'hbar) - SAY " " - null $sourceFiles => SAY '" no files specified" - SETQ($sourceFiles,SORTBY('pathnameType,$sourceFiles)) - for fl in $sourceFiles repeat sayBrightly [" " ,namestring fl] -\end{verbatim} +\defun{workfilesSpad2Cmd}{workfilesSpad2Cmd} <>= (defun |workfilesSpad2Cmd| (args) - (prog (|deleteFlag| type |flist| |type1| |fl|) - (return - (seq - (cond - (args (|throwKeyedMsg| 's2iz0047 nil)) - (t - (setq |deleteFlag| nil) - (do ((t0 |$options| (cdr t0)) (t1 nil)) - ((or (atom t0) - (progn (setq t1 (car t0)) nil) - (progn (progn (setq type (car t1)) t1) nil)) - nil) - (seq - (exit - (progn - (setq |type1| - (|selectOptionLC| type '(|boot| |lisp| |meta| |delete|) nil)) - (cond - ((null |type1|) - (|throwKeyedMsg| 's2iz0048 (cons type nil))) - ((eq |type1| '|delete|) - (setq |deleteFlag| t))))))) - (do ((t2 |$options| (cdr t2)) (t3 nil)) - ((or (atom t2) - (progn (setq t3 (CAR t2)) nil) - (progn - (progn - (setq type (car t3)) - (setq |flist| (cdr t3)) t3) - nil)) - nil) - (seq - (exit - (progn - (setq |type1| - (|selectOptionLC| type '(|boot| |lisp| |meta| |delete|) nil)) - (cond - ((eq |type1| '|delete|) nil) - (t - (do ((t4 |flist| (CDR t4)) (|file| nil)) - ((or (atom t4) (progn (setq |file| (car t4)) nil)) nil) - (seq - (exit - (progn - (setq |fl| - (|pathname| - (cons |file| (cons |type1| (cons "*" nil))))) - (cond - (|deleteFlag| - (setq |$sourceFiles| (|delete| |fl| |$sourceFiles|))) - ((null (make-input-filename |fl|)) - (|sayKeyedMsg| - 's2iz0035 (cons (|namestring| |fl|) nil))) - (t (|updateSourceFiles| |fl|))))))))))))) - (say " ") - (|centerAndHighlight| - '| User-specified work files | - $linelength - (|specialChar| '|hbar|)) - (say " ") + (let (deleteflag type flist type1 fl) + (declare (special |$options| |$sourceFiles|)) + (cond + (args (|throwKeyedMsg| 's2iz0047 nil)) + (t + (setq deleteflag nil) + (do ((t0 |$options| (cdr t0)) (t1 nil)) + ((or (atom t0) + (progn (setq t1 (car t0)) nil) + (progn (progn (setq type (car t1)) t1) nil)) + nil) + (setq type1 + (|selectOptionLC| type '(|boot| |lisp| |meta| |delete|) nil)) (cond - ((null |$sourceFiles|) - (say " no files specified")) - (t - (setq |$sourceFiles| (sortby '|pathnameType| |$sourceFiles|)) - (do ((t5 |$sourceFiles| (cdr t5)) (|fl| nil)) - ((or (atom t5) (progn (setq |fl| (car t5)) nil)) nil) - (seq - (exit - (|sayBrightly| - (cons " " (cons (|namestring| |fl|) nil)))))))))))))) + ((null type1) (|throwKeyedMsg| 's2iz0048 (cons type nil))) + ((eq type1 '|delete|) (setq deleteflag t)))) + (do ((t2 |$options| (cdr t2)) (t3 nil)) + ((or (atom t2) + (progn (setq t3 (CAR t2)) nil) + (progn + (progn + (setq type (car t3)) + (setq flist (cdr t3)) t3) + nil)) + nil) + (setq type1 (|selectOptionLC| type '(|boot| |lisp| |meta| |delete|) nil)) + (unless (eq type1 '|delete|) + (dolist (file flist) + (setq fl (|pathname| (list file type1 "*"))) + (cond + (deleteflag + (setq |$sourceFiles| (|delete| fl |$sourceFiles|))) + ((null (make-input-filename fl)) + (|sayKeyedMsg| 's2iz0035 (list (|namestring| fl)))) + (t (|updateSourceFiles| fl)))))) + (say " ") + (|centerAndHighlight| + '| User-specified work files | + $linelength + (|specialChar| '|hbar|)) + (say " ") + (if (null |$sourceFiles|) + (say " no files specified") + (progn + (setq |$sourceFiles| (sortby '|pathnameType| |$sourceFiles|)) + (do ((t5 |$sourceFiles| (cdr t5)) (fl nil)) + ((or (atom t5) (progn (setq fl (car t5)) nil)) nil) + (|sayBrightly| (list " " (|namestring| fl)))))))))) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{zsystemdevelopment} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\defun{zsystemdevelopment} -\begin{verbatim} -zsystemdevelopment l == zsystemDevelopmentSpad2Cmd l -\end{verbatim} +\defun{zsystemdevelopment}{zsystemdevelopment} <>= (defun |zsystemdevelopment| (arg) (|zsystemDevelopmentSpad2Cmd| arg)) @ -\defun{zsystemDevelopmentSpad2Cmd} -\begin{verbatim} -zsystemDevelopmentSpad2Cmd l == zsystemdevelopment1 (l,$InteractiveMode) -\end{verbatim} +\defun{zsystemDevelopmentSpad2Cmd}{zsystemDevelopmentSpad2Cmd} <>= (defun |zsystemDevelopmentSpad2Cmd| (arg) + (declare (special |$InteractiveMode|)) (|zsystemdevelopment1| arg |$InteractiveMode|)) @ -\defun{zsystemdevelopment1} -\begin{verbatim} -zsystemdevelopment1(l,im) == - $InteractiveMode : local := im - fromopt := nil - -- cycle through once to see if )from is mentioned - for [opt,:optargs] in $options repeat - opt1 := selectOptionLC(opt,'(from),nil) - opt1 = 'from => fromopt := [['FROM,:optargs]] - for [opt,:optargs] in $options repeat - if null optargs then optargs := l - newopt := APPEND(optargs,fromopt) - opt1 := selectOptionLC(opt,'(from),nil) - opt1 = 'from => nil - opt = "c" => _/D_,1 (newopt ,_/COMP(),NIL,NIL) - opt = "d" => _/D_,1 (newopt ,'DEFINE,NIL,NIL) - opt = "dt" => _/D_,1 (newopt ,'DEFINE,NIL,true) - opt = "ct" => _/D_,1 (newopt ,_/COMP(),NIL,true) - opt = "ctl" => _/D_,1 (newopt ,_/COMP(),NIL,'TRACELET) - opt = "ec" => _/D_,1 (newopt ,_/COMP(),true,NIL) - opt = "ect" => _/D_,1 (newopt ,_/COMP(),true,true) - opt = "e" => _/D_,1 (newopt ,NIL,true,NIL) - opt = "version" => version() - opt = "pause" => - conStream := DEFIOSTREAM ('((DEVICE . CONSOLE) (QUAL . V)),120,0) - NEXT conStream - SHUT conStream - opt = "update" or opt = "patch" => - $InteractiveMode := nil - upf := [KAR optargs or _/VERSION, KADR optargs or _/WSNAME, - KADDR optargs or '_*] - fun := (opt = "patch" => '_/UPDATE_-LIB_-1; '_/UPDATE_-1) - CATCH('FILENAM, FUNCALL(fun, upf)) - sayMessage '" Update/patch is completed." - null optargs => - sayBrightly ['" An argument is required for",:bright opt] - sayMessage ['" Unknown option:",:bright opt," ",'%l, - '" Available options are", _ - :bright '"c ct e ec ect cls pause update patch compare record"] -\end{verbatim} +\defun{zsystemdevelopment1}{zsystemdevelopment1} <>= -(defun |zsystemdevelopment1| (arg |im|) - (prog (|$InteractiveMode| |fromopt| opt optargs |newopt| |opt1| - |conStream| |upf| |fun|) - (declare (special |$InteractiveMode|)) - (return - (seq - (progn - (setq |$InteractiveMode| |im|) - (setq |fromopt| nil) - (do ((t0 |$options| (cdr t0)) (t1 nil)) - ((or (atom t0) - (progn (setq t1 (car t0)) nil) - (progn - (progn - (setq opt (CAR t1)) - (setq optargs (CDR t1)) - t1) - nil)) - nil) - (seq - (exit - (progn - (setq |opt1| (|selectOptionLC| opt '(|from|) nil)) - (cond - ((eq |opt1| '|from|) - (setq |fromopt| (cons (cons 'from optargs) nil)))))))) - (do ((t2 |$options| (cdr t2)) (t3 nil)) - ((or (atom t2) - (progn (setq t3 (car t2)) nil) - (progn - (progn - (setq opt (car t3)) - (setq optargs (cdr t3)) - t3) - nil)) - nil) - (seq - (exit - (progn - (cond ((null optargs) (setq optargs arg))) - (setq |newopt| (append optargs |fromopt|)) - (setq |opt1| (|selectOptionLC| opt '(|from|) nil)) - (cond - ((eq |opt1| '|from|) - nil) - ((eq opt '|c|) - (|/D,1| |newopt| (/COMP) nil nil)) - ((eq opt '|d|) - (|/D,1| |newopt| 'define nil nil)) - ((eq opt '|dt|) - (|/D,1| |newopt| 'define nil t)) - ((eq opt '|ct|) - (|/D,1| |newopt| (/COMP) nil t)) - ((eq opt '|ctl|) - (|/D,1| |newopt| (/COMP) nil 'tracelet)) - ((eq opt '|ec|) - (|/D,1| |newopt| (/COMP) t nil)) - ((eq opt '|ect|) - (|/D,1| |newopt| (/COMP) t t)) - ((eq opt '|e|) - (|/D,1| |newopt| nil t nil)) - ((eq opt '|version|) - (|version|)) - ((eq opt '|pause|) - (setq |conStream| - (defiostream '((device . console) (qual . v)) 120 0)) - (next |conStream|) - (shut |conStream|)) - ((or - (eq opt '|update|) - (eq opt '|patch|)) - (setq |$InteractiveMode| nil) - (setq |upf| - (cons - (or (kar optargs) /version) - (cons - (or (kadr optargs) /wsname) - (cons (or (kaddr optargs) '*) nil)))) - (setq |fun| - (cond - ((eq opt '|patch|) '/update-lib-1) - (t '/update-1))) - (catch 'filenam (funcall |fun| |upf|)) - (|sayMessage| " Update/patch is completed.")) - ((null optargs) - (|sayBrightly| - (cons - " An argument is required for" - (|bright| opt)))) - (t - (|sayMessage| - (cons - " Unknown option:" - (append - (|bright| opt) - (cons '| | (cons '|%l| (cons " Available options are" - (|bright| - "c ct e ec ect cls pause update patch compare record") - ))))))))))))))))) +(defun |zsystemdevelopment1| (arg im) + (let (|$InteractiveMode| fromopt opt optargs newopt opt1 constream upf fun) + (declare (special |$InteractiveMode| /wsname /version |$options|)) + (setq |$InteractiveMode| im) + (setq fromopt nil) + (do ((t0 |$options| (cdr t0)) (t1 nil)) + ((or (atom t0) + (progn (setq t1 (car t0)) nil) + (progn + (progn + (setq opt (CAR t1)) + (setq optargs (CDR t1)) + t1) + nil)) + nil) + (setq opt1 (|selectOptionLC| opt '(|from|) nil)) + (when (eq opt1 '|from|) (setq fromopt (cons (cons 'from optargs) nil)))) + (do ((t2 |$options| (cdr t2)) (t3 nil)) + ((or (atom t2) + (progn (setq t3 (car t2)) nil) + (progn + (progn + (setq opt (car t3)) + (setq optargs (cdr t3)) + t3) + nil)) + nil) + (unless optargs (setq optargs arg)) + (setq newopt (append optargs fromopt)) + (setq opt1 (|selectOptionLC| opt '(|from|) nil)) + (cond + ((eq opt1 '|from|) nil) + ((eq opt '|c|) (|/D,1| newopt (/COMP) nil nil)) + ((eq opt '|d|) (|/D,1| newopt 'define nil nil)) + ((eq opt '|dt|) (|/D,1| newopt 'define nil t)) + ((eq opt '|ct|) (|/D,1| newopt (/COMP) nil t)) + ((eq opt '|ctl|) (|/D,1| newopt (/COMP) nil 'tracelet)) + ((eq opt '|ec|) (|/D,1| newopt (/COMP) t nil)) + ((eq opt '|ect|) (|/D,1| newopt (/COMP) t t)) + ((eq opt '|e|) (|/D,1| newopt nil t nil)) + ((eq opt '|version|) (|version|)) + ((eq opt '|pause|) + (setq constream + (defiostream '((device . console) (qual . v)) 120 0)) + (next constream) + (shut constream)) + ((or + (eq opt '|update|) + (eq opt '|patch|)) + (setq |$InteractiveMode| nil) + (setq upf + (cons + (or (kar optargs) /version) + (cons + (or (kadr optargs) /wsname) + (cons (or (kaddr optargs) '*) nil)))) + (setq fun + (cond + ((eq opt '|patch|) '/update-lib-1) + (t '/update-1))) + (catch 'filenam (funcall fun upf)) + (|sayMessage| " Update/patch is completed.")) + ((null optargs) + (|sayBrightly| `(" An argument is required for" ,@(|bright| opt)))) + (t + (|sayMessage| + `(" Unknown option:" ,@(|bright| opt) + |%l| " Available options are" + ,@(|bright| + "c ct e ec ect cls pause update patch compare record")))))))) + +@ + +\chapter{Handling output} +\section{Special Character Tables} + +\defdollar{defaultSpecialCharacters} +<>= +(defvar |$defaultSpecialCharacters| (list + (int-char 28) ; upper left corner + (int-char 27) ; upper right corner + (int-char 30) ; lower left corner + (int-char 31) ; lower right corner + (int-char 79) ; vertical bar + (int-char 45) ; horizontal bar + (int-char 144) ; APL quad + (int-char 173) ; left bracket + (int-char 189) ; right bracket + (int-char 192) ; left brace + (int-char 208) ; right brace + (int-char 59) ; top box tee + (int-char 62) ; bottom box tee + (int-char 63) ; right box tee + (int-char 61) ; left box tee + (int-char 44) ; center box tee + (int-char 224))) ; back slash + +@ + +\defdollar{plainSpecialCharacters0} +<>= +(defvar |$plainSpecialCharacters0| (list + (int-char 78) ; upper left corner (+) + (int-char 78) ; upper right corner (+) + (int-char 78) ; lower left corner (+) + (int-char 78) ; lower right corner (+) + (int-char 79) ; vertical bar + (int-char 96) ; horizontal bar (-) + (int-char 111) ; APL quad (?) + (int-char 173) ; left bracket + (int-char 189) ; right bracket + (int-char 192) ; left brace + (int-char 208) ; right brace + (int-char 78) ; top box tee (+) + (int-char 78) ; bottom box tee (+) + (int-char 78) ; right box tee (+) + (int-char 78) ; left box tee (+) + (int-char 78) ; center box tee (+) + (int-char 224))) ; back slash + +@ + +\defdollar{plainSpecialCharacters1} +<>= +(defvar |$plainSpecialCharacters1| (list + (int-char 107) ; upper left corner (,) + (int-char 107) ; upper right corner (,) + (int-char 125) ; lower left corner (') + (int-char 125) ; lower right corner (') + (int-char 79) ; vertical bar + (int-char 96) ; horizontal bar (-) + (int-char 111) ; APL quad (?) + (int-char 173) ; left bracket + (int-char 189) ; right bracket + (int-char 192) ; left brace + (int-char 208) ; right brace + (int-char 78) ; top box tee (+) + (int-char 78) ; bottom box tee (+) + (int-char 78) ; right box tee (+) + (int-char 78) ; left box tee (+) + (int-char 78) ; center box tee (+) + (int-char 224))) ; back slash + +@ + +\defdollar{plainSpecialCharacters2} +<>= +(defvar |$plainSpecialCharacters2| (list + (int-char 79) ; upper left corner (|) + (int-char 79) ; upper right corner (|) + (int-char 79) ; lower left corner (|) + (int-char 79) ; lower right corner (|) + (int-char 79) ; vertical bar + (int-char 96) ; horizontal bar (-) + (int-char 111) ; APL quad (?) + (int-char 173) ; left bracket + (int-char 189) ; right bracket + (int-char 192) ; left brace + (int-char 208) ; right brace + (int-char 78) ; top box tee (+) + (int-char 78) ; bottom box tee (+) + (int-char 78) ; right box tee (+) + (int-char 78) ; left box tee (+) + (int-char 78) ; center box tee (+) + (int-char 224))) ; back slash + +@ + +\defdollar{plainSpecialCharacters3} +<>= +(defvar |$plainSpecialCharacters3| (list + (int-char 96) ; upper left corner (-) + (int-char 96) ; upper right corner (-) + (int-char 96) ; lower left corner (-) + (int-char 96) ; lower right corner (-) + (int-char 79) ; vertical bar + (int-char 96) ; horizontal bar (-) + (int-char 111) ; APL quad (?) + (int-char 173) ; left bracket + (int-char 189) ; right bracket + (int-char 192) ; left brace + (int-char 208) ; right brace + (int-char 78) ; top box tee (+) + (int-char 78) ; bottom box tee (+) + (int-char 78) ; right box tee (+) + (int-char 78) ; left box tee (+) + (int-char 78) ; center box tee (+) + (int-char 224))) ; back slash + +@ + +\defdollar{plainRTspecialCharacters} +<>= +(defvar |$plainRTspecialCharacters| (list + (QUOTE +) ; upper left corner (+) + (QUOTE +) ; upper right corner (+) + (QUOTE +) ; lower left corner (+) + (QUOTE +) ; lower right corner (+) + (QUOTE |\||) ; vertical bar + (QUOTE -) ; horizontal bar (-) + (QUOTE ?) ; APL quad (?) + (QUOTE [) ; left bracket + (QUOTE ]) ; right bracket + (QUOTE {) ; left brace + (QUOTE }) ; right brace + (QUOTE +) ; top box tee (+) + (QUOTE +) ; bottom box tee (+) + (QUOTE +) ; right box tee (+) + (QUOTE +) ; left box tee (+) + (QUOTE +) ; center box tee (+) + (QUOTE |\\|))) ; back slash + +@ + +\defdollar{RTspecialCharacters} +<>= +(defvar |$RTspecialCharacters| (list + (intern (string (code-char 218))) ;-- upper left corner (+) + (intern (string (code-char 191))) ;-- upper right corner (+) + (intern (string (code-char 192))) ;-- lower left corner (+) + (intern (string (code-char 217))) ;-- lower right corner (+) + (intern (string (code-char 179))) ;-- vertical bar + (intern (string (code-char 196))) ;-- horizontal bar (-) + (list (code-char #x1d) (code-char #xe2)) + ;-- APL quad (?) + (QUOTE [) ;-- left bracket + (QUOTE ]) ;-- right bracket + (QUOTE {) ;-- left brace + (QUOTE }) ;-- right brace + (intern (string (code-char 194))) ;-- top box tee (+) + (intern (string (code-char 193))) ;-- bottom box tee (+) + (intern (string (code-char 180))) ;-- right box tee (+) + (intern (string (code-char 195))) ;-- left box tee (+) + (intern (string (code-char 197))) ;-- center box tee (+) + (QUOTE |\\|))) ;-- back slash + +@ + +\defdollar{specialCharacters} +<>= +(defvar |$specialCharacters| |$RTspecialCharacters|) + +@ + +\defdollar{specialCharacterAlist} +<>= +(defvar |$specialCharacterAlist| + '((|ulc| . 0) + (|urc| . 1) + (|llc| . 2) + (|lrc| . 3) + (|vbar| . 4) + (|hbar| . 5) + (|quad| . 6) + (|lbrk| . 7) + (|rbrk| . 8) + (|lbrc| . 9) + (|rbrc| . 10) + (|ttee| . 11) + (|btee| . 12) + (|rtee| . 13) + (|ltee| . 14) + (|ctee| . 15) + (|bslash| . 16))) + +@ + +\chapter{Stream Handling} +\defun{make-instream}{make-instream} +<>= +(defun make-instream (filespec &optional (recnum 0)) + (declare (ignore recnum)) + (cond ((numberp filespec) (make-synonym-stream '*terminal-io*)) + ((null filespec) (error "not handled yet")) + (t (open (make-input-filename filespec) + :direction :input :if-does-not-exist nil)))) + +@ + +\defun{make-outstream}{make-outstream} +<>= +(defun make-outstream (filespec &optional (width nil) (recnum 0)) + (declare (ignore width) (ignore recnum)) + (cond ((numberp filespec) (make-synonym-stream '*terminal-io*)) + ((null filespec) (error "not handled yet")) + (t (open (make-filename filespec) :direction :output)))) + +@ + +\defun{make-appendstream}{make-appendstream} +<>= +(defun make-appendstream (filespec &optional (width nil) (recnum 0)) + "fortran support" + (declare (ignore width) (ignore recnum)) + (cond + ((numberp filespec) (make-synonym-stream '*terminal-io*)) + ((null filespec) (error "make-appendstream: not handled yet")) + ('else (open (make-filename filespec) :direction :output + :if-exists :append :if-does-not-exist :create)))) + +@ + +\defun{defiostream}{defiostream} +<>= +(defun defiostream (stream-alist buffer-size char-position) + (declare (ignore buffer-size)) + (let ((mode (or (cdr (assoc 'MODE stream-alist)) 'INPUT)) + (filename (cdr (assoc 'FILE stream-alist))) + (dev (cdr (assoc 'DEVICE stream-alist)))) + (if (EQ dev 'CONSOLE) (make-synonym-stream '*terminal-io*) + (let ((strm (case mode + ((OUTPUT O) (open (make-filename filename) + :direction :output)) + ((INPUT I) (open (make-input-filename filename) + :direction :input))))) + (if (and (numberp char-position) (> char-position 0)) + (file-position strm char-position)) + strm)))) + +@ + +\defun{shut}{shut} +<>= +(defun shut (st) + (if (is-console st) + st + (if (streamp st) (close st) -1))) + +@ + +\defun{eofp}{eofp} +<>= +(defun eofp (stream) (null (peek-char nil stream nil nil))) + +@ + +\defun{makeStream}{makeStream} +<>= +(defun |makeStream| (append filename i j) + (if append + (make-appendstream filename i j) + (make-outstream filename i j))) @ \chapter{The Spad Server Mechanism} @@ -15846,7 +14468,7 @@ This is a cover function for the C code used for communication interface. @ \chapter{Axiom Build-time Functions} -\defun{spad-save} +\defun{spad-save}{spad-save} The {\bf spad-save} function is just a cover function for more lisp system specific save functions. There is no standard name for saving a lisp image so we make one and conditionalize it @@ -15855,7 +14477,7 @@ at compile time. This function is passed the name of an image that will be saved. The saved image contains all of the loaded functions. -This is used in the [[src/interp/Makefile.pamphlet]] in three places: +This is used in the src/interp/Makefile.pamphlet in three places: \begin{list}{} \item creating depsys, an image for compiling axiom. @@ -15865,7 +14487,7 @@ image is created to contain the compile time environment and saved. We pipe compile commands into this environment to compile from Common Lisp to machine dependent code. \begin{verbatim} -DEPSYS= ${OBJ}/${SYS}/bin/depsys +DEPSYS=${OBJ}/${SYS}/bin/depsys \end{verbatim} \item creating savesys, an image for running axiom. @@ -15873,7 +14495,7 @@ DEPSYS= ${OBJ}/${SYS}/bin/depsys Once we've compile all of the Common Lisp files we fire up a clean lisp image called {\bf LOADSYS}, load all of the final executable code and save it out as {\bf SAVESYS}. -The {\bf SAVESYS} image is copied to the [[${MNT}/${SYS}/bin]] +The {\bf SAVESYS} image is copied to the \verb|${MNT}/${SYS}/bin| subdirectory and becomes the axiom executable image. \begin{verbatim} LOADSYS= ${OBJ}/${SYS}/bin/lisp @@ -15944,6 +14566,15 @@ load the file \verb|exposed.lsp| to set up the exposure group information. @ +\chapter{System Statistics} +\pagehead{statisticsInitialization}{statisticsInitialization} +<>= +(defun |statisticsInitialization| () + "initialize the garbage collection timer" + #+:akcl (system:gbc-time 0) + nil) + +@ \chapter{Special Lisp Functions} \defmacro{identp} @@ -15957,7 +14588,7 @@ load the file \verb|exposed.lsp| to set up the exposure group information. @ -\defun{concat} +\defun{concat}{concat} <>= (defun concat (a b &rest l) (if (bit-vector-p a) @@ -15970,7 +14601,7 @@ load the file \verb|exposed.lsp| to set up the exposure group information. @ -\defun{functionp} +\defun{functionp}{functionp} <>= (defun |functionp| (fn) (if (identp fn) @@ -15980,7 +14611,7 @@ load the file \verb|exposed.lsp| to set up the exposure group information. @ ;; --------------------> NEW DEFINITION (override in msgdb.boot.pamphlet) -\defun{brightprint} +\defun{brightprint}{brightprint} <>= (defun brightprint (x) (messageprint x)) @@ -15988,14 +14619,14 @@ load the file \verb|exposed.lsp| to set up the exposure group information. @ ;; --------------------> NEW DEFINITION (override in msgdb.boot.pamphlet) -\defun{brightprint-0} +\defun{brightprint-0}{brightprint-0} <>= (defun brightprint-0 (x) (messageprint-1 x)) @ -\defun{member} +\defun{member}{member} <>= (defun |member| (item sequence) (cond @@ -16006,14 +14637,14 @@ load the file \verb|exposed.lsp| to set up the exposure group information. @ -\defun{messageprint} +\defun{messageprint}{messageprint} <>= (defun messageprint (x) (mapc #'messageprint-1 x)) @ -\defun{messageprint-1} +\defun{messageprint-1}{messageprint-1} <>= (defun messageprint-1 (x) (cond @@ -16028,7 +14659,7 @@ load the file \verb|exposed.lsp| to set up the exposure group information. @ -\defun{messageprint-2} +\defun{messageprint-2}{messageprint-2} <>= (defun messageprint-2 (x) (if (atom x) @@ -16037,7 +14668,7 @@ load the file \verb|exposed.lsp| to set up the exposure group information. @ -\defun{sayBrightly1} +\defun{sayBrightly1}{sayBrightly1} <>= (defun sayBrightly1 (x *standard-output*) (if (atom x) @@ -16052,7 +14683,7 @@ load the file \verb|exposed.lsp| to set up the exposure group information. @ -\defun{sayMSG} +\defun{sayMSG}{sayMSG} <>= (defun |sayMSG| (x) (declare (special |$algebraOutputStream|)) @@ -16110,15 +14741,29 @@ load the file \verb|exposed.lsp| to set up the exposure group information. <> <> <> +<> <> <> +<> <> +<> <> <> +<> +<> <> <> +<> <> +<> +<> +<> +<> +<> +<> +<> +<> <> <> <> @@ -16140,6 +14785,7 @@ load the file \verb|exposed.lsp| to set up the exposure group information. <> <> <> +<> <> <> @@ -16214,8 +14860,12 @@ load the file \verb|exposed.lsp| to set up the exposure group information. <> <> +<> <> <> +<> +<> +<> <> <> <> @@ -16242,6 +14892,8 @@ load the file \verb|exposed.lsp| to set up the exposure group information. <> <> <> +<> +<> <> <> <> @@ -16278,10 +14930,13 @@ load the file \verb|exposed.lsp| to set up the exposure group information. <> <> <> +<> <> +<> <> <> <> +<> <> <> <> @@ -16296,17 +14951,28 @@ load the file \verb|exposed.lsp| to set up the exposure group information. <> <> <> +<> <> +<> <> <> -<> <> +<> +<> +<> +<> +<> +<> <> +<> +<> +<> <> +<> <> -<> <> <> +<> <> <> <> @@ -16351,7 +15017,6 @@ load the file \verb|exposed.lsp| to set up the exposure group information. <> <> <> -<> <> <> <> @@ -16400,32 +15065,32 @@ NAME & SET & USE \\ *top-level-hook* & set-restart-hook & \\ \end{tabular} \subsection{*eof*} -The [[*eof*]] variable is set to [[NIL]] in [[ncTopLevel]]. +The \verb|*eof*| variable is set to NIL in ncTopLevel. \subsection{*features*} -The [[*features*]] variable from common lisp is tested for the presence -of the [[:unix]] keyword. Apparently this controls the use of Saturn, +The \verb|*features*| variable from common lisp is tested for the presence +of the \verb|:unix| keyword. Apparently this controls the use of Saturn, a previous Axiom frontend. The Saturn frontend was never released as open source and so this test and the associated variables are probably not used. \subsection{*package*} -The [[*package*]] variable, from common lisp, is set in [[restart]] -to the [[BOOT]] package where the intepreter lives. +The \verb|*package*| variable, from common lisp, is set in restart +to the BOOT package where the intepreter lives. \subsection{*standard-input*} -The [[*standard-input*]] common lisp variable is used to set the -[[curinstream]] variable in [[ncIntLoop]]. +The \verb|*standard-input*| common lisp variable is used to set the +curinstream variable in ncIntLoop. -This variable is an argument to [[serverReadLine]] in -the [[intloopReadConsole]] function. +This variable is an argument to serverReadLine in +the intloopReadConsole function. \subsection{*standard-output*} -The [[*standard-output*]] common lisp variable is used to set the -[[curoutstream]] variable in [[ncIntLoop]]. +The \verb|*standard-output*| common lisp variable is used to set the +curoutstream variable in ncIntLoop. \subsection{*top-level-hook*} -The [[*top-level-hook*]] common lisp variable contains the name of +The \verb|*top-level-hook*| common lisp variable contains the name of a function to invoke when an image is started. In our case it is -called [[restart]]. This is the entry point to the Axiom interpreter. +called restart. This is the entry point to the Axiom interpreter. \section{Dollar Global Variables} \begin{tabular}{lll} @@ -16521,21 +15186,21 @@ top\_level & & runspad \\ \end{tabular} \subsection{\$boot} -The [[$boot]] variable is set to [[NIL]] in [[ncTopLevel]]. +The \verb|$boot| variable is set to NIL in ncTopLevel. \subsection{coerceFailure} -The [[coerceFailure]] symbol is a catch tag used in [[runspad]] -to catch an exit from [[ncTopLevel]]. +The coerceFailure symbol is a catch tag used in runspad +to catch an exit from ncTopLevel. \subsection{curinstream} -The [[curinstream]] variable is set to the value of the -[[*standard-input*]] common lisp -variable in [[ncIntLoop]]. While not using the +The curinstream variable is set to the value of the +\verb|*standard-input*| common lisp +variable in ncIntLoop. While not using the ``dollar'' convention this variable is still ``global''. \subsection{curinstream} -The [[curoutstream]] variable is set to the value of the -[[*standard-output*]] common lisp variable in [[ncIntLoop]]. +The curoutstream variable is set to the value of the +\verb|*standard-output*| common lisp variable in ncIntLoop. While not using the ``dollar'' convention this variable is still ``global''. \subsection{\$current-directory} @@ -16543,83 +15208,83 @@ This is set to the value returned by the \verb|get-current-directory| function in \fnref{restart}. It is set to the argument of the \verb|reroot| function. -So during execute both [[$current-directory]] and [[$spadroot]] reflect -the value of the [[AXIOM]] shell variable. +So during execute both \verb|$current-directory| and \verb|$spadroot| reflect +the value of the AXIOM shell variable. \subsection{\$currentLine} -The [[$currentLine]] line is set to [[NIL]] in [[restart]]. -It is used in [[removeUndoLines]] in the undo mechanism. +The \verb|$currentLine| line is set to NIL in restart. +It is used in removeUndoLines in the undo mechanism. \subsection{\$dalymode} -The [[$dalymode]] variable is used in a case statement in -[[intloopReadConsole]]. This variable can be set to any non-nil +The \verb|$dalymode| variable is used in a case statement in +intloopReadConsole. This variable can be set to any non-nil value. When not nil the interpreter will send any line that begins -with an ``[[(]]'' to be sent to the underlying lisp. This is useful -for debugging Axiom. The normal value of this variable is [[NIL]]. +with an ``('' to be sent to the underlying lisp. This is useful +for debugging Axiom. The normal value of this variable is NIL. This variable was created as an alternative to prefixing every lisp -command with [[)lisp]]. When doing a lot of debugging this is tedious +command with )lisp. When doing a lot of debugging this is tedious and error prone. This variable was created to shortcut that process. Clearly it breaks some semantics of the language accepted by the interpreter as parens are used for grouping expressions. \subsection{\$defaultMsgDatabaseName} -The [[$defaultMsgDatabaseName]] is the absolute path to the -[[s2-us.msgs]] file which contains all of the english language +The \verb|$defaultMsgDatabaseName| is the absolute path to the +s2-us.msgs file which contains all of the english language messages output by the system. \subsection{\$directory-list} -The [[$directory-list]] is a list of absolute directory names. -These names are made absolute by mapping the [[make-absolute-filename]] -over the variable [[$relative-directory-list]]. +The \verb|$directory-list| is a list of absolute directory names. +These names are made absolute by mapping the make-absolute-filename +over the variable \verb|$relative-directory-list|. \subsection{\$displayStartMsgs} -The [[$displayStartMsgs]] variable is used in [[restart]] but is not +The \verb|$displayStartMsgs| variable is used in restart but is not set so this is likely a bug. \subsection{\$e} -The [[$e]] variable is set to the value of -[[$InteractiveFrame]] which is set in [[restart]] to the value of the -call to the [[makeInitialModemapFrame]] function. This function simply -returns a copy of the variable [[$InitialModemapFrame]]. +The \verb|$e| variable is set to the value of +\verb|$InteractiveFrame| which is set in restart to the value of the +call to the makeInitialModemapFrame function. This function simply +returns a copy of the variable \verb|$InitialModemapFrame|. -Thus [[$e]] is a copy of the variable [[$InitialModemapFrame]]. +Thus \verb|$e| is a copy of the variable \verb|$InitialModemapFrame|. This variable is used in the undo mechanism. \subsection{\$erMsgToss} -The [[$erMsgToss]] variable is set to [[NIL]] in [[SpadInterpretStream]]. +The \verb|$erMsgToss| variable is set to NIL in SpadInterpretStream. \subsection{\$fn} -The [[$fn]] variable is set in [[SpadInterpretStream]]. It is set to +The \verb|$fn| variable is set in SpadInterpretStream. It is set to the second argument which is a list. It appears that this list has the -same structure as an argument to the LispVM [[rdefiostream]] function. +same structure as an argument to the LispVM rdefiostream function. \subsection{\$frameRecord} -[[$frameRecord = [delta1, delta2,... ] ]] where -[[delta(i)]] contains changes in the ``backwards'' direction. -Each [[delta(i)]] has the form [[((var . proplist)...)]] where +\verb|$frameRecord = [delta1, delta2,... ]| where +delta(i) contains changes in the ``backwards'' direction. +Each delta(i) has the form ((var . proplist)...) where proplist denotes an ordinary proplist. For example, an entry -of the form [[((x (value) (mode (Integer)))...)]] indicates that -to undo 1 step, [[x]]'s value is cleared and its mode should be set -to [[(Integer)]]. +of the form ((x (value) (mode (Integer)))...) indicates that +to undo 1 step, x's value is cleared and its mode should be set +to (Integer). -A [[delta(i)]] of the form [[(systemCommand . delta)]] is a special +A delta(i) of the form (systemCommand . delta) is a special delta indicating changes due to system commands executed between the last command and the current command. By recording these deltas separately, it is possible to undo to either BEFORE or AFTER -the command. These special [[delta(i)]]s are given ONLY when a +the command. These special delta(i)s are given ONLY when a a system command is given which alters the environment. -Note: [[recordFrame('system)]] is called before a command is executed, and -[[recordFrame('normal)]] is called after (see processInteractive1). +Note: recordFrame('system) is called before a command is executed, and +recordFrame('normal) is called after (see processInteractive1). If no changes are found for former, no special entry is given. This is part of the undo mechanism. \subsection{\$genValue} -If the [[$genValue]] variable is true then evaluate generated code, -otherwise leave code unevaluated. If [[$genValue]] is false then we +If the \verb|$genValue| variable is true then evaluate generated code, +otherwise leave code unevaluated. If \verb|$genValue| is false then we are compiling. This variable is only defined and used locally. <>= (defvar |$genValue| nil "evaluate generated code if true") @@ -16627,7 +15292,7 @@ are compiling. This variable is only defined and used locally. @ \subsection{\$HiFiAccess} -The [[$HiFiAccess]] is set by [[initHist]] to [[T]]. It is a flag +The \verb|$HiFiAccess| is set by initHist to T. It is a flag used by the history mechanism to record whether the history function is currently on. It can be reset by using the axiom command @@ -16636,51 +15301,51 @@ command \end{verbatim} It appears that the name means ``History File Access''. -The [[$HiFiAccess]] variable is used by [[historySpad2Cmd]] to check -whether history is turned on. [[T]] means it is, [[NIL]] means it is not. +The \verb|$HiFiAccess| variable is used by historySpad2Cmd to check +whether history is turned on. T means it is, NIL means it is not. \subsection{\$HistList} -Thie [[$HistList]] variable is set by [[initHistList]] to an initial -value of [[NIL]] elements. The last element of the list is smashed to +Thie \verb|$HistList| variable is set by initHistList to an initial +value of NIL elements. The last element of the list is smashed to point to the first element to make the list circular. -This is a circular list of length [[$HistListLen]]. +This is a circular list of length \verb|$HistListLen|. \subsection{\$HistListAct} -The [[$HistListAct]] variable is set by [[initHistList]] to [[0]]. +The \verb|$HistListAct| variable is set by initHistList to 0. This variable holds the actual number of elements in the history list. This is the number of ``undoable'' steps. \subsection{\$HistListLen} -The [[$HistListLen]] variable is set by [[initHistList]] to [[20]]. +The \verb|$HistListLen| variable is set by initHistList to 20. This is the length of a circular list maintained in the variable -[[$HistList]]. +\verb|$HistList|. \subsection{\$HistRecord} -The [[$HistRecord]] variable is set by [[initHistList]] to [[NIL]]. -[[$HistRecord]] collects the input line, all variable bindings +The \verb|$HistRecord| variable is set by initHistList to NIL. +\verb|$HistRecord| collects the input line, all variable bindings and the output of a step, before it is written to the file named by -the function [[histFileName]]. +the function histFileName. \subsection{\$historyFileType} -The [[$historyFileType]] is set at load time by a call to -[[initvars]] to a value of ``[[axh]]''. It appears that this +The \verb|$historyFileType| is set at load time by a call to +initvars to a value of ``axh''. It appears that this is intended to be used as a filetype extension. -It is part of the history mechanism. It is used in [[makeHistFileName]] +It is part of the history mechanism. It is used in makeHistFileName as part of the history file name. \subsection{\$inclAssertions} -The [[$inclAssertions]] is set -in the function [[SpadInterpretStream]] to the list [[(aix |CommonLisp|)]] +The \verb|$inclAssertions| is set +in the function SpadInterpretStream to the list (aix |CommonLisp|) \subsection{\$internalHistoryTable} -The [[$internalHistoryTable]] variable is set at load time by a call to -[[initvars]] to a value of [[NIL]]. +The \verb|$internalHistoryTable| variable is set at load time by a call to +initvars to a value of NIL. It is part of the history mechanism. \subsection{\$interpreterFrameName} -The [[$interpreterFrameName]] variable, set in -[[initializeInterpreterFrameRing]] to the constant -[[initial]] to indicate that this is the initial (default) frame. +The \verb|$interpreterFrameName| variable, set in +initializeInterpreterFrameRing to the constant +initial to indicate that this is the initial (default) frame. Frames are structures that capture all of the variables defined in a session. There can be multiple frames and the user can freely switch @@ -16688,199 +15353,196 @@ between them. Frames are kept in a ring data structure so you can move around the ring. \subsection{\$interpreterFrameRing} -The [[$interpreterFrameRing]] is set to a pair whose car is set to -the result of [[emptyInterpreterFrame]] +The \verb|$interpreterFrameRing| is set to a pair whose car is set to +the result of emptyInterpreterFrame \subsection{\$InitialModemapFrame} This variable is copied and returned by the function -[[makeInitialModemapFrame]]. There is no initial value so this +\verb|makeInitialModemapFrame|. There is no initial value so this is probably a bug. \subsection{\$inLispVM} -The [[$inLispVM]] is set to [[NIL]] in [[spad]]. LispVM is a +The \verb|$inLispVM| is set to NIL in spad. LispVM is a non-common lisp that runs on IBM/370 mainframes. This is probably dead code. It appears that this list has the same structure as an argument -to the LispVM [[rdefiostream]] function. +to the LispVM rdefiostream function. \subsection{\$InteractiveFrame} -The [[$InteractiveFrame]] is set in [[restart]] to the value of the -call to the [[makeInitialModemapFrame]] function. This function simply -returns a copy of the variable [[$InitialModemapFrame]] +The \verb|$InteractiveFrame| is set in restart to the value of the +call to the makeInitialModemapFrame function. This function simply +returns a copy of the variable \verb|$InitialModemapFrame| \subsection{\$InteractiveMode} -The [[$InteractiveMode]] is set to [[T]] in [[ncTopLevel]]. +The \verb|$InteractiveMode| is set to T in ncTopLevel. \subsection{\$intRestart} -The [[$intRestart]] variable is used in [[intloop]] but has no value. +The \verb|$intRestart| variable is used in intloop but has no value. This is probably a bug. While the variable's value is unchanged the -system will continually reenter the [[SpadInterpretStream]] function. +system will continually reenter the SpadInterpretStream function. \subsection{\$intTopLevel} -The [[$intTopLevel]] is a catch tag. Throwing to this tags which is -caught in the [[intloop]] will -restart the [[SpadInterpretStream]] function. +The \verb|$intTopLevel| is a catch tag. Throwing to this tags which is +caught in the intloop will restart the SpadInterpretStream function. \subsection{\$IOindex} -The [[$IOindex]] index variable is set to [[1]] in [[restart]]. -This variable is used in the [[historySpad2Cmd]] function in the -history mechanism. It is set in the [[removeUndoLines]] function +The \verb|$IOindex| index variable is set to 1 in restart. +This variable is used in the historySpad2Cmd function in the +history mechanism. It is set in the removeUndoLines function in the undo mechanism. -This is used in the undo mechanism in function [[undoCount]] +This is used in the undo mechanism in function undoCount to compute the number of undos. You can't undo more actions then have already happened. \subsection{\$lastPos} -The [[$lastPos]] variable is set in [[SpadInterpretStream]] -to the value of the [[$nopos]] variable. -Since [[$nopos]] appears to have no value +The \verb|$lastPos| variable is set in SpadInterpretStream +to the value of the \verb|$nopos| variable. +Since \verb|$nopos| appears to have no value this is likely a bug. \subsection{\$libQuiet} -The [[$libQuiet]] variable is set to the third argument of the -[[SpadInterpretStream]] function. This is passed from [[intloop]] -with the value of [[T]]. This variable appears to be intended to +The \verb|$libQuiet| variable is set to the third argument of the +SpadInterpretStream function. This is passed from intloop +with the value of T. This variable appears to be intended to control the printing of library loading messages which would need to be suppressed if input was coming from a file. \subsection{\$library-directory-list} -The [[$library-directory-list]] variable is set by [[reroot]] by -mapping the function [[make-absolute-filename]] across the -[[$relative-library-directory-list]] variable which is not yet set so this +The \verb|$library-directory-list| variable is set by reroot by +mapping the function make-absolute-filename across the +\verb|$relative-library-directory-list| variable which is not yet set so this is probably a bug. \subsection{\$msgDatabaseName} -The [[$msgDatabaseName]] is set to [[NIL]] in [[reroot]]. +The \verb|$msgDatabaseName| is set to NIL in reroot. \subsection{\$ncMsgList} -The [[$ncMsgList]] is set to [[NIL]] in [[SpadInterpretStream]]. +The \verb|$ncMsgList| is set to NIL in SpadInterpretStream. \subsection{\$newcompErrorCount} -The [[$newcompErrorCount]] is set to [[0]] in [[SpadInterpretStream]]. +The \verb|$newcompErrorCount| is set to 0 in SpadInterpretStream. \subsection{\$newcompMode} -The [[$newcompMode]] is set to [[NIL]] in [[SpadInterpretStream]]. +The \verb|$newcompMode| is set to NIL in SpadInterpretStream. \subsection{\$newspad} -The [[$newspad]] is set to [[T]] in [[ncTopLevel]]. +The \verb|$newspad| is set to T in ncTopLevel. \subsection{\$nopos} -The [[$nopos]] variable is used in [[SpadInterpretStream]] but does +The \verb|$nopos| variable is used in SpadInterpretStream but does not appear to have a value and is likely a bug. \subsection{\$oldHistoryFileName} -The [[$oldHistoryFileName]] is set at load time by a call to -[[initvars]] to a value of ``[[last]]''. +The \verb|$oldHistoryFileName| is set at load time by a call to +initvars to a value of ``last''. It is part of the history mechanism. It is used in the function -[[oldHistFileName]] and [[restoreHistory]]. +oldHistFileName and restoreHistory. \subsection{\$okToExecuteMachineCode} -The [[$okToExecuteMachineCode]] is set to [[T]] in [[SpadInterpretStream]]. +The \verb|$okToExecuteMachineCode| is set to T in SpadInterpretStream. \subsection{\$options} -The [[$options]] variable is tested by the [[history]] function. -If it is [[NIL]] then output the message +The \verb|$options| variable is tested by the history function. +If it is NIL then output the message \begin{verbatim} You have not used the correct syntax for the history command. Issue )help history for more information. \end{verbatim} -The [[$options]] variable is tested in the [[historySpad2Cmd]] function. +The \verb|$options| variable is tested in the historySpad2Cmd function. It appears to record the options that were given to a spad command on -the input line. The function [[selectOptionLC]] appears to take a list +the input line. The function selectOptionLC appears to take a list off options to scan. This variable is not yet set and is probably a bug. \subsection{\$previousBindings} -The [[$previousBindings]] is a copy of the -[[CAAR $InteractiveFrame]]. This is used to -compute the [[delta(i)]]s stored in [[$frameRecord]]. +The \verb|$previousBindings| is a copy of the +\verb|CAAR $InteractiveFrame|. This is used to +compute the delta(i)s stored in \verb|$frameRecord|. This is part of the undo mechanism. \pagehead{printLoadMsgs}{printLoadMsgs} -The [[$printLoadMsgs]] variable is set to [[T]] in [[restart]]. +The \verb|$printLoadMsgs| variable is set to T in restart. \subsection{\$PrintCompilerMessageIfTrue} -The [[$PrintCompilerMessageIfTrue]] variable is set to [[NIL]] in [[spad]]. +The \verb|$PrintCompilerMessageIfTrue| variable is set to NIL in spad. \subsection{\$openServerIfTrue} -The [[$openServerIfTrue]] is tested in [[restart]] before it has been +The \verb|$openServerIfTrue| is tested in restart before it has been set (and is thus a bug). It appears to control whether the interpreter will be used as an open server, probably for OpenMath use. -If an open server is not requested then this variable to [[NIL]] +If an open server is not requested then this variable to NIL \subsection{\$promptMsg} -The [[$promptMsg]] variable is set to the constant [[S2CTP023]]. This -constant points to a message in [[src/doc/msgs/s2-us.msgs]]. This message +The \verb|$promptMsg| variable is set to the constant S2CTP023. This +constant points to a message in src/doc/msgs/s2-us.msgs. This message does nothing but print the argument value. \subsection{\$relative-directory-list} -The [[$relative-directory-list]] is used in [[reroot]] to create -[[$directory-list]] which is a list of absolute directory names. +The \verb|$relative-directory-list| is used in reroot to create +\verb|$directory-list| which is a list of absolute directory names. It is not yet set and is probably a bug. \subsection{\$relative-library-directory-list} -The [[$relative-library-directory-list]] is used in [[reroot]] to create -a list of absolute directory names from [[$library-directory-list]] (which is -It is not yet set and is probably a bug). +The \verb|$relative-library-directory-list| is used in reroot to create +a list of absolute directory names from \verb|$library-directory-list| +(which is It is not yet set and is probably a bug). \subsection{\$reportUndo} -The [[$reportUndo]] variable is used in [[diffAlist]]. It was not normally -bound but has been set to [[T]] in [[initvars]]. If the variable is set -to [[T]] then we call [[reportUndo]]. +The \verb|$reportUndo| variable is used in diffAlist. It was not normally +bound but has been set to T in initvars. If the variable is set +to T then we call reportUndo. It is part of the undo mechanism. \subsection{\$shoeReadLineFunction} -The [[$shoeReadLineFunction]] is set in [[SpadInterpretStream]] -to point to the -[[serverReadLine]] +The \verb|$shoeReadLineFunction| is set in SpadInterpretStream +to point to the serverReadLine \subsection{\$spadroot} -The [[$spadroot]] variable is the internal name for the [[AXIOM]] +The \verb|$spadroot| variable is the internal name for the AXIOM shell variable. -The [[$spadroot]] variable is set in [[reroot]] to the value of the +The \verb|$spadroot| variable is set in reroot to the value of the argument. The argument is expected to be a directory name. -The [[$spadroot]] variable is tested in [[initroot]]. +The \verb|$spadroot| variable is tested in initroot. -The [[$spadroot]] variable is used by the function -[[make-absolute-filename]]. It concatenates this variable to the +The \verb|$spadroot| variable is used by the function +make-absolute-filename. It concatenates this variable to the front of a relative pathname to make it absolute. \subsection{\$spad} -The [[$spad]] variable is set to [[T]] in [[ncTopLevel]]. +The \verb|$spad| variable is set to T in ncTopLevel. \subsection{\$SpadServer} -If an open server is not requested then this variable to [[T]]. +If an open server is not requested then this variable to T. It has no value before this time (and is thus a bug). \subsection{\$SpadServerName} -The [[$SpadServerName]] is passed to the [[openServer]] function, if the +The \verb|$SpadServerName| is passed to the openServer function, if the function exists. \subsection{\$systemCommandFunction} -The [[$systemCommandFunction]] is set in [[SpadInterpretStream]] -to point to the function -[[InterpExecuteSpadSystemCommand]]. +The \verb|$systemCommandFunction| is set in SpadInterpretStream +to point to the function InterpExecuteSpadSystemCommand. \subsection{top\_level} -The [[top\_level]] symbol is a catch tag used in [[runspad]] -to catch an exit from [[ncTopLevel]]. +The top\_level symbol is a catch tag used in runspad +to catch an exit from ncTopLevel. \subsection{\$quitTag} -The [[$quitTag]] is used as a variable in a [[catch]] block. -It appears that it can be thrown somewhere below [[ncTopLevel]]. +The \verb|$quitTag| is used as a variable in a catch block. +It appears that it can be thrown somewhere below ncTopLevel. \subsection{\$useInternalHistoryTable} -The [[$useInternalHistoryTable]] variable is set at load time by a call to -[[initvars]] to a value of [[NIL]]. It is part of the history mechanism. +The \verb|$useInternalHistoryTable| variable is set at load time by a call to +initvars to a value of NIL. It is part of the history mechanism. \subsection{\$undoFlag} -The [[$undoFlag]] is used in [[recordFrame]] to decide whether to do -undo recording. It is initially set to [[T]] in [[initvars]]. +The \verb|$undoFlag| is used in recordFrame to decide whether to do +undo recording. It is initially set to T in initvars. This is part of the undo mechanism. \chapter{Makefile.bookvol5} @@ -16912,5 +15574,6 @@ remake: \bibitem{2} Daly, Timothy, ``The Axiom Wiki Website''\\ {\bf http://axiom.axiom-developer.org} \end{thebibliography} +\chapter{Index} \printindex \end{document} diff --git a/changelog b/changelog index 4f0404f..a523fe8 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,16 @@ +20090323 tpd src/axiom-website/patches.html 20090323.01.tpd.patch +20090323 tpd src/interp/vmlisp.lisp collect command handling +20090323 tpd src/interp/setq.lisp collect command handling +20090323 tpd src/interp/interp-proclaims collect command handling +20090323 tpd src/interp/i-output.boot collect command handling +20090323 tpd src/interp/debugsys.lisp collect command handling +20090323 tpd src/interp/bootfuns.lisp collect command handling +20090323 tpd src/interp/Makefile collect command handling +20090323 tpd src/input/unittest1.input collect command handling +20090323 tpd src/input/setcmd.input collect command handling +20090323 tpd books/bookvol5 collect command handling +20090323 tpd src/interp/setvart.boot removed, moved to bookvol5 +20090323 tpd src/interp/setvars.boot removed, moved to bookvol5 20090319 tpd src/axiom-website/patches.html 20090319.01.tpd.patch 20090319 tpd src/interp/vmlisp.lisp move top level cmd handling 20090319 tpd src/interp/setvars.boot move top level cmd handling diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index acb665a..c2cf15d 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -1013,5 +1013,7 @@ sockio.lisp restore sock-send-int
bookvol5 rewrite generated lisp into readable form
20090319.01.tpd.patch bookvol5 move top level command handling
+20090323.01.tpd.patch +bookvol5 finish move of command handling
diff --git a/src/input/setcmd.input.pamphlet b/src/input/setcmd.input.pamphlet index 9592801..43983d4 100644 --- a/src/input/setcmd.input.pamphlet +++ b/src/input/setcmd.input.pamphlet @@ -16,7 +16,7 @@ )set message auto off )clear all ---S 1 of 86 +--S 1 of 143 )set breakmode --R-------------------------- The breakmode Option --------------------------- --R @@ -34,7 +34,7 @@ --R --E 1 ---S 2 of 86 +--S 2 of 143 )set compiler --R Current Values of compiler Variables --R @@ -46,7 +46,7 @@ --R --E 2 ---S 3 of 86 +--S 3 of 143 )set compiler --R Current Values of compiler Variables --R @@ -58,7 +58,7 @@ --R --E 3 ---S 4 of 86 +--S 4 of 143 )set compiler input --R---------------------------- The input Option ----------------------------- --R @@ -70,7 +70,7 @@ --Rfrom this path. --E 4 ---S 5 of 86 +--S 5 of 143 )set compiler output --R --R---------------------------- The output Option ---------------------------- @@ -82,7 +82,7 @@ --Rin a file called user.lib in the current directory. --E 5 ---S 6 of 86 +--S 6 of 143 )set compiler args --R----------------------------- The args Option ----------------------------- --R @@ -96,7 +96,7 @@ --R "-O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -Y $AXIOM/algebra" --E 6 ---S 7 of 86 +--S 7 of 143 )set expose --R---------------------------- The expose Option ---------------------------- --R @@ -127,7 +127,7 @@ --R for more information. --E 7 ---S 8 of 86 +--S 8 of 143 )set functions --R Current Values of functions Variables --R @@ -139,27 +139,31 @@ --R --E 8 ---S 9 of 86 +--S 9 of 143 )set functions cache +--R --R---------------------------- The cache Option ----------------------------- --R --R Description: number of function results to cache --R --R )set functions cache is used to tell AXIOM how many ---R values computed by interpreter functions should be saved. This can save ---R quite a bit of time in recursive functions, though one must consider that ---R the cached values will take up (perhaps valuable) room in the workspace. +--R values computed by interpreter functions should be saved. This +--R can save quite a bit of time in recursive functions, though one +--R must consider that the cached values will take up (perhaps +--R valuable) room in the workspace. +--R +--R The value given after cache must either be the word all or a positive integer. +--R This may be followed by any number of function names whose cache +--R sizes you wish to so set. If no functions are given, the default +--R cache size is set. --R ---R The value given after cache must either be the word all or a positive ---R integer. This may be followed by any number of function names whose cache ---R sizes you wish to so set. If no functions are given, the default cache ---R size is set. ---R Examples: )set fun cache all )set fun cache 10 f g Legendre +--R Examples: +--R )set fun cache all )set fun cache 10 f g Legendre --R --R In general, functions will cache no returned values. --E 9 ---S 10 of 86 +--S 10 of 143 )set functions compile --R--------------------------- The compile Option ---------------------------- --R @@ -174,7 +178,7 @@ --R --E 10 ---S 11 of 86 +--S 11 of 143 )set functions recurrence --R-------------------------- The recurrence Option -------------------------- --R @@ -189,7 +193,7 @@ --R --E 11 ---S 12 of 86 +--S 12 of 143 )set fortran --R Current Values of fortran Variables --R @@ -213,7 +217,7 @@ --RFor more information, issue )help set . --E 12 ---S 13 of 86 +--S 13 of 143 )set fortran ints2floats --R------------------------- The ints2floats Option -------------------------- --R @@ -228,7 +232,7 @@ --R --E 13 ---S 14 of 86 +--S 14 of 143 )set fortran fortindent --R-------------------------- The fortindent Option -------------------------- --R @@ -239,7 +243,7 @@ --R --E 14 ---S 15 of 86 +--S 15 of 143 )set fortran fortlength --R-------------------------- The fortlength Option -------------------------- --R @@ -250,7 +254,7 @@ --R --E 15 ---S 16 of 86 +--S 16 of 143 )set fortran typedecs --R--------------------------- The typedecs Option --------------------------- --R @@ -265,7 +269,7 @@ --R --E 16 ---S 17 of 86 +--S 17 of 143 )set fortran defaulttype --R------------------------- The defaulttype Option -------------------------- --R @@ -283,7 +287,7 @@ --R --E 17 ---S 18 of 86 +--S 18 of 143 )set fortran precision --R-------------------------- The precision Option --------------------------- --R @@ -298,7 +302,7 @@ --R --E 18 ---S 19 of 86 +--S 19 of 143 )set fortran intrinsic --R-------------------------- The intrinsic Option --------------------------- --R @@ -313,7 +317,7 @@ --R --E 19 ---S 20 of 86 +--S 20 of 143 )set fortran explength --R-------------------------- The explength Option --------------------------- --R @@ -324,7 +328,7 @@ --R --E 20 ---S 21 of 86 +--S 21 of 143 )set fortran segment --R--------------------------- The segment Option ---------------------------- --R @@ -339,7 +343,7 @@ --R --E 21 ---S 22 of 86 +--S 22 of 143 )set fortran optlevel --R--------------------------- The optlevel Option --------------------------- --R @@ -350,7 +354,7 @@ --R --E 22 ---S 23 of 86 +--S 23 of 143 )set fortran startindex --R-------------------------- The startindex Option -------------------------- --R @@ -361,7 +365,7 @@ --R --E 23 ---S 24 of 86 +--S 24 of 143 )set fortran calling --R Current Values of calling Variables --R @@ -373,7 +377,7 @@ --R --E 24 ---S 25 of 86 +--S 25 of 143 )set fortran calling tempfile --R--------------------------- The tempfile Option --------------------------- --R @@ -390,7 +394,7 @@ --R The current setting is /tmp/ --E 25 ---S 26 of 86 +--S 26 of 143 )set fortran calling directory --R-------------------------- The directory Option --------------------------- --R @@ -407,7 +411,7 @@ --R The current setting is ./ --E 26 ---S 27 of 86 +--S 27 of 143 )set fortran calling linker --R---------------------------- The linker Option ---------------------------- --R @@ -425,7 +429,7 @@ --R The current setting is -lxlf --E 27 ---S 28 of 86 +--S 28 of 143 )set kernel --R Current Values of kernel Variables --R @@ -436,7 +440,7 @@ --R --E 28 ---S 29 of 86 +--S 29 of 143 )set kernel warn --R----------------------------- The warn Option ----------------------------- --R @@ -451,7 +455,7 @@ --R )set kernel warn off --E 29 ---S 30 of 86 +--S 30 of 143 )set kernel protect --R--------------------------- The protect Option ---------------------------- --R @@ -466,7 +470,7 @@ --R )set kernel protect on --E 30 ---S 31 of 86 +--S 31 of 143 )set hyperdoc --R Current Values of hyperdoc Variables --R @@ -477,7 +481,7 @@ --R --E 31 ---S 32 of 86 +--S 32 of 143 )set hyperdoc fullscreen --R-------------------------- The fullscreen Option -------------------------- --R @@ -492,7 +496,7 @@ --R --E 32 ---S 33 of 86 +--S 33 of 143 )set hyperdoc mathwidth --R-------------------------- The mathwidth Option --------------------------- --R @@ -503,7 +507,7 @@ --R --E 33 ---S 34 of 86 +--S 34 of 143 )set help --R Current Values of help Variables --R @@ -513,7 +517,7 @@ --R --E 34 ---S 35 of 86 +--S 35 of 143 )set help fullscreen --R-------------------------- The fullscreen Option -------------------------- --R @@ -528,7 +532,7 @@ --R --E 35 ---S 36 of 86 +--S 36 of 143 )set history --R--------------------------- The history Option ---------------------------- --R @@ -543,7 +547,7 @@ --R --E 36 ---S 37 of 86 +--S 37 of 143 )set messages --R Current Values of messages Variables --R @@ -575,15 +579,23 @@ --R --E 37 ---S 38 of 86 +--S 38 of 143 )set messages autoload +--R --R--------------------------- The autoload Option --------------------------- --R --R Description: print file auto-load messages --R +--R The autoload option may be followed by any one of the following: +--R +--R on +--R -> off +--R +--R The current setting is indicated. +--R --E 38 ---S 39 of 86 +--S 39 of 143 )set messages bottomup --R--------------------------- The bottomup Option --------------------------- --R @@ -598,7 +610,7 @@ --R --E 39 ---S 40 of 86 +--S 40 of 143 )set messages coercion --R--------------------------- The coercion Option --------------------------- --R @@ -613,7 +625,7 @@ --R --E 40 ---S 41 of 86 +--S 41 of 143 )set messages dropmap --R--------------------------- The dropmap Option ---------------------------- --R @@ -628,7 +640,7 @@ --R --E 41 ---S 42 of 86 +--S 42 of 143 )set messages expose --R---------------------------- The expose Option ---------------------------- --R @@ -643,7 +655,7 @@ --R --E 42 ---S 43 of 86 +--S 43 of 143 )set messages file --R----------------------------- The file Option ----------------------------- --R @@ -658,7 +670,7 @@ --R --E 43 ---S 44 of 86 +--S 44 of 143 )set messages frame --R---------------------------- The frame Option ----------------------------- --R @@ -673,7 +685,7 @@ --R --E 44 ---S 45 of 86 +--S 45 of 143 )set messages highlighting --R------------------------- The highlighting Option ------------------------- --R @@ -688,7 +700,7 @@ --R --E 45 ---S 46 of 86 +--S 46 of 143 )set messages instant --R--------------------------- The instant Option ---------------------------- --R @@ -703,7 +715,7 @@ --R --E 46 ---S 47 of 86 +--S 47 of 143 )set messages insteach --R--------------------------- The insteach Option --------------------------- --R @@ -718,7 +730,7 @@ --R --E 47 ---S 48 of 86 +--S 48 of 143 )set messages interponly --R-------------------------- The interponly Option -------------------------- --R @@ -733,7 +745,7 @@ --R --E 48 ---S 49 of 86 +--S 49 of 143 )set messages number --R---------------------------- The number Option ---------------------------- --R @@ -748,7 +760,7 @@ --R --E 49 ---S 50 of 86 +--S 50 of 143 )set messages prompt --R---------------------------- The prompt Option ---------------------------- --R @@ -766,7 +778,7 @@ --R --E 50 ---S 51 of 86 +--S 51 of 143 )set messages selection --R-------------------------- The selection Option --------------------------- --R @@ -781,7 +793,7 @@ --R --E 51 ---S 52 of 86 +--S 52 of 143 )set messages set --R----------------------------- The set Option ------------------------------ --R @@ -796,7 +808,7 @@ --R --E 52 ---S 53 of 86 +--S 53 of 143 )set messages startup --R--------------------------- The startup Option ---------------------------- --R @@ -811,7 +823,7 @@ --R --E 53 ---S 54 of 86 +--S 54 of 143 )set messages summary --R--------------------------- The summary Option ---------------------------- --R @@ -826,7 +838,7 @@ --R --E 54 ---S 55 of 86 +--S 55 of 143 )set messages testing --R--------------------------- The testing Option ---------------------------- --R @@ -841,7 +853,7 @@ --R --E 55 ---S 56 of 86 +--S 56 of 143 )set messages time --R----------------------------- The time Option ----------------------------- --R @@ -857,7 +869,7 @@ --R --E 56 ---S 57 of 86 +--S 57 of 143 )set messages type --R----------------------------- The type Option ----------------------------- --R @@ -872,7 +884,7 @@ --R --E 57 ---S 58 of 86 +--S 58 of 143 )set messages void --R----------------------------- The void Option ----------------------------- --R @@ -887,7 +899,7 @@ --R --E 58 ---S 59 of 86 +--S 59 of 143 )set messages any --R----------------------------- The any Option ------------------------------ --R @@ -902,7 +914,7 @@ --R --E 59 ---S 60 of 86 +--S 60 of 143 )set messages naglink --R--------------------------- The naglink Option ---------------------------- --R @@ -917,7 +929,7 @@ --R --E 60 ---S 61 of 86 +--S 61 of 143 )set naglink host --R----------------------------- The host Option ----------------------------- --R @@ -930,7 +942,7 @@ --R The current setting is localhost --E 61 ---S 62 of 86 +--S 62 of 143 )set naglink persistence --R------------------------- The persistence Option -------------------------- --R @@ -944,7 +956,7 @@ --R The current setting is 1 --E 62 ---S 63 of 86 +--S 63 of 143 )set naglink messages --R--------------------------- The messages Option --------------------------- --R @@ -959,7 +971,7 @@ --R --E 63 ---S 64 of 86 +--S 64 of 143 )set naglink double --R---------------------------- The double Option ---------------------------- --R @@ -974,7 +986,7 @@ --R --E 64 ---S 65 of 86 +--S 65 of 143 )set output --R Current Values of output Variables --R @@ -995,7 +1007,7 @@ --R --E 65 ---S 66 of 86 +--S 66 of 143 )set output abbreviate --R-------------------------- The abbreviate Option -------------------------- --R @@ -1010,7 +1022,7 @@ --R --E 66 ---S 67 of 86 +--S 67 of 143 )set output algebra --R--------------------------- The algebra Option ---------------------------- --R @@ -1040,7 +1052,7 @@ --RThe current setting is: On:CONSOLE --E 67 ---S 68 of 86 +--S 68 of 143 )set output characters --R-------------------------- The characters Option -------------------------- --R @@ -1066,7 +1078,7 @@ --R bslash is shown as \ --E 68 ---S 69 of 86 +--S 69 of 143 )set output fortran --R--------------------------- The fortran Option ---------------------------- --R @@ -1098,7 +1110,7 @@ --RThe current setting is: Off:CONSOLE --E 69 ---S 70 of 86 +--S 70 of 143 )set output fraction --R--------------------------- The fraction Option --------------------------- --R @@ -1113,7 +1125,7 @@ --R --E 70 ---S 71 of 86 +--S 71 of 143 )set output length --R---------------------------- The length Option ---------------------------- --R @@ -1124,7 +1136,7 @@ --R --E 71 ---S 72 of 86 +--S 72 of 143 )set output mathml --R---------------------------- The mathml Option ---------------------------- --R @@ -1154,7 +1166,7 @@ --RThe current setting is: Off:CONSOLE --E 72 ---S 73 of 86 +--S 73 of 143 )set output openmath --R--------------------------- The openmath Option --------------------------- --R @@ -1184,7 +1196,7 @@ --RThe current setting is: Off:CONSOLE --E 73 ---S 74 of 86 +--S 74 of 143 )set output script --R---------------------------- The script Option ---------------------------- --R @@ -1214,7 +1226,7 @@ --RThe current setting is: Off:CONSOLE --E 74 ---S 75 of 86 +--S 75 of 143 )set output scripts --R--------------------------- The scripts Option ---------------------------- --R @@ -1229,7 +1241,7 @@ --R --E 75 ---S 76 of 86 +--S 76 of 143 )set output showeditor --R-------------------------- The showeditor Option -------------------------- --R @@ -1244,7 +1256,7 @@ --R --E 76 ---S 77 of 86 +--S 77 of 143 )set output tex --R----------------------------- The tex Option ------------------------------ --R @@ -1274,7 +1286,7 @@ --RThe current setting is: Off:CONSOLE --E 77 ---S 78 of 86 +--S 78 of 143 )set quit --R----------------------------- The quit Option ----------------------------- --R @@ -1289,7 +1301,7 @@ --R --E 78 ---S 79 of 86 +--S 79 of 143 )set streams --R Current Values of streams Variables --R @@ -1300,7 +1312,7 @@ --R --E 79 ---S 80 of 86 +--S 80 of 143 )set streams calculate --R-------------------------- The calculate Option --------------------------- --R @@ -1314,7 +1326,7 @@ --R The current setting is 10 . --E 80 ---S 81 of 86 +--S 81 of 143 )set streams showall --R--------------------------- The showall Option ---------------------------- --R @@ -1329,7 +1341,7 @@ --R --E 81 ---S 82 of 86 +--S 82 of 143 )set system --R Current Values of system Variables --R @@ -1341,7 +1353,7 @@ --R --E 82 ---S 83 of 86 +--S 83 of 143 )set system functioncode --R------------------------- The functioncode Option ------------------------- --R @@ -1356,7 +1368,7 @@ --R --E 83 ---S 84 of 86 +--S 84 of 143 )set system optimization --R------------------------- The optimization Option ------------------------- --R @@ -1371,7 +1383,7 @@ --R --E 84 ---S 85 of 86 +--S 85 of 143 )set system prettyprint --R------------------------- The prettyprint Option -------------------------- --R @@ -1386,7 +1398,7 @@ --R --E 85 ---S 86 of 86 +--S 86 of 143 )set userlevel --R-------------------------- The userlevel Option --------------------------- --R @@ -1402,6 +1414,1072 @@ --R --E 86 +--S 87 of 143 +)set output char +--R-------------------------- The characters Option -------------------------- +--R +--R Description: choose special output character set +--R +--R +--R The characters option may be followed by any one of the following: +--R +--R default +--R -> plain +--R +--R The current setting is indicated within the list. This option determines +--R the special characters used for algebraic output. This is what the +--R current choice of special characters looks like: +--R ulc is shown as + urc is shown as + +--R llc is shown as + lrc is shown as + +--R vbar is shown as | hbar is shown as - +--R quad is shown as ? lbrk is shown as [ +--R rbrk is shown as ] lbrc is shown as { +--R rbrc is shown as } ttee is shown as + +--R btee is shown as + rtee is shown as + +--R ltee is shown as + ctee is shown as + +--R bslash is shown as \ +--E 87 + +--S 88 of 143 +)set output char default +--E 88 + +--S 89 of 143 +)set output char +--RÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The characters Option ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ +--R +--R Description: choose special output character set +--R +--R +--R The characters option may be followed by any one of the following: +--R +--R -> default +--R plain +--R +--R The current setting is indicated within the list. This option determines +--R the special characters used for algebraic output. This is what the +--R current choice of special characters looks like: +--R ulc is shown as Ú urc is shown as ¿ +--R llc is shown as À lrc is shown as Ù +--R vbar is shown as ³ hbar is shown as Ä +--R quad is shown as NIL lbrk is shown as [ +--R rbrk is shown as ] lbrc is shown as { +--R rbrc is shown as } ttee is shown as  +--R btee is shown as Á rtee is shown as ´ +--R ltee is shown as à ctee is shown as Å +--R bslash is shown as \ +--E 89 + +--S 90 of 143 +)set output char plain +--E 90 + +--S 91 of 143 +)set output char +--R-------------------------- The characters Option -------------------------- +--R +--R Description: choose special output character set +--R +--R +--R The characters option may be followed by any one of the following: +--R +--R default +--R -> plain +--R +--R The current setting is indicated within the list. This option determines +--R the special characters used for algebraic output. This is what the +--R current choice of special characters looks like: +--R ulc is shown as + urc is shown as + +--R llc is shown as + lrc is shown as + +--R vbar is shown as | hbar is shown as - +--R quad is shown as ? lbrk is shown as [ +--R rbrk is shown as ] lbrc is shown as { +--R rbrc is shown as } ttee is shown as + +--R btee is shown as + rtee is shown as + +--R ltee is shown as + ctee is shown as + +--R bslash is shown as \ +--E 91 + +--S 92 of 143 +)set output fortran +--R--------------------------- The fortran Option ---------------------------- +--R +--R Description: create output in FORTRAN format +--R +--R )set output fortran is used to tell AXIOM to turn FORTRAN-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RAlso See: )set fortran +--R +--RSyntax: )set output fortran +--R where arg can be one of +--R on turn FORTRAN printing on +--R off turn FORTRAN printing off (default state) +--R console send FORTRAN output to screen (default state) +--R fp<.fe> send FORTRAN output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .sfort. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RFORTRAN output to the file polymer.sfort, issue the two commands +--R +--R )set output fortran on +--R )set output fortran polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: Off:CONSOLE +--E 92 + +--S 93 of 143 +)set output fortran foo +--I FORTRAN output will be written to file /research/test/foo.sfort . +--E 93 + +--S 94 of 143 +)set output fortran +--R--------------------------- The fortran Option ---------------------------- +--R +--R Description: create output in FORTRAN format +--R +--R )set output fortran is used to tell AXIOM to turn FORTRAN-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RAlso See: )set fortran +--R +--RSyntax: )set output fortran +--R where arg can be one of +--R on turn FORTRAN printing on +--R off turn FORTRAN printing off (default state) +--R console send FORTRAN output to screen (default state) +--R fp<.fe> send FORTRAN output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .sfort. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RFORTRAN output to the file polymer.sfort, issue the two commands +--R +--R )set output fortran on +--R )set output fortran polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: Off:/research/test/foo.sfort +--E 94 + +--S 95 of 143 +)set output fortran on +--E 95 + +--S 96 of 143 +)set output fortran +--R--------------------------- The fortran Option ---------------------------- +--R +--R Description: create output in FORTRAN format +--R +--R )set output fortran is used to tell AXIOM to turn FORTRAN-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RAlso See: )set fortran +--R +--RSyntax: )set output fortran +--R where arg can be one of +--R on turn FORTRAN printing on +--R off turn FORTRAN printing off (default state) +--R console send FORTRAN output to screen (default state) +--R fp<.fe> send FORTRAN output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .sfort. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RFORTRAN output to the file polymer.sfort, issue the two commands +--R +--R )set output fortran on +--R )set output fortran polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: On:/research/test/foo.sfort +--E 96 + +--S 97 of 143 +)set output fortran append +--I FORTRAN output will be written to file /research/test/NIL.sfort . +--E 97 + +--S 98 of 143 +)set output fortran +--R--------------------------- The fortran Option ---------------------------- +--R +--R Description: create output in FORTRAN format +--R +--R )set output fortran is used to tell AXIOM to turn FORTRAN-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RAlso See: )set fortran +--R +--RSyntax: )set output fortran +--R where arg can be one of +--R on turn FORTRAN printing on +--R off turn FORTRAN printing off (default state) +--R console send FORTRAN output to screen (default state) +--R fp<.fe> send FORTRAN output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .sfort. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RFORTRAN output to the file polymer.sfort, issue the two commands +--R +--R )set output fortran on +--R )set output fortran polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: On:/research/test/NIL.sfort +--E 98 + +--S 99 of 143 +)set output fortran foo +--I FORTRAN output will be written to file /research/test/foo.sfort . +--E 99 + +--S 100 of 143 +)set output fortran +--R--------------------------- The fortran Option ---------------------------- +--R +--R Description: create output in FORTRAN format +--R +--R )set output fortran is used to tell AXIOM to turn FORTRAN-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RAlso See: )set fortran +--R +--RSyntax: )set output fortran +--R where arg can be one of +--R on turn FORTRAN printing on +--R off turn FORTRAN printing off (default state) +--R console send FORTRAN output to screen (default state) +--R fp<.fe> send FORTRAN output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .sfort. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RFORTRAN output to the file polymer.sfort, issue the two commands +--R +--R )set output fortran on +--R )set output fortran polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: On:/research/test/foo.sfort +--E 100 + +--S 101 of 143 +)set output algebra +--R--------------------------- The algebra Option ---------------------------- +--R +--R Description: display output in algebraic form +--R +--R )set output algebra is used to tell AXIOM to turn algebra-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output algebra +--R where arg can be one of +--R on turn algebra printing on (default state) +--R off turn algebra printing off +--R console send algebra output to screen (default state) +--R fp<.fe> send algebra output to file with file prefix fp +--R and file extension .fe. If not given, .fe defaults to .spout. +--R +--RIf you wish to send the output to a file, you may need to issue this command +--Rtwice: once with on and once with the file name. For example, to send +--Ralgebra output to the file polymer.spout, issue the two commands +--R +--R )set output algebra on +--R )set output algebra polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: On:CONSOLE +--E 101 + +--S 102 of 143 +)set output algebra foo +--E 102 + +--S 103 of 143 +)set output algebra +--R--------------------------- The algebra Option ---------------------------- +--R +--R Description: display output in algebraic form +--R +--R )set output algebra is used to tell AXIOM to turn algebra-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output algebra +--R where arg can be one of +--R on turn algebra printing on (default state) +--R off turn algebra printing off +--R console send algebra output to screen (default state) +--R fp<.fe> send algebra output to file with file prefix fp +--R and file extension .fe. If not given, .fe defaults to .spout. +--R +--RIf you wish to send the output to a file, you may need to issue this command +--Rtwice: once with on and once with the file name. For example, to send +--Ralgebra output to the file polymer.spout, issue the two commands +--R +--R )set output algebra on +--R )set output algebra polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: On:/tmp/foo.spout +--E 103 + +--S 104 of 143 +)set output algebra off +--E 104 + +--S 105 of 143 +)set output algebra +--R--------------------------- The algebra Option ---------------------------- +--R +--R Description: display output in algebraic form +--R +--R )set output algebra is used to tell AXIOM to turn algebra-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output algebra +--R where arg can be one of +--R on turn algebra printing on (default state) +--R off turn algebra printing off +--R console send algebra output to screen (default state) +--R fp<.fe> send algebra output to file with file prefix fp +--R and file extension .fe. If not given, .fe defaults to .spout. +--R +--RIf you wish to send the output to a file, you may need to issue this command +--Rtwice: once with on and once with the file name. For example, to send +--Ralgebra output to the file polymer.spout, issue the two commands +--R +--R )set output algebra on +--R )set output algebra polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: Off:/tmp/foo.spout +--E 105 + +--S 106 of 143 +)set output algebra console +--E 106 + +--S 107 of 143 +)set output algebra +--R--------------------------- The algebra Option ---------------------------- +--R +--R Description: display output in algebraic form +--R +--R )set output algebra is used to tell AXIOM to turn algebra-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output algebra +--R where arg can be one of +--R on turn algebra printing on (default state) +--R off turn algebra printing off +--R console send algebra output to screen (default state) +--R fp<.fe> send algebra output to file with file prefix fp +--R and file extension .fe. If not given, .fe defaults to .spout. +--R +--RIf you wish to send the output to a file, you may need to issue this command +--Rtwice: once with on and once with the file name. For example, to send +--Ralgebra output to the file polymer.spout, issue the two commands +--R +--R )set output algebra on +--R )set output algebra polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: Off:CONSOLE +--E 107 + +--S 108 of 143 +)set output algebra on +--E 108 + +--S 109 of 143 +)set output algebra +--R--------------------------- The algebra Option ---------------------------- +--R +--R Description: display output in algebraic form +--R +--R )set output algebra is used to tell AXIOM to turn algebra-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output algebra +--R where arg can be one of +--R on turn algebra printing on (default state) +--R off turn algebra printing off +--R console send algebra output to screen (default state) +--R fp<.fe> send algebra output to file with file prefix fp +--R and file extension .fe. If not given, .fe defaults to .spout. +--R +--RIf you wish to send the output to a file, you may need to issue this command +--Rtwice: once with on and once with the file name. For example, to send +--Ralgebra output to the file polymer.spout, issue the two commands +--R +--R )set output algebra on +--R )set output algebra polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: On:CONSOLE +--E 109 + +--S 110 of 143 +)set output mathml +--R---------------------------- The mathml Option ---------------------------- +--R +--R Description: create output in MathML style +--R +--R )set output mathml is used to tell AXIOM to turn MathML-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output mathml +--R where arg can be one of +--R on turn MathML printing on +--R off turn MathML printing off (default state) +--R console send MathML output to screen (default state) +--R fp<.fe> send MathML output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .stex. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RMathML output to the file polymer.smml, issue the two commands +--R +--R )set output mathml on +--R )set output mathml polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: Off:CONSOLE +--E 110 + +--S 111 of 143 +)set output mathml foo +--I MathML output will be written to file /research/test/foo.smml . +--E 111 + +--S 112 of 143 +)set output mathml +--R---------------------------- The mathml Option ---------------------------- +--R +--R Description: create output in MathML style +--R +--R )set output mathml is used to tell AXIOM to turn MathML-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output mathml +--R where arg can be one of +--R on turn MathML printing on +--R off turn MathML printing off (default state) +--R console send MathML output to screen (default state) +--R fp<.fe> send MathML output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .stex. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RMathML output to the file polymer.smml, issue the two commands +--R +--R )set output mathml on +--R )set output mathml polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: Off:/research/test/foo.smml +--E 112 + +--S 113 of 143 +)set output mathml on +--E 113 + +--S 114 of 143 +)set output mathml +--R---------------------------- The mathml Option ---------------------------- +--R +--R Description: create output in MathML style +--R +--R )set output mathml is used to tell AXIOM to turn MathML-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output mathml +--R where arg can be one of +--R on turn MathML printing on +--R off turn MathML printing off (default state) +--R console send MathML output to screen (default state) +--R fp<.fe> send MathML output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .stex. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RMathML output to the file polymer.smml, issue the two commands +--R +--R )set output mathml on +--R )set output mathml polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: On:/research/test/foo.smml +--E 114 + +--S 115 of 143 +)set output mathml console +--E 115 + +--S 116 of 143 +)set output mathml +--R---------------------------- The mathml Option ---------------------------- +--R +--R Description: create output in MathML style +--R +--R )set output mathml is used to tell AXIOM to turn MathML-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output mathml +--R where arg can be one of +--R on turn MathML printing on +--R off turn MathML printing off (default state) +--R console send MathML output to screen (default state) +--R fp<.fe> send MathML output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .stex. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RMathML output to the file polymer.smml, issue the two commands +--R +--R )set output mathml on +--R )set output mathml polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: On:CONSOLE +--E 116 + +--S 117 of 143 +)set output openmath +--R--------------------------- The openmath Option --------------------------- +--R +--R Description: create output in OpenMath style +--R +--R )set output openmath is used to tell AXIOM to turn OpenMath output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output openmath +--R where arg can be one of +--R on turn OpenMath printing on +--R off turn OpenMath printing off (default state) +--R console send OpenMath output to screen (default state) +--R fp<.fe> send OpenMath output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .som. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--ROpenMath output to the file polymer.som, issue the two commands +--R +--R )set output openmath on +--R )set output openmath polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: Off:CONSOLE +--E 117 + +--S 118 of 143 +)set output openmath on +--E 118 + +--S 119 of 143 +)set output openmath +--R--------------------------- The openmath Option --------------------------- +--R +--R Description: create output in OpenMath style +--R +--R )set output openmath is used to tell AXIOM to turn OpenMath output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output openmath +--R where arg can be one of +--R on turn OpenMath printing on +--R off turn OpenMath printing off (default state) +--R console send OpenMath output to screen (default state) +--R fp<.fe> send OpenMath output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .som. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--ROpenMath output to the file polymer.som, issue the two commands +--R +--R )set output openmath on +--R )set output openmath polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: On:CONSOLE +--E 119 + +--S 120 of 143 +)set output openmath foo +--I OpenMath output will be written to file /research/test/foo.som . +--E 120 + +--S 121 of 143 +)set output openmath +--R--------------------------- The openmath Option --------------------------- +--R +--R Description: create output in OpenMath style +--R +--R )set output openmath is used to tell AXIOM to turn OpenMath output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output openmath +--R where arg can be one of +--R on turn OpenMath printing on +--R off turn OpenMath printing off (default state) +--R console send OpenMath output to screen (default state) +--R fp<.fe> send OpenMath output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .som. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--ROpenMath output to the file polymer.som, issue the two commands +--R +--R )set output openmath on +--R )set output openmath polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: On:/research/test/foo.som +--E 121 + +--S 122 of 143 +)set output openmath off +--E 122 + +--S 123 of 143 +)set output openmath +--R--------------------------- The openmath Option --------------------------- +--R +--R Description: create output in OpenMath style +--R +--R )set output openmath is used to tell AXIOM to turn OpenMath output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output openmath +--R where arg can be one of +--R on turn OpenMath printing on +--R off turn OpenMath printing off (default state) +--R console send OpenMath output to screen (default state) +--R fp<.fe> send OpenMath output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .som. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--ROpenMath output to the file polymer.som, issue the two commands +--R +--R )set output openmath on +--R )set output openmath polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: Off:/research/test/foo.som +--E 123 + +--S 124 of 143 +)set output openmath console +--E 124 + +--S 125 of 143 +)set output openmath +--R--------------------------- The openmath Option --------------------------- +--R +--R Description: create output in OpenMath style +--R +--R )set output openmath is used to tell AXIOM to turn OpenMath output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output openmath +--R where arg can be one of +--R on turn OpenMath printing on +--R off turn OpenMath printing off (default state) +--R console send OpenMath output to screen (default state) +--R fp<.fe> send OpenMath output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .som. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--ROpenMath output to the file polymer.som, issue the two commands +--R +--R )set output openmath on +--R )set output openmath polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: Off:CONSOLE +--E 125 + +--S 126 of 143 +)set output script +--R---------------------------- The script Option ---------------------------- +--R +--R Description: display output in SCRIPT formula format +--R +--R )set output script is used to tell AXIOM to turn IBM Script formula-style +--Routput printing on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output script +--R where arg can be one of +--R on turn IBM Script formula printing on +--R off turn IBM Script formula printing off (default state) +--R console send IBM Script formula output to screen (default state) +--R fp<.fe> send IBM Script formula output to file with file prefix fp +--R and file extension .fe. If not given, .fe defaults to .sform. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RIBM Script formula output to the file polymer.sform, issue the two commands +--R +--R )set output script on +--R )set output script polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: Off:CONSOLE +--E 126 + +--S 127 of 143 +)set output script on +--E 127 + +--S 128 of 143 +)set output script +--R---------------------------- The script Option ---------------------------- +--R +--R Description: display output in SCRIPT formula format +--R +--R )set output script is used to tell AXIOM to turn IBM Script formula-style +--Routput printing on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output script +--R where arg can be one of +--R on turn IBM Script formula printing on +--R off turn IBM Script formula printing off (default state) +--R console send IBM Script formula output to screen (default state) +--R fp<.fe> send IBM Script formula output to file with file prefix fp +--R and file extension .fe. If not given, .fe defaults to .sform. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RIBM Script formula output to the file polymer.sform, issue the two commands +--R +--R )set output script on +--R )set output script polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: On:CONSOLE +--E 128 + +--S 129 of 143 +)set output script foo +--I IBM Script formula output will be written to file +--I /research/test/foo.sform . +--E 129 + +--S 130 of 143 +)set output script +--R---------------------------- The script Option ---------------------------- +--R +--R Description: display output in SCRIPT formula format +--R +--R )set output script is used to tell AXIOM to turn IBM Script formula-style +--Routput printing on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output script +--R where arg can be one of +--R on turn IBM Script formula printing on +--R off turn IBM Script formula printing off (default state) +--R console send IBM Script formula output to screen (default state) +--R fp<.fe> send IBM Script formula output to file with file prefix fp +--R and file extension .fe. If not given, .fe defaults to .sform. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RIBM Script formula output to the file polymer.sform, issue the two commands +--R +--R )set output script on +--R )set output script polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: On:/research/test/foo.sform +--E 130 + +--S 131 of 143 +)set output script console +--E 131 + +--S 132 of 143 +)set output script +--R---------------------------- The script Option ---------------------------- +--R +--R Description: display output in SCRIPT formula format +--R +--R )set output script is used to tell AXIOM to turn IBM Script formula-style +--Routput printing on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output script +--R where arg can be one of +--R on turn IBM Script formula printing on +--R off turn IBM Script formula printing off (default state) +--R console send IBM Script formula output to screen (default state) +--R fp<.fe> send IBM Script formula output to file with file prefix fp +--R and file extension .fe. If not given, .fe defaults to .sform. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RIBM Script formula output to the file polymer.sform, issue the two commands +--R +--R )set output script on +--R )set output script polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: On:CONSOLE +--E 132 + +--S 133 of 143 +)set output script off +--E 133 + +--S 134 of 143 +)set output script +--R---------------------------- The script Option ---------------------------- +--R +--R Description: display output in SCRIPT formula format +--R +--R )set output script is used to tell AXIOM to turn IBM Script formula-style +--Routput printing on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output script +--R where arg can be one of +--R on turn IBM Script formula printing on +--R off turn IBM Script formula printing off (default state) +--R console send IBM Script formula output to screen (default state) +--R fp<.fe> send IBM Script formula output to file with file prefix fp +--R and file extension .fe. If not given, .fe defaults to .sform. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RIBM Script formula output to the file polymer.sform, issue the two commands +--R +--R )set output script on +--R )set output script polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: Off:CONSOLE +--E 134 + +--S 135 of 143 +)set output tex +--R----------------------------- The tex Option ------------------------------ +--R +--R Description: create output in TeX style +--R +--R )set output tex is used to tell AXIOM to turn TeX-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output tex +--R where arg can be one of +--R on turn TeX printing on +--R off turn TeX printing off (default state) +--R console send TeX output to screen (default state) +--R fp<.fe> send TeX output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .stex. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RTeX output to the file polymer.stex, issue the two commands +--R +--R )set output tex on +--R )set output tex polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: Off:CONSOLE +--E 135 + +--S 136 of 143 +)set output tex on +--E 136 + +--S 137 of 143 +)set output tex +--R----------------------------- The tex Option ------------------------------ +--R +--R Description: create output in TeX style +--R +--R )set output tex is used to tell AXIOM to turn TeX-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output tex +--R where arg can be one of +--R on turn TeX printing on +--R off turn TeX printing off (default state) +--R console send TeX output to screen (default state) +--R fp<.fe> send TeX output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .stex. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RTeX output to the file polymer.stex, issue the two commands +--R +--R )set output tex on +--R )set output tex polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: On:CONSOLE +--E 137 + +--S 138 of 143 +)set output tex foo +--I TeX output will be written to file /research/test/foo.stex . +--E 138 + +--S 139 of 143 +)set output tex +--R----------------------------- The tex Option ------------------------------ +--R +--R Description: create output in TeX style +--R +--R )set output tex is used to tell AXIOM to turn TeX-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output tex +--R where arg can be one of +--R on turn TeX printing on +--R off turn TeX printing off (default state) +--R console send TeX output to screen (default state) +--R fp<.fe> send TeX output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .stex. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RTeX output to the file polymer.stex, issue the two commands +--R +--R )set output tex on +--R )set output tex polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: On:/research/test/foo.stex +--E 139 + +--S 140 of 143 +)set output tex off +--E 140 + +--S 141 of 143 +)set output tex +--R----------------------------- The tex Option ------------------------------ +--R +--R Description: create output in TeX style +--R +--R )set output tex is used to tell AXIOM to turn TeX-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output tex +--R where arg can be one of +--R on turn TeX printing on +--R off turn TeX printing off (default state) +--R console send TeX output to screen (default state) +--R fp<.fe> send TeX output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .stex. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RTeX output to the file polymer.stex, issue the two commands +--R +--R )set output tex on +--R )set output tex polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--IThe current setting is: Off:/research/test/foo.stex +--E 141 + +--S 142 of 143 +)set output tex console +--E 142 + +--S 143 of 143 +)set output tex +--R----------------------------- The tex Option ------------------------------ +--R +--R Description: create output in TeX style +--R +--R )set output tex is used to tell AXIOM to turn TeX-style output +--Rprinting on and off, and where to place the output. By default, the +--Rdestination for the output is the screen but printing is turned off. +--R +--RSyntax: )set output tex +--R where arg can be one of +--R on turn TeX printing on +--R off turn TeX printing off (default state) +--R console send TeX output to screen (default state) +--R fp<.fe> send TeX output to file with file prefix fp and file +--R extension .fe. If not given, .fe defaults to .stex. +--R +--RIf you wish to send the output to a file, you must issue this command +--Rtwice: once with on and once with the file name. For example, to send +--RTeX output to the file polymer.stex, issue the two commands +--R +--R )set output tex on +--R )set output tex polymer +--R +--RThe output is placed in the directory from which you invoked AXIOM or +--Rthe one you set with the )cd system command. +--RThe current setting is: Off:CONSOLE +--E 143 + )spool )lisp (bye) diff --git a/src/input/unittest1.input.pamphlet b/src/input/unittest1.input.pamphlet index c5d0dfa..0c6bac5 100644 --- a/src/input/unittest1.input.pamphlet +++ b/src/input/unittest1.input.pamphlet @@ -17,83 +17,16 @@ Unit test the user level commands )set mes auto off )clear all ---S 1 of 70 +--S 1 of 97 )with API --R )library cannot find the file API. --E 1 ---S 2 of 70 -)apropos matrix ---R ---ROperations whose names satisfy the above pattern(s): ---R ---RbezoutMatrix createGenericMatrix ---RcreateMultiplicationMatrix diagonalMatrix ---ReigenMatrix firstUncouplingMatrix ---RgetMultiplicationMatrix idealiserMatrix ---RidentityMatrix identitySquareMatrix ---RintegralDerivationMatrix integralMatrix ---RintegralMatrixAtInfinity inverseIntegralMatrix ---RinverseIntegralMatrixAtInfinity leftTraceMatrix ---RlinearMatrix mapMatrixIfCan ---Rmatrix matrixConcat3D ---RmatrixDimensions matrixGcd ---RrectangularMatrix rightTraceMatrix ---RscalarMatrix setsubMatrix! ---RsquareMatrix subMatrix ---RsylvesterMatrix traceMatrix ---RwronskianMatrix zeroMatrix ---RzeroSquareMatrix ---R ---R To get more information about an operation such as squareMatrix , ---R issue the command )display op squareMatrix ---R------------------------------- Categories -------------------------------- ---R ---RCategories with names matching patterns: ---R matrix ---R ---R FMC FortranMatrixCategory ---R FMFUN FortranMatrixFunctionCategory ---R MATCAT MatrixCategory RMATCAT RectangularMatrixCategory ---R SMATCAT SquareMatrixCategory ---R--------------------------------- Domains --------------------------------- ---R ---RDomains with names matching patterns: ---R matrix ---R ---R DHMATRIX DenavitHartenbergMatrix DPMM DirectProductMatrixModule ---R IMATRIX IndexedMatrix LSQM LieSquareMatrix ---R M3D ThreeDimensionalMatrix MATCAT- MatrixCategory& ---R MATRIX Matrix RMATCAT- RectangularMatrixCategory& ---R RMATRIX RectangularMatrix SMATCAT- SquareMatrixCategory& ---R SQMATRIX SquareMatrix ---R-------------------------------- Packages --------------------------------- ---R ---RPackages with names matching patterns: ---R matrix ---R ---R BEZOUT BezoutMatrix CVMP CoerceVectorMatrixPackage ---R IMATLIN InnerMatrixLinearAlgebraFunctions ---R IMATQF InnerMatrixQuotientFieldFunctions ---R LSMP LinearSystemMatrixPackage LSMP1 LinearSystemMatrixPackage1 ---R MATCAT2 MatrixCategoryFunctions2 MATLIN MatrixLinearAlgebraFunctions ---R MATSTOR StorageEfficientMatrixOperations ---R MCDEN MatrixCommonDenominator NAGF01 NagMatrixOperationsPackage ---R RMCAT2 RectangularMatrixCategoryFunctions2 ---R TRIMAT TriangularMatrixOperations ---R--------------- System Commands for User Level: development --------------- ---R ---RNo system commands at this level matching patterns: ---R matrix ---R ---R------------------------- System Command Synonyms ------------------------- ---R ---R No user-defined synonyms satisfying patterns: ---R matrix ---R +--S 2 of 97 this command generates random output +--)apropos matrix --E 2 ---S 3 of 70 +--S 3 of 97 )what categories set --R --R------------------------------- Categories -------------------------------- @@ -112,7 +45,7 @@ Unit test the user level commands --R TSETCAT TriangularSetCategory --E 3 ---S 4 of 70 +--S 4 of 97 )what commands set --R --R--------------- System Commands for User Level: development --------------- @@ -124,134 +57,15 @@ Unit test the user level commands --R --E 4 ---S 5 of 70 -)what domains set ---R ---R--------------------------------- Domains --------------------------------- ---R ---RDomains with names matching patterns: ---R set ---R ---R FSAGG- FiniteSetAggregate& GPOLSET GeneralPolynomialSet ---R GSTBL GeneralSparseTable GTSET GeneralTriangularSet ---R MKCHSET MakeCachableSet MSET Multiset ---R ORDSET- OrderedSet& OSI OrdSetInts ---R PSETCAT- PolynomialSetCategory& QALGSET QuasiAlgebraicSet ---R REGSET RegularTriangularSet ---R RSETCAT- RegularTriangularSetCategory& ---R RULESET Ruleset SAOS SingletonAsOrderedSet ---R SET Set SETAGG- SetAggregate& ---R SETCAT- SetCategory& SETMN SetOfMIntegersInOneToN ---R SREGSET SquareFreeRegularTriangularSet ---R STBL SparseTable TSETCAT- TriangularSetCategory& ---R WUTSET WuWenTsunTriangularSet +--S 5 of 97 this command generates random output +--)what domains set --E 5 ---S 6 of 70 -)what operations set ---R ---R ---ROperations whose names satisfy the above pattern(s): ---R ---ROMsetEncoding ---RbasicSet ---RcharacteristicSet ---RcrushedSet ---Rfactorset ---RfirstSubsetGray ---RinternalSubPolSet? ---RinternalZeroSetSplit ---RinvertibleSet ---RmedialSet ---Rminset ---Rmultiset ---RnextSubsetGray ---Roverset? ---Rqsetelt! ---RquasiAlgebraicSet ---Rreset ---RresetAttributeButtons ---RresetBadValues ---RresetNew ---RresetVariableOrder ---RrewriteSetByReducingWithParticularGenerators ---RrewriteSetWithReduction ---RroughBasicSet ---Rruleset ---Rset ---RsetAdaptive ---RsetAdaptive3D ---RsetAttributeButtonStep ---RsetButtonValue ---RsetClipValue ---RsetClosed ---RsetColumn! ---RsetCondition! ---RsetDifference ---RsetEmpty! ---RsetEpilogue! ---RsetErrorBound ---RsetFieldInfo ---RsetFormula! ---RsetImagSteps ---RsetIntersection ---RsetLabelValue ---RsetLegalFortranSourceExtensions ---RsetMaxPoints ---RsetMaxPoints3D ---RsetMinPoints ---RsetMinPoints3D ---RsetOfMinN ---RsetOrder ---RsetPoly ---RsetPosition ---RsetPredicates ---RsetPrologue! ---RsetProperties ---RsetProperty ---RsetRealSteps ---RsetRow! ---RsetScreenResolution ---RsetScreenResolution3D ---RsetStatus ---RsetStatus! ---RsetTex! ---RsetTopPredicate ---RsetUnion ---RsetValue! ---RsetVariableOrder ---Rsetchildren! ---Rsetelt ---Rsetelt! ---Rsetfirst! ---Rsetlast! ---Rsetleaves! ---Rsetleft! ---Rsetnext! ---Rsetprevious! ---Rsetref ---Rsetrest! ---Rsetright! ---RsetsubMatrix! ---Rsetvalue! ---RstartTableInvSet! ---RstopTableInvSet! ---RstoseInvertibleSet ---RstoseInvertibleSetreg ---RstoseInvertibleSetsqfreg ---RsubPolSet? ---RsubSet ---RsubTriSet? ---Rsubset? ---RtoseInvertibleSet ---RzeroSetSplit ---RzeroSetSplitIntoTriangularSystems ---R ---R To get more information about an operation such as ruleset , ---R issue the command )display op ruleset +--S 6 of 97 this command generates random output +--)what operations set --E 6 ---S 7 of 70 +--S 7 of 97 )what packages set --R --R-------------------------------- Packages --------------------------------- @@ -268,7 +82,7 @@ Unit test the user level commands --R SRDCMPK SquareFreeRegularSetDecompositionPackage --E 7 ---S 8 of 70 +--S 8 of 97 )what synonym set --R --R------------------------- System Command Synonyms ------------------------- @@ -278,327 +92,15 @@ Unit test the user level commands --R --E 8 ---S 9 of 70 -)what things set ---R ---R ---ROperations whose names satisfy the above pattern(s): ---R ---ROMsetEncoding ---RbasicSet ---RcharacteristicSet ---RcrushedSet ---Rfactorset ---RfirstSubsetGray ---RinternalSubPolSet? ---RinternalZeroSetSplit ---RinvertibleSet ---RmedialSet ---Rminset ---Rmultiset ---RnextSubsetGray ---Roverset? ---Rqsetelt! ---RquasiAlgebraicSet ---Rreset ---RresetAttributeButtons ---RresetBadValues ---RresetNew ---RresetVariableOrder ---RrewriteSetByReducingWithParticularGenerators ---RrewriteSetWithReduction ---RroughBasicSet ---Rruleset ---Rset ---RsetAdaptive ---RsetAdaptive3D ---RsetAttributeButtonStep ---RsetButtonValue ---RsetClipValue ---RsetClosed ---RsetColumn! ---RsetCondition! ---RsetDifference ---RsetEmpty! ---RsetEpilogue! ---RsetErrorBound ---RsetFieldInfo ---RsetFormula! ---RsetImagSteps ---RsetIntersection ---RsetLabelValue ---RsetLegalFortranSourceExtensions ---RsetMaxPoints ---RsetMaxPoints3D ---RsetMinPoints ---RsetMinPoints3D ---RsetOfMinN ---RsetOrder ---RsetPoly ---RsetPosition ---RsetPredicates ---RsetPrologue! ---RsetProperties ---RsetProperty ---RsetRealSteps ---RsetRow! ---RsetScreenResolution ---RsetScreenResolution3D ---RsetStatus ---RsetStatus! ---RsetTex! ---RsetTopPredicate ---RsetUnion ---RsetValue! ---RsetVariableOrder ---Rsetchildren! ---Rsetelt ---Rsetelt! ---Rsetfirst! ---Rsetlast! ---Rsetleaves! ---Rsetleft! ---Rsetnext! ---Rsetprevious! ---Rsetref ---Rsetrest! ---Rsetright! ---RsetsubMatrix! ---Rsetvalue! ---RstartTableInvSet! ---RstopTableInvSet! ---RstoseInvertibleSet ---RstoseInvertibleSetreg ---RstoseInvertibleSetsqfreg ---RsubPolSet? ---RsubSet ---RsubTriSet? ---Rsubset? ---RtoseInvertibleSet ---RzeroSetSplit ---RzeroSetSplitIntoTriangularSystems ---R ---R To get more information about an operation such as ruleset , ---R issue the command )display op ruleset ---R------------------------------- Categories -------------------------------- ---R ---RCategories with names matching patterns: ---R set ---R ---R CACHSET CachableSet FSAGG FiniteSetAggregate ---R MSETAGG MultisetAggregate ---R NTSCAT NormalizedTriangularSetCategory ---R OMSAGG OrderedMultisetAggregate ORDSET OrderedSet ---R PSETCAT PolynomialSetCategory RSETCAT RegularTriangularSetCategory ---R SETAGG SetAggregate SETCAT SetCategory ---R SFRTCAT SquareFreeRegularTriangularSetCategory ---R SNTSCAT SquareFreeNormalizedTriangularSetCategory ---R TSETCAT TriangularSetCategory ---R--------------------------------- Domains --------------------------------- ---R ---RDomains with names matching patterns: ---R set ---R ---R FSAGG- FiniteSetAggregate& GPOLSET GeneralPolynomialSet ---R GSTBL GeneralSparseTable GTSET GeneralTriangularSet ---R MKCHSET MakeCachableSet MSET Multiset ---R ORDSET- OrderedSet& OSI OrdSetInts ---R PSETCAT- PolynomialSetCategory& QALGSET QuasiAlgebraicSet ---R REGSET RegularTriangularSet ---R RSETCAT- RegularTriangularSetCategory& ---R RULESET Ruleset SAOS SingletonAsOrderedSet ---R SET Set SETAGG- SetAggregate& ---R SETCAT- SetCategory& SETMN SetOfMIntegersInOneToN ---R SREGSET SquareFreeRegularTriangularSet ---R STBL SparseTable TSETCAT- TriangularSetCategory& ---R WUTSET WuWenTsunTriangularSet ---R-------------------------------- Packages --------------------------------- ---R ---RPackages with names matching patterns: ---R set ---R ---R FSAGG2 FiniteSetAggregateFunctions2 LAZM3PK LazardSetSolvingPackage ---R PSETPK PolynomialSetUtilitiesPackage ---R QALGSET2 QuasiAlgebraicSet2 ---R RSDCMPK RegularSetDecompositionPackage ---R RSETGCD RegularTriangularSetGcdPackage ---R SFRGCD SquareFreeRegularTriangularSetGcdPackage ---R SRDCMPK SquareFreeRegularSetDecompositionPackage ---R--------------- System Commands for User Level: development --------------- ---R ---RSystem commands at this level matching patterns: ---R set ---R ---Rset ---R ---R------------------------- System Command Synonyms ------------------------- ---R ---R No user-defined synonyms satisfying patterns: ---R set ---R +--S 9 of 97 this command generates random output +--)what things set --E 9 ---S 10 of 70 -)apropos set ---R ---R ---ROperations whose names satisfy the above pattern(s): ---R ---ROMsetEncoding ---RbasicSet ---RcharacteristicSet ---RcrushedSet ---Rfactorset ---RfirstSubsetGray ---RinternalSubPolSet? ---RinternalZeroSetSplit ---RinvertibleSet ---RmedialSet ---Rminset ---Rmultiset ---RnextSubsetGray ---Roverset? ---Rqsetelt! ---RquasiAlgebraicSet ---Rreset ---RresetAttributeButtons ---RresetBadValues ---RresetNew ---RresetVariableOrder ---RrewriteSetByReducingWithParticularGenerators ---RrewriteSetWithReduction ---RroughBasicSet ---Rruleset ---Rset ---RsetAdaptive ---RsetAdaptive3D ---RsetAttributeButtonStep ---RsetButtonValue ---RsetClipValue ---RsetClosed ---RsetColumn! ---RsetCondition! ---RsetDifference ---RsetEmpty! ---RsetEpilogue! ---RsetErrorBound ---RsetFieldInfo ---RsetFormula! ---RsetImagSteps ---RsetIntersection ---RsetLabelValue ---RsetLegalFortranSourceExtensions ---RsetMaxPoints ---RsetMaxPoints3D ---RsetMinPoints ---RsetMinPoints3D ---RsetOfMinN ---RsetOrder ---RsetPoly ---RsetPosition ---RsetPredicates ---RsetPrologue! ---RsetProperties ---RsetProperty ---RsetRealSteps ---RsetRow! ---RsetScreenResolution ---RsetScreenResolution3D ---RsetStatus ---RsetStatus! ---RsetTex! ---RsetTopPredicate ---RsetUnion ---RsetValue! ---RsetVariableOrder ---Rsetchildren! ---Rsetelt ---Rsetelt! ---Rsetfirst! ---Rsetlast! ---Rsetleaves! ---Rsetleft! ---Rsetnext! ---Rsetprevious! ---Rsetref ---Rsetrest! ---Rsetright! ---RsetsubMatrix! ---Rsetvalue! ---RstartTableInvSet! ---RstopTableInvSet! ---RstoseInvertibleSet ---RstoseInvertibleSetreg ---RstoseInvertibleSetsqfreg ---RsubPolSet? ---RsubSet ---RsubTriSet? ---Rsubset? ---RtoseInvertibleSet ---RzeroSetSplit ---RzeroSetSplitIntoTriangularSystems ---R ---R To get more information about an operation such as ruleset , ---R issue the command )display op ruleset ---R------------------------------- Categories -------------------------------- ---R ---RCategories with names matching patterns: ---R set ---R ---R CACHSET CachableSet FSAGG FiniteSetAggregate ---R MSETAGG MultisetAggregate ---R NTSCAT NormalizedTriangularSetCategory ---R OMSAGG OrderedMultisetAggregate ORDSET OrderedSet ---R PSETCAT PolynomialSetCategory RSETCAT RegularTriangularSetCategory ---R SETAGG SetAggregate SETCAT SetCategory ---R SFRTCAT SquareFreeRegularTriangularSetCategory ---R SNTSCAT SquareFreeNormalizedTriangularSetCategory ---R TSETCAT TriangularSetCategory ---R--------------------------------- Domains --------------------------------- ---R ---RDomains with names matching patterns: ---R set ---R ---R FSAGG- FiniteSetAggregate& GPOLSET GeneralPolynomialSet ---R GSTBL GeneralSparseTable GTSET GeneralTriangularSet ---R MKCHSET MakeCachableSet MSET Multiset ---R ORDSET- OrderedSet& OSI OrdSetInts ---R PSETCAT- PolynomialSetCategory& QALGSET QuasiAlgebraicSet ---R REGSET RegularTriangularSet ---R RSETCAT- RegularTriangularSetCategory& ---R RULESET Ruleset SAOS SingletonAsOrderedSet ---R SET Set SETAGG- SetAggregate& ---R SETCAT- SetCategory& SETMN SetOfMIntegersInOneToN ---R SREGSET SquareFreeRegularTriangularSet ---R STBL SparseTable TSETCAT- TriangularSetCategory& ---R WUTSET WuWenTsunTriangularSet ---R-------------------------------- Packages --------------------------------- ---R ---RPackages with names matching patterns: ---R set ---R ---R FSAGG2 FiniteSetAggregateFunctions2 LAZM3PK LazardSetSolvingPackage ---R PSETPK PolynomialSetUtilitiesPackage ---R QALGSET2 QuasiAlgebraicSet2 ---R RSDCMPK RegularSetDecompositionPackage ---R RSETGCD RegularTriangularSetGcdPackage ---R SFRGCD SquareFreeRegularTriangularSetGcdPackage ---R SRDCMPK SquareFreeRegularSetDecompositionPackage ---R--------------- System Commands for User Level: development --------------- ---R ---RSystem commands at this level matching patterns: ---R set ---R ---Rset ---R ---R------------------------- System Command Synonyms ------------------------- ---R ---R No user-defined synonyms satisfying patterns: ---R set ---R +--S 10 of 97 this command generates random output +--)apropos set --E 10 ---S 11 of 70 +--S 11 of 97 )prompt --R---------------------------- The prompt Option ---------------------------- --R @@ -616,13 +118,13 @@ Unit test the user level commands --R --E 11 ---S 12 of 70 +--S 12 of 97 )version --R --IValue = "Saturday February 21, 2009 at 17:59:27 " --E 12 ---S 13 of 70 +--S 13 of 97 )zsys )from )c --R --R @@ -633,7 +135,7 @@ Unit test the user level commands --R --E 13 ---S 14 of 70 +--S 14 of 97 )zsys )from )d --R --R @@ -644,7 +146,7 @@ Unit test the user level commands --R --E 14 ---S 15 of 70 +--S 15 of 97 )zsys )from )dt --R --R @@ -655,7 +157,7 @@ Unit test the user level commands --R --E 15 ---S 16 of 70 +--S 16 of 97 )zsys )from )ct --R --R @@ -666,7 +168,7 @@ Unit test the user level commands --R --E 16 ---S 17 of 70 +--S 17 of 97 )zsys )from )ctl --R --R @@ -677,7 +179,7 @@ Unit test the user level commands --R --E 17 ---S 18 of 70 +--S 18 of 97 )zsys )from )ec --R --R @@ -688,7 +190,7 @@ Unit test the user level commands --R --E 18 ---S 19 of 70 +--S 19 of 97 )zsys )from )ect --R --R @@ -699,7 +201,7 @@ Unit test the user level commands --R --E 19 ---S 20 of 70 +--S 20 of 97 )zsys )from )e --R --R @@ -710,12 +212,12 @@ Unit test the user level commands --R --E 20 ---S 21 of 70 +--S 21 of 97 )zsys )from )version --R --E 21 ---S 22 of 70 +--S 22 of 97 )zsys )from )update --R --R @@ -726,7 +228,7 @@ Unit test the user level commands --R --E 22 ---S 23 of 70 +--S 23 of 97 )zsys )from )patch --R --R @@ -737,33 +239,33 @@ Unit test the user level commands --R --E 23 ---S 24 of 70 +--S 24 of 97 )zsys )from )there 1 --R --R ---R Unknown option: there +--R Unknown option: there --R Available options are c ct e ec ect cls pause update patch compare record --R --E 24 ---S 25 of 70 +--S 25 of 97 )zsys )from )compare --R --R An argument is required for compare --E 25 ---S 26 of 70 +--S 26 of 97 )zsys )from )record --R --R An argument is required for record --E 26 ---S 27 of 70 +--S 27 of 97 )summary --R --E 27 ---S 28 of 70 +--S 28 of 97 --R)credits --RAn alphabetical listing of contributors to AXIOM: --RCyril Alberga Roy Adler Christian Aistleitner @@ -848,7 +350,7 @@ Unit test the user level commands --RBruno Zuercher Dan Zwillinger --E 28 ---S 29 of 70 +--S 29 of 97 )set expose --R---------------------------- The expose Option ---------------------------- --R @@ -879,7 +381,7 @@ Unit test the user level commands --R for more information. --E 29 ---S 30 of 70 +--S 30 of 97 )set expose add --R----------------------------- The add Option ------------------------------ --R The following groups are explicitly exposed in the current frame @@ -903,7 +405,7 @@ Unit test the user level commands --R for more information. --E 30 ---S 31 of 70 +--S 31 of 97 )set expose drop --R----------------------------- The drop Option ----------------------------- --R The following constructors are explicitly hidden in the current @@ -920,7 +422,7 @@ Unit test the user level commands --R for more information. --E 31 ---S 32 of 70 +--S 32 of 97 )set expose add group --R---------------------------- The group Option ----------------------------- --R The following groups are explicitly exposed in the current frame @@ -941,7 +443,7 @@ Unit test the user level commands --Rdefaults --E 32 ---S 33 of 70 +--S 33 of 97 )set expose add constructor --R------------------------- The constructor Option -------------------------- --R The following constructors are explicitly exposed in the current @@ -949,7 +451,7 @@ Unit test the user level commands --R there are no explicitly exposed constructors --E 33 ---S 34 of 70 +--S 34 of 97 )set expose drop group --R---------------------------- The group Option ----------------------------- --R When followed by one or more exposure group names, this option @@ -964,7 +466,7 @@ Unit test the user level commands --R anna --E 34 ---S 35 of 70 +--S 35 of 97 )set expose drop constructor --R------------------------- The constructor Option -------------------------- --R When followed by one or more constructor names, this option allows @@ -979,7 +481,7 @@ Unit test the user level commands --R there are no explicitly hidden constructors --E 35 ---S 36 of 70 +--S 36 of 97 )show SQMATRIX --R SquareMatrix(ndim: NonNegativeInteger,R: Ring) is a domain constructor --R Abbreviation for SquareMatrix is SQMATRIX @@ -1078,12 +580,12 @@ Unit test the user level commands --R --E 36 ---S 37 of 70 +--S 37 of 97 )set expose add constructor SQMATRIX --I SquareMatrix is now explicitly exposed in frame frame0 --E 37 ---S 38 of 70 +--S 38 of 97 )show SQMATRIX --R SquareMatrix(ndim: NonNegativeInteger,R: Ring) is a domain constructor --R Abbreviation for SquareMatrix is SQMATRIX @@ -1182,7 +684,7 @@ Unit test the user level commands --R --E 38 ---S 39 of 70 +--S 39 of 97 )set expose add --R----------------------------- The add Option ------------------------------ --R The following groups are explicitly exposed in the current frame @@ -1206,12 +708,12 @@ Unit test the user level commands --R for more information. --E 39 ---S 40 of 70 +--S 40 of 97 )set expose drop constructor SQMATRIX --I SquareMatrix is now explicitly hidden in frame frame0 --E 40 ---S 41 of 70 +--S 41 of 97 )show SQMATRIX --R SquareMatrix(ndim: NonNegativeInteger,R: Ring) is a domain constructor --R Abbreviation for SquareMatrix is SQMATRIX @@ -1310,7 +812,7 @@ Unit test the user level commands --R --E 41 ---S 42 of 70 +--S 42 of 97 )set expose --R---------------------------- The expose Option ---------------------------- --R @@ -1341,12 +843,12 @@ Unit test the user level commands --R for more information. --E 42 ---S 43 of 70 +--S 43 of 97 )set expose drop group anna --I anna is no longer an exposure group for frame frame0 --E 43 ---S 44 of 70 +--S 44 of 97 )set expose --R---------------------------- The expose Option ---------------------------- --R @@ -1376,7 +878,7 @@ Unit test the user level commands --R for more information. --E 44 ---S 45 of 70 +--S 45 of 97 )set expose add group --R---------------------------- The group Option ----------------------------- --R The following groups are explicitly exposed in the current frame @@ -1396,12 +898,12 @@ Unit test the user level commands --Rdefaults --E 45 ---S 46 of 70 +--S 46 of 97 )set expose add group anna --I anna is now an exposure group for frame frame0 --E 46 ---S 47 of 70 +--S 47 of 97 )set expose --R---------------------------- The expose Option ---------------------------- --R @@ -1432,301 +934,605 @@ Unit test the user level commands --R for more information. --E 47 ---S 48 of 70 +--S 48 of 97 )display - - )display keyword arguments are - abbreviations - all - macros - modes - names - operations - properties - types - values - or abbreviations thereof - +--R +--R )display keyword arguments are +--R abbreviations +--R all +--R macros +--R modes +--R names +--R operations +--R properties +--R types +--R values +--R or abbreviations thereof +--R --E 48 ---S 49 of 70 +--S 49 of 97 )display abb - You have requested that all abbreviations be displayed. As there are - several hundred abbreviations, please confirm your request by - typing y or yes and then pressing Enter : -n - Since you did not respond with y or yes the list of abbreviations - will not be displayed. +--R +--R You have requested that all abbreviations be displayed. As there are +--R several hundred abbreviations, please confirm your request by +--R typing y or yes and then pressing Enter : +--R +--R >> System error: +--R %.EOF is not of type SEQUENCE. +--R +--R Continuing to read the file... +--R --E 49 ---S 50 of 70 +--S 50 of 97 )display all -Properties of %e : - This is a system-defined macro. - macro %e () == exp(1) -Properties of %i : - This is a system-defined macro. - macro %i () == complex(0,1) -Properties of %infinity : - This is a system-defined macro. - macro %infinity () == infinity() -Properties of %minusInfinity : - This is a system-defined macro. - macro %minusInfinity () == minusInfinity() -Properties of %pi : - This is a system-defined macro. - macro %pi () == pi() -Properties of %plusInfinity : - This is a system-defined macro. - macro %plusInfinity () == plusInfinity() -Properties of SF : - This is a system-defined macro. - macro SF () == DoubleFloat() +--RProperties of %e : +--R This is a system-defined macro. +--R macro %e () == exp(1) +--RProperties of %i : +--R This is a system-defined macro. +--R macro %i () == complex(0,1) +--RProperties of %infinity : +--R This is a system-defined macro. +--R macro %infinity () == infinity() +--RProperties of %minusInfinity : +--R This is a system-defined macro. +--R macro %minusInfinity () == minusInfinity() +--RProperties of %pi : +--R This is a system-defined macro. +--R macro %pi () == pi() +--RProperties of %plusInfinity : +--R This is a system-defined macro. +--R macro %plusInfinity () == plusInfinity() +--RProperties of SF : +--R This is a system-defined macro. +--R macro SF () == DoubleFloat() --E 50 ---S 51 of 70 +--S 51 of 97 )display macros - -System-defined macros: - macro %e () == exp(1) - macro %i () == complex(0,1) - macro %infinity () == infinity() - macro %minusInfinity () == minusInfinity() - macro %pi () == pi() - macro %plusInfinity () == plusInfinity() - macro SF () == DoubleFloat() +--R +--RSystem-defined macros: +--R macro %e () == exp(1) +--R macro %i () == complex(0,1) +--R macro %infinity () == infinity() +--R macro %minusInfinity () == minusInfinity() +--R macro %pi () == pi() +--R macro %plusInfinity () == plusInfinity() +--R macro SF () == DoubleFloat() --E 51 ---S 52 of 70 +--S 52 of 97 )display modes - Type of value of %e: (none) - Type of value of %i: (none) - Type of value of %infinity: (none) - Type of value of %minusInfinity: (none) - Type of value of %pi: (none) - Type of value of %plusInfinity: (none) - Type of value of SF: (none) +--R Type of value of %e: (none) +--R Type of value of %i: (none) +--R Type of value of %infinity: (none) +--R Type of value of %minusInfinity: (none) +--R Type of value of %pi: (none) +--R Type of value of %plusInfinity: (none) +--R Type of value of SF: (none) --E 52 ---S 53 of 70 +--S 53 of 97 )display names - -Names of User-Defined Objects in the Workspace: - - * None * - -Names of System-Defined Objects in the Workspace: - -%e %i %infinity %minusInfinity -%pi %plusInfinity SF +--R +--RNames of User-Defined Objects in the Workspace: +--R +--R * None * +--R +--RNames of System-Defined Objects in the Workspace: +--R +--R%e %i %infinity %minusInfinity +--R%pi %plusInfinity SF --E 53 ---S 54 of 70 +--S 54 of 97 )display operations - You have requested that all information about all AXIOM operations - (functions) be displayed. As there are several hundred - operations, please confirm your request by typing y or yes and - then pressing Enter : -n - Since you did not respond with y or yes the list of operations will - not be displayed. +--R +--R You have requested that all information about all AXIOM operations +--R (functions) be displayed. As there are several hundred +--R operations, please confirm your request by typing y or yes and +--R then pressing Enter : +--R +--R >> System error: +--R %.EOF is not of type SEQUENCE. +--R +--R Continuing to read the file... +--R --E 54 ---S 55 of 70 +--S 55 of 97 )display properties -Properties of %e : - This is a system-defined macro. - macro %e () == exp(1) -Properties of %i : - This is a system-defined macro. - macro %i () == complex(0,1) -Properties of %infinity : - This is a system-defined macro. - macro %infinity () == infinity() -Properties of %minusInfinity : - This is a system-defined macro. - macro %minusInfinity () == minusInfinity() -Properties of %pi : - This is a system-defined macro. - macro %pi () == pi() -Properties of %plusInfinity : - This is a system-defined macro. - macro %plusInfinity () == plusInfinity() -Properties of SF : - This is a system-defined macro. - macro SF () == DoubleFloat() +--RProperties of %e : +--R This is a system-defined macro. +--R macro %e () == exp(1) +--RProperties of %i : +--R This is a system-defined macro. +--R macro %i () == complex(0,1) +--RProperties of %infinity : +--R This is a system-defined macro. +--R macro %infinity () == infinity() +--RProperties of %minusInfinity : +--R This is a system-defined macro. +--R macro %minusInfinity () == minusInfinity() +--RProperties of %pi : +--R This is a system-defined macro. +--R macro %pi () == pi() +--RProperties of %plusInfinity : +--R This is a system-defined macro. +--R macro %plusInfinity () == plusInfinity() +--RProperties of SF : +--R This is a system-defined macro. +--R macro SF () == DoubleFloat() --E 55 ---S 56 of 70 +--S 56 of 97 )display types - Type of value of %e: (none) - Type of value of %i: (none) - Type of value of %infinity: (none) - Type of value of %minusInfinity: (none) - Type of value of %pi: (none) - Type of value of %plusInfinity: (none) - Type of value of SF: (none) +--R Type of value of %e: (none) +--R Type of value of %i: (none) +--R Type of value of %infinity: (none) +--R Type of value of %minusInfinity: (none) +--R Type of value of %pi: (none) +--R Type of value of %plusInfinity: (none) +--R Type of value of SF: (none) --E 56 ---S 57 of 70 +--S 57 of 97 )display values - Value of %e: (none) - Value of %i: (none) - Value of %infinity: (none) - Value of %minusInfinity: (none) - Value of %pi: (none) - Value of %plusInfinity: (none) - Value of SF: (none) +--R Value of %e: (none) +--R Value of %i: (none) +--R Value of %infinity: (none) +--R Value of %minusInfinity: (none) +--R Value of %pi: (none) +--R Value of %plusInfinity: (none) +--R Value of SF: (none) --E 57 ---S 58 of 70 +--S 58 of 97 )display abb DHMATRIX - DHMATRIX abbreviates domain DenavitHartenbergMatrix +--R DHMATRIX abbreviates domain DenavitHartenbergMatrix --E 58 ---S 59 of 70 +--S 59 of 97 )display abb DenavitHartenbergMatrix - DHMATRIX abbreviates domain DenavitHartenbergMatrix +--R DHMATRIX abbreviates domain DenavitHartenbergMatrix --E 59 ---S 60 of 70 +--S 60 of 97 )display operations rotatex - -There is one exposed function called rotatex : - [1] D1 -> DenavitHartenbergMatrix D1 from DenavitHartenbergMatrix D1 - if D1 has Join(Field,TranscendentalFunctionCategory) - -Examples of rotatex from DenavitHartenbergMatrix - +--R +--RThere is one exposed function called rotatex : +--R [1] D1 -> DenavitHartenbergMatrix D1 from DenavitHartenbergMatrix D1 +--R if D1 has Join(Field,TranscendentalFunctionCategory) +--R +--RExamples of rotatex from DenavitHartenbergMatrix +--R --E 60 ---S 61 of 70 +--S 61 of 97 )set fortran calling - Current Values of calling Variables +--R Current Values of calling Variables +--R +--RVariable Description Current Value +--R----------------------------------------------------------------------------- +--Rtempfile set location of temporary data files /tmp/ +--Rdirectory set location of generated FORTRAN files ./ +--Rlinker linker arguments (e.g. libraries to search) -lxlf +--R +--E 61 -Variable Description Current Value ------------------------------------------------------------------------------ -tempfile set location of temporary data files /tmp/ -directory set location of generated FORTRAN files ./ -linker linker arguments (e.g. libraries to search) -lxlf +--S 62 of 97 +)set fortran calling tempfile +--R--------------------------- The tempfile Option --------------------------- +--R +--R Description: set location of temporary data files +--R +--R )set fortran calling tempfile is used to tell AXIOM where +--R to place intermediate FORTRAN data files . This must be the +--R name of a valid existing directory to which you have permission +--R to write (including the final slash). +--R +--R Syntax: +--R )set fortran calling tempfile DIRECTORYNAME +--R +--R The current setting is /tmp/ +--E 62 ---E 61 +--S 63 of 97 +)set fortran calling tempfile /home/daly +--E 63 ---S 62 of 70 +--S 64 of 97 )set fortran calling tempfile ---------------------------- The tempfile Option --------------------------- +--R--------------------------- The tempfile Option --------------------------- +--R +--R Description: set location of temporary data files +--R +--R )set fortran calling tempfile is used to tell AXIOM where +--R to place intermediate FORTRAN data files . This must be the +--R name of a valid existing directory to which you have permission +--R to write (including the final slash). +--R +--R Syntax: +--R )set fortran calling tempfile DIRECTORYNAME +--R +--R The current setting is /home/daly +--E 64 - Description: set location of temporary data files +--S 65 of 97 +)set fortran calling directory +--R-------------------------- The directory Option --------------------------- +--R +--R Description: set location of generated FORTRAN files +--R +--R )set fortran calling directory is used to tell AXIOM where +--R to place generated FORTRAN files. This must be the name +--R of a valid existing directory to which you have permission +--R to write (including the final slash). +--R +--R Syntax: +--R )set fortran calling directory DIRECTORYNAME +--R +--R The current setting is ./ +--E 65 - )set fortran calling tempfile is used to tell AXIOM where - to place intermediate FORTRAN data files . This must be the - name of a valid existing directory to which you have permission - to write (including the final slash). +--S 66 of 97 +)set fortran calling directory /home/daly/ +--E 66 - Syntax: - )set fortran calling tempfile DIRECTORYNAME +--S 67 of 97 +)set fortran calling directory +--R-------------------------- The directory Option --------------------------- +--R +--R Description: set location of generated FORTRAN files +--R +--R )set fortran calling directory is used to tell AXIOM where +--R to place generated FORTRAN files. This must be the name +--R of a valid existing directory to which you have permission +--R to write (including the final slash). +--R +--R Syntax: +--R )set fortran calling directory DIRECTORYNAME +--R +--R The current setting is /home/daly/ +--E 67 - The current setting is /tmp/ ---E 62 +--S 68 of 97 +)set fortran calling linker +--R---------------------------- The linker Option ---------------------------- +--R +--R Description: linker arguments (e.g. libraries to search) +--R +--R )set fortran calling linkerargs is used to pass arguments to the linker +--R when using mkFort to create functions which call Fortran code. +--R For example, it might give a list of libraries to be searched, +--R and their locations. +--R The string is passed verbatim, so must be the correct syntax for +--R the particular linker being used. +--R +--R Example: )set fortran calling linker "-lxlf" +--R +--R The current setting is -lxlf +--E 68 ---S 63 of 70 -)set fortran calling tempfile /home/daly ---E 63 +--S 69 of 97 +)set fortran calling linker "-TPD" +--E 69 ---S 64 of 70 -)set fortran calling tempfile ---------------------------- The tempfile Option --------------------------- +--S 70 of 97 +)set fortran calling linker +--R---------------------------- The linker Option ---------------------------- +--R +--R Description: linker arguments (e.g. libraries to search) +--R +--R )set fortran calling linkerargs is used to pass arguments to the linker +--R when using mkFort to create functions which call Fortran code. +--R For example, it might give a list of libraries to be searched, +--R and their locations. +--R The string is passed verbatim, so must be the correct syntax for +--R the particular linker being used. +--R +--R Example: )set fortran calling linker "-lxlf" +--R +--R The current setting is -TPD +--E 70 - Description: set location of temporary data files +@ +The kernel protect option has been disabled and will shortly be +removed altogether. It was created because the CCL implementation +hard coded some internal functions so they could not be changed. +<<*>>= - )set fortran calling tempfile is used to tell AXIOM where - to place intermediate FORTRAN data files . This must be the - name of a valid existing directory to which you have permission - to write (including the final slash). +--S 71 of 97 +)set kernel +--R Current Values of kernel Variables +--R +--RVariable Description Current Value +--R----------------------------------------------------------------------------- +--Rwarn warn when re-definition is attempted off +--Rprotect prevent re-definition of kernel functions off +--R +--E 71 - Syntax: - )set fortran calling tempfile DIRECTORYNAME +--S 72 of 97 +)set kernel warn +--R----------------------------- The warn Option ----------------------------- +--R +--R Description: warn when re-definition is attempted +--R +--RSome AXIOM library functions are compiled into the kernel for efficiency +--Rreasons. To prevent them being re-defined when loaded from a library +--Rthey are specially protected. If a user wishes to know when an attempt +--Ris made to re-define such a function, he or she should issue the command: +--R )set kernel warn on +--RTo restore the default behaviour, he or she should issue the command: +--R )set kernel warn off +--E 72 - The current setting is /home/daly/ ---E 64 +--S 73 of 97 +)set kernel warn on +--E 73 ---S 65 of 70 -)set fortran calling directory --------------------------- The directory Option --------------------------- +--S 74 of 97 +)set kernel +--R Current Values of kernel Variables +--R +--RVariable Description Current Value +--R----------------------------------------------------------------------------- +--Rwarn warn when re-definition is attempted off +--Rprotect prevent re-definition of kernel functions off +--R +--E 74 - Description: set location of generated FORTRAN files +--S 75 of 97 +)set kernel protect +--R--------------------------- The protect Option ---------------------------- +--R +--R Description: prevent re-definition of kernel functions +--R +--RSome AXIOM library functions are compiled into the kernel for efficiency +--Rreasons. To prevent them being re-defined when loaded from a library +--Rthey are specially protected. If a user wishes to re-define these +--Rfunctions, he or she should issue the command: +--R )set kernel protect off +--RTo restore the default behaviour, he or she should issue the command: +--R )set kernel protect on +--E 75 - )set fortran calling directory is used to tell AXIOM where - to place generated FORTRAN files. This must be the name - of a valid existing directory to which you have permission - to write (including the final slash). +--S 76 of 97 +)set kernel protect on +--E 76 - Syntax: - )set fortran calling directory DIRECTORYNAME +--S 77 of 97 +)set kernel +--R Current Values of kernel Variables +--R +--RVariable Description Current Value +--R----------------------------------------------------------------------------- +--Rwarn warn when re-definition is attempted off +--Rprotect prevent re-definition of kernel functions off +--R +--E 77 - The current setting is ./ ---E 65 +--S 78 of 97 +)set mes auto +--R +--R--------------------------- The autoload Option --------------------------- +--R +--R Description: print file auto-load messages +--R +--R The autoload option may be followed by any one of the following: +--R +--R on +--R -> off +--R +--R The current setting is indicated. +--R +--E 78 ---S 66 of 70 -)set fortran calling directory /home/daly/ ---E 66 +--S 79 of 97 +)set mes auto off +--E 79 ---S 67 of 70 -)set fortran calling directory --------------------------- The directory Option --------------------------- +--S 80 of 97 +)set mes auto +--R +--R--------------------------- The autoload Option --------------------------- +--R +--R Description: print file auto-load messages +--R +--R The autoload option may be followed by any one of the following: +--R +--R on +--R -> off +--R +--R The current setting is indicated. +--R +--E 80 - Description: set location of generated FORTRAN files +--S 81 of 97 +)set mes auto on +--E 81 - )set fortran calling directory is used to tell AXIOM where - to place generated FORTRAN files. This must be the name - of a valid existing directory to which you have permission - to write (including the final slash). +--S 82 of 97 +)set mes auto +--R +--R--------------------------- The autoload Option --------------------------- +--R +--R Description: print file auto-load messages +--R +--R The autoload option may be followed by any one of the following: +--R +--R -> on +--R off +--R +--R The current setting is indicated. +--R +--E 82 - Syntax: - )set fortran calling directory DIRECTORYNAME +--S 83 of 97 +)lisp |$printLoadMsgs| +--R +--RValue = T +--E 83 - The current setting is /home/daly/ ---E 67 +--S 84 of 97 +)set naglink +--R Current Values of naglink Variables +--R +--RVariable Description Current Value +--R----------------------------------------------------------------------------- +--Rhost internet address of host for NAGLink localhost +--Rpersistence number of (fortran) functions to remember 1 +--Rmessages show NAGLink messages on +--Rdouble enforce DOUBLE PRECISION ASPs on +--R +--E 84 ---S 68 of 70 -)set fortran calling linker ----------------------------- The linker Option ---------------------------- +--S 85 of 97 +)set naglink host +--R----------------------------- The host Option ----------------------------- +--R +--R Description: internet address of host for NAGLink +--R +--R )set naglink host is used to tell AXIOM which host to contact for +--R a NAGLink request. An Internet address should be supplied. The host +--R specified must be running the NAGLink daemon. +--R +--R The current setting is localhost +--E 85 - Description: linker arguments (e.g. libraries to search) +--S 86 of 97 +)set naglink persistence +--R------------------------- The persistence Option -------------------------- +--R +--R Description: number of (fortran) functions to remember +--R +--R )set naglink persistence is used to tell the nagd daemon how many ASP +--R source and object files to keep around in case you reuse them. This helps +--R to avoid needless recompilations. The number specified should be a +--R non-negative integer. +--R +--R The current setting is 1 +--E 86 - )set fortran calling linkerargs is used to pass arguments to the linker - when using mkFort to create functions which call Fortran code. - For example, it might give a list of libraries to be searched, - and their locations. - The string is passed verbatim, so must be the correct syntax for - the particular linker being used. +--S 87 of 97 +)set naglink messages +--R--------------------------- The messages Option --------------------------- +--R +--R Description: show NAGLink messages +--R +--R The messages option may be followed by any one of the following: +--R +--R -> on +--R off +--R +--R The current setting is indicated. +--R +--E 87 - Example: )set fortran calling linker "-lxlf" +--S 88 of 97 +)set naglink double +--R---------------------------- The double Option ---------------------------- +--R +--R Description: enforce DOUBLE PRECISION ASPs +--R +--R The double option may be followed by any one of the following: +--R +--R -> on +--R off +--R +--R The current setting is indicated. +--R +--E 88 - The current setting is -lxlf ---E 68 +--S 89 of 97 +)set naglink host axiom-developer.org +--E 89 ---S 69 of 70 -)set fortran calling linker "-TPD" ---E 69 +--S 90 of 97 +)set naglink host +--R----------------------------- The host Option ----------------------------- +--R +--R Description: internet address of host for NAGLink +--R +--R )set naglink host is used to tell AXIOM which host to contact for +--R a NAGLink request. An Internet address should be supplied. The host +--R specified must be running the NAGLink daemon. +--R +--R The current setting is axiom-developer.org +--E 90 ---S 70 of 70 -)set fortran calling linker ----------------------------- The linker Option ---------------------------- +--S 91 of 97 +)set naglink persistence 10 +--E 91 + +--S 92 of 97 +)set naglink persistence +--R------------------------- The persistence Option -------------------------- +--R +--R Description: number of (fortran) functions to remember +--R +--R )set naglink persistence is used to tell the nagd daemon how many ASP +--R source and object files to keep around in case you reuse them. This helps +--R to avoid needless recompilations. The number specified should be a +--R non-negative integer. +--R +--R The current setting is 10 +--E 92 - Description: linker arguments (e.g. libraries to search) +--S 93 of 97 +)set naglink messages off +--E 93 - )set fortran calling linkerargs is used to pass arguments to the linker - when using mkFort to create functions which call Fortran code. - For example, it might give a list of libraries to be searched, - and their locations. - The string is passed verbatim, so must be the correct syntax for - the particular linker being used. +--S 94 of 97 +)set naglink messages +--R--------------------------- The messages Option --------------------------- +--R +--R Description: show NAGLink messages +--R +--R The messages option may be followed by any one of the following: +--R +--R on +--R -> off +--R +--R The current setting is indicated. +--R +--E 94 - Example: )set fortran calling linker "-lxlf" +--S 95 of 97 +)set naglink double off +--E 95 + +--S 96 of 97 +)set naglink double +--R---------------------------- The double Option ---------------------------- +--R +--R Description: enforce DOUBLE PRECISION ASPs +--R +--R The double option may be followed by any one of the following: +--R +--R on +--R -> off +--R +--R The current setting is indicated. +--R +--E 96 + +--S 97 of 97 +)set naglink +--R Current Values of naglink Variables +--R +--RVariable Description Current Value +--R----------------------------------------------------------------------------- +--Rhost internet address of host for NAGLink axiom-developer.org +--Rpersistence number of (fortran) functions to remember 10 +--Rmessages show NAGLink messages off +--Rdouble enforce DOUBLE PRECISION ASPs off +--R +--E 97 - The current setting is -TPD ---E 70 )spool )lisp (bye) diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index 2ad3ebe..d0a819c 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -206,7 +206,6 @@ OBJS= ${OUT}/vmlisp.${O} ${OUT}/hash.${O} \ ${OUT}/rulesets.${O} \ ${OUT}/scan.${O} ${OUT}/serror.${O} \ ${OUT}/server.${O} \ - ${OUT}/setvars.${O} \ ${OUT}/sfsfun-l.${O} ${OUT}/sfsfun.${O} \ ${OUT}/simpbool.${O} ${OUT}/slam.${O} \ ${OUT}/sockio.${O} ${OUT}/spad.${O} \ @@ -224,7 +223,7 @@ file contains last-minute changes to various functions and constants. <>= INOBJS= ${OUT}/varini.${O} ${OUT}/parini.${O} \ - ${OUT}/setvart.${O} ${OUT}/intint.${O} \ + ${OUT}/intint.${O} \ ${OUT}/interop.${O} ${OUT}/patches.${O} @ @@ -493,8 +492,8 @@ DOCFILES=${DOC}/alql.boot.dvi \ ${DOC}/record.boot.dvi ${DOC}/regress.lisp.dvi \ ${DOC}/rulesets.boot.dvi ${DOC}/scan.boot.dvi \ ${DOC}/serror.boot.dvi ${DOC}/server.boot.dvi \ - ${DOC}/setq.lisp.dvi ${DOC}/setvars.boot.dvi \ - ${DOC}/setvart.boot.dvi ${DOC}/sfsfun.boot.dvi \ + ${DOC}/setq.lisp.dvi \ + ${DOC}/sfsfun.boot.dvi \ ${DOC}/sfsfun-l.lisp.dvi \ ${DOC}/showimp.boot.dvi ${DOC}/simpbool.boot.dvi \ ${DOC}/slam.boot.dvi ${DOC}/sockio.lisp.dvi \ @@ -5728,111 +5727,6 @@ ${DOC}/server.boot.dvi: ${IN}/server.boot.pamphlet @ -\subsection{setvars.boot} -Note that the {\bf setvars.boot.pamphlet} file contains both the -original {\bf boot} code and a saved copy of the {\bf setvars.clisp} -code. We need to keep the translated code around so we can bootstrap -the system. In other words, we need this boot code translated so we -can build the boot translator. - -{\bf note: if you change the boot code in setvars.boot.pamphlet -you must translate this code to lisp and store the resulting lisp -code back into the setvars.boot.pamphlet file. this is not automated.} -<>= -${OUT}/setvars.${LISP}: ${IN}/setvars.boot.pamphlet - @ echo 393 making ${OUT}/setvars.${LISP} \ - from ${IN}/setvars.boot.pamphlet - @ rm -f ${OUT}/setvars.${O} - @( cd ${OUT} ; \ - ${TANGLE} -Rsetvars.clisp ${IN}/setvars.boot.pamphlet \ - >setvars.${LISP} ) - -@ -<>= -${OUT}/setvars.${O}: ${MID}/setvars.clisp - @ echo 394 making ${OUT}/setvars.${O} from ${MID}/setvars.clisp - @ (cd ${MID} ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (compile-file "${MID}/setvars.clisp"' \ - ':output-file "${OUT}/setvars.${O}") (${BYE}))' | ${DEPSYS} ; \ - else \ - echo '(progn (compile-file "${MID}/setvars.clisp"' \ - ':output-file "${OUT}/setvars.${O}") (${BYE}))' | ${DEPSYS} \ - >${TMP}/trace ; \ - fi ) - -@ -<>= -${MID}/setvars.clisp: ${IN}/setvars.boot.pamphlet - @ echo 395 making ${MID}/setvars.clisp from ${IN}/setvars.boot.pamphlet - @ (cd ${MID} ; \ - ${TANGLE} ${IN}/setvars.boot.pamphlet >setvars.boot ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (boottran::boottocl "setvars.boot") (${BYE}))' \ - | ${DEPSYS} ; \ - else \ - echo '(progn (boottran::boottocl "setvars.boot") (${BYE}))' \ - | ${DEPSYS} >${TMP}/trace ; \ - fi ; \ - rm setvars.boot ) - -@ -<>= -${DOC}/setvars.boot.dvi: ${IN}/setvars.boot.pamphlet - @echo 396 making ${DOC}/setvars.boot.dvi \ - from ${IN}/setvars.boot.pamphlet - @(cd ${DOC} ; \ - cp ${IN}/setvars.boot.pamphlet ${DOC} ; \ - ${DOCUMENT} ${NOISE} setvars.boot ; \ - rm -f ${DOC}/setvars.boot.pamphlet ; \ - rm -f ${DOC}/setvars.boot.tex ; \ - rm -f ${DOC}/setvars.boot ) - -@ - -\subsection{setvart.boot} -<>= -${OUT}/setvart.${O}: ${MID}/setvart.clisp - @ echo 397 making ${OUT}/setvart.${O} from ${MID}/setvart.clisp - @ (cd ${MID} ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (compile-file "${MID}/setvart.clisp"' \ - ':output-file "${OUT}/setvart.${O}") (${BYE}))' | ${DEPSYS} ; \ - else \ - echo '(progn (compile-file "${MID}/setvart.clisp"' \ - ':output-file "${OUT}/setvart.${O}") (${BYE}))' | ${DEPSYS} \ - >${TMP}/trace ; \ - fi ) - -@ -<>= -${MID}/setvart.clisp: ${IN}/setvart.boot.pamphlet - @ echo 398 making ${MID}/setvart.clisp from ${IN}/setvart.boot.pamphlet - @ (cd ${MID} ; \ - ${TANGLE} ${IN}/setvart.boot.pamphlet >setvart.boot ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (boottran::boottocl "setvart.boot") (${BYE}))' \ - | ${DEPSYS} ; \ - else \ - echo '(progn (boottran::boottocl "setvart.boot") (${BYE}))' \ - | ${DEPSYS} >${TMP}/trace ; \ - fi ; \ - rm setvart.boot ) - -@ -<>= -${DOC}/setvart.boot.dvi: ${IN}/setvart.boot.pamphlet - @echo 399 making ${DOC}/setvart.boot.dvi \ - from ${IN}/setvart.boot.pamphlet - @(cd ${DOC} ; \ - cp ${IN}/setvart.boot.pamphlet ${DOC} ; \ - ${DOCUMENT} ${NOISE} setvart.boot ; \ - rm -f ${DOC}/setvart.boot.pamphlet ; \ - rm -f ${DOC}/setvart.boot.tex ; \ - rm -f ${DOC}/setvart.boot ) - -@ - \subsection{simpbool.boot} <>= ${OUT}/simpbool.${O}: ${MID}/simpbool.clisp @@ -9211,15 +9105,6 @@ clean: <> <> -<> -<> -<> -<> - -<> -<> -<> - <> <> <> diff --git a/src/interp/bootfuns.lisp.pamphlet b/src/interp/bootfuns.lisp.pamphlet index 654856c..5619b6e 100644 --- a/src/interp/bootfuns.lisp.pamphlet +++ b/src/interp/bootfuns.lisp.pamphlet @@ -451,12 +451,6 @@ for primitive domains. Also used by putInLocalDomainReferences and optCal.") (def-boot-val |$inputPromptType| '|step| "checked in MKPROMPT") (def-boot-val |$IOindex| 0 "step counter") -(defun |printLoadMessages| (u) - (if (memq u '(|%display%| |%describe%|)) - (if |$printLoadMsgs| "on" "off") - (seq - (setq |$printLoadMsgs| (and (listp u) (equal (car u) '|on|)))))) - @ \eject \begin{thebibliography}{99} diff --git a/src/interp/debugsys.lisp.pamphlet b/src/interp/debugsys.lisp.pamphlet index e1e1855..8b9f7e9 100644 --- a/src/interp/debugsys.lisp.pamphlet +++ b/src/interp/debugsys.lisp.pamphlet @@ -164,7 +164,6 @@ loaded by hand we need to establish a value. (thesymb "/int/interp/scan.clisp") (thesymb "/int/interp/serror.clisp") (thesymb "/int/interp/server.clisp") - (thesymb "/int/interp/setvars.clisp") (thesymb "/int/interp/sfsfun-l.lisp") (thesymb "/int/interp/sfsfun.clisp") (thesymb "/int/interp/simpbool.clisp") @@ -185,7 +184,6 @@ loaded by hand we need to establish a value. (list (thesymb "/int/interp/varini.clisp") (thesymb "/int/interp/parini.clisp") - (thesymb "/int/interp/setvart.clisp") (thesymb "/int/interp/intint.lisp") (thesymb "/int/interp/interop.clisp") (thesymb "/int/interp/patches.lisp"))) diff --git a/src/interp/i-output.boot.pamphlet b/src/interp/i-output.boot.pamphlet index af6ead2..8a85823 100644 --- a/src/interp/i-output.boot.pamphlet +++ b/src/interp/i-output.boot.pamphlet @@ -56,170 +56,6 @@ --% Output display routines -SETANDFILEQ($defaultSpecialCharacters,[ - EBCDIC( 28), -- upper left corner - EBCDIC( 27), -- upper right corner - EBCDIC( 30), -- lower left corner - EBCDIC( 31), -- lower right corner - EBCDIC( 79), -- vertical bar - EBCDIC( 45), -- horizontal bar - EBCDIC(144), -- APL quad - EBCDIC(173), -- left bracket - EBCDIC(189), -- right bracket - EBCDIC(192), -- left brace - EBCDIC(208), -- right brace - EBCDIC( 59), -- top box tee - EBCDIC( 62), -- bottom box tee - EBCDIC( 63), -- right box tee - EBCDIC( 61), -- left box tee - EBCDIC( 44), -- center box tee - EBCDIC(224) -- back slash - ]) - -SETANDFILEQ($plainSpecialCharacters0,[ - EBCDIC( 78), -- upper left corner (+) - EBCDIC( 78), -- upper right corner (+) - EBCDIC( 78), -- lower left corner (+) - EBCDIC( 78), -- lower right corner (+) - EBCDIC( 79), -- vertical bar - EBCDIC( 96), -- horizontal bar (-) - EBCDIC(111), -- APL quad (?) - EBCDIC(173), -- left bracket - EBCDIC(189), -- right bracket - EBCDIC(192), -- left brace - EBCDIC(208), -- right brace - EBCDIC( 78), -- top box tee (+) - EBCDIC( 78), -- bottom box tee (+) - EBCDIC( 78), -- right box tee (+) - EBCDIC( 78), -- left box tee (+) - EBCDIC( 78), -- center box tee (+) - EBCDIC(224) -- back slash - ]) - -SETANDFILEQ($plainSpecialCharacters1,[ - EBCDIC(107), -- upper left corner (,) - EBCDIC(107), -- upper right corner (,) - EBCDIC(125), -- lower left corner (') - EBCDIC(125), -- lower right corner (') - EBCDIC( 79), -- vertical bar - EBCDIC( 96), -- horizontal bar (-) - EBCDIC(111), -- APL quad (?) - EBCDIC(173), -- left bracket - EBCDIC(189), -- right bracket - EBCDIC(192), -- left brace - EBCDIC(208), -- right brace - EBCDIC( 78), -- top box tee (+) - EBCDIC( 78), -- bottom box tee (+) - EBCDIC( 78), -- right box tee (+) - EBCDIC( 78), -- left box tee (+) - EBCDIC( 78), -- center box tee (+) - EBCDIC(224) -- back slash - ]) - -SETANDFILEQ($plainSpecialCharacters2,[ - EBCDIC( 79), -- upper left corner (|) - EBCDIC( 79), -- upper right corner (|) - EBCDIC( 79), -- lower left corner (|) - EBCDIC( 79), -- lower right corner (|) - EBCDIC( 79), -- vertical bar - EBCDIC( 96), -- horizontal bar (-) - EBCDIC(111), -- APL quad (?) - EBCDIC(173), -- left bracket - EBCDIC(189), -- right bracket - EBCDIC(192), -- left brace - EBCDIC(208), -- right brace - EBCDIC( 78), -- top box tee (+) - EBCDIC( 78), -- bottom box tee (+) - EBCDIC( 78), -- right box tee (+) - EBCDIC( 78), -- left box tee (+) - EBCDIC( 78), -- center box tee (+) - EBCDIC(224) -- back slash - ]) - -SETANDFILEQ($plainSpecialCharacters3,[ - EBCDIC( 96), -- upper left corner (-) - EBCDIC( 96), -- upper right corner (-) - EBCDIC( 96), -- lower left corner (-) - EBCDIC( 96), -- lower right corner (-) - EBCDIC( 79), -- vertical bar - EBCDIC( 96), -- horizontal bar (-) - EBCDIC(111), -- APL quad (?) - EBCDIC(173), -- left bracket - EBCDIC(189), -- right bracket - EBCDIC(192), -- left brace - EBCDIC(208), -- right brace - EBCDIC( 78), -- top box tee (+) - EBCDIC( 78), -- bottom box tee (+) - EBCDIC( 78), -- right box tee (+) - EBCDIC( 78), -- left box tee (+) - EBCDIC( 78), -- center box tee (+) - EBCDIC(224) -- back slash - ]) - -SETANDFILEQ($plainRTspecialCharacters,[ - '_+, -- upper left corner (+) - '_+, -- upper right corner (+) - '_+, -- lower left corner (+) - '_+, -- lower right corner (+) - '_|, -- vertical bar - '_-, -- horizontal bar (-) - '_?, -- APL quad (?) - '_[, -- left bracket - '_], -- right bracket - '_{, -- left brace - '_}, -- right brace - '_+, -- top box tee (+) - '_+, -- bottom box tee (+) - '_+, -- right box tee (+) - '_+, -- left box tee (+) - '_+, -- center box tee (+) - '_\ -- back slash - ]) - -makeCharacter n == INTERN(STRING(CODE_-CHAR n)) - -SETANDFILEQ($RTspecialCharacters,[ - makeCharacter 218, -- upper left corner (+) - makeCharacter 191, -- upper right corner (+) - makeCharacter 192, -- lower left corner (+) - makeCharacter 217, -- lower right corner (+) - makeCharacter 179, -- vertical bar - makeCharacter 196, -- horizontal bar (-) - $quadSymbol, -- APL quad (?) - '_[, -- left bracket - '_], -- right bracket - '_{, -- left brace - '_}, -- right brace - makeCharacter 194, -- top box tee (+) - makeCharacter 193, -- bottom box tee (+) - makeCharacter 180, -- right box tee (+) - makeCharacter 195, -- left box tee (+) - makeCharacter 197, -- center box tee (+) - '_\ -- back slash - ]) - -SETANDFILEQ($specialCharacters,$RTspecialCharacters) - -SETANDFILEQ($specialCharacterAlist, '( - (ulc . 0)_ - (urc . 1)_ - (llc . 2)_ - (lrc . 3)_ - (vbar . 4)_ - (hbar . 5)_ - (quad . 6)_ - (lbrk . 7)_ - (rbrk . 8)_ - (lbrc . 9)_ - (rbrc . 10)_ - (ttee . 11)_ - (btee . 12)_ - (rtee . 13)_ - (ltee . 14)_ - (ctee . 15)_ - (bslash . 16)_ - )) - $collectOutput := nil specialChar(symbol) == diff --git a/src/interp/interp-proclaims.lisp b/src/interp/interp-proclaims.lisp index 3c9d854..ff2537b 100644 --- a/src/interp/interp-proclaims.lisp +++ b/src/interp/interp-proclaims.lisp @@ -395,7 +395,7 @@ BOOT::|infix?| BOOT::|matchSegment?| BOOT::|stringMatch| BOOT::|skipBlanks| BOOT::|dbPresentConsSaturn| BOOT::MAKE-DEFUN BOOT::|compOrCroak| BOOT::|profileRecord| - BOOT::|getSignature| BOOT::|traceDomainLocalOps| + BOOT::|getSignature| BOOT::|getArgumentModeOrMoan| BOOT::|filterListOfStringsWithFn| BOOT::|mkGrepPattern1,charPosition| @@ -2331,9 +2331,9 @@ BOOT::|bright| BOOT::GET-STRING-TOKEN BOOT::|formatUnabbreviated| BOOT::GET-IDENTIFIER-TOKEN BOOT::BVEC-NOT BOOT::TOKEN-LOOKAHEAD-TYPE - BOOT::|orderBySlotNumber| BOOT::|traceSpad2Cmd| + BOOT::|orderBySlotNumber| BOOT::|compArgumentConditions| BOOT::|e02defSolve,flam| - BOOT::|trace1| BOOT::LINE-PRINT BOOT::|saveMapSig| + BOOT::LINE-PRINT BOOT::|saveMapSig| BOOT::LINE-PAST-END-P BOOT::|untrace| BOOT::|stripOffArgumentConditions| BOOT::DATABASE-CONSTRUCTORKIND BOOT::SPAD_ERROR_LOC @@ -2870,7 +2870,7 @@ BOOT::|objSetMode| VMLISP:SORTBY BOOT::MONITOR-GETVALUE VMLISP:|member| BOOT::MONITOR-EVALTRAN1 BOOT::|coerceIntByMapInner| BOOT::|getConstantFromDomain| - BOOT::|valueArgsEqual?| BOOT::|traceDomainConstructor| + BOOT::|valueArgsEqual?| BOOT::|coerceIntByMap| BOOT::|equalZero| BOOT::|replaceLast| BOOT::|coerceIntTest| VMLISP:ADDOPTIONS BOOT::|isSubTowerOf| BOOT::|starstarcond| BOOT::|equalOne| @@ -3251,9 +3251,9 @@ BOOT::|NRTassignCapsuleFunctionSlot| BOOT::|reportSpadTrace| BOOT::BVEC-NOR BOOT::BVEC-NAND BOOT::|addDomain| BOOT::|giveFormalParametersValues| - BOOT::PRINT-DEFUN BOOT::|augmentTraceNames| + BOOT::PRINT-DEFUN BOOT::|stripOffSubdomainConditions| - BOOT::|untraceDomainLocalOps| BOOT::TRANSLABEL1 + BOOT::TRANSLABEL1 BOOT::|getOption| BOOT::TRANSLABEL BOOT::|traceOptionError| BOOT::GET-GLIPH-TOKEN BOOT::|funfind,LAM| BOOT::|mergePathnames| BOOT::|subTypes| BOOT::|lassocSub| diff --git a/src/interp/setq.lisp.pamphlet b/src/interp/setq.lisp.pamphlet index f97be83..577d012 100644 --- a/src/interp/setq.lisp.pamphlet +++ b/src/interp/setq.lisp.pamphlet @@ -226,7 +226,6 @@ (SETQ RPAR ")") (SETQ SLASH "/") (SETQ STAR "*") -(SETQ UNDERBAR "_") (SETQ |$fortranArrayStartingIndex| 0) ;; These were originally in INIT LISP @@ -585,90 +584,6 @@ ;; By default, don't generate info files with old compiler. (setq |$profileCompiler| nil) -(setq credits '( -"An alphabetical listing of contributors to AXIOM:" -"Cyril Alberga Roy Adler Christian Aistleitner" -"Richard Anderson George Andrews S.J. Atkins" -"Henry Baker Stephen Balzac Yurij Baransky" -"David R. Barton Gerald Baumgartner Gilbert Baumslag" -"Jay Belanger David Bindel Fred Blair" -"Vladimir Bondarenko Mark Botch" -"Alexandre Bouyer Peter A. Broadbery Martin Brock" -"Manuel Bronstein Stephen Buchwald Florian Bundschuh" -"Luanne Burns William Burge" -"Quentin Carpent Robert Caviness Bruce Char" -"Ondrej Certik Cheekai Chin David V. Chudnovsky" -"Gregory V. Chudnovsky Josh Cohen Christophe Conil" -"Don Coppersmith George Corliss Robert Corless" -"Gary Cornell Meino Cramer Claire Di Crescenzo" -"David Cyganski" -"Timothy Daly Sr. Timothy Daly Jr. James H. Davenport" -"Didier Deshommes Michael Dewar" -"Jean Della Dora Gabriel Dos Reis Claire DiCrescendo" -"Sam Dooley Lionel Ducos Martin Dunstan" -"Brian Dupee Dominique Duval" -"Robert Edwards Heow Eide-Goodman Lars Erickson" -"Richard Fateman Bertfried Fauser Stuart Feldman" -"Brian Ford Albrecht Fortenbacher George Frances" -"Constantine Frangos Timothy Freeman Korrinn Fu" -"Marc Gaetano Rudiger Gebauer Kathy Gerber" -"Patricia Gianni Samantha Goldrich Holger Gollan" -"Teresa Gomez-Diaz Laureano Gonzalez-Vega Stephen Gortler" -"Johannes Grabmeier Matt Grayson Klaus Ebbe Grue" -"James Griesmer Vladimir Grinberg Oswald Gschnitzer" -"Jocelyn Guidry" -"Steve Hague Satoshi Hamaguchi Mike Hansen" -"Richard Harke Vilya Harvey Martin Hassner" -"Arthur S. Hathaway Dan Hatton Waldek Hebisch" -"Karl Hegbloom Ralf Hemmecke Henderson" -"Antoine Hersen Gernot Hueber" -"Pietro Iglio" -"Alejandro Jakubi Richard Jenks" -"Kai Kaminski Grant Keady Tony Kennedy" -"Paul Kosinski Klaus Kusche Bernhard Kutzler" -"Tim Lahey Larry Lambe Franz Lehner" -"Frederic Lehobey Michel Levaud Howard Levy" -"Liu Xiaojun Rudiger Loos Michael Lucks" -"Richard Luczak" -"Camm Maguire Francois Maltey Alasdair McAndrew" -"Bob McElrath Michael McGettrick Ian Meikle" -"David Mentre Victor S. Miller Gerard Milmeister" -"Mohammed Mobarak H. Michael Moeller Michael Monagan" -"Marc Moreno-Maza Scott Morrison Joel Moses" -"Mark Murray" -"William Naylor C. Andrew Neff John Nelder" -"Godfrey Nolan Arthur Norman Jinzhong Niu" -"Michael O'Connor Summat Oemrawsingh Kostas Oikonomou" -"Humberto Ortiz-Zuazaga" -"Julian A. Padget Bill Page Susan Pelzel" -"Michel Petitot Didier Pinchon Ayal Pinkus" -"Jose Alfredo Portes" -"Claude Quitte" -"Arthur C. Ralfs Norman Ramsey Anatoly Raportirenko" -"Michael Richardson Renaud Rioboo Jean Rivlin" -"Nicolas Robidoux Simon Robinson Raymond Rogers" -"Michael Rothstein Martin Rubey" -"Philip Santas Alfred Scheerhorn William Schelter" -"Gerhard Schneider Martin Schoenert Marshall Schor" -"Frithjof Schulze Fritz Schwarz Nick Simicich" -"William Sit Elena Smirnova Jonathan Steinbach" -"Fabio Stumbo Christine Sundaresan Robert Sutor" -"Moss E. Sweedler Eugene Surowitz" -"Max Tegmark James Thatcher Balbir Thomas" -"Mike Thomas Dylan Thurston Barry Trager" -"Themos T. Tsikas" -"Gregory Vanuxem" -"Bernhard Wall Stephen Watt Jaap Weel" -"Juergen Weiss M. Weller Mark Wegman" -"James Wen Thorsten Werther Michael Wester" -"John M. Wiley Berhard Will Clifton J. Williamson" -"Stephen Wilson Shmuel Winograd Robert Wisbauer" -"Sandra Wityak Waldemar Wiwianka Knut Wolf" -"Clifford Yapp David Yun" -"Vadim Zhytnikov Richard Zippel Evelyn Zoernack" -"Bruno Zuercher Dan Zwillinger" -)) - @ \eject \begin{thebibliography}{99} diff --git a/src/interp/setvars.boot.pamphlet b/src/interp/setvars.boot.pamphlet deleted file mode 100644 index 6d2e935..0000000 --- a/src/interp/setvars.boot.pamphlet +++ /dev/null @@ -1,1892 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp setvars.boot} -\author{The Axiom Team} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{Bootstrap information} -This file contains both the {\bf boot} code and the {\bf Lisp} -code that is the result of the {\bf boot to lisp} translation. -We need to keep the translated code around so we can bootstrap -the system. In other words, we need this boot code translated -so we can build the boot translator. - -{\bf NOTE WELL: IF YOU CHANGE THIS BOOT CODE YOU MUST -TRANSLATE THIS CODE TO LISP AND STORE THE RESULTING LISP -CODE BACK INTO THIS FILE.} - -See the {\bf setvars.clisp} section below. -\section{Top level function calling conventions} -Conventions: -\begin{list}{} -\item when called with argument "\%initialize", a function will -set the appropriate variables to their default states. -\item when called with argument "\%display\%", a function will return a -current state information suitable for sayBrightly -\item when called with argument "\%describe\%", a function will print -a description of itself and any conditions it imposes. -\item otherwise, a function may interpret its arguments as it sees -appropriate. -\end{list} -Also by convention each top level function named in the FUNCTION -slot (see the data structure in setvart.boot.pamphlet\cite{1}) has an -associated describe function. Thus, for example, -setOutputFortran is accompanied by function to describe -its arguments, such as describeSetOutputFortran. -\section{Top level set functions} -The {\bf set} function in this file handles the top level {\bf )set} -command line functions. - -\section{expose} -See the section expose in setvart.boot.pamphlet\cite{1} -\begin{verbatim} ----------------------- The expose Option ---------------------- - - Description: control interpreter constructor exposure - - The following groups are explicitly exposed in the current - frame (called initial ): - basic - categories - naglink - anna - - The following constructors are explicitly exposed in the - current frame: - there are no explicitly exposed constructors - - The following constructors are explicitly hidden in the - current frame: - there are no explicitly hidden constructors - - When )set expose is followed by no arguments, the information - you now see is displayed. When followed by the initialize - argument, the exposure group data in the file interp.exposed - is read and is then available. The arguments add and drop are - used to add or drop exposure groups or explicit constructors - from the local frame exposure data. Issue - )set expose add or )set expose drop - for more information. -\end{verbatim} - -\section{functions} -See the section functions in setvart.boot.pamphlet\cite{1} -\begin{verbatim} - Current Values of functions Variables - -Variable Description Current Value ------------------------------------------------------------------ -cache number of function results to cache 0 -compile compile, don't just define function bodies off -recurrence specially compile recurrence relations on - -\end{verbatim} -<>= -<> -<> -<> -<> -<> -@ -\subsection{setFunctionsCache} -<>= -setFunctionsCache arg == - $options : local := NIL - arg = "%initialize%" => - $cacheCount := 0 - $cacheAlist := NIL - arg = "%display%" => - null $cacheAlist => object2String $cacheCount - '"..." - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeSetFunctionsCache() - TERPRI() - sayAllCacheCounts() - n := first arg - (n ^= 'all) and ((not FIXP n) or (n < 0)) => - sayMessage ['"Your value of",:bright n,'"is invalid because ..."] - describeSetFunctionsCache() - terminateSystemCommand() - if (rest arg) then $options := [['vars,:rest arg]] - countCache n - -@ -\subsection{countCache} -<>= -countCache n == - $options => - $options is [["vars",:l]] => - for x in l repeat - NULL IDENTP x => sayKeyedMsg("S2IF0007",[x]) - $cacheAlist:= insertAlist(x,n,$cacheAlist) - cacheCountName:= INTERNL(x,'";COUNT") - SET(cacheCountName,n) - sayCacheCount(x,n) - optionError(CAAR $options,nil) - sayCacheCount(nil,$cacheCount:= n) - -@ -\subsection{describeSetFunctionsCache} -<>= -describeSetFunctionsCache() == - sayBrightly LIST( - '%b,'")set functions cache",'%d,'"is used to tell AXIOM how many",'%l,_ - '" values computed by interpreter functions should be saved. This can save ",'%l, _ - '" quite a bit of time in recursive functions, though one must consider that",'%l,_ - '" the cached values will take up (perhaps valuable) room in the workspace.",'%l,'%l,_ - '" The value given after",'%b,'"cache",'%d,'"must either be the",_ - '" word",'%b,'"all",'%d,'"or a positive",'%l,_ - '" integer. This may be followed by any number of function names whose cache",'%l,_ - '" sizes you wish to so set. If no functions are given, the default cache",'%l,_ - '" size is set.",'%l,'" Examples:",_ - '" )set fun cache all )set fun cache 10 f g Legendre") - -@ -\subsection{sayAllCacheCounts} -<>= -sayAllCacheCounts () == - sayCacheCount(nil,$cacheCount) - $cacheAlist => - TERPRI() --- SAY '" However," - for [x,:n] in $cacheAlist | n ^= $cacheCount repeat sayCacheCount(x,n) - -@ -\subsection{sayCacheCount} -<>= -sayCacheCount(fn,n) == - prefix:= - fn => ["function",:bright linearFormatName fn] - n = 0 => ["interpreter functions "] - ["In general, interpreter functions "] - n = 0 => - fn => - sayBrightly ['" Caching for ",:prefix, - '"is turned off"] - sayBrightly '" In general, functions will cache no returned values." - phrase:= - n="all" => [:bright "all","values."] - n=1 => [" only the last value."] - [" the last",:bright n,"values."] - sayBrightly ['" ",:prefix,'"will cache",:phrase] - -@ -\section{history} -See the section history in setvart.boot.pamphlet\cite{1} -\begin{verbatim} ---------------------- The history Option ---------------------- - - Description: save workspace values in a history file - - The history option may be followed by any one of the - following: - - -> on - off - - The current setting is indicated within the list. - -\end{verbatim} -<>= -<> -@ -\subsection{setHistory} -<>= -setHistory arg == - -- this is just a front end for the history functions - arg = "%initialize%" => nil - - current := object2String translateTrueFalse2YesNo $HiFiAccess - arg = "%display%" => current - - (null arg) or (arg = "%describe%") or (first arg = '_?) => - sayMessage ['" The",:bright '"history",'"option", - '" may be followed by any one of the following:"] - for name in '("on" "off" "yes" "no") repeat - if name = current - then sayBrightly ['" ->",:bright name] - else sayBrightly ['" ",name] - TERPRI() - sayBrightly '" The current setting is indicated within the list." - sayBrightly [:bright '"yes",'"and",:bright '"no", - '"have the same effect as",:bright '"on",'"and",:bright '"off", - '"respectively."] - if $useInternalHistoryTable - then wh := '"memory" - else wh := '"a file" - sayBrightly ['%l,'" When the history facility is active, the data", - '" is kept in ",wh,'"."] - sayMessage ['" Issue",:bright '")help history", - '"for more information."] - - arg is [fn] and - (fn := DOWNCASE(fn)) in '(y n ye yes no on of off) => - $options := [[fn]] - historySpad2Cmd() - setHistory NIL - -@ -\section{kernel} -See the section kernel in setvart.boot.pamphlet\cite{1} -\begin{verbatim} - Current Values of kernel Variables - -Variable Description Current Value ------------------------------------------------------------------ -warn warn when re-definition is attempted off -protect prevent re-definition of kernel functions off - -\end{verbatim} -<>= -<> -<> -<> -<> -@ -\subsection{describeProtectedSymbolsWarning} -<>= -describeProtectedSymbolsWarning() == - sayBrightly LIST( - '"Some AXIOM library functions are compiled into the kernel for efficiency",_ - '%l,'"reasons. To prevent them being re-defined when loaded from a library",_ - '%l,'"they are specially protected. If a user wishes to know when an attempt",_ - '%l,'"is made to re-define such a function, he or she should issue the command:",_ - '%l,'" )set kernel warn on",_ - '%l,'"To restore the default behaviour, he or she should issue the command:",_ - '%l,'" )set kernel warn off") - -@ -\subsection{protectedSymbolsWarning} -<>= -protectedSymbolsWarning arg == - arg = "%initialize%" => PROTECTED_-SYMBOL_-WARN(false) - arg = "%display%" => - v := PROTECTED_-SYMBOL_-WARN(true) - PROTECTED_-SYMBOL_-WARN(v) - v => '"on" - '"off" - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeProtectedSymbolsWarning() - PROTECTED_-SYMBOL_-WARN translateYesNo2TrueFalse first arg - -@ -\subsection{describeProtectSymbols} -<>= -describeProtectSymbols() == - sayBrightly LIST( - '"Some AXIOM library functions are compiled into the kernel for efficiency",_ - '%l,'"reasons. To prevent them being re-defined when loaded from a library",_ - '%l,'"they are specially protected. If a user wishes to re-define these",_ - '%l,'"functions, he or she should issue the command:",_ - '%l,'" )set kernel protect off",_ - '%l,'"To restore the default behaviour, he or she should issue the command:",_ - '%l,'" )set kernel protect on") - -@ -\subsection{protectSymbols} -<>= -protectSymbols arg == - arg = "%initialize%" => PROTECT_-SYMBOLS(true) - arg = "%display%" => - v := PROTECT_-SYMBOLS(true) - PROTECT_-SYMBOLS(v) - v => '"on" - '"off" - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeProtectSymbols() - PROTECT_-SYMBOLS translateYesNo2TrueFalse first arg - -@ -\section{naglink} -See the section naglink in setvart.boot.pamphlet\cite{1} -\begin{verbatim} - Current Values of naglink Variables - -Variable Description Current Value ------------------------------------------------------------------ -host internet address of host for NAGLink localhost -persistence number of (fortran) functions to remember 1 -messages show NAGLink messages on -double enforce DOUBLE PRECISION ASPs on - -\end{verbatim} -<>= -<> -<> -<> -<> -@ -\subsection{setNagHost} -<>= -setNagHost arg == - arg = "%initialize%" => - $nagHost := '"localhost" - arg = "%display%" => - object2String $nagHost - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeSetNagHost() - $nagHost := object2String arg - -@ -\subsection{describeSetNagHost} -<>= -describeSetNagHost() == - sayBrightly LIST ( - '%b,'")set naglink host",'%d,_ - '"is used to tell AXIOM which host to contact for",'%l,_ - '" a NAGLink request. An Internet address should be supplied. The host",'%l,_ - '" specified must be running the NAGLink daemon.",'%l,'%l,_ - '" The current setting is",'%b,$nagHost,'%d) - -@ -\subsection{setFortPers} -<>= -setFortPers arg == - arg = "%initialize%" => - $fortPersistence := 1 - arg = "%display%" => - $fortPersistence - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeFortPersistence() - n := first arg - ((not FIXP n) or (n < 0)) => - sayMessage ['"Your value of",:bright n,'"is invalid because ..."] - describeFortPersistence() - terminateSystemCommand() - $fortPersistence := first(arg) - -@ -\subsection{describeFortPersistence} -<>= -describeFortPersistence() == - sayBrightly LIST ( - '%b,'")set naglink persistence",'%d,_ - '"is used to tell the ",'%b,"nagd",'%d," daemon how many ASP",'%l,_ - '" source and object files to keep around in case you reuse them. This helps",'%l,_ - '" to avoid needless recompilations. The number specified should be a ",'%l,_ - '" non-negative integer.", '%l,'%l,_ - '" The current setting is",'%b,$fortPersistence,'%d) - -@ -\section{output algebra} -See the subsection output algebra in setvart.boot.pamphlet\cite{1} -\begin{verbatim} ---------------------- The algebra Option ---------------------- - - Description: display output in algebraic form - - )set output algebra is used to tell AXIOM to turn algebra-style - output printing on and off, and where to place the output. By - default, the destination for the output is the screen but - printing is turned off. - -Syntax: )set output algebra - where arg can be one of - on turn algebra printing on (default state) - off turn algebra printing off - console send algebra output to screen (default state) - fp<.fe> send algebra output to file with file prefix fp - and file extension .fe. If not given, - .fe defaults to .spout. - -If you wish to send the output to a file, you may need to issue -this command twice: once with on and once with the file name. -For example, to send algebra output to the file polymer.spout, -issue the two commands - - )set output algebra on - )set output algebra polymer - -The output is placed in the directory from which you invoked -AXIOM or the one you set with the )cd system command. -The current setting is: On:CONSOLE -\end{verbatim} -<>= -<> -<> -@ -\subsection{setOutputAlgebra} -<>= -setOutputAlgebra arg == - arg = "%initialize%" => - $algebraOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $algebraOutputFile := '"CONSOLE" - $algebraFormat := true - - arg = "%display%" => - if $algebraFormat then label := '"On:" else label := '"Off:" - STRCONC(label,$algebraOutputFile) - - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeSetOutputAlgebra() - - -- try to figure out what the argument is - - if arg is [fn] and - fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) - then 'ok - else arg := [fn,'spout] - - arg is [fn] => - UPCASE(fn) in '(Y N YE O OF) => - sayKeyedMsg("S2IV0002",'(algebra algebra)) - UPCASE(fn) in '(NO OFF) => $algebraFormat := NIL - UPCASE(fn) in '(YES ON) => $algebraFormat := true - UPCASE(fn) = 'CONSOLE => - SHUT $algebraOutputStream - $algebraOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $algebraOutputFile := '"CONSOLE" - - (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file - if (ptype := pathnameType fn) then - fn := STRCONC(pathnameDirectory fn,pathnameName fn) - ft := ptype - if null fm then fm := 'A - filename := $FILEP(fn,ft,fm) - null filename => - sayKeyedMsg("S2IV0003",[fn,ft,fm]) - (testStream := MAKE_-OUTSTREAM(filename,255,0)) => - SHUT $algebraOutputStream - $algebraOutputStream := testStream - $algebraOutputFile := object2String filename - sayKeyedMsg("S2IV0004",['"Algebra",$algebraOutputFile]) - sayKeyedMsg("S2IV0003",[fn,ft,fm]) - - sayKeyedMsg("S2IV0005",NIL) - describeSetOutputAlgebra() - -@ -\subsection{describeSetOutputAlgebra} -<>= -describeSetOutputAlgebra() == - sayBrightly LIST ('%b,'")set output algebra",'%d,_ - '"is used to tell AXIOM to turn algebra-style output",'%l,_ - '"printing on and off, and where to place the output. By default, the",'%l,_ - '"destination for the output is the screen but printing is turned off.",'%l,_ - '%l,_ - '"Syntax: )set output algebra ",'%l,_ - '" where arg can be one of",'%l,_ - '" on turn algebra printing on (default state)",'%l,_ - '" off turn algebra printing off",'%l,_ - '" console send algebra output to screen (default state)",'%l,_ - '" fp<.fe> send algebra output to file with file prefix fp",'%l,_ - '" and file extension .fe. If not given, .fe defaults to .spout.",'%l, - '%l,_ - '"If you wish to send the output to a file, you may need to issue this command",'%l,_ - '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ - '"algebra output to the file",'%b,'"polymer.spout,",'%d,'"issue the two commands",'%l,_ - '%l,_ - '" )set output algebra on",'%l,_ - '" )set output algebra polymer",'%l,_ - '%l,_ - '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ - '"the one you set with the )cd system command.",'%l,_ - '"The current setting is: ",'%b,setOutputAlgebra "%display%",'%d) - - -@ -\section{output characters} -See the subsection output characters in setvart.boot.pamphlet\cite{1} -\begin{verbatim} --------------------- The characters Option -------------------- - - Description: choose special output character set - - - The characters option may be followed by any one of the - following: - - default - -> plain - - The current setting is indicated within the list. This - option determines the special characters used for algebraic - output. This is what the current choice of special characters - looks like: - ulc is shown as + urc is shown as + - llc is shown as + lrc is shown as + - vbar is shown as | hbar is shown as - - quad is shown as ? lbrk is shown as [ - rbrk is shown as ] lbrc is shown as { - rbrc is shown as } ttee is shown as + - btee is shown as + rtee is shown as + - ltee is shown as + ctee is shown as + - bslash is shown as \ -\end{verbatim} -<>= -<> -@ -\subsection{setOutputCharacters} -<>= -setOutputCharacters arg == - -- this sets the special character set - arg = "%initialize%" => - $specialCharacters := $plainRTspecialCharacters - - current := - $specialCharacters = $RTspecialCharacters => '"default" - $specialCharacters = $plainRTspecialCharacters => '"plain" - '"unknown" - arg = "%display%" => current - - (null arg) or (arg = "%describe%") or (first arg = '_?) => - sayMessage ['" The",:bright '"characters",'"option", - '" may be followed by any one of the following:"] - for name in '("default" "plain") repeat - if name = current - then sayBrightly ['" ->",:bright name] - else sayBrightly ['" ",name] - TERPRI() - sayBrightly '" The current setting is indicated within the list. This option determines " - sayBrightly '" the special characters used for algebraic output. This is what the" - sayBrightly '" current choice of special characters looks like:" - l := NIL - for [char,:.] in $specialCharacterAlist repeat - s := STRCONC('" ",PNAME char,'" is shown as ", - PNAME specialChar(char)) - l := cons(s,l) - sayAsManyPerLineAsPossible reverse l - - arg is [fn] and (fn := DOWNCASE(fn)) => - fn = 'default => $specialCharacters := $RTspecialCharacters - fn = 'plain => $specialCharacters := $plainRTspecialCharacters - setOutputCharacters NIL - setOutputCharacters NIL - -@ -\section{output fortran} -See the subsection output fortran in setvart.boot.pamphlet\cite{1} -\begin{verbatim} ---------------------- The fortran Option ---------------------- - - Description: create output in FORTRAN format - - )set output fortran is used to tell AXIOM to turn FORTRAN-style - output printing on and off, and where to place the output. By - default, the destination for the output is the screen but - printing is turned off. - -Also See: )set fortran - -Syntax: )set output fortran - where arg can be one of - on turn FORTRAN printing on - off turn FORTRAN printing off (default state) - console send FORTRAN output to screen (default state) - fp<.fe> send FORTRAN output to file with file prefix - fp and file extension .fe. If not given, - .fe defaults to .sfort. - -If you wish to send the output to a file, you must issue -this command twice: once with on and once with the file name. -For example, to send FORTRAN output to the file polymer.sfort, - issue the two commands - - )set output fortran on - )set output fortran polymer - -The output is placed in the directory from which you invoked -AXIOM or the one you set with the )cd system command. -The current setting is: Off:CONSOLE -\end{verbatim} -<>= -<> -<> -<> -@ -\subsection{makeStream} -<>= -makeStream(append,filename,i,j) == - append => MAKE_-APPENDSTREAM(filename,i,j) - MAKE_-OUTSTREAM(filename,i,j) - -@ -\subsection{setOutputFortran} -<>= -setOutputFortran arg == - arg = "%initialize%" => - $fortranOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $fortranOutputFile := '"CONSOLE" - $fortranFormat := NIL - - arg = "%display%" => - if $fortranFormat then label := '"On:" else label := '"Off:" - STRCONC(label,$fortranOutputFile) - - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeSetOutputFortran() - - -- try to figure out what the argument is - - append := NIL - quiet := NIL - while LISTP arg and UPCASE(first arg) in '(APPEND QUIET) repeat - if UPCASE first(arg) = 'APPEND then append := true - else if UPCASE first(arg) = 'QUIET then quiet := true - arg := rest(arg) - - if arg is [fn] and - fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) - then 'ok - else arg := [fn,'sfort] - - arg is [fn] => - UPCASE(fn) in '(Y N YE O OF) => - sayKeyedMsg("S2IV0002",'(FORTRAN fortran)) - UPCASE(fn) in '(NO OFF) => $fortranFormat := NIL - UPCASE(fn) in '(YES ON) => $fortranFormat := true - UPCASE(fn) = 'CONSOLE => - SHUT $fortranOutputStream - $fortranOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $fortranOutputFile := '"CONSOLE" - - (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file - if (ptype := pathnameType fn) then - fn := STRCONC(pathnameDirectory fn,pathnameName fn) - ft := ptype - if null fm then fm := 'A - filename := $FILEP(fn,ft,fm) - null filename => sayKeyedMsg("S2IV0003",[fn,ft,fm]) - (testStream := makeStream(append,filename,255,0)) => - SHUT $fortranOutputStream - $fortranOutputStream := testStream - $fortranOutputFile := object2String filename - if null quiet then sayKeyedMsg("S2IV0004",['FORTRAN,$fortranOutputFile]) - if null quiet then sayKeyedMsg("S2IV0003",[fn,ft,fm]) - if null quiet then sayKeyedMsg("S2IV0005",NIL) - describeSetOutputFortran() - -@ -\subsection{describeSetOutputFortran} -<>= -describeSetOutputFortran() == - sayBrightly LIST ('%b,'")set output fortran",'%d,_ - '"is used to tell AXIOM to turn FORTRAN-style output",'%l,_ - '"printing on and off, and where to place the output. By default, the",'%l,_ - '"destination for the output is the screen but printing is turned off.",'%l,_ - '%l,_ - '"Also See: )set fortran",'%l, - '%l,_ - '"Syntax: )set output fortran ",'%l,_ - '" where arg can be one of",'%l,_ - '" on turn FORTRAN printing on",'%l,_ - '" off turn FORTRAN printing off (default state)",'%l,_ - '" console send FORTRAN output to screen (default state)",'%l,_ - '" fp<.fe> send FORTRAN output to file with file prefix fp and file",'%l,_ - '" extension .fe. If not given, .fe defaults to .sfort.",'%l, - '%l,_ - '"If you wish to send the output to a file, you must issue this command",'%l,_ - '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ - '"FORTRAN output to the file",'%b,'"polymer.sfort,",'%d,'"issue the two commands",'%l,_ - '%l,_ - '" )set output fortran on",'%l,_ - '" )set output fortran polymer",'%l,_ - '%l,_ - '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ - '"the one you set with the )cd system command.",'%l,_ - '"The current setting is: ",'%b,setOutputFortran "%display%",'%d) - -@ -\section{output mathml} -See the section mathml in setvart.boot.pamphlet\cite{1} -\begin{verbatim} ------------------------ The mathml Option ------------------------ - - Description: create output in MathML style - - )set output mathml is used to tell AXIOM to turn MathML-style output -printing on and off, and where to place the output. By default, -the destination for the output is the screen but printing is -turned off. - -Syntax: )set output mathml - where arg can be one of - on turn MathML printing on - off turn MathML printing off (default state) - console send MathML output to screen (default state) - fp<.fe> send MathML output to file with file prefix fp - and file extension .fe. If not given, - .fe defaults to .stex. - -If you wish to send the output to a file, you must issue -this command twice: once with on and once with the file name. -For example, to send MathML output to the file polymer.stex, -issue the two commands - - )set output mathml on - )set output mathml polymer - -The output is placed in the directory from which you invoked -AXIOM or the one you set with the )cd system command. -The current setting is: Off:CONSOLE -\end{verbatim} -<>= -<> -<> -@ -\subsection{setOutputMathml} -<>= -setOutputMathml arg == - arg = "%initialize%" => - $mathmlOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $mathmlOutputFile := '"CONSOLE" - $mathmlFormat := NIL - - arg = "%display%" => - if $mathmlFormat then label := '"On:" else label := '"Off:" - STRCONC(label,$mathmlOutputFile) - - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeSetOutputMathml() - - -- try to figure out what the argument is - - if arg is [fn] and - fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) - then 'ok - else arg := [fn,'smml] - - arg is [fn] => - UPCASE(fn) in '(Y N YE O OF) => - sayKeyedMsg("S2IV0002",'(MathML mathml)) - UPCASE(fn) in '(NO OFF) => $mathmlFormat := NIL - UPCASE(fn) in '(YES ON) => $mathmlFormat := true - UPCASE(fn) = 'CONSOLE => - SHUT $mathmlOutputStream - $mathmlOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $mathmlOutputFile := '"CONSOLE" - - (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file - if (ptype := pathnameType fn) then - fn := STRCONC(pathnameDirectory fn,pathnameName fn) - ft := ptype - if null fm then fm := 'A - filename := $FILEP(fn,ft,fm) - null filename => - sayKeyedMsg("S2IV0003",[fn,ft,fm]) - (testStream := MAKE_-OUTSTREAM(filename,255,0)) => - SHUT $mathmlOutputStream - $mathmlOutputStream := testStream - $mathmlOutputFile := object2String filename - sayKeyedMsg("S2IV0004",['"MathML",$mathmlOutputFile]) - sayKeyedMsg("S2IV0003",[fn,ft,fm]) - - sayKeyedMsg("S2IV0005",NIL) - describeSetOutputMathml() - -@ -\subsection{describeSetOutputMathml} -<>= -describeSetOutputMathml() == - sayBrightly LIST ('%b,'")set output mathml",'%d,_ - '"is used to tell AXIOM to turn MathML-style output",'%l,_ - '"printing on and off, and where to place the output. By default, the",'%l,_ - '"destination for the output is the screen but printing is turned off.",'%l,_ - '%l,_ - '"Syntax: )set output mathml ",'%l,_ - '" where arg can be one of",'%l,_ - '" on turn MathML printing on",'%l,_ - '" off turn MathML printing off (default state)",'%l,_ - '" console send MathML output to screen (default state)",'%l,_ - '" fp<.fe> send MathML output to file with file prefix fp and file",'%l,_ - '" extension .fe. If not given, .fe defaults to .stex.",'%l, - '%l,_ - '"If you wish to send the output to a file, you must issue this command",'%l,_ - '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ - '"MathML output to the file",'%b,'"polymer.smml,",'%d,'"issue the two commands",'%l,_ - '%l,_ - '" )set output mathml on",'%l,_ - '" )set output mathml polymer",'%l,_ - '%l,_ - '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ - '"the one you set with the )cd system command.",'%l,_ - '"The current setting is: ",'%b,setOutputMathml "%display%",'%d) - - -@ -\section{output openmath} -See the subsection output openmath in setvart.boot.pamphlet\cite{1} -\begin{verbatim} ------------------- The openmath Option ------------------------ - - Description: create output in OpenMath style - - )set output tex is used to tell AXIOM to turn TeX-style output -printing on and off, and where to place the output. By default, -the destination for the output is the screen but printing is -turned off. - -Syntax: )set output tex - where arg can be one of - on turn TeX printing on - off turn TeX printing off (default state) - console send TeX output to screen (default state) - fp<.fe> send TeX output to file with file prefix fp - and file extension .fe. If not given, - .fe defaults to .som. - -If you wish to send the output to a file, you must issue -this command twice: once with on and once with the file name. -For example, to send TeX output to the file polymer.som, -issue the two commands - - )set output tex on - )set output tex polymer - -The output is placed in the directory from which you invoked -AXIOM or the one you set with the )cd system command. -The current setting is: Off:CONSOLE -<>= -<> -<> -@ -\subsection{setOutputOpenMath} -<>= -setOutputOpenMath arg == - arg = "%initialize%" => - $openMathOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $openMathOutputFile := '"CONSOLE" - $openMathFormat := NIL - - arg = "%display%" => - if $openMathFormat then label := '"On:" else label := '"Off:" - STRCONC(label,$openMathOutputFile) - - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeSetOutputOpenMath() - - -- try to figure out what the argument is - - if arg is [fn] and - fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) - then 'ok - else arg := [fn,'som] - - arg is [fn] => - UPCASE(fn) in '(Y N YE O OF) => - sayKeyedMsg("S2IV0002",'(OpenMath openmath)) - UPCASE(fn) in '(NO OFF) => $openMathFormat := NIL - UPCASE(fn) in '(YES ON) => $openMathFormat := true - UPCASE(fn) = 'CONSOLE => - SHUT $openMathOutputStream - $openMathOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $openMathOutputFile := '"CONSOLE" - - (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file - if (ptype := pathnameType fn) then - fn := STRCONC(pathnameDirectory fn,pathnameName fn) - ft := ptype - if null fm then fm := 'A - filename := $FILEP(fn,ft,fm) - null filename => - sayKeyedMsg("S2IV0003",[fn,ft,fm]) - (testStream := MAKE_-OUTSTREAM(filename,255,0)) => - SHUT $openMathOutputStream - $openMathOutputStream := testStream - $openMathOutputFile := object2String filename - sayKeyedMsg("S2IV0004",['"OpenMath",$openMathOutputFile]) - sayKeyedMsg("S2IV0003",[fn,ft,fm]) - - sayKeyedMsg("S2IV0005",NIL) - describeSetOutputOpenMath() - -@ -\subsection{describeSetOutputOpenMath} -<>= -describeSetOutputOpenMath() == - sayBrightly LIST ('%b,'")set output openmath",'%d,_ - '"is used to tell AXIOM to turn OpenMath output",'%l,_ - '"printing on and off, and where to place the output. By default, the",'%l,_ - '"destination for the output is the screen but printing is turned off.",'%l,_ - '%l,_ - '"Syntax: )set output openmath ",'%l,_ - '" where arg can be one of",'%l,_ - '" on turn OpenMath printing on",'%l,_ - '" off turn OpenMath printing off (default state)",'%l,_ - '" console send OpenMath output to screen (default state)",'%l,_ - '" fp<.fe> send OpenMath output to file with file prefix fp and file",'%l,_ - '" extension .fe. If not given, .fe defaults to .som.",'%l, - '%l,_ - '"If you wish to send the output to a file, you must issue this command",'%l,_ - '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ - '"OpenMath output to the file",'%b,'"polymer.som,",'%d,'"issue the two commands",'%l,_ - '%l,_ - '" )set output openmath on",'%l,_ - '" )set output openmath polymer",'%l,_ - '%l,_ - '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ - '"the one you set with the )cd system command.",'%l,_ - '"The current setting is: ",'%b,setOutputOpenMath "%display%",'%d) - -@ -\section{output script} -See the subsection output script in setvart.boot.pamphlet\cite{1} -\begin{verbatim} ----------------------- The script Option ---------------------- - - Description: display output in SCRIPT formula format - - )set output script is used to tell AXIOM to turn IBM Script - formula-style output printing on and off, and where to place - the output. By default, the destination for the output is the - screen but printing is turned off. - -Syntax: )set output script - where arg can be one of - on turn IBM Script formula printing on - off turn IBM Script formula printing off - (default state) - console send IBM Script formula output to screen - (default state) - fp<.fe> send IBM Script formula output to file with file - prefix fp and file extension .fe. If not given, - .fe defaults to .sform. - -If you wish to send the output to a file, you must issue -this command twice: once with on and once with the file -name. For example, to send IBM Script formula output to -the file polymer.sform, issue the two commands - - )set output script on - )set output script polymer - -The output is placed in the directory from which you -invoked AXIOM or the one you set with the )cd system command. -The current setting is: Off:CONSOLE -\end{verbatim} -<>= -<> -<> -@ -\subsection{setOutputFormula} -<>= -setOutputFormula arg == - arg = "%initialize%" => - $formulaOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $formulaOutputFile := '"CONSOLE" - $formulaFormat := NIL - - arg = "%display%" => - if $formulaFormat then label := '"On:" else label := '"Off:" - STRCONC(label,$formulaOutputFile) - - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeSetOutputFormula() - - -- try to figure out what the argument is - - if arg is [fn] and - fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) - then 'ok - else arg := [fn,'sform] - - arg is [fn] => - UPCASE(fn) in '(Y N YE O OF) => - sayKeyedMsg("S2IV0002",'(script script)) - UPCASE(fn) in '(NO OFF) => $formulaFormat := NIL - UPCASE(fn) in '(YES ON) => $formulaFormat := true - UPCASE(fn) = 'CONSOLE => - SHUT $formulaOutputStream - $formulaOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $formulaOutputFile := '"CONSOLE" - - (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file - if (ptype := pathnameType fn) then - fn := STRCONC(pathnameDirectory fn,pathnameName fn) - ft := ptype - if null fm then fm := 'A - filename := $FILEP(fn,ft,fm) - null filename => - sayKeyedMsg("S2IV0003",[fn,ft,fm]) - (testStream := MAKE_-OUTSTREAM(filename,255,0)) => - SHUT $formulaOutputStream - $formulaOutputStream := testStream - $formulaOutputFile := object2String filename - sayKeyedMsg("S2IV0004",['"IBM Script formula",$formulaOutputFile]) - sayKeyedMsg("S2IV0003",[fn,ft,fm]) - - sayKeyedMsg("S2IV0005",NIL) - describeSetOutputFormula() - -@ -\subsection{describeSetOutputFormula} -<>= -describeSetOutputFormula() == - sayBrightly LIST ('%b,'")set output script",'%d,_ - '"is used to tell AXIOM to turn IBM Script formula-style",'%l,_ - '"output printing on and off, and where to place the output. By default, the",'%l,_ - '"destination for the output is the screen but printing is turned off.",'%l,_ - '%l,_ - '"Syntax: )set output script ",'%l,_ - '" where arg can be one of",'%l,_ - '" on turn IBM Script formula printing on",'%l,_ - '" off turn IBM Script formula printing off (default state)",'%l,_ - '" console send IBM Script formula output to screen (default state)",'%l,_ - '" fp<.fe> send IBM Script formula output to file with file prefix fp",'%l,_ - '" and file extension .fe. If not given, .fe defaults to .sform.",'%l, - '%l,_ - '"If you wish to send the output to a file, you must issue this command",'%l,_ - '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ - '"IBM Script formula output to the file",'%b,'"polymer.sform,",'%d,'"issue the two commands",'%l,_ - '%l,_ - '" )set output script on",'%l,_ - '" )set output script polymer",'%l,_ - '%l,_ - '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ - '"the one you set with the )cd system command.",'%l,_ - '"The current setting is: ",'%b,setOutputFormula "%display%",'%d) - -@ -\section{output tex} -See the section tex in setvart.boot.pamphlet\cite{1} -\begin{verbatim} ------------------------ The tex Option ------------------------ - - Description: create output in TeX style - - )set output tex is used to tell AXIOM to turn TeX-style output -printing on and off, and where to place the output. By default, -the destination for the output is the screen but printing is -turned off. - -Syntax: )set output tex - where arg can be one of - on turn TeX printing on - off turn TeX printing off (default state) - console send TeX output to screen (default state) - fp<.fe> send TeX output to file with file prefix fp - and file extension .fe. If not given, - .fe defaults to .stex. - -If you wish to send the output to a file, you must issue -this command twice: once with on and once with the file name. -For example, to send TeX output to the file polymer.stex, -issue the two commands - - )set output tex on - )set output tex polymer - -The output is placed in the directory from which you invoked -AXIOM or the one you set with the )cd system command. -The current setting is: Off:CONSOLE -\end{verbatim} -<>= -<> -<> -@ -\subsection{setOutputTex} -<>= -setOutputTex arg == - arg = "%initialize%" => - $texOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $texOutputFile := '"CONSOLE" - $texFormat := NIL - - arg = "%display%" => - if $texFormat then label := '"On:" else label := '"Off:" - STRCONC(label,$texOutputFile) - - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeSetOutputTex() - - -- try to figure out what the argument is - - if arg is [fn] and - fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) - then 'ok - else arg := [fn,'stex] - - arg is [fn] => - UPCASE(fn) in '(Y N YE O OF) => - sayKeyedMsg("S2IV0002",'(TeX tex)) - UPCASE(fn) in '(NO OFF) => $texFormat := NIL - UPCASE(fn) in '(YES ON) => $texFormat := true - UPCASE(fn) = 'CONSOLE => - SHUT $texOutputStream - $texOutputStream := - DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) - $texOutputFile := '"CONSOLE" - - (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file - if (ptype := pathnameType fn) then - fn := STRCONC(pathnameDirectory fn,pathnameName fn) - ft := ptype - if null fm then fm := 'A - filename := $FILEP(fn,ft,fm) - null filename => - sayKeyedMsg("S2IV0003",[fn,ft,fm]) - (testStream := MAKE_-OUTSTREAM(filename,255,0)) => - SHUT $texOutputStream - $texOutputStream := testStream - $texOutputFile := object2String filename - sayKeyedMsg("S2IV0004",['"TeX",$texOutputFile]) - sayKeyedMsg("S2IV0003",[fn,ft,fm]) - - sayKeyedMsg("S2IV0005",NIL) - describeSetOutputTex() - -@ -\subsection{describeSetOutputTex} -<>= -describeSetOutputTex() == - sayBrightly LIST ('%b,'")set output tex",'%d,_ - '"is used to tell AXIOM to turn TeX-style output",'%l,_ - '"printing on and off, and where to place the output. By default, the",'%l,_ - '"destination for the output is the screen but printing is turned off.",'%l,_ - '%l,_ - '"Syntax: )set output tex ",'%l,_ - '" where arg can be one of",'%l,_ - '" on turn TeX printing on",'%l,_ - '" off turn TeX printing off (default state)",'%l,_ - '" console send TeX output to screen (default state)",'%l,_ - '" fp<.fe> send TeX output to file with file prefix fp and file",'%l,_ - '" extension .fe. If not given, .fe defaults to .stex.",'%l, - '%l,_ - '"If you wish to send the output to a file, you must issue this command",'%l,_ - '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ - '"TeX output to the file",'%b,'"polymer.stex,",'%d,'"issue the two commands",'%l,_ - '%l,_ - '" )set output tex on",'%l,_ - '" )set output tex polymer",'%l,_ - '%l,_ - '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ - '"the one you set with the )cd system command.",'%l,_ - '"The current setting is: ",'%b,setOutputTex "%display%",'%d) - -@ -\section{streams calculate} -See the section streams in setvart.boot.pamphlet\cite{1} -\begin{verbatim} - Current Values of streams Variables - -Variable Description Current Value ------------------------------------------------------------------ -calculate specify number of elements to calculate 10 -showall display all stream elements computed off - -\end{verbatim} -<>= -<> -<> -@ -\subsection{setStreamsCalculate} -<>= -setStreamsCalculate arg == - arg = "%initialize%" => - $streamCount := 10 - arg = "%display%" => - object2String $streamCount - (null arg) or (arg = "%describe%") or (first arg = '_?) => - describeSetStreamsCalculate() - n := first arg - (n ^= 'all) and ((not FIXP n) or (n < 0)) => - sayMessage ['"Your value of",:bright n,'"is invalid because ..."] - describeSetStreamsCalculate() - terminateSystemCommand() - $streamCount := n - -@ -\subsection{describeSetStreamsCalculate} -<>= -describeSetStreamsCalculate() == sayKeyedMsg("S2IV0001",[$streamCount]) - -@ -\section{License} -<>= --- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. --- All rights reserved. --- --- Redistribution and use in source and binary forms, with or without --- modification, are permitted provided that the following conditions are --- met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- --- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS --- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED --- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER --- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, --- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, --- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -@ -<<*>>= -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -@ -\section{setvars.clisp} -<>= - -(IN-PACKAGE "BOOT" ) - -;setFunctionsCache arg == -; $options : local := NIL -; arg = "%initialize%" => -; $cacheCount := 0 -; $cacheAlist := NIL -; arg = "%display%" => -; null $cacheAlist => object2String $cacheCount -; '"..." -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; describeSetFunctionsCache() -; TERPRI() -; sayAllCacheCounts() -; n := first arg -; (n ^= 'all) and ((not FIXP n) or (n < 0)) => -; sayMessage ['"Your value of",:bright n,'"is invalid because ..."] -; describeSetFunctionsCache() -; terminateSystemCommand() -; if (rest arg) then $options := [['vars,:rest arg]] -; countCache n - -(DEFUN |setFunctionsCache| (|arg|) (PROG (|$options| |n|) (DECLARE (SPECIAL |$options|)) (RETURN (PROGN (SPADLET |$options| NIL) (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (SPADLET |$cacheCount| 0) (SPADLET |$cacheAlist| NIL)) ((BOOT-EQUAL |arg| (QUOTE |%display%|)) (COND ((NULL |$cacheAlist|) (|object2String| |$cacheCount|)) ((QUOTE T) (MAKESTRING "...")))) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|describeSetFunctionsCache|) (TERPRI) (|sayAllCacheCounts|)) ((QUOTE T) (SPADLET |n| (CAR |arg|)) (COND ((AND (NEQUAL |n| (QUOTE |all|)) (OR (NULL (FIXP |n|)) (MINUSP |n|))) (|sayMessage| (CONS (MAKESTRING "Your value of") (APPEND (|bright| |n|) (CONS (MAKESTRING "is invalid because ...") NIL)))) (|describeSetFunctionsCache|) (|terminateSystemCommand|)) ((QUOTE T) (COND ((CDR |arg|) (SPADLET |$options| (CONS (CONS (QUOTE |vars|) (CDR |arg|)) NIL)))) (|countCache| |n|))))))))) -;countCache n == -; $options => -; $options is [["vars",:l]] => -; for x in l repeat -; NULL IDENTP x => sayKeyedMsg("S2IF0007",[x]) -; $cacheAlist:= insertAlist(x,n,$cacheAlist) -; cacheCountName:= INTERNL(x,'";COUNT") -; SET(cacheCountName,n) -; sayCacheCount(x,n) -; optionError(CAAR $options,nil) -; sayCacheCount(nil,$cacheCount:= n) - -(DEFUN |countCache| (|n|) (PROG (|ISTMP#1| |l| |cacheCountName|) (RETURN (SEQ (COND (|$options| (COND ((AND (PAIRP |$options|) (EQ (QCDR |$options|) NIL) (PROGN (SPADLET |ISTMP#1| (QCAR |$options|)) (AND (PAIRP |ISTMP#1|) (EQ (QCAR |ISTMP#1|) (QUOTE |vars|)) (PROGN (SPADLET |l| (QCDR |ISTMP#1|)) (QUOTE T))))) (DO ((#0=#:G3123 |l| (CDR #0#)) (|x| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |x| (CAR #0#)) NIL)) NIL) (SEQ (EXIT (COND ((NULL (IDENTP |x|)) (|sayKeyedMsg| (QUOTE S2IF0007) (CONS |x| NIL))) ((QUOTE T) (SPADLET |$cacheAlist| (|insertAlist| |x| |n| |$cacheAlist|)) (SPADLET |cacheCountName| (INTERNL |x| (MAKESTRING ";COUNT"))) (SET |cacheCountName| |n|) (|sayCacheCount| |x| |n|))))))) ((QUOTE T) (|optionError| (CAAR |$options|) NIL)))) ((QUOTE T) (|sayCacheCount| NIL (SPADLET |$cacheCount| |n|)))))))) -;describeSetFunctionsCache() == -; sayBrightly LIST( -; '%b,'")set functions cache",'%d,'"is used to tell AXIOM how many",'%l,_ -; '" values computed by interpreter functions should be saved. This can save ",'%l, _ -; '" quite a bit of time in recursive functions, though one must consider that",'%l,_ -; '" the cached values will take up (perhaps valuable) room in the workspace.",'%l,'%l,_ -; '" The value given after",'%b,'"cache",'%d,'"must either be the",_ -; '" word",'%b,'"all",'%d,'"or a positive",'%l,_ -; '" integer. This may be followed by any number of function names whose cache",'%l,_ -; '" sizes you wish to so set. If no functions are given, the default cache",'%l,_ -; '" size is set.",'%l,'" Examples:",_ -; '" )set fun cache all )set fun cache 10 f g Legendre") - -(DEFUN |describeSetFunctionsCache| NIL (|sayBrightly| (LIST (QUOTE |%b|) (MAKESTRING ")set functions cache") (QUOTE |%d|) (MAKESTRING "is used to tell AXIOM how many") (QUOTE |%l|) (MAKESTRING " values computed by interpreter functions should be saved. This can save ") (QUOTE |%l|) (MAKESTRING " quite a bit of time in recursive functions, though one must consider that") (QUOTE |%l|) (MAKESTRING " the cached values will take up (perhaps valuable) room in the workspace.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING " The value given after") (QUOTE |%b|) (MAKESTRING "cache") (QUOTE |%d|) (MAKESTRING "must either be the") (MAKESTRING " word") (QUOTE |%b|) (MAKESTRING "all") (QUOTE |%d|) (MAKESTRING "or a positive") (QUOTE |%l|) (MAKESTRING " integer. This may be followed by any number of function names whose cache") (QUOTE |%l|) (MAKESTRING " sizes you wish to so set. If no functions are given, the default cache") (QUOTE |%l|) (MAKESTRING " size is set.") (QUOTE |%l|) (MAKESTRING " Examples:") (MAKESTRING " )set fun cache all )set fun cache 10 f g Legendre")))) -;sayAllCacheCounts () == -; sayCacheCount(nil,$cacheCount) -; $cacheAlist => -; TERPRI() -;-- SAY '" However," -; for [x,:n] in $cacheAlist | n ^= $cacheCount repeat sayCacheCount(x,n) - -(DEFUN |sayAllCacheCounts| NIL (PROG (|x| |n|) (RETURN (SEQ (PROGN (|sayCacheCount| NIL |$cacheCount|) (COND (|$cacheAlist| (PROGN (TERPRI) (DO ((#0=#:G3151 |$cacheAlist| (CDR #0#)) (#1=#:G3140 NIL)) ((OR (ATOM #0#) (PROGN (SETQ #1# (CAR #0#)) NIL) (PROGN (PROGN (SPADLET |x| (CAR #1#)) (SPADLET |n| (CDR #1#)) #1#) NIL)) NIL) (SEQ (EXIT (COND ((NEQUAL |n| |$cacheCount|) (|sayCacheCount| |x| |n|)))))))))))))) -;sayCacheCount(fn,n) == -; prefix:= -; fn => ["function",:bright linearFormatName fn] -; n = 0 => ["interpreter functions "] -; ["In general, interpreter functions "] -; n = 0 => -; fn => -; sayBrightly ['" Caching for ",:prefix, -; '"is turned off"] -; sayBrightly '" In general, functions will cache no returned values." -; phrase:= -; n="all" => [:bright "all","values."] -; n=1 => [" only the last value."] -; [" the last",:bright n,"values."] -; sayBrightly ['" ",:prefix,'"will cache",:phrase] - -(DEFUN |sayCacheCount| (|fn| |n|) (PROG (|prefix| |phrase|) (RETURN (PROGN (SPADLET |prefix| (COND (|fn| (CONS (QUOTE |function|) (|bright| (|linearFormatName| |fn|)))) ((EQL |n| 0) (CONS (QUOTE |interpreter functions |) NIL)) ((QUOTE T) (CONS (QUOTE |In general, interpreter functions |) NIL)))) (COND ((EQL |n| 0) (COND (|fn| (|sayBrightly| (CONS (MAKESTRING " Caching for ") (APPEND |prefix| (CONS (MAKESTRING "is turned off") NIL))))) ((QUOTE T) (|sayBrightly| (MAKESTRING " In general, functions will cache no returned values."))))) ((QUOTE T) (SPADLET |phrase| (COND ((BOOT-EQUAL |n| (QUOTE |all|)) (APPEND (|bright| (QUOTE |all|)) (CONS (QUOTE |values.|) NIL))) ((EQL |n| 1) (CONS (QUOTE | only the last value.|) NIL)) ((QUOTE T) (CONS (QUOTE | the last|) (APPEND (|bright| |n|) (CONS (QUOTE |values.|) NIL)))))) (|sayBrightly| (CONS (MAKESTRING " ") (APPEND |prefix| (CONS (MAKESTRING "will cache") |phrase|)))))))))) -;setHistory arg == -; -- this is just a front end for the history functions -; arg = "%initialize%" => nil -; current := object2String translateTrueFalse2YesNo $HiFiAccess -; arg = "%display%" => current -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; sayMessage ['" The",:bright '"history",'"option", -; '" may be followed by any one of the following:"] -; for name in '("on" "off" "yes" "no") repeat -; if name = current -; then sayBrightly ['" ->",:bright name] -; else sayBrightly ['" ",name] -; TERPRI() -; sayBrightly '" The current setting is indicated within the list." -; sayBrightly [:bright '"yes",'"and",:bright '"no", -; '"have the same effect as",:bright '"on",'"and",:bright '"off", -; '"respectively."] -; if $useInternalHistoryTable -; then wh := '"memory" -; else wh := '"a file" -; sayBrightly ['%l,'" When the history facility is active, the data", -; '" is kept in ",wh,'"."] -; sayMessage ['" Issue",:bright '")help history", -; '"for more information."] -; arg is [fn] and -; (fn := DOWNCASE(fn)) in '(y n ye yes no on of off) => -; $options := [[fn]] -; historySpad2Cmd() -; setHistory NIL - -(DEFUN |setHistory| (|arg|) (PROG (|current| |wh| |fn|) (RETURN (SEQ (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) NIL) ((QUOTE T) (SPADLET |current| (|object2String| (|translateTrueFalse2YesNo| |$HiFiAccess|))) (COND ((BOOT-EQUAL |arg| (QUOTE |%display%|)) |current|) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|sayMessage| (CONS (MAKESTRING " The") (APPEND (|bright| (MAKESTRING "history")) (CONS (MAKESTRING "option") (CONS (MAKESTRING " may be followed by any one of the following:") NIL))))) (DO ((#0=#:G3178 (QUOTE ("on" "off" "yes" "no")) (CDR #0#)) (|name| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |name| (CAR #0#)) NIL)) NIL) (SEQ (EXIT (COND ((BOOT-EQUAL |name| |current|) (|sayBrightly| (CONS (MAKESTRING " ->") (|bright| |name|)))) ((QUOTE T) (|sayBrightly| (CONS (MAKESTRING " ") (CONS |name| NIL)))))))) (TERPRI) (|sayBrightly| (MAKESTRING " The current setting is indicated within the list.")) (|sayBrightly| (APPEND (|bright| (MAKESTRING "yes")) (CONS (MAKESTRING "and") (APPEND (|bright| (MAKESTRING "no")) (CONS (MAKESTRING "have the same effect as") (APPEND (|bright| (MAKESTRING "on")) (CONS (MAKESTRING "and") (APPEND (|bright| (MAKESTRING "off")) (CONS (MAKESTRING "respectively.") NIL))))))))) (COND (|$useInternalHistoryTable| (SPADLET |wh| (MAKESTRING "memory"))) ((QUOTE T) (SPADLET |wh| (MAKESTRING "a file")))) (|sayBrightly| (CONS (QUOTE |%l|) (CONS (MAKESTRING " When the history facility is active, the data") (CONS (MAKESTRING " is kept in ") (CONS |wh| (CONS (MAKESTRING ".") NIL)))))) (|sayMessage| (CONS (MAKESTRING " Issue") (APPEND (|bright| (MAKESTRING ")help history")) (CONS (MAKESTRING "for more information.") NIL))))) ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T)) (|member| (SPADLET |fn| (DOWNCASE |fn|)) (QUOTE (|y| |n| |ye| |yes| |no| |on| |of| |off|)))) (SPADLET |$options| (CONS (CONS |fn| NIL) NIL)) (|historySpad2Cmd|)) ((QUOTE T) (|setHistory| NIL))))))))) -;describeProtectedSymbolsWarning() == -; sayBrightly LIST( -; '"Some AXIOM library functions are compiled into the kernel for efficiency",_ -; '%l,'"reasons. To prevent them being re-defined when loaded from a library",_ -; '%l,'"they are specially protected. If a user wishes to know when an attempt",_ -; '%l,'"is made to re-define such a function, he or she should issue the command:",_ -; '%l,'" )set kernel warn on",_ -; '%l,'"To restore the default behaviour, he or she should issue the command:",_ -; '%l,'" )set kernel warn off") - -(DEFUN |describeProtectedSymbolsWarning| NIL (|sayBrightly| (LIST (MAKESTRING "Some AXIOM library functions are compiled into the kernel for efficiency") (QUOTE |%l|) (MAKESTRING "reasons. To prevent them being re-defined when loaded from a library") (QUOTE |%l|) (MAKESTRING "they are specially protected. If a user wishes to know when an attempt") (QUOTE |%l|) (MAKESTRING "is made to re-define such a function, he or she should issue the command:") (QUOTE |%l|) (MAKESTRING " )set kernel warn on") (QUOTE |%l|) (MAKESTRING "To restore the default behaviour, he or she should issue the command:") (QUOTE |%l|) (MAKESTRING " )set kernel warn off")))) -;protectedSymbolsWarning arg == -; arg = "%initialize%" => PROTECTED_-SYMBOL_-WARN(false) -; arg = "%display%" => -; v := PROTECTED_-SYMBOL_-WARN(true) -; PROTECTED_-SYMBOL_-WARN(v) -; v => '"on" -; '"off" -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; describeProtectedSymbolsWarning() -; PROTECTED_-SYMBOL_-WARN translateYesNo2TrueFalse first arg - -(DEFUN |protectedSymbolsWarning| (|arg|) (PROG (|v|) (RETURN (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (PROTECTED-SYMBOL-WARN NIL)) ((BOOT-EQUAL |arg| (QUOTE |%display%|)) (SPADLET |v| (PROTECTED-SYMBOL-WARN (QUOTE T))) (PROTECTED-SYMBOL-WARN |v|) (COND (|v| (MAKESTRING "on")) ((QUOTE T) (MAKESTRING "off")))) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|describeProtectedSymbolsWarning|)) ((QUOTE T) (PROTECTED-SYMBOL-WARN (|translateYesNo2TrueFalse| (CAR |arg|)))))))) -;describeProtectSymbols() == -; sayBrightly LIST( -; '"Some AXIOM library functions are compiled into the kernel for efficiency",_ -; '%l,'"reasons. To prevent them being re-defined when loaded from a library",_ -; '%l,'"they are specially protected. If a user wishes to re-define these",_ -; '%l,'"functions, he or she should issue the command:",_ -; '%l,'" )set kernel protect off",_ -; '%l,'"To restore the default behaviour, he or she should issue the command:",_ -; '%l,'" )set kernel protect on") - -(DEFUN |describeProtectSymbols| NIL (|sayBrightly| (LIST (MAKESTRING "Some AXIOM library functions are compiled into the kernel for efficiency") (QUOTE |%l|) (MAKESTRING "reasons. To prevent them being re-defined when loaded from a library") (QUOTE |%l|) (MAKESTRING "they are specially protected. If a user wishes to re-define these") (QUOTE |%l|) (MAKESTRING "functions, he or she should issue the command:") (QUOTE |%l|) (MAKESTRING " )set kernel protect off") (QUOTE |%l|) (MAKESTRING "To restore the default behaviour, he or she should issue the command:") (QUOTE |%l|) (MAKESTRING " )set kernel protect on")))) -;protectSymbols arg == -; arg = "%initialize%" => PROTECT_-SYMBOLS(true) -; arg = "%display%" => -; v := PROTECT_-SYMBOLS(true) -; PROTECT_-SYMBOLS(v) -; v => '"on" -; '"off" -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; describeProtectSymbols() -; PROTECT_-SYMBOLS translateYesNo2TrueFalse first arg - -(DEFUN |protectSymbols| (|arg|) (PROG (|v|) (RETURN (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (PROTECT-SYMBOLS (QUOTE T))) ((BOOT-EQUAL |arg| (QUOTE |%display%|)) (SPADLET |v| (PROTECT-SYMBOLS (QUOTE T))) (PROTECT-SYMBOLS |v|) (COND (|v| (MAKESTRING "on")) ((QUOTE T) (MAKESTRING "off")))) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|describeProtectSymbols|)) ((QUOTE T) (PROTECT-SYMBOLS (|translateYesNo2TrueFalse| (CAR |arg|)))))))) -;setNagHost arg == -; arg = "%initialize%" => -; $nagHost := '"localhost" -; arg = "%display%" => -; object2String $nagHost -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; describeSetNagHost() -; $nagHost := object2String arg - -(DEFUN |setNagHost| (|arg|) (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (SPADLET |$nagHost| (MAKESTRING "localhost"))) ((BOOT-EQUAL |arg| (QUOTE |%display%|)) (|object2String| |$nagHost|)) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|describeSetNagHost|)) ((QUOTE T) (SPADLET |$nagHost| (|object2String| |arg|))))) -;describeSetNagHost() == -; sayBrightly LIST ( -; '%b,'")set naglink host",'%d,_ -; '"is used to tell AXIOM which host to contact for",'%l,_ -; '" a NAGLink request. An Internet address should be supplied. The host",'%l,_ -; '" specified must be running the NAGLink daemon.",'%l,'%l,_ -; '" The current setting is",'%b,$nagHost,'%d) - -(DEFUN |describeSetNagHost| NIL (|sayBrightly| (LIST (QUOTE |%b|) (MAKESTRING ")set naglink host") (QUOTE |%d|) (MAKESTRING "is used to tell AXIOM which host to contact for") (QUOTE |%l|) (MAKESTRING " a NAGLink request. An Internet address should be supplied. The host") (QUOTE |%l|) (MAKESTRING " specified must be running the NAGLink daemon.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING " The current setting is") (QUOTE |%b|) |$nagHost| (QUOTE |%d|)))) -;setFortPers arg == -; arg = "%initialize%" => -; $fortPersistence := 1 -; arg = "%display%" => -; $fortPersistence -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; describeFortPersistence() -; n := first arg -; ((not FIXP n) or (n < 0)) => -; sayMessage ['"Your value of",:bright n,'"is invalid because ..."] -; describeFortPersistence() -; terminateSystemCommand() -; $fortPersistence := first(arg) - -(DEFUN |setFortPers| (|arg|) (PROG (|n|) (RETURN (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (SPADLET |$fortPersistence| 1)) ((BOOT-EQUAL |arg| (QUOTE |%display%|)) |$fortPersistence|) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|describeFortPersistence|)) ((QUOTE T) (SPADLET |n| (CAR |arg|)) (COND ((OR (NULL (FIXP |n|)) (MINUSP |n|)) (|sayMessage| (CONS (MAKESTRING "Your value of") (APPEND (|bright| |n|) (CONS (MAKESTRING "is invalid because ...") NIL)))) (|describeFortPersistence|) (|terminateSystemCommand|)) ((QUOTE T) (SPADLET |$fortPersistence| (CAR |arg|))))))))) -;describeFortPersistence() == -; sayBrightly LIST ( -; '%b,'")set naglink persistence",'%d,_ -; '"is used to tell the ",'%b,"nagd",'%d," daemon how many ASP",'%l,_ -; '" source and object files to keep around in case you reuse them. This helps",'%l,_ -; '" to avoid needless recompilations. The number specified should be a ",'%l,_ -; '" non-negative integer.", '%l,'%l,_ -; '" The current setting is",'%b,$fortPersistence,'%d) - -(DEFUN |describeFortPersistence| NIL (|sayBrightly| (LIST (QUOTE |%b|) (MAKESTRING ")set naglink persistence") (QUOTE |%d|) (MAKESTRING "is used to tell the ") (QUOTE |%b|) (QUOTE |nagd|) (QUOTE |%d|) (QUOTE | daemon how many ASP|) (QUOTE |%l|) (MAKESTRING " source and object files to keep around in case you reuse them. This helps") (QUOTE |%l|) (MAKESTRING " to avoid needless recompilations. The number specified should be a ") (QUOTE |%l|) (MAKESTRING " non-negative integer.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING " The current setting is") (QUOTE |%b|) |$fortPersistence| (QUOTE |%d|)))) -;setOutputAlgebra arg == -; arg = "%initialize%" => -; $algebraOutputStream := -; DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) -; $algebraOutputFile := '"CONSOLE" -; $algebraFormat := true -; arg = "%display%" => -; if $algebraFormat then label := '"On:" else label := '"Off:" -; STRCONC(label,$algebraOutputFile) -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; describeSetOutputAlgebra() -; -- try to figure out what the argument is -; if arg is [fn] and -; fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) -; then 'ok -; else arg := [fn,'spout] -; arg is [fn] => -; UPCASE(fn) in '(Y N YE O OF) => -; sayKeyedMsg("S2IV0002",'(algebra algebra)) -; UPCASE(fn) in '(NO OFF) => $algebraFormat := NIL -; UPCASE(fn) in '(YES ON) => $algebraFormat := true -; UPCASE(fn) = 'CONSOLE => -; SHUT $algebraOutputStream -; $algebraOutputStream := -; DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) -; $algebraOutputFile := '"CONSOLE" -; (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file -; if (ptype := pathnameType fn) then -; fn := STRCONC(pathnameDirectory fn,pathnameName fn) -; ft := ptype -; if null fm then fm := 'A -; filename := $FILEP(fn,ft,fm) -; null filename => -; sayKeyedMsg("S2IV0003",[fn,ft,fm]) -; (testStream := MAKE_-OUTSTREAM(filename,255,0)) => -; SHUT $algebraOutputStream -; $algebraOutputStream := testStream -; $algebraOutputFile := object2String filename -; sayKeyedMsg("S2IV0004",['"Algebra",$algebraOutputFile]) -; sayKeyedMsg("S2IV0003",[fn,ft,fm]) -; sayKeyedMsg("S2IV0005",NIL) -; describeSetOutputAlgebra() - -(DEFUN |setOutputAlgebra| (|arg|) (PROG (|label| |ISTMP#1| |ISTMP#2| |ptype| |fn| |ft| |fm| |filename| |testStream|) (RETURN (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (SPADLET |$algebraOutputStream| (DEFIOSTREAM (QUOTE ((MODE . OUTPUT) (DEVICE . CONSOLE))) 255 0)) (SPADLET |$algebraOutputFile| (MAKESTRING "CONSOLE")) (SPADLET |$algebraFormat| (QUOTE T))) ((BOOT-EQUAL |arg| (QUOTE |%display%|)) (COND (|$algebraFormat| (SPADLET |label| (MAKESTRING "On:"))) ((QUOTE T) (SPADLET |label| (MAKESTRING "Off:")))) (STRCONC |label| |$algebraOutputFile|)) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|describeSetOutputAlgebra|)) ((QUOTE T) (COND ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T)) (|member| |fn| (QUOTE (Y N YE YES NO O ON OF OFF CONSOLE |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|)))) (QUOTE |ok|)) ((QUOTE T) (SPADLET |arg| (CONS |fn| (CONS (QUOTE |spout|) NIL))))) (COND ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T))) (COND ((|member| (UPCASE |fn|) (QUOTE (Y N YE O OF))) (|sayKeyedMsg| (QUOTE S2IV0002) (QUOTE (|algebra| |algebra|)))) ((|member| (UPCASE |fn|) (QUOTE (NO OFF))) (SPADLET |$algebraFormat| NIL)) ((|member| (UPCASE |fn|) (QUOTE (YES ON))) (SPADLET |$algebraFormat| (QUOTE T))) ((BOOT-EQUAL (UPCASE |fn|) (QUOTE CONSOLE)) (PROGN (SHUT |$algebraOutputStream|) (SPADLET |$algebraOutputStream| (DEFIOSTREAM (QUOTE ((MODE . OUTPUT) (DEVICE . CONSOLE))) 255 0)) (SPADLET |$algebraOutputFile| (MAKESTRING "CONSOLE")))))) ((OR (AND (PAIRP |arg|) (PROGN (SPADLET |fn| (QCAR |arg|)) (SPADLET |ISTMP#1| (QCDR |arg|)) (AND (PAIRP |ISTMP#1|) (EQ (QCDR |ISTMP#1|) NIL) (PROGN (SPADLET |ft| (QCAR |ISTMP#1|)) (QUOTE T))))) (AND (PAIRP |arg|) (PROGN (SPADLET |fn| (QCAR |arg|)) (SPADLET |ISTMP#1| (QCDR |arg|)) (AND (PAIRP |ISTMP#1|) (PROGN (SPADLET |ft| (QCAR |ISTMP#1|)) (SPADLET |ISTMP#2| (QCDR |ISTMP#1|)) (AND (PAIRP |ISTMP#2|) (EQ (QCDR |ISTMP#2|) NIL) (PROGN (SPADLET |fm| (QCAR |ISTMP#2|)) (QUOTE T)))))))) (COND ((SPADLET |ptype| (|pathnameType| |fn|)) (SPADLET |fn| (STRCONC (|pathnameDirectory| |fn|) (|pathnameName| |fn|))) (SPADLET |ft| |ptype|))) (COND ((NULL |fm|) (SPADLET |fm| (QUOTE A)))) (SPADLET |filename| ($FILEP |fn| |ft| |fm|)) (COND ((NULL |filename|) (|sayKeyedMsg| (QUOTE S2IV0003) (CONS |fn| (CONS |ft| (CONS |fm| NIL))))) ((SPADLET |testStream| (MAKE-OUTSTREAM |filename| 255 0)) (SHUT |$algebraOutputStream|) (SPADLET |$algebraOutputStream| |testStream|) (SPADLET |$algebraOutputFile| (|object2String| |filename|)) (|sayKeyedMsg| (QUOTE S2IV0004) (CONS (MAKESTRING "Algebra") (CONS |$algebraOutputFile| NIL)))) ((QUOTE T) (|sayKeyedMsg| (QUOTE S2IV0003) (CONS |fn| (CONS |ft| (CONS |fm| NIL))))))) ((QUOTE T) (|sayKeyedMsg| (QUOTE S2IV0005) NIL) (|describeSetOutputAlgebra|)))))))) -;describeSetOutputAlgebra() == -; sayBrightly LIST ('%b,'")set output algebra",'%d,_ -; '"is used to tell AXIOM to turn algebra-style output",'%l,_ -; '"printing on and off, and where to place the output. By default, the",'%l,_ -; '"destination for the output is the screen but printing is turned off.",'%l,_ -; '%l,_ -; '"Syntax: )set output algebra ",'%l,_ -; '" where arg can be one of",'%l,_ -; '" on turn algebra printing on (default state)",'%l,_ -; '" off turn algebra printing off",'%l,_ -; '" console send algebra output to screen (default state)",'%l,_ -; '" fp<.fe> send algebra output to file with file prefix fp",'%l,_ -; '" and file extension .fe. If not given, .fe defaults to .spout.",'%l, -; '%l,_ -; '"If you wish to send the output to a file, you may need to issue this command",'%l,_ -; '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ -; '"algebra output to the file",'%b,'"polymer.spout,",'%d,'"issue the two commands",'%l,_ -; '%l,_ -; '" )set output algebra on",'%l,_ -; '" )set output algebra polymer",'%l,_ -; '%l,_ -; '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ -; '"the one you set with the )cd system command.",'%l,_ -; '"The current setting is: ",'%b,setOutputAlgebra "%display%",'%d) - -(DEFUN |describeSetOutputAlgebra| NIL (|sayBrightly| (LIST (QUOTE |%b|) (MAKESTRING ")set output algebra") (QUOTE |%d|) (MAKESTRING "is used to tell AXIOM to turn algebra-style output") (QUOTE |%l|) (MAKESTRING "printing on and off, and where to place the output. By default, the") (QUOTE |%l|) (MAKESTRING "destination for the output is the screen but printing is turned off.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "Syntax: )set output algebra ") (QUOTE |%l|) (MAKESTRING " where arg can be one of") (QUOTE |%l|) (MAKESTRING " on turn algebra printing on (default state)") (QUOTE |%l|) (MAKESTRING " off turn algebra printing off") (QUOTE |%l|) (MAKESTRING " console send algebra output to screen (default state)") (QUOTE |%l|) (MAKESTRING " fp<.fe> send algebra output to file with file prefix fp") (QUOTE |%l|) (MAKESTRING " and file extension .fe. If not given, .fe defaults to .spout.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "If you wish to send the output to a file, you may need to issue this command") (QUOTE |%l|) (MAKESTRING "twice: once with") (QUOTE |%b|) (MAKESTRING "on") (QUOTE |%d|) (MAKESTRING "and once with the file name. For example, to send") (QUOTE |%l|) (MAKESTRING "algebra output to the file") (QUOTE |%b|) (MAKESTRING "polymer.spout,") (QUOTE |%d|) (MAKESTRING "issue the two commands") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING " )set output algebra on") (QUOTE |%l|) (MAKESTRING " )set output algebra polymer") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "The output is placed in the directory from which you invoked AXIOM or") (QUOTE |%l|) (MAKESTRING "the one you set with the )cd system command.") (QUOTE |%l|) (MAKESTRING "The current setting is: ") (QUOTE |%b|) (|setOutputAlgebra| (QUOTE |%display%|)) (QUOTE |%d|)))) -;setOutputCharacters arg == -; -- this sets the special character set -; arg = "%initialize%" => -; $specialCharacters := $plainRTspecialCharacters -; current := -; $specialCharacters = $RTspecialCharacters => '"default" -; $specialCharacters = $plainRTspecialCharacters => '"plain" -; '"unknown" -; arg = "%display%" => current -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; sayMessage ['" The",:bright '"characters",'"option", -; '" may be followed by any one of the following:"] -; for name in '("default" "plain") repeat -; if name = current -; then sayBrightly ['" ->",:bright name] -; else sayBrightly ['" ",name] -; TERPRI() -; sayBrightly '" The current setting is indicated within the list. This option determines " -; sayBrightly '" the special characters used for algebraic output. This is what the" -; sayBrightly '" current choice of special characters looks like:" -; l := NIL -; for [char,:.] in $specialCharacterAlist repeat -; s := STRCONC('" ",PNAME char,'" is shown as ", -; PNAME specialChar(char)) -; l := cons(s,l) -; sayAsManyPerLineAsPossible reverse l -; arg is [fn] and (fn := DOWNCASE(fn)) => -; fn = 'default => $specialCharacters := $RTspecialCharacters -; fn = 'plain => $specialCharacters := $plainRTspecialCharacters -; setOutputCharacters NIL -; setOutputCharacters NIL - -(DEFUN |setOutputCharacters| (|arg|) (PROG (|current| |char| |s| |l| |fn|) (RETURN (SEQ (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (SPADLET |$specialCharacters| |$plainRTspecialCharacters|)) ((QUOTE T) (SPADLET |current| (COND ((BOOT-EQUAL |$specialCharacters| |$RTspecialCharacters|) (MAKESTRING "default")) ((BOOT-EQUAL |$specialCharacters| |$plainRTspecialCharacters|) (MAKESTRING "plain")) ((QUOTE T) (MAKESTRING "unknown")))) (COND ((BOOT-EQUAL |arg| (QUOTE |%display%|)) |current|) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|sayMessage| (CONS (MAKESTRING " The") (APPEND (|bright| (MAKESTRING "characters")) (CONS (MAKESTRING "option") (CONS (MAKESTRING " may be followed by any one of the following:") NIL))))) (DO ((#0=#:G3317 (QUOTE ("default" "plain")) (CDR #0#)) (|name| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |name| (CAR #0#)) NIL)) NIL) (SEQ (EXIT (COND ((BOOT-EQUAL |name| |current|) (|sayBrightly| (CONS (MAKESTRING " ->") (|bright| |name|)))) ((QUOTE T) (|sayBrightly| (CONS (MAKESTRING " ") (CONS |name| NIL)))))))) (TERPRI) (|sayBrightly| (MAKESTRING " The current setting is indicated within the list. This option determines ")) (|sayBrightly| (MAKESTRING " the special characters used for algebraic output. This is what the")) (|sayBrightly| (MAKESTRING " current choice of special characters looks like:")) (SPADLET |l| NIL) (DO ((#1=#:G3329 |$specialCharacterAlist| (CDR #1#)) (#2=#:G3308 NIL)) ((OR (ATOM #1#) (PROGN (SETQ #2# (CAR #1#)) NIL) (PROGN (PROGN (SPADLET |char| (CAR #2#)) #2#) NIL)) NIL) (SEQ (EXIT (PROGN (SPADLET |s| (STRCONC (MAKESTRING " ") (PNAME |char|) (MAKESTRING " is shown as ") (PNAME (|specialChar| |char|)))) (SPADLET |l| (CONS |s| |l|)))))) (|sayAsManyPerLineAsPossible| (REVERSE |l|))) ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T)) (SPADLET |fn| (DOWNCASE |fn|))) (COND ((BOOT-EQUAL |fn| (QUOTE |default|)) (SPADLET |$specialCharacters| |$RTspecialCharacters|)) ((BOOT-EQUAL |fn| (QUOTE |plain|)) (SPADLET |$specialCharacters| |$plainRTspecialCharacters|)) ((QUOTE T) (|setOutputCharacters| NIL)))) ((QUOTE T) (|setOutputCharacters| NIL))))))))) -;makeStream(append,filename,i,j) == -; append => MAKE_-APPENDSTREAM(filename,i,j) -; MAKE_-OUTSTREAM(filename,i,j) - -(DEFUN |makeStream| (APPEND |filename| |i| |j|) (COND (APPEND (MAKE-APPENDSTREAM |filename| |i| |j|)) ((QUOTE T) (MAKE-OUTSTREAM |filename| |i| |j|)))) -;setOutputFortran arg == -; arg = "%initialize%" => -; $fortranOutputStream := -; DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) -; $fortranOutputFile := '"CONSOLE" -; $fortranFormat := NIL -; arg = "%display%" => -; if $fortranFormat then label := '"On:" else label := '"Off:" -; STRCONC(label,$fortranOutputFile) -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; describeSetOutputFortran() -; -- try to figure out what the argument is -; append := NIL -; quiet := NIL -; while LISTP arg and UPCASE(first arg) in '(APPEND QUIET) repeat -; if UPCASE first(arg) = 'APPEND then append := true -; else if UPCASE first(arg) = 'QUIET then quiet := true -; arg := rest(arg) -; if arg is [fn] and -; fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) -; then 'ok -; else arg := [fn,'sfort] -; arg is [fn] => -; UPCASE(fn) in '(Y N YE O OF) => -; sayKeyedMsg("S2IV0002",'(FORTRAN fortran)) -; UPCASE(fn) in '(NO OFF) => $fortranFormat := NIL -; UPCASE(fn) in '(YES ON) => $fortranFormat := true -; UPCASE(fn) = 'CONSOLE => -; SHUT $fortranOutputStream -; $fortranOutputStream := -; DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) -; $fortranOutputFile := '"CONSOLE" -; (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file -; if (ptype := pathnameType fn) then -; fn := STRCONC(pathnameDirectory fn,pathnameName fn) -; ft := ptype -; if null fm then fm := 'A -; filename := $FILEP(fn,ft,fm) -; null filename => sayKeyedMsg("S2IV0003",[fn,ft,fm]) -; (testStream := makeStream(append,filename,255,0)) => -; SHUT $fortranOutputStream -; $fortranOutputStream := testStream -; $fortranOutputFile := object2String filename -; if null quiet then sayKeyedMsg("S2IV0004",['FORTRAN,$fortranOutputFile]) -; if null quiet then sayKeyedMsg("S2IV0003",[fn,ft,fm]) -; if null quiet then sayKeyedMsg("S2IV0005",NIL) -; describeSetOutputFortran() - -(DEFUN |setOutputFortran| (|arg|) (PROG (|label| APPEND |quiet| |ISTMP#1| |ISTMP#2| |ptype| |fn| |ft| |fm| |filename| |testStream|) (RETURN (SEQ (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (SPADLET |$fortranOutputStream| (DEFIOSTREAM (QUOTE ((MODE . OUTPUT) (DEVICE . CONSOLE))) 255 0)) (SPADLET |$fortranOutputFile| (MAKESTRING "CONSOLE")) (SPADLET |$fortranFormat| NIL)) ((BOOT-EQUAL |arg| (QUOTE |%display%|)) (COND (|$fortranFormat| (SPADLET |label| (MAKESTRING "On:"))) ((QUOTE T) (SPADLET |label| (MAKESTRING "Off:")))) (STRCONC |label| |$fortranOutputFile|)) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|describeSetOutputFortran|)) ((QUOTE T) (SPADLET APPEND NIL) (SPADLET |quiet| NIL) (DO NIL ((NULL (AND (LISTP |arg|) (|member| (UPCASE (CAR |arg|)) (QUOTE (APPEND QUIET))))) NIL) (SEQ (EXIT (PROGN (COND ((BOOT-EQUAL (UPCASE (CAR |arg|)) (QUOTE APPEND)) (SPADLET APPEND (QUOTE T))) ((BOOT-EQUAL (UPCASE (CAR |arg|)) (QUOTE QUIET)) (SPADLET |quiet| (QUOTE T))) ((QUOTE T) NIL)) (SPADLET |arg| (CDR |arg|)))))) (COND ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T)) (|member| |fn| (QUOTE (Y N YE YES NO O ON OF OFF CONSOLE |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|)))) (QUOTE |ok|)) ((QUOTE T) (SPADLET |arg| (CONS |fn| (CONS (QUOTE |sfort|) NIL))))) (COND ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T))) (COND ((|member| (UPCASE |fn|) (QUOTE (Y N YE O OF))) (|sayKeyedMsg| (QUOTE S2IV0002) (QUOTE (FORTRAN |fortran|)))) ((|member| (UPCASE |fn|) (QUOTE (NO OFF))) (SPADLET |$fortranFormat| NIL)) ((|member| (UPCASE |fn|) (QUOTE (YES ON))) (SPADLET |$fortranFormat| (QUOTE T))) ((BOOT-EQUAL (UPCASE |fn|) (QUOTE CONSOLE)) (PROGN (SHUT |$fortranOutputStream|) (SPADLET |$fortranOutputStream| (DEFIOSTREAM (QUOTE ((MODE . OUTPUT) (DEVICE . CONSOLE))) 255 0)) (SPADLET |$fortranOutputFile| (MAKESTRING "CONSOLE")))))) ((OR (AND (PAIRP |arg|) (PROGN (SPADLET |fn| (QCAR |arg|)) (SPADLET |ISTMP#1| (QCDR |arg|)) (AND (PAIRP |ISTMP#1|) (EQ (QCDR |ISTMP#1|) NIL) (PROGN (SPADLET |ft| (QCAR |ISTMP#1|)) (QUOTE T))))) (AND (PAIRP |arg|) (PROGN (SPADLET |fn| (QCAR |arg|)) (SPADLET |ISTMP#1| (QCDR |arg|)) (AND (PAIRP |ISTMP#1|) (PROGN (SPADLET |ft| (QCAR |ISTMP#1|)) (SPADLET |ISTMP#2| (QCDR |ISTMP#1|)) (AND (PAIRP |ISTMP#2|) (EQ (QCDR |ISTMP#2|) NIL) (PROGN (SPADLET |fm| (QCAR |ISTMP#2|)) (QUOTE T)))))))) (COND ((SPADLET |ptype| (|pathnameType| |fn|)) (SPADLET |fn| (STRCONC (|pathnameDirectory| |fn|) (|pathnameName| |fn|))) (SPADLET |ft| |ptype|))) (COND ((NULL |fm|) (SPADLET |fm| (QUOTE A)))) (SPADLET |filename| ($FILEP |fn| |ft| |fm|)) (COND ((NULL |filename|) (|sayKeyedMsg| (QUOTE S2IV0003) (CONS |fn| (CONS |ft| (CONS |fm| NIL))))) ((SPADLET |testStream| (|makeStream| APPEND |filename| 255 0)) (SHUT |$fortranOutputStream|) (SPADLET |$fortranOutputStream| |testStream|) (SPADLET |$fortranOutputFile| (|object2String| |filename|)) (COND ((NULL |quiet|) (|sayKeyedMsg| (QUOTE S2IV0004) (CONS (QUOTE FORTRAN) (CONS |$fortranOutputFile| NIL)))) ((QUOTE T) NIL))) ((NULL |quiet|) (|sayKeyedMsg| (QUOTE S2IV0003) (CONS |fn| (CONS |ft| (CONS |fm| NIL))))) ((QUOTE T) NIL))) ((QUOTE T) (COND ((NULL |quiet|) (|sayKeyedMsg| (QUOTE S2IV0005) NIL))) (|describeSetOutputFortran|))))))))) -;describeSetOutputFortran() == -; sayBrightly LIST ('%b,'")set output fortran",'%d,_ -; '"is used to tell AXIOM to turn FORTRAN-style output",'%l,_ -; '"printing on and off, and where to place the output. By default, the",'%l,_ -; '"destination for the output is the screen but printing is turned off.",'%l,_ -; '%l,_ -; '"Also See: )set fortran",'%l, -; '%l,_ -; '"Syntax: )set output fortran ",'%l,_ -; '" where arg can be one of",'%l,_ -; '" on turn FORTRAN printing on",'%l,_ -; '" off turn FORTRAN printing off (default state)",'%l,_ -; '" console send FORTRAN output to screen (default state)",'%l,_ -; '" fp<.fe> send FORTRAN output to file with file prefix fp and file",'%l,_ -; '" extension .fe. If not given, .fe defaults to .sfort.",'%l, -; '%l,_ -; '"If you wish to send the output to a file, you must issue this command",'%l,_ -; '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ -; '"FORTRAN output to the file",'%b,'"polymer.sfort,",'%d,'"issue the two commands",'%l,_ -; '%l,_ -; '" )set output fortran on",'%l,_ -; '" )set output fortran polymer",'%l,_ -; '%l,_ -; '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ -; '"the one you set with the )cd system command.",'%l,_ -; '"The current setting is: ",'%b,setOutputFortran "%display%",'%d) - -(DEFUN |describeSetOutputFortran| NIL (|sayBrightly| (LIST (QUOTE |%b|) (MAKESTRING ")set output fortran") (QUOTE |%d|) (MAKESTRING "is used to tell AXIOM to turn FORTRAN-style output") (QUOTE |%l|) (MAKESTRING "printing on and off, and where to place the output. By default, the") (QUOTE |%l|) (MAKESTRING "destination for the output is the screen but printing is turned off.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "Also See: )set fortran") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "Syntax: )set output fortran ") (QUOTE |%l|) (MAKESTRING " where arg can be one of") (QUOTE |%l|) (MAKESTRING " on turn FORTRAN printing on") (QUOTE |%l|) (MAKESTRING " off turn FORTRAN printing off (default state)") (QUOTE |%l|) (MAKESTRING " console send FORTRAN output to screen (default state)") (QUOTE |%l|) (MAKESTRING " fp<.fe> send FORTRAN output to file with file prefix fp and file") (QUOTE |%l|) (MAKESTRING " extension .fe. If not given, .fe defaults to .sfort.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "If you wish to send the output to a file, you must issue this command") (QUOTE |%l|) (MAKESTRING "twice: once with") (QUOTE |%b|) (MAKESTRING "on") (QUOTE |%d|) (MAKESTRING "and once with the file name. For example, to send") (QUOTE |%l|) (MAKESTRING "FORTRAN output to the file") (QUOTE |%b|) (MAKESTRING "polymer.sfort,") (QUOTE |%d|) (MAKESTRING "issue the two commands") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING " )set output fortran on") (QUOTE |%l|) (MAKESTRING " )set output fortran polymer") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "The output is placed in the directory from which you invoked AXIOM or") (QUOTE |%l|) (MAKESTRING "the one you set with the )cd system command.") (QUOTE |%l|) (MAKESTRING "The current setting is: ") (QUOTE |%b|) (|setOutputFortran| (QUOTE |%display%|)) (QUOTE |%d|)))) -;setOutputOpenMath arg == -; arg = "%initialize%" => -; $openMathOutputStream := -; DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) -; $openMathOutputFile := '"CONSOLE" -; $openMathFormat := NIL -; arg = "%display%" => -; if $openMathFormat then label := '"On:" else label := '"Off:" -; STRCONC(label,$openMathOutputFile) -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; describeSetOutputOpenMath() -; -- try to figure out what the argument is -; if arg is [fn] and -; fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) -; then 'ok -; else arg := [fn,'som] -; arg is [fn] => -; UPCASE(fn) in '(Y N YE O OF) => -; sayKeyedMsg("S2IV0002",'(OpenMath openmath)) -; UPCASE(fn) in '(NO OFF) => $openMathFormat := NIL -; UPCASE(fn) in '(YES ON) => $openMathFormat := true -; UPCASE(fn) = 'CONSOLE => -; SHUT $openMathOutputStream -; $openMathOutputStream := -; DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) -; $openMathOutputFile := '"CONSOLE" -; (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file -; if (ptype := pathnameType fn) then -; fn := STRCONC(pathnameDirectory fn,pathnameName fn) -; ft := ptype -; if null fm then fm := 'A -; filename := $FILEP(fn,ft,fm) -; null filename => -; sayKeyedMsg("S2IV0003",[fn,ft,fm]) -; (testStream := MAKE_-OUTSTREAM(filename,255,0)) => -; SHUT $openMathOutputStream -; $openMathOutputStream := testStream -; $openMathOutputFile := object2String filename -; sayKeyedMsg("S2IV0004",['"OpenMath",$openMathOutputFile]) -; sayKeyedMsg("S2IV0003",[fn,ft,fm]) -; sayKeyedMsg("S2IV0005",NIL) -; describeSetOutputOpenMath() - -(DEFUN |setOutputOpenMath| (|arg|) (PROG (|label| |ISTMP#1| |ISTMP#2| |ptype| |fn| |ft| |fm| |filename| |testStream|) (RETURN (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (SPADLET |$openMathOutputStream| (DEFIOSTREAM (QUOTE ((MODE . OUTPUT) (DEVICE . CONSOLE))) 255 0)) (SPADLET |$openMathOutputFile| (MAKESTRING "CONSOLE")) (SPADLET |$openMathFormat| NIL)) ((BOOT-EQUAL |arg| (QUOTE |%display%|)) (COND (|$openMathFormat| (SPADLET |label| (MAKESTRING "On:"))) ((QUOTE T) (SPADLET |label| (MAKESTRING "Off:")))) (STRCONC |label| |$openMathOutputFile|)) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|describeSetOutputOpenMath|)) ((QUOTE T) (COND ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T)) (|member| |fn| (QUOTE (Y N YE YES NO O ON OF OFF CONSOLE |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|)))) (QUOTE |ok|)) ((QUOTE T) (SPADLET |arg| (CONS |fn| (CONS (QUOTE |som|) NIL))))) (COND ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T))) (COND ((|member| (UPCASE |fn|) (QUOTE (Y N YE O OF))) (|sayKeyedMsg| (QUOTE S2IV0002) (QUOTE (|OpenMath| |openmath|)))) ((|member| (UPCASE |fn|) (QUOTE (NO OFF))) (SPADLET |$openMathFormat| NIL)) ((|member| (UPCASE |fn|) (QUOTE (YES ON))) (SPADLET |$openMathFormat| (QUOTE T))) ((BOOT-EQUAL (UPCASE |fn|) (QUOTE CONSOLE)) (PROGN (SHUT |$openMathOutputStream|) (SPADLET |$openMathOutputStream| (DEFIOSTREAM (QUOTE ((MODE . OUTPUT) (DEVICE . CONSOLE))) 255 0)) (SPADLET |$openMathOutputFile| (MAKESTRING "CONSOLE")))))) ((OR (AND (PAIRP |arg|) (PROGN (SPADLET |fn| (QCAR |arg|)) (SPADLET |ISTMP#1| (QCDR |arg|)) (AND (PAIRP |ISTMP#1|) (EQ (QCDR |ISTMP#1|) NIL) (PROGN (SPADLET |ft| (QCAR |ISTMP#1|)) (QUOTE T))))) (AND (PAIRP |arg|) (PROGN (SPADLET |fn| (QCAR |arg|)) (SPADLET |ISTMP#1| (QCDR |arg|)) (AND (PAIRP |ISTMP#1|) (PROGN (SPADLET |ft| (QCAR |ISTMP#1|)) (SPADLET |ISTMP#2| (QCDR |ISTMP#1|)) (AND (PAIRP |ISTMP#2|) (EQ (QCDR |ISTMP#2|) NIL) (PROGN (SPADLET |fm| (QCAR |ISTMP#2|)) (QUOTE T)))))))) (COND ((SPADLET |ptype| (|pathnameType| |fn|)) (SPADLET |fn| (STRCONC (|pathnameDirectory| |fn|) (|pathnameName| |fn|))) (SPADLET |ft| |ptype|))) (COND ((NULL |fm|) (SPADLET |fm| (QUOTE A)))) (SPADLET |filename| ($FILEP |fn| |ft| |fm|)) (COND ((NULL |filename|) (|sayKeyedMsg| (QUOTE S2IV0003) (CONS |fn| (CONS |ft| (CONS |fm| NIL))))) ((SPADLET |testStream| (MAKE-OUTSTREAM |filename| 255 0)) (SHUT |$openMathOutputStream|) (SPADLET |$openMathOutputStream| |testStream|) (SPADLET |$openMathOutputFile| (|object2String| |filename|)) (|sayKeyedMsg| (QUOTE S2IV0004) (CONS (MAKESTRING "OpenMath") (CONS |$openMathOutputFile| NIL)))) ((QUOTE T) (|sayKeyedMsg| (QUOTE S2IV0003) (CONS |fn| (CONS |ft| (CONS |fm| NIL))))))) ((QUOTE T) (|sayKeyedMsg| (QUOTE S2IV0005) NIL) (|describeSetOutputOpenMath|)))))))) -;describeSetOutputOpenMath() == -; sayBrightly LIST ('%b,'")set output openmath",'%d,_ -; '"is used to tell AXIOM to turn OpenMath output",'%l,_ -; '"printing on and off, and where to place the output. By default, the",'%l,_ -; '"destination for the output is the screen but printing is turned off.",'%l,_ -; '%l,_ -; '"Syntax: )set output openmath ",'%l,_ -; '" where arg can be one of",'%l,_ -; '" on turn OpenMath printing on",'%l,_ -; '" off turn OpenMath printing off (default state)",'%l,_ -; '" console send OpenMath output to screen (default state)",'%l,_ -; '" fp<.fe> send OpenMath output to file with file prefix fp and file",'%l,_ -; '" extension .fe. If not given, .fe defaults to .som.",'%l, -; '%l,_ -; '"If you wish to send the output to a file, you must issue this command",'%l,_ -; '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ -; '"OpenMath output to the file",'%b,'"polymer.som,",'%d,'"issue the two commands",'%l,_ -; '%l,_ -; '" )set output openmath on",'%l,_ -; '" )set output openmath polymer",'%l,_ -; '%l,_ -; '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ -; '"the one you set with the )cd system command.",'%l,_ -; '"The current setting is: ",'%b,setOutputOpenMath "%display%",'%d) - -(DEFUN |describeSetOutputOpenMath| NIL (|sayBrightly| (LIST (QUOTE |%b|) (MAKESTRING ")set output openmath") (QUOTE |%d|) (MAKESTRING "is used to tell AXIOM to turn OpenMath output") (QUOTE |%l|) (MAKESTRING "printing on and off, and where to place the output. By default, the") (QUOTE |%l|) (MAKESTRING "destination for the output is the screen but printing is turned off.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "Syntax: )set output openmath ") (QUOTE |%l|) (MAKESTRING " where arg can be one of") (QUOTE |%l|) (MAKESTRING " on turn OpenMath printing on") (QUOTE |%l|) (MAKESTRING " off turn OpenMath printing off (default state)") (QUOTE |%l|) (MAKESTRING " console send OpenMath output to screen (default state)") (QUOTE |%l|) (MAKESTRING " fp<.fe> send OpenMath output to file with file prefix fp and file") (QUOTE |%l|) (MAKESTRING " extension .fe. If not given, .fe defaults to .som.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "If you wish to send the output to a file, you must issue this command") (QUOTE |%l|) (MAKESTRING "twice: once with") (QUOTE |%b|) (MAKESTRING "on") (QUOTE |%d|) (MAKESTRING "and once with the file name. For example, to send") (QUOTE |%l|) (MAKESTRING "OpenMath output to the file") (QUOTE |%b|) (MAKESTRING "polymer.som,") (QUOTE |%d|) (MAKESTRING "issue the two commands") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING " )set output openmath on") (QUOTE |%l|) (MAKESTRING " )set output openmath polymer") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "The output is placed in the directory from which you invoked AXIOM or") (QUOTE |%l|) (MAKESTRING "the one you set with the )cd system command.") (QUOTE |%l|) (MAKESTRING "The current setting is: ") (QUOTE |%b|) (|setOutputOpenMath| (QUOTE |%display%|)) (QUOTE |%d|)))) -;setOutputFormula arg == -; arg = "%initialize%" => -; $formulaOutputStream := -; DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) -; $formulaOutputFile := '"CONSOLE" -; $formulaFormat := NIL -; arg = "%display%" => -; if $formulaFormat then label := '"On:" else label := '"Off:" -; STRCONC(label,$formulaOutputFile) -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; describeSetOutputFormula() -; -- try to figure out what the argument is -; if arg is [fn] and -; fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) -; then 'ok -; else arg := [fn,'sform] -; arg is [fn] => -; UPCASE(fn) in '(Y N YE O OF) => -; sayKeyedMsg("S2IV0002",'(script script)) -; UPCASE(fn) in '(NO OFF) => $formulaFormat := NIL -; UPCASE(fn) in '(YES ON) => $formulaFormat := true -; UPCASE(fn) = 'CONSOLE => -; SHUT $formulaOutputStream -; $formulaOutputStream := -; DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) -; $formulaOutputFile := '"CONSOLE" -; (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file -; if (ptype := pathnameType fn) then -; fn := STRCONC(pathnameDirectory fn,pathnameName fn) -; ft := ptype -; if null fm then fm := 'A -; filename := $FILEP(fn,ft,fm) -; null filename => -; sayKeyedMsg("S2IV0003",[fn,ft,fm]) -; (testStream := MAKE_-OUTSTREAM(filename,255,0)) => -; SHUT $formulaOutputStream -; $formulaOutputStream := testStream -; $formulaOutputFile := object2String filename -; sayKeyedMsg("S2IV0004",['"IBM Script formula",$formulaOutputFile]) -; sayKeyedMsg("S2IV0003",[fn,ft,fm]) -; sayKeyedMsg("S2IV0005",NIL) -; describeSetOutputFormula() - -(DEFUN |setOutputFormula| (|arg|) (PROG (|label| |ISTMP#1| |ISTMP#2| |ptype| |fn| |ft| |fm| |filename| |testStream|) (RETURN (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (SPADLET |$formulaOutputStream| (DEFIOSTREAM (QUOTE ((MODE . OUTPUT) (DEVICE . CONSOLE))) 255 0)) (SPADLET |$formulaOutputFile| (MAKESTRING "CONSOLE")) (SPADLET |$formulaFormat| NIL)) ((BOOT-EQUAL |arg| (QUOTE |%display%|)) (COND (|$formulaFormat| (SPADLET |label| (MAKESTRING "On:"))) ((QUOTE T) (SPADLET |label| (MAKESTRING "Off:")))) (STRCONC |label| |$formulaOutputFile|)) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|describeSetOutputFormula|)) ((QUOTE T) (COND ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T)) (|member| |fn| (QUOTE (Y N YE YES NO O ON OF OFF CONSOLE |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|)))) (QUOTE |ok|)) ((QUOTE T) (SPADLET |arg| (CONS |fn| (CONS (QUOTE |sform|) NIL))))) (COND ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T))) (COND ((|member| (UPCASE |fn|) (QUOTE (Y N YE O OF))) (|sayKeyedMsg| (QUOTE S2IV0002) (QUOTE (|script| |script|)))) ((|member| (UPCASE |fn|) (QUOTE (NO OFF))) (SPADLET |$formulaFormat| NIL)) ((|member| (UPCASE |fn|) (QUOTE (YES ON))) (SPADLET |$formulaFormat| (QUOTE T))) ((BOOT-EQUAL (UPCASE |fn|) (QUOTE CONSOLE)) (PROGN (SHUT |$formulaOutputStream|) (SPADLET |$formulaOutputStream| (DEFIOSTREAM (QUOTE ((MODE . OUTPUT) (DEVICE . CONSOLE))) 255 0)) (SPADLET |$formulaOutputFile| (MAKESTRING "CONSOLE")))))) ((OR (AND (PAIRP |arg|) (PROGN (SPADLET |fn| (QCAR |arg|)) (SPADLET |ISTMP#1| (QCDR |arg|)) (AND (PAIRP |ISTMP#1|) (EQ (QCDR |ISTMP#1|) NIL) (PROGN (SPADLET |ft| (QCAR |ISTMP#1|)) (QUOTE T))))) (AND (PAIRP |arg|) (PROGN (SPADLET |fn| (QCAR |arg|)) (SPADLET |ISTMP#1| (QCDR |arg|)) (AND (PAIRP |ISTMP#1|) (PROGN (SPADLET |ft| (QCAR |ISTMP#1|)) (SPADLET |ISTMP#2| (QCDR |ISTMP#1|)) (AND (PAIRP |ISTMP#2|) (EQ (QCDR |ISTMP#2|) NIL) (PROGN (SPADLET |fm| (QCAR |ISTMP#2|)) (QUOTE T)))))))) (COND ((SPADLET |ptype| (|pathnameType| |fn|)) (SPADLET |fn| (STRCONC (|pathnameDirectory| |fn|) (|pathnameName| |fn|))) (SPADLET |ft| |ptype|))) (COND ((NULL |fm|) (SPADLET |fm| (QUOTE A)))) (SPADLET |filename| ($FILEP |fn| |ft| |fm|)) (COND ((NULL |filename|) (|sayKeyedMsg| (QUOTE S2IV0003) (CONS |fn| (CONS |ft| (CONS |fm| NIL))))) ((SPADLET |testStream| (MAKE-OUTSTREAM |filename| 255 0)) (SHUT |$formulaOutputStream|) (SPADLET |$formulaOutputStream| |testStream|) (SPADLET |$formulaOutputFile| (|object2String| |filename|)) (|sayKeyedMsg| (QUOTE S2IV0004) (CONS (MAKESTRING "IBM Script formula") (CONS |$formulaOutputFile| NIL)))) ((QUOTE T) (|sayKeyedMsg| (QUOTE S2IV0003) (CONS |fn| (CONS |ft| (CONS |fm| NIL))))))) ((QUOTE T) (|sayKeyedMsg| (QUOTE S2IV0005) NIL) (|describeSetOutputFormula|)))))))) -;describeSetOutputFormula() == -; sayBrightly LIST ('%b,'")set output script",'%d,_ -; '"is used to tell AXIOM to turn IBM Script formula-style",'%l,_ -; '"output printing on and off, and where to place the output. By default, the",'%l,_ -; '"destination for the output is the screen but printing is turned off.",'%l,_ -; '%l,_ -; '"Syntax: )set output script ",'%l,_ -; '" where arg can be one of",'%l,_ -; '" on turn IBM Script formula printing on",'%l,_ -; '" off turn IBM Script formula printing off (default state)",'%l,_ -; '" console send IBM Script formula output to screen (default state)",'%l,_ -; '" fp<.fe> send IBM Script formula output to file with file prefix fp",'%l,_ -; '" and file extension .fe. If not given, .fe defaults to .sform.",'%l, -; '%l,_ -; '"If you wish to send the output to a file, you must issue this command",'%l,_ -; '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ -; '"IBM Script formula output to the file",'%b,'"polymer.sform,",'%d,'"issue the two commands",'%l,_ -; '%l,_ -; '" )set output script on",'%l,_ -; '" )set output script polymer",'%l,_ -; '%l,_ -; '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ -; '"the one you set with the )cd system command.",'%l,_ -; '"The current setting is: ",'%b,setOutputFormula "%display%",'%d) - -(DEFUN |describeSetOutputFormula| NIL (|sayBrightly| (LIST (QUOTE |%b|) (MAKESTRING ")set output script") (QUOTE |%d|) (MAKESTRING "is used to tell AXIOM to turn IBM Script formula-style") (QUOTE |%l|) (MAKESTRING "output printing on and off, and where to place the output. By default, the") (QUOTE |%l|) (MAKESTRING "destination for the output is the screen but printing is turned off.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "Syntax: )set output script ") (QUOTE |%l|) (MAKESTRING " where arg can be one of") (QUOTE |%l|) (MAKESTRING " on turn IBM Script formula printing on") (QUOTE |%l|) (MAKESTRING " off turn IBM Script formula printing off (default state)") (QUOTE |%l|) (MAKESTRING " console send IBM Script formula output to screen (default state)") (QUOTE |%l|) (MAKESTRING " fp<.fe> send IBM Script formula output to file with file prefix fp") (QUOTE |%l|) (MAKESTRING " and file extension .fe. If not given, .fe defaults to .sform.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "If you wish to send the output to a file, you must issue this command") (QUOTE |%l|) (MAKESTRING "twice: once with") (QUOTE |%b|) (MAKESTRING "on") (QUOTE |%d|) (MAKESTRING "and once with the file name. For example, to send") (QUOTE |%l|) (MAKESTRING "IBM Script formula output to the file") (QUOTE |%b|) (MAKESTRING "polymer.sform,") (QUOTE |%d|) (MAKESTRING "issue the two commands") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING " )set output script on") (QUOTE |%l|) (MAKESTRING " )set output script polymer") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "The output is placed in the directory from which you invoked AXIOM or") (QUOTE |%l|) (MAKESTRING "the one you set with the )cd system command.") (QUOTE |%l|) (MAKESTRING "The current setting is: ") (QUOTE |%b|) (|setOutputFormula| (QUOTE |%display%|)) (QUOTE |%d|)))) -;setOutputTex arg == -; arg = "%initialize%" => -; $texOutputStream := -; DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) -; $texOutputFile := '"CONSOLE" -; $texFormat := NIL -; arg = "%display%" => -; if $texFormat then label := '"On:" else label := '"Off:" -; STRCONC(label,$texOutputFile) -; (null arg) or (arg = "%describe%") or (first arg = '_?) => -; describeSetOutputTex() -; -- try to figure out what the argument is -; if arg is [fn] and -; fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console) -; then 'ok -; else arg := [fn,'stex] -; arg is [fn] => -; UPCASE(fn) in '(Y N YE O OF) => -; sayKeyedMsg("S2IV0002",'(TeX tex)) -; UPCASE(fn) in '(NO OFF) => $texFormat := NIL -; UPCASE(fn) in '(YES ON) => $texFormat := true -; UPCASE(fn) = 'CONSOLE => -; SHUT $texOutputStream -; $texOutputStream := -; DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0) -; $texOutputFile := '"CONSOLE" -; (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file -; if (ptype := pathnameType fn) then -; fn := STRCONC(pathnameDirectory fn,pathnameName fn) -; ft := ptype -; if null fm then fm := 'A -; filename := $FILEP(fn,ft,fm) -; null filename => -; sayKeyedMsg("S2IV0003",[fn,ft,fm]) -; (testStream := MAKE_-OUTSTREAM(filename,255,0)) => -; SHUT $texOutputStream -; $texOutputStream := testStream -; $texOutputFile := object2String filename -; sayKeyedMsg("S2IV0004",['"TeX",$texOutputFile]) -; sayKeyedMsg("S2IV0003",[fn,ft,fm]) -; sayKeyedMsg("S2IV0005",NIL) -; describeSetOutputTex() - -(DEFUN |setOutputTex| (|arg|) (PROG (|label| |ISTMP#1| |ISTMP#2| |ptype| |fn| |ft| |fm| |filename| |testStream|) (RETURN (COND ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (SPADLET |$texOutputStream| (DEFIOSTREAM (QUOTE ((MODE . OUTPUT) (DEVICE . CONSOLE))) 255 0)) (SPADLET |$texOutputFile| (MAKESTRING "CONSOLE")) (SPADLET |$texFormat| NIL)) ((BOOT-EQUAL |arg| (QUOTE |%display%|)) (COND (|$texFormat| (SPADLET |label| (MAKESTRING "On:"))) ((QUOTE T) (SPADLET |label| (MAKESTRING "Off:")))) (STRCONC |label| |$texOutputFile|)) ((OR (NULL |arg|) (BOOT-EQUAL |arg| (QUOTE |%describe%|)) (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) (|describeSetOutputTex|)) ((QUOTE T) (COND ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T)) (|member| |fn| (QUOTE (Y N YE YES NO O ON OF OFF CONSOLE |y| |n| |ye| |yes| |no| |o| |on| |of| |off| |console|)))) (QUOTE |ok|)) ((QUOTE T) (SPADLET |arg| (CONS |fn| (CONS (QUOTE |stex|) NIL))))) (COND ((AND (PAIRP |arg|) (EQ (QCDR |arg|) NIL) (PROGN (SPADLET |fn| (QCAR |arg|)) (QUOTE T))) (COND ((|member| (UPCASE |fn|) (QUOTE (Y N YE O OF))) (|sayKeyedMsg| (QUOTE S2IV0002) (QUOTE (|TeX| |tex|)))) ((|member| (UPCASE |fn|) (QUOTE (NO OFF))) (SPADLET |$texFormat| NIL)) ((|member| (UPCASE |fn|) (QUOTE (YES ON))) (SPADLET |$texFormat| (QUOTE T))) ((BOOT-EQUAL (UPCASE |fn|) (QUOTE CONSOLE)) (PROGN (SHUT |$texOutputStream|) (SPADLET |$texOutputStream| (DEFIOSTREAM (QUOTE ((MODE . OUTPUT) (DEVICE . CONSOLE))) 255 0)) (SPADLET |$texOutputFile| (MAKESTRING "CONSOLE")))))) ((OR (AND (PAIRP |arg|) (PROGN (SPADLET |fn| (QCAR |arg|)) (SPADLET |ISTMP#1| (QCDR |arg|)) (AND (PAIRP |ISTMP#1|) (EQ (QCDR |ISTMP#1|) NIL) (PROGN (SPADLET |ft| (QCAR |ISTMP#1|)) (QUOTE T))))) (AND (PAIRP |arg|) (PROGN (SPADLET |fn| (QCAR |arg|)) (SPADLET |ISTMP#1| (QCDR |arg|)) (AND (PAIRP |ISTMP#1|) (PROGN (SPADLET |ft| (QCAR |ISTMP#1|)) (SPADLET |ISTMP#2| (QCDR |ISTMP#1|)) (AND (PAIRP |ISTMP#2|) (EQ (QCDR |ISTMP#2|) NIL) (PROGN (SPADLET |fm| (QCAR |ISTMP#2|)) (QUOTE T)))))))) (COND ((SPADLET |ptype| (|pathnameType| |fn|)) (SPADLET |fn| (STRCONC (|pathnameDirectory| |fn|) (|pathnameName| |fn|))) (SPADLET |ft| |ptype|))) (COND ((NULL |fm|) (SPADLET |fm| (QUOTE A)))) (SPADLET |filename| ($FILEP |fn| |ft| |fm|)) (COND ((NULL |filename|) (|sayKeyedMsg| (QUOTE S2IV0003) (CONS |fn| (CONS |ft| (CONS |fm| NIL))))) ((SPADLET |testStream| (MAKE-OUTSTREAM |filename| 255 0)) (SHUT |$texOutputStream|) (SPADLET |$texOutputStream| |testStream|) (SPADLET |$texOutputFile| (|object2String| |filename|)) (|sayKeyedMsg| (QUOTE S2IV0004) (CONS (MAKESTRING "TeX") (CONS |$texOutputFile| NIL)))) ((QUOTE T) (|sayKeyedMsg| (QUOTE S2IV0003) (CONS |fn| (CONS |ft| (CONS |fm| NIL))))))) ((QUOTE T) (|sayKeyedMsg| (QUOTE S2IV0005) NIL) (|describeSetOutputTex|)))))))) -;describeSetOutputTex() == -; sayBrightly LIST ('%b,'")set output tex",'%d,_ -; '"is used to tell AXIOM to turn TeX-style output",'%l,_ -; '"printing on and off, and where to place the output. By default, the",'%l,_ -; '"destination for the output is the screen but printing is turned off.",'%l,_ -; '%l,_ -; '"Syntax: )set output tex ",'%l,_ -; '" where arg can be one of",'%l,_ -; '" on turn TeX printing on",'%l,_ -; '" off turn TeX printing off (default state)",'%l,_ -; '" console send TeX output to screen (default state)",'%l,_ -; '" fp<.fe> send TeX output to file with file prefix fp and file",'%l,_ -; '" extension .fe. If not given, .fe defaults to .stex.",'%l, -; '%l,_ -; '"If you wish to send the output to a file, you must issue this command",'%l,_ -; '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_ -; '"TeX output to the file",'%b,'"polymer.stex,",'%d,'"issue the two commands",'%l,_ -; '%l,_ -; '" )set output tex on",'%l,_ -; '" )set output tex polymer",'%l,_ -; '%l,_ -; '"The output is placed in the directory from which you invoked AXIOM or",'%l,_ -; '"the one you set with the )cd system command.",'%l,_ -; '"The current setting is: ",'%b,setOutputTex "%display%",'%d) - -(DEFUN |describeSetOutputTex| NIL (|sayBrightly| (LIST (QUOTE |%b|) (MAKESTRING ")set output tex") (QUOTE |%d|) (MAKESTRING "is used to tell AXIOM to turn TeX-style output") (QUOTE |%l|) (MAKESTRING "printing on and off, and where to place the output. By default, the") (QUOTE |%l|) (MAKESTRING "destination for the output is the screen but printing is turned off.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "Syntax: )set output tex ") (QUOTE |%l|) (MAKESTRING " where arg can be one of") (QUOTE |%l|) (MAKESTRING " on turn TeX printing on") (QUOTE |%l|) (MAKESTRING " off turn TeX printing off (default state)") (QUOTE |%l|) (MAKESTRING " console send TeX output to screen (default state)") (QUOTE |%l|) (MAKESTRING " fp<.fe> send TeX output to file with file prefix fp and file") (QUOTE |%l|) (MAKESTRING " extension .fe. If not given, .fe defaults to .stex.") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "If you wish to send the output to a file, you must issue this command") (QUOTE |%l|) (MAKESTRING "twice: once with") (QUOTE |%b|) (MAKESTRING "on") (QUOTE |%d|) (MAKESTRING "and once with the file name. For example, to send") (QUOTE |%l|) (MAKESTRING "TeX output to the file") (QUOTE |%b|) (MAKESTRING "polymer.stex,") (QUOTE |%d|) (MAKESTRING "issue the two commands") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING " )set output tex on") (QUOTE |%l|) (MAKESTRING " )set output tex polymer") (QUOTE |%l|) (QUOTE |%l|) (MAKESTRING "The output is placed in the directory from which you invoked AXIOM or") (QUOTE |%l|) (MAKESTRING "the one you set with the )cd system command.") (QUOTE |%l|) (MAKESTRING "The current setting is: ") (QUOTE |%b|) (|setOutputTex| (QUOTE |%display%|)) (QUOTE |%d|)))) - -(DEFUN |setStreamsCalculate| (|arg|) - (PROG (|n|) - (RETURN - (COND - ((BOOT-EQUAL |arg| (QUOTE |%initialize%|)) (SPADLET |$streamCount| 10)) - ((BOOT-EQUAL |arg| (QUOTE |%display%|)) (|object2String| |$streamCount|)) - ((OR - (NULL |arg|) - (BOOT-EQUAL |arg| (QUOTE |%describe%|)) - (BOOT-EQUAL (CAR |arg|) (QUOTE ?))) - (|describeSetStreamsCalculate|)) - ((QUOTE T) - (SPADLET |n| (CAR |arg|)) - (COND - ((AND - (NEQUAL |n| (QUOTE |all|)) - (OR - (NULL (FIXP |n|)) - (MINUSP |n|))) - (|sayMessage| - (CONS - (MAKESTRING "Your value of") - (APPEND - (|bright| |n|) - (CONS - (MAKESTRING "is invalid because ...") - NIL)))) - (|describeSetStreamsCalculate|) - (|terminateSystemCommand|)) - ((QUOTE T) (SPADLET |$streamCount| |n|)))))))) - -(DEFUN |describeSetStreamsCalculate| NIL - (|sayKeyedMsg| (QUOTE S2IV0001) (CONS |$streamCount| NIL))) -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} setvart.boot.pamphlet -\end{thebibliography} -\end{document} diff --git a/src/interp/setvart.boot.pamphlet b/src/interp/setvart.boot.pamphlet deleted file mode 100644 index da870d3..0000000 --- a/src/interp/setvart.boot.pamphlet +++ /dev/null @@ -1,20 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp setvart.boot} -\author{The Axiom Team} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -<<*>>= -EVALANDFILEACTQ (initializeSetVariables $setOptions) -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} src/interp/property.lisp.pamphlet -\bibitem{2} src/interp/setvars.boot.pamphlet -\end{thebibliography} -\end{document} diff --git a/src/interp/vmlisp.lisp.pamphlet b/src/interp/vmlisp.lisp.pamphlet index 9ee26d5..215ab70 100644 --- a/src/interp/vmlisp.lisp.pamphlet +++ b/src/interp/vmlisp.lisp.pamphlet @@ -1670,48 +1670,6 @@ can be restored. ; 27.1 Creation -(defun MAKE-INSTREAM (filespec &optional (recnum 0)) - (declare (ignore recnum)) - (cond ((numberp filespec) (make-synonym-stream '*terminal-io*)) - ((null filespec) (error "not handled yet")) - (t (open (make-input-filename filespec) - :direction :input :if-does-not-exist nil)))) - -(defun MAKE-OUTSTREAM (filespec &optional (width nil) (recnum 0)) - (declare (ignore width) (ignore recnum)) - (cond ((numberp filespec) (make-synonym-stream '*terminal-io*)) - ((null filespec) (error "not handled yet")) - (t (open (make-filename filespec) :direction :output)))) - -(defun MAKE-APPENDSTREAM (filespec &optional (width nil) (recnum 0)) - "fortran support" - (declare (ignore width) (ignore recnum)) - (cond - ((numberp filespec) (make-synonym-stream '*terminal-io*)) - ((null filespec) (error "make-appendstream: not handled yet")) - ('else (open (make-filename filespec) :direction :output - :if-exists :append :if-does-not-exist :create)))) - -(defun DEFIOSTREAM (stream-alist buffer-size char-position) - (declare (ignore buffer-size)) - (let ((mode (or (cdr (assoc 'MODE stream-alist)) 'INPUT)) - (filename (cdr (assoc 'FILE stream-alist))) - (dev (cdr (assoc 'DEVICE stream-alist)))) - (if (EQ dev 'CONSOLE) (make-synonym-stream '*terminal-io*) - (let ((strm (case mode - ((OUTPUT O) (open (make-filename filename) - :direction :output)) - ((INPUT I) (open (make-input-filename filename) - :direction :input))))) - (if (and (numberp char-position) (> char-position 0)) - (file-position strm char-position)) - strm)))) - -(defun shut (st) (if (is-console st) st - (if (streamp st) (close st) -1))) - -(defun EOFP (stream) (null (peek-char nil stream nil nil))) - ; 28.0 Key addressed I/O