diff --git a/books/bookvol0.pamphlet b/books/bookvol0.pamphlet index 8f1c57e..6650920 100644 --- a/books/bookvol0.pamphlet +++ b/books/bookvol0.pamphlet @@ -60462,31 +60462,6 @@ with Release 1.x may not be readable by this Release. If you cannot recreate the saved data by recomputing in Release 2.0, please contact NAG for assistance. -%------------------------------------------------------------------------ -\section{The New Axiom Library Compiler} -\index{ugWhatsNewAsharp} -%------------------------------------------------------------------------ - -A new compiler is now available for Axiom. -The programming language is referred to as the Aldor, and -improves upon the old Axiom language in many ways. -The {\tt )compile} command has been upgraded to be able to -invoke the new or old compilers. -The language and the compiler are described in the hard-copy -documentation which came with your Axiom system. - -To ease the chore of upgrading your {\it .spad} files (old -compiler) to {\it .as} files (new compiler), the -{\tt )compile} command has been given a {\tt )translate} -option. This invokes a special version of the old compiler which -parses and analyzes your old code and produces augmented code -using the new syntax. -Please be aware that the translation is not necessarily one -hundred percent complete or correct. -You should attempt to compile the output with the Aldor compiler -and make any necessary corrections. - - % ---------------------------------------------------------------------- \section{The NAG Library Link} \index{nagLinkIntro} @@ -61914,23 +61889,10 @@ system function and constructor caches. \begin{list}{} \item {\tt )compile} \item {\tt )compile {\it fileName}} -\item {\tt )compile {\it fileName}.as} -\item {\tt )compile {\it directory/fileName}.as} -\item {\tt )compile {\it fileName}.ao} -\item {\tt )compile {\it directory/fileName}.ao} -\item {\tt )compile {\it fileName}.al} -\item {\tt )compile {\it directory/fileName}.al} -\item {\tt )compile {\it fileName}.lsp} -\item {\tt )compile {\it directory/fileName}.lsp} \item {\tt )compile {\it fileName}.spad} \item {\tt )compile {\it directory/fileName}.spad} -\item {\tt )compile {\it fileName} )new} -\item {\tt )compile {\it fileName} )old} -\item {\tt )compile {\it fileName} )translate} \item {\tt )compile {\it fileName} )quiet} \item {\tt )compile {\it fileName} )noquiet} -\item {\tt )compile {\it fileName} )moreargs} -\item {\tt )compile {\it fileName} )onlyargs} \item {\tt )compile {\it fileName} )break} \item {\tt )compile {\it fileName} )nobreak} \item {\tt )compile {\it fileName} )library} @@ -61941,278 +61903,94 @@ system function and constructor caches. \par\noindent{\bf Command Description:} -You use this command to invoke the new Axiom library compiler or -the old Axiom system compiler. -The {\tt )compile} system command is actually a combination of -Axiom processing and a call to the Aldor compiler. -It is performing double-duty, acting as a front-end to -both the Aldor compiler and the old Axiom system -compiler. -(The old Axiom system compiler was written in Lisp and was -an integral part of the Axiom environment. -The Aldor compiler is written in C and executed by the operating system -when called from within Axiom.) - -This command compiles files with file extensions {\it .as, .ao} -and {\it .al} with the -Aldor compiler and files with file extension {\it .spad} with the -old Axiom system compiler. -It also can compile files with file extension {\it .lsp}. These -are assumed to be Lisp files genererated by the Aldor -compiler. -If you omit the file extension, the command looks to see if you -have specified the {\tt )new} or {\tt )old} option. -If you have given one of these options, the corresponding compiler -is used. -Otherwise, the command first looks in the standard system -directories for files with extension {\it .as, .ao} and {\it -.al} and then files with extension {\it .spad}. -The first file found has the appropriate compiler invoked on it. -If the command cannot find a matching file, an error message is -displayed and the command terminates. - -The {\tt )translate} option is used to invoke a special version -of the old system compiler that will translate a {\it .spad} file -to a {\it .as} file. That is, the {\it .spad} file will be parsed and -analyzed and a file using the new syntax will be created. By default, -the {\it .as} file is created in the same directory as the -{\it .spad} file. If that directory is not writable, the current -directory is used. If the current directory is not writable, an -error message is given and the command terminates. -Note that {\tt )translate} implies the {\tt )old} option so the -file extension can safely be omitted. If {\tt )translate} is -given, all other options are ignored. -Please be aware that the translation is not necessarily one -hundred percent complete or correct. -You should attempt to compile the output with the Aldor compiler -and make any necessary corrections. - -We now describe the options for the new Aldor compiler. - -The first thing {\tt )compile} does is look for a source code -filename among its arguments. -Thus -\begin{verbatim} -)compile mycode.as -)compile /u/jones/as/mycode.as -)compile mycode -\end{verbatim} -all invoke {\tt )compiler} on the file {\tt -/u/jones/as/mycode.as} if the current Axiom working -directory is {\tt /u/jones/as.} (Recall that you can set the -working directory via the {\tt )cd} command. If you don't set it -explicitly, it is the directory from which you started -Axiom.) - -This is frequently all you need to compile your file. -This simple command: -\begin{enumerate} -\item Invokes the Aldor compiler and produces Lisp output. -\item Calls the Lisp compiler if the Aldor compilation was -successful. -\item Uses the {\tt )library} command to tell Axiom about -the contents of your compiled file and arrange to have those -contents loaded on demand. -\end{enumerate} - -Should you not want the {\tt )library} command automatically -invoked, call {\tt )compile} with the {\tt )nolibrary} option. -For example, -\begin{verbatim} -)compile mycode.as )nolibrary -\end{verbatim} - -The general description of Aldor command line arguments is in -the Aldor documentation. -The default options used by the {\tt )compile} command can be -viewed and set using the {\tt )set compiler args} Axiom -system command. -The current defaults are -\begin{verbatim} --O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -\end{verbatim} -These options mean: -\begin{itemize} -\item {\tt -O}: perform all optimizations, -\item {\tt -Fasy}: generate a {\tt .asy} file, -\item {\tt -Fao}: generate a {\tt .ao} file, -\item {\tt -Flsp}: generate a {\tt .lsp} (Lisp) -file, -\index{Lisp!code generation} -\item {\tt -laxiom}: use the {\tt axiom} library {\tt libaxiom.al}, -\item {\tt -Mno-AXL\_W\_WillObsolete}: do not display messages -about older generated files becoming obsolete, and -\item {\tt -DAxiom}: define the global assertion {\tt Axiom} so that the -Aldor libraries for generating stand-alone code -are not accidentally used with Axiom. -\end{itemize} - -To supplement these default arguments, use the {\tt )moreargs} option on -{\tt )compile.} -For example, -\begin{verbatim} -)compile mycode.as )moreargs "-v" -\end{verbatim} -uses the default arguments and appends the {\tt -v} (verbose) -argument flag. -The additional argument specification {\bf must be enclosed in -double quotes.} - -To completely replace these default arguments for a particular -use of {\tt )compile}, use the {\tt )onlyargs} option. -For example, -\begin{verbatim} -)compile mycode.as )onlyargs "-v -O" -\end{verbatim} -only uses the {\tt -v} (verbose) and {\tt -O} (optimize) -arguments. -The argument specification {\bf must be enclosed in double quotes.} -In this example, Lisp code is not produced and so the compilation -output will not be available to Axiom. - -To completely replace the default arguments for all calls to {\tt -)compile} within your Axiom session, use {\tt )set compiler args.} -For example, to use the above arguments for all compilations, issue -\begin{verbatim} -)set compiler args "-v -O" -\end{verbatim} -Make sure you include the necessary {\tt -l} and {\tt -Y} -arguments along with those needed for Lisp file creation. -As above, {\bf the argument specification must be enclosed in double -quotes.} - -By default, the {\tt )library} system command {\it exposes} all -domains and categories it processes. -This means that the Axiom intepreter will consider those -domains and categories when it is trying to resolve a reference -to a function. -Sometimes domains and categories should not be exposed. -For example, a domain may just be used privately by another -domain and may not be meant for top-level use. -The {\tt )library} command should still be used, though, so that -the code will be loaded on demand. -In this case, you should use the {\tt )nolibrary} option on {\tt -)compile} and the {\tt )noexpose} option in the {\tt )library} -command. For example, -\begin{verbatim} -)compile mycode.as )nolibrary +You use this command to invoke the Axiom library compiler. This +compiles files with file extension {\tt .spad} with the Axiom system +compiler. The command first looks in the standard system directories +for files with extension {\tt .spad}. + +Should you not want the {\tt )library} command automatically invoked, +call {\tt )compile} with the {\tt )nolibrary} option. For example, +\begin{verbatim} +)compile mycode )nolibrary +\end{verbatim} +By default, the {\tt )library} system command exposes all domains and +categories it processes. This means that the Axiom intepreter will consider +those domains and categories when it is trying to resolve a reference to a +function. +Sometimes domains and categories should not be exposed. For example, a domain +may just be used privately by another domain and may not be meant for +top-level use. The {\tt )library} command should still be used, though, so +that the code will be loaded on demand. In this case, you should use the +{\tt )nolibrary} option on {\tt )compile} and the {\tt )noexpose} option in +the {\tt )library} command. For +example, +\begin{verbatim} +)compile mycode.spad )nolibrary )library mycode )noexpose -\end{verbatim} - -Once you have established your own collection of compiled code, -you may find it handy to use the {\tt )dir} option on the -{\tt )library} command. -This causes {\tt )library} to process all compiled code in the -specified directory. For example, -\begin{verbatim} -)library )dir /u/jones/as/quantum -\end{verbatim} -You must give an explicit directory after {\tt )dir}, even if you -want all compiled code in the current working directory -processed, e.g. -\begin{verbatim} +\end{verbatim} +Once you have established your own collection of compiled code, you may find +it handy to use the )dir option on the )library command. This causes )library +to process all compiled code in the specified directory. For example, +\begin{verbatim} +)library )dir /u/jones/quantum +\end{verbatim} +You must give an explicit directory after )dir, even if you want all compiled +code in the current working directory processed. +\begin{verbatim} )library )dir . -\end{verbatim} - -The {\tt )compile} command works with several file extensions. We saw -above what happens when it is invoked on a file with extension {\tt -.as.} A {\tt .ao} file is a portable binary compiled version of a -{\tt .as} file, and {\tt )compile} simply passes the {\tt .ao} file -onto Aldor. The generated Lisp file is compiled and {\tt )library} -is automatically called, just as if you had specified a {\tt .as} file. - -A {\tt .al} file is an archive file containing {\tt .ao} files. The -archive is created (on Unix systems) with the {\tt ar} program. When -{\tt )compile} is given a {\tt .al} file, it creates a directory whose -name is based on that of the archive. For example, if you issue -\begin{verbatim} -)compile mylib.al -\end{verbatim} -the directory {\tt mylib.axldir} is created. All -members of the archive are unarchived into the -directory and {\tt )compile} is called on each {\tt .ao} file found. It -is your responsibility to remove the directory and its contents, if you -choose to do so. - -A {\tt .lsp} file is a Lisp source file, presumably, in our context, -generated by Aldor when called with the {\tt -Flsp} option. When -{\tt )compile} is used with a {\tt .lsp} file, the Lisp file is -compiled and {\tt )library} is called. You must also have present a -{\tt .asy} generated from the same source file. - -The following are descriptions of options for the old system compiler. - -You can compile category, domain, and package constructors -contained in files with file extension {\it .spad}. -You can compile individual constructors or every constructor -in a file. - -The full filename is remembered between invocations of this command and -{\tt )edit} commands. -The sequence of commands -\begin{verbatim} +\end{verbatim} +You can compile category, domain, and package constructors contained in files +with file extension {\tt .spad}. You can compile individual constructors or +every constructor in a file. + +The full filename is remembered between invocations of this command and +{\tt )edit} commands. The sequence of commands +\begin{verbatim} )compile matrix.spad )edit )compile -\end{verbatim} -will call the compiler, edit, and then call the compiler again -on the file {\bf matrix.spad.} -If you do not specify a {\it directory,} the working current -directory (see \sectionref{ugSysCmdcd} is searched for the file. -If the file is not found, the standard system directories are searched. - -If you do not give any options, all constructors within a file are -compiled. -Each constructor should have an {\tt )abbreviation} command in -the file in which it is defined. -We suggest that you place the {\tt )abbreviation} commands at the -top of the file in the order in which the constructors are -defined. -The list of commands serves as a table of contents for the file. -\index{abbreviation} +\end{verbatim} +will call the compiler, edit, and then call the compiler again on the file +matrix.spad. If you do not specify a directory, the working current directory +(see description of command )cd ) is searched for the file. If the file is +not found, the standard system directories are searched. + +If you do not give any options, all constructors within a file are compiled. +Each constructor should have an {\tt )abbreviation} command in the file in +which it is defined. We suggest that you place the {\tt )abbreviation} +commands at the top of the file in the order in which the constructors are +defined. The list of commands serves as a table of contents for the file. + +The {\tt )library} option causes directories containing the compiled code +for each constructor to be created in the working current directory. The +name of such a directory consists of the constructor abbreviation and the +{\tt .nrlib} file extension. For example, the directory containing the +compiled code for the {\tt MATRIX} constructor is called {\bf MATRIX.nrlib}. +The {\tt )nolibrary} option says that such files should not be created. + +The {\tt )vartrace} option causes the compiler to generate extra code for the +constructor to support conditional tracing of variable assignments. +(see \sectionref{ugSysCmdtrace}). Without this option, this code is suppressed +and one cannot use the )vars option for the trace command. + +The {\tt )constructor} option is used to specify a particular constructor to +compile. All other constructors in the file are ignored. The constructor name +or abbreviation follows {\tt )constructor}. Thus either -The {\tt )library} option causes directories containing the -compiled code for each constructor -to be created in the working current directory. -The name of such a directory consists of the constructor -abbreviation and the {\bf .nrlib} file extension. -For example, the directory containing the compiled code for -the {\tt MATRIX} constructor is called {\bf MATRIX.nrlib.} -The {\tt )nolibrary} option says that such files should not -be created. -The default is {\tt )library.} -Note that the semantics of {\tt )library} and {\tt )nolibrary} -for the new Aldor compiler and for the old system compiler are -completely different. - -The {\tt )vartrace} option causes the compiler to generate -extra code for the constructor to support conditional tracing of -variable assignments. (see \sectionref{ugSysCmdtrace}). Without -this option, this code is suppressed and one cannot use -the {\tt )vars} option for the trace command. - -The {\tt )constructor} option is used to -specify a particular constructor to compile. -All other constructors in the file are ignored. -The constructor name or abbreviation follows {\tt )constructor.} -Thus either -\begin{verbatim} +\begin{verbatim} )compile matrix.spad )constructor RectangularMatrix \end{verbatim} or -\begin{verbatim} +\begin{verbatim} )compile matrix.spad )constructor RMATRIX \end{verbatim} -compiles the {\tt RectangularMatrix} constructor -defined in {\bf matrix.spad.} - -The {\tt )break} and {\tt )nobreak} options determine what -the old system compiler does when it encounters an error. -{\tt )break} is the default and it indicates that processing -should stop at the first error. -The value of the {\tt )set break} variable then controls what happens. - - +compiles the {\tt RectangularMatrix} constructor defined in {\bf matrix.spad}. + +The {\tt )break} and {\tt )nobreak} options determine what the compiler does +when it encounters an error. {\tt )break} is the default and it indicates that +processing should stop at the first error. The value of the {\tt )set break} +variable then controls what happens. + \par\noindent{\bf Also See:} {\tt )abbreviation} \index{ugSysCmdabbreviation}, {\tt )edit} \index{ugSysCmdedit}, and @@ -62762,7 +62540,7 @@ was available in Axiom releases before version 2.0. The {\tt )library} command makes available to Axiom the compiled objects in the libraries listed. -For example, if you {\tt )compile dopler.as} in your home +For example, if you {\tt )compile dopler.spad} in your home directory, issue {\tt )library dopler} to have Axiom look at the library, determine the category and domain constructors present, update the internal database with various properties of the diff --git a/books/bookvol1.pamphlet b/books/bookvol1.pamphlet index 4d577ea..8b320dc 100644 --- a/books/bookvol1.pamphlet +++ b/books/bookvol1.pamphlet @@ -12934,23 +12934,10 @@ system function and constructor caches. \begin{list}{} \item {\tt )compile} \item {\tt )compile {\it fileName}} -\item {\tt )compile {\it fileName}.as} -\item {\tt )compile {\it directory/fileName}.as} -\item {\tt )compile {\it fileName}.ao} -\item {\tt )compile {\it directory/fileName}.ao} -\item {\tt )compile {\it fileName}.al} -\item {\tt )compile {\it directory/fileName}.al} -\item {\tt )compile {\it fileName}.lsp} -\item {\tt )compile {\it directory/fileName}.lsp} \item {\tt )compile {\it fileName}.spad} \item {\tt )compile {\it directory/fileName}.spad} -\item {\tt )compile {\it fileName} )new} -\item {\tt )compile {\it fileName} )old} -\item {\tt )compile {\it fileName} )translate} \item {\tt )compile {\it fileName} )quiet} \item {\tt )compile {\it fileName} )noquiet} -\item {\tt )compile {\it fileName} )moreargs} -\item {\tt )compile {\it fileName} )onlyargs} \item {\tt )compile {\it fileName} )break} \item {\tt )compile {\it fileName} )nobreak} \item {\tt )compile {\it fileName} )library} @@ -12962,287 +12949,94 @@ system function and constructor caches. \par\noindent{\bf Command Description:} \index{spad} -\index{aldor} -You use this command to invoke the {\bf Spad} compiler or the -{\bf Aldor} compiler. -The {\tt )compile} system command is actually a combination of -Axiom processing and a call to the Aldor compiler. -It is performing double-duty, acting as a front-end to -both the Aldor compiler and the Spad compiler. -(The Spad compiler is written in Lisp and is -an integral part of the Axiom environment. -The Aldor compiler is written in C and executed by the operating system -when called from within Axiom.) - -The command compiles files with file extensions {\it .as, .ao} -and {\it .al} with the -Aldor compiler and files with file extension {\it .spad} with the -Spad compiler. -It also can compile files with file extension {\it .lsp}. These -are assumed to be Lisp files genererated by the Aldor -compiler. -If you omit the file extension, the command looks to see if you -have specified the {\tt )new} or {\tt )old} option. -If you have given one of these options, the corresponding compiler -is used. -Otherwise, the command first looks in the standard system -directories for files with extension {\it .as, .ao} and {\it -.al} and then files with extension {\it .spad}. -The first file found has the appropriate compiler invoked on it. -If the command cannot find a matching file, an error message is -displayed and the command terminates. - -The {\tt )translate} option is used to invoke a special version -of the Spad compiler that will translate a {\it .spad} file -to a {\it .as} file. That is, the {\it .spad} file will be parsed and -analyzed and a file using the new syntax will be created. By default, -the {\it .as} file is created in the same directory as the -{\it .spad} file. If that directory is not writable, the current -directory is used. If the current directory is not writable, an -error message is given and the command terminates. -Note that {\tt )translate} implies the {\tt )old} option so the -file extension can safely be omitted. If {\tt )translate} is -given, all other options are ignored. -Please be aware that the translation is not necessarily one -hundred percent complete or correct. -You should attempt to compile the output with the Aldor compiler -and make any necessary corrections. - -We now describe the options for the new Aldor compiler. - -The first thing {\tt )compile} does is look for a source code -filename among its arguments. -Thus -\begin{verbatim} -)compile mycode.as -)compile /u/jones/as/mycode.as -)compile mycode -\end{verbatim} -all invoke {\tt )compiler} on the file {\tt -/u/jones/as/mycode.as} if the current Axiom working -directory is {\tt /u/jones/as.} (Recall that you can set the -working directory via the {\tt )cd} command. If you don't set it -explicitly, it is the directory from which you started -Axiom.) - -This is frequently all you need to compile your file. -This simple command: -\begin{enumerate} -\item Invokes the Aldor compiler and produces Lisp output. -\item Calls the Lisp compiler if the Aldor compilation was -successful. -\item Uses the {\tt )library} command to tell Axiom about -the contents of your compiled file and arrange to have those -contents loaded on demand. -\end{enumerate} - -Should you not want the {\tt )library} command automatically -invoked, call {\tt )compile} with the {\tt )nolibrary} option. -For example, -\begin{verbatim} -)compile mycode.as )nolibrary -\end{verbatim} - -The general description of Aldor command line arguments is in -the Aldor documentation. -The default options used by the {\tt )compile} command can be -viewed and set using the {\tt )set compiler args} Axiom -system command. -The current defaults are -\begin{verbatim} --O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -\end{verbatim} -These options mean: -\begin{itemize} -\item {\tt -O}: perform all optimizations, -\item {\tt -Fasy}: generate a {\tt .asy} file, -\item {\tt -Fao}: generate a {\tt .ao} file, -\item {\tt -Flsp}: generate a {\tt .lsp} (Lisp) -file, -\index{Lisp!code generation} -\item {\tt -laxiom}: use the {\tt axiom} library {\tt libaxiom.al}, -\item {\tt -Mno-AXL\_W\_WillObsolete}: do not display messages -about older generated files becoming obsolete, and -\item {\tt -DAxiom}: define the global assertion {\tt Axiom} so that the -Aldor libraries for generating stand-alone code -are not accidentally used with Axiom. -\end{itemize} - -To supplement these default arguments, use the {\tt )moreargs} option on -{\tt )compile.} -For example, -\begin{verbatim} -)compile mycode.as )moreargs "-v" -\end{verbatim} -uses the default arguments and appends the {\tt -v} (verbose) -argument flag. -The additional argument specification {\bf must be enclosed in -double quotes.} - -To completely replace these default arguments for a particular -use of {\tt )compile}, use the {\tt )onlyargs} option. -For example, -\begin{verbatim} -)compile mycode.as )onlyargs "-v -O" -\end{verbatim} -only uses the {\tt -v} (verbose) and {\tt -O} (optimize) -arguments. -The argument specification {\bf must be enclosed in double quotes.} -In this example, Lisp code is not produced and so the compilation -output will not be available to Axiom. - -To completely replace the default arguments for all calls to {\tt -)compile} within your Axiom session, use {\tt )set compiler args.} -For example, to use the above arguments for all compilations, issue -\begin{verbatim} -)set compiler args "-v -O" -\end{verbatim} -Make sure you include the necessary {\tt -l} and {\tt -Y} -arguments along with those needed for Lisp file creation. -As above, {\bf the argument specification must be enclosed in double -quotes.} - -By default, the {\tt )library} system command {\it exposes} all -domains and categories it processes. -This means that the Axiom intepreter will consider those -domains and categories when it is trying to resolve a reference -to a function. -Sometimes domains and categories should not be exposed. -For example, a domain may just be used privately by another -domain and may not be meant for top-level use. -The {\tt )library} command should still be used, though, so that -the code will be loaded on demand. -In this case, you should use the {\tt )nolibrary} option on {\tt -)compile} and the {\tt )noexpose} option in the {\tt )library} -command. For example, -\begin{verbatim} -)compile mycode.as )nolibrary +You use this command to invoke the Axiom library compiler. This +compiles files with file extension {\tt .spad} with the Axiom system +compiler. The command first looks in the standard system directories +for files with extension {\tt .spad}. + +Should you not want the {\tt )library} command automatically invoked, +call {\tt )compile} with the {\tt )nolibrary} option. For example, +\begin{verbatim} +)compile mycode )nolibrary +\end{verbatim} +By default, the {\tt )library} system command exposes all domains and +categories it processes. This means that the Axiom intepreter will consider +those domains and categories when it is trying to resolve a reference to a +function. +Sometimes domains and categories should not be exposed. For example, a domain +may just be used privately by another domain and may not be meant for +top-level use. The {\tt )library} command should still be used, though, so +that the code will be loaded on demand. In this case, you should use the +{\tt )nolibrary} option on {\tt )compile} and the {\tt )noexpose} option in +the {\tt )library} command. For +example, +\begin{verbatim} +)compile mycode.spad )nolibrary )library mycode )noexpose -\end{verbatim} - -Once you have established your own collection of compiled code, -you may find it handy to use the {\tt )dir} option on the -{\tt )library} command. -This causes {\tt )library} to process all compiled code in the -specified directory. For example, -\begin{verbatim} -)library )dir /u/jones/as/quantum -\end{verbatim} -You must give an explicit directory after {\tt )dir}, even if you -want all compiled code in the current working directory -processed, e.g. -\begin{verbatim} +\end{verbatim} +Once you have established your own collection of compiled code, you may find +it handy to use the )dir option on the )library command. This causes )library +to process all compiled code in the specified directory. For example, +\begin{verbatim} +)library )dir /u/jones/quantum +\end{verbatim} +You must give an explicit directory after )dir, even if you want all compiled +code in the current working directory processed. +\begin{verbatim} )library )dir . -\end{verbatim} - -The {\tt )compile} command works with several file extensions. We saw -above what happens when it is invoked on a file with extension {\tt -.as.} A {\tt .ao} file is a portable binary compiled version of a -{\tt .as} file, and {\tt )compile} simply passes the {\tt .ao} file -onto Aldor. The generated Lisp file is compiled and {\tt )library} -is automatically called, just as if you had specified a {\tt .as} file. - -A {\tt .al} file is an archive file containing {\tt .ao} files. The -archive is created (on Unix systems) with the {\tt ar} program. When -{\tt )compile} is given a {\tt .al} file, it creates a directory whose -name is based on that of the archive. For example, if you issue -\begin{verbatim} -)compile mylib.al -\end{verbatim} -the directory {\tt mylib.axldir} is created. All -members of the archive are unarchived into the -directory and {\tt )compile} is called on each {\tt .ao} file found. It -is your responsibility to remove the directory and its contents, if you -choose to do so. - -A {\tt .lsp} file is a Lisp source file, presumably, in our context, -generated by Aldor when called with the {\tt -Flsp} option. When -{\tt )compile} is used with a {\tt .lsp} file, the Lisp file is -compiled and {\tt )library} is called. You must also have present a -{\tt .asy} generated from the same source file. - -The following are descriptions of options for the Spad compiler. - -You can compile category, domain, and package constructors -contained in files with file extension {\it .spad}. -You can compile individual constructors or every constructor -in a file. - -The full filename is remembered between invocations of this command and -{\tt )edit} commands. -The sequence of commands -\begin{verbatim} +\end{verbatim} +You can compile category, domain, and package constructors contained in files +with file extension {\tt .spad}. You can compile individual constructors or +every constructor in a file. + +The full filename is remembered between invocations of this command and +{\tt )edit} commands. The sequence of commands +\begin{verbatim} )compile matrix.spad )edit )compile -\end{verbatim} -will call the compiler, edit, and then call the compiler again -on the file {\bf matrix.spad.} -If you do not specify a {\it directory,} the working current -directory is searched for the file. -If the file is not found, the standard system directories are searched. - -If you do not give any options, all constructors within a file are -compiled. -Each constructor should have an {\tt )abbreviation} command in -the file in which it is defined. -We suggest that you place the {\tt )abbreviation} commands at the -top of the file in the order in which the constructors are -defined. -The list of commands serves as a table of contents for the file. -\index{abbreviation} +\end{verbatim} +will call the compiler, edit, and then call the compiler again on the file +matrix.spad. If you do not specify a directory, the working current directory +(see description of command )cd ) is searched for the file. If the file is +not found, the standard system directories are searched. + +If you do not give any options, all constructors within a file are compiled. +Each constructor should have an {\tt )abbreviation} command in the file in +which it is defined. We suggest that you place the {\tt )abbreviation} +commands at the top of the file in the order in which the constructors are +defined. The list of commands serves as a table of contents for the file. + +The {\tt )library} option causes directories containing the compiled code +for each constructor to be created in the working current directory. The +name of such a directory consists of the constructor abbreviation and the +{\tt .nrlib} file extension. For example, the directory containing the +compiled code for the {\tt MATRIX} constructor is called {\bf MATRIX.nrlib}. +The {\tt )nolibrary} option says that such files should not be created. + +The {\tt )vartrace} option causes the compiler to generate extra code for the +constructor to support conditional tracing of variable assignments. +Without this option, this code is suppressed +and one cannot use the )vars option for the trace command. + +The {\tt )constructor} option is used to specify a particular constructor to +compile. All other constructors in the file are ignored. The constructor name +or abbreviation follows {\tt )constructor}. Thus either -The {\tt )library} option causes directories containing the -compiled code for each constructor -to be created in the working current directory. -The name of such a directory consists of the constructor -abbreviation and the {\bf .nrlib} file extension. -For example, the directory containing the compiled code for -the {\tt MATRIX} constructor is called {\bf MATRIX.nrlib.} -The {\tt )nolibrary} option says that such files should not -be created. -The default is {\tt )library.} -Note that the semantics of {\tt )library} and {\tt )nolibrary} -for the new Aldor compiler and for the Spad compiler are -completely different. - -The {\tt )vartrace} option causes the compiler to generate -extra code for the constructor to support conditional tracing of -variable assignments. Without -this option, this code is suppressed and one cannot use -the {\tt )vars} option for the trace command. - -The {\tt )constructor} option is used to -specify a particular constructor to compile. -All other constructors in the file are ignored. -The constructor name or abbreviation follows {\tt )constructor.} -Thus either -\begin{verbatim} +\begin{verbatim} )compile matrix.spad )constructor RectangularMatrix \end{verbatim} or -\begin{verbatim} +\begin{verbatim} )compile matrix.spad )constructor RMATRIX \end{verbatim} -compiles the {\tt RectangularMatrix} constructor -defined in {\bf matrix.spad.} - -The {\tt )break} and {\tt )nobreak} options determine what -the Spad compiler does when it encounters an error. -{\tt )break} is the default and it indicates that processing -should stop at the first error. -The value of the {\tt )set break} variable then controls what happens. - - -%% BEGIN OBSOLTE -% It is important for you to realize that it does not suffice to compile a -% constructor to use the new code in the interpreter. -% After compilation, the {\tt )load} command with the -% {\tt )update} option should be used to bring in the new code -% and update internal system tables with information about the -% constructor. -%% END OBSOLTE - +compiles the {\tt RectangularMatrix} constructor defined in {\bf matrix.spad}. + +The {\tt )break} and {\tt )nobreak} options determine what the compiler does +when it encounters an error. {\tt )break} is the default and it indicates that +processing should stop at the first error. The value of the {\tt )set break} +variable then controls what happens. + \par\noindent{\bf Also See:} {\tt )abbreviation} \index{)abbreviation}, {\tt )edit} \index{)edit}, and diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index f9479e0..0103d51 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -15239,7 +15239,7 @@ See:\\ \item The \fnref{cd} command \item The \fnref{clear} command \item The \fnref{close} command -\item The \fnref{compiler} command +\item The \fnref{compile} command \item The \fnref{copyright} command \item The \fnref{credits} command \item The \fnref{display} command @@ -15475,7 +15475,7 @@ new system commands provided you handle the argument parsing. \defun{systemCommand}{Handle system commands} You can type ``)?'' and see trivial help information. -You can type ``)? compiler'' and see compiler related information +You can type ``)? compile'' and see compiler related information \calls{systemCommand}{selectOptionLC} \calls{systemCommand}{helpSpad2Cmd} \calls{systemCommand}{selectOption} @@ -17804,9 +17804,9 @@ Returns the number of active scratchpad clients @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\cmdhead{compiler help page} +\cmdhead{compile help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +<>= ==================================================================== A.7. )compile ==================================================================== @@ -17817,23 +17817,10 @@ Command Syntax: - )compile - )compile fileName - - )compile fileName.as - - )compile directory/fileName.as - - )compile fileName.ao - - )compile directory/fileName.ao - - )compile fileName.al - - )compile directory/fileName.al - - )compile fileName.lsp - - )compile directory/fileName.lsp - )compile fileName.spad - )compile directory/fileName.spad - - )compile fileName )new - - )compile fileName )old - - )compile fileName )translate - )compile fileName )quiet - )compile fileName )noquiet - - )compile fileName )moreargs - - )compile fileName )onlyargs - )compile fileName )break - )compile fileName )nobreak - )compile fileName )library @@ -17843,114 +17830,15 @@ Command Syntax: Command Description: -You use this command to invoke the new AXIOM library compiler or the old -AXIOM system compiler. The )compile system command is actually a combination -of AXIOM processing and a call to the AXIOM-XL compiler. It is performing -double-duty, acting as a front-end to both the AXIOM-XL compiler and the old -AXIOM system compiler. (The old AXIOM system compiler was written in Lisp and -was an integral part of the AXIOM environment. The AXIOM-XL compiler is -written in C and executed by the operating system when called from within -AXIOM.) - -The command compiles files with file extensions .as, .ao and .al with the -AXIOM-XL compiler and files with file extension .spad with the old AXIOM -system compiler. It also can compile files with file extension .lsp. These -are assumed to be Lisp files genererated by the AXIOM-XL compiler. If you -omit the file extension, the command looks to see if you have specified the -)new or )old option. If you have given one of these options, the -corresponding compiler is used. Otherwise, the command first looks in the -standard system directories for files with extension .as, .ao and .al and -then files with extension .spad. The first file found has the appropriate -compiler invoked on it. If the command cannot find a matching file, an error -message is displayed and the command terminates. - -The )translate option is used to invoke a special version of the old system -compiler that will translate a .spad file to a .as file. That is, the .spad -file will be parsed and analyzed and a file using the new syntax will be -created. By default, the .as file is created in the same directory as the -.spad file. If that directory is not writable, the current directory is used. -If the current directory is not writable, an error message is given and the -command terminates. Note that )translate implies the )old option so the file -extension can safely be omitted. If )translate is given, all other options -are ignored. Please be aware that the translation is not necessarily one -hundred percent complete or correct. You should attempt to compile the output -with the AXIOM-XL compiler and make any necessary corrections. - -We now describe the options for the new AXIOM-XL compiler. - -The first thing )compile does is look for a source code filename among its -arguments. Thus - -)compile mycode.as -)compile /u/jones/as/mycode.as -)compile mycode - -all invoke )compiler on the file /u/jones/as/mycode.as if the current AXIOM -working directory is /u/jones/as. (Recall that you can set the working -directory via the )cd command. If you don't set it explicitly, it is the -directory from which you started AXIOM.) - -This is frequently all you need to compile your file. This simple command: - - - Invokes the AXIOM-XL compiler and produces Lisp output. - - Calls the Lisp compiler if the AXIOM-XL compilation was - successful. - - Use the )library command to tell AXIOM about - the contents of your compiled file and arrange to have those contents - loaded on demand. +You use this command to invoke the AXIOM library compiler. This +compiles files with file extension .spad with the AXIOM system +compiler. The command first looks in the standard system directories +for files with extension .spad. Should you not want the )library command automatically invoked, call )compile with the )nolibrary option. For example, -)compile mycode.as )nolibrary - -The general description of AXIOM-XL command line arguments is in the AXIOM-XL -documentation. The default options used by the )compile command can be viewed -and set using the )set compiler args AXIOM system command. The current -defaults are - --O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom - -These options mean: - - - -O: perform all optimizations, - - -Fasy: generate a .asy file, - - -Fao: generate a .ao file, - - -Flsp: generate a .lsp (Lisp) - file, - - -laxiom: use the axiom library libaxiom.al, - - -Mno-AXL_W_WillObsolete: do not display messages - about older generated files becoming obsolete, and - - -DAxiom: define the global assertion Axiom so that the - AXIOM-XL libraries for generating stand-alone code are not accidentally - used with AXIOM. - -To supplement these default arguments, use the )moreargs option on )compile. -For example, - -)compile mycode.as )moreargs "-v" - -uses the default arguments and appends the -v (verbose) argument flag. The -additional argument specification must be enclosed in double quotes. - -To completely replace these default arguments for a particular use of -)compile, use the )onlyargs option. For example, - -)compile mycode.as )onlyargs "-v -O" - -only uses the -v (verbose) and -O (optimize) arguments. The argument -specification must be enclosed in double quotes. In this example, Lisp code -is not produced and so the compilation output will not be available to AXIOM. - -To completely replace the default arguments for all calls to )compile within -your AXIOM session, use )set compiler args. For example, to use the above -arguments for all compilations, issue - -)set compiler args "-v -O" - -Make sure you include the necessary -l and -Y arguments along with those -needed for Lisp file creation. As above, the argument specification must be -enclosed in double quotes. +)compile mycode )nolibrary By default, the )library system command exposes all domains and categories it processes. This means that the AXIOM intepreter will consider those domains @@ -17962,7 +17850,7 @@ code will be loaded on demand. In this case, you should use the )nolibrary option on )compile and the )noexpose option in the )library command. For example, -)compile mycode.as )nolibrary +)compile mycode.spad )nolibrary )library mycode )noexpose Once you have established your own collection of compiled code, you may find @@ -17976,31 +17864,6 @@ code in the current working directory processed. )library )dir . -The )compile command works with several file extensions. We saw above what -happens when it is invoked on a file with extension .as. A .ao file is a -portable binary compiled version of a .as file, and )compile simply passes -the .ao file onto AXIOM-XL. The generated Lisp file is compiled and )library -is automatically called, just as if you had specified a .as file. - -A .al file is an archive file containing .ao files. The archive is created -(on Unix systems) with the ar program. When )compile is given a .al file, it -creates a directory whose name is based on that of the archive. For example, -if you issue - -)compile mylib.al - -the directory mylib.axldir is created. All members of the archive are -unarchived into the directory and )compile is called on each .ao file found. -It is your responsibility to remove the directory and its contents, if you -choose to do so. - -A .lsp file is a Lisp source file, presumably, in our context, generated by -AXIOM-XL when called with the -Flsp option. When )compile is used with a .lsp -file, the Lisp file is compiled and )library is called. You must also have -present a .asy generated from the same source file. - -The following are descriptions of options for the old system compiler. - You can compile category, domain, and package constructors contained in files with file extension .spad. You can compile individual constructors or every constructor in a file. @@ -18028,9 +17891,7 @@ constructor to be created in the working current directory. The name of such a directory consists of the constructor abbreviation and the .NRLIB file extension. For example, the directory containing the compiled code for the MATRIX constructor is called MATRIX.NRLIB. The )nolibrary option says that -such files should not be created. The default is )library. Note that the -semantics of )library and )nolibrary for the new AXIOM-XL compiler and for -the old system compiler are completely different. +such files should not be created. The )vartrace option causes the compiler to generate extra code for the constructor to support conditional tracing of variable assignments. (see @@ -18049,7 +17910,7 @@ or compiles the RectangularMatrix constructor defined in matrix.spad. -The )break and )nobreak options determine what the old system compiler does +The )break and )nobreak options determine what the compiler does when it encounters an error. )break is the default and it indicates that processing should stop at the first error. The value of the )set break variable then controls what happens. @@ -20105,13 +19966,9 @@ Available algebra help topics are: (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 - (makeInputFilename - (cons narg (cons 'helpspad (cons '* nil)))))) + ((null (setq helpfile (makeInputFilename (list narg "help")))) nil) (|$useFullScreenHelp| (obey (concat "$AXIOM/lib/SPADEDIT " (|namestring| helpfile))) t) @@ -20119,8 +19976,7 @@ Available algebra help topics are: (setq filestream (make-instream helpfile)) (do ((line (|read-line| filestream nil) (|read-line| filestream nil))) ((null line) (shut filestream)) - (say line)))))) - t)) + (say line)))))))) @ @@ -22093,17 +21949,16 @@ This command replaces the )load system command that was available in AXIOM releases before version 2.0. The )library command makes available to AXIOM the compiled objects in the libraries listed. -For example, if you )compile dopler.as in your home directory, issue )library +For example, if you )compile dopler.spad in your home directory, issue )library dopler to have AXIOM look at the library, determine the category and domain constructors present, update the internal database with various properties of the constructors, and arrange for the constructors to be automatically loaded when needed. If the )noexpose option has not been given, the constructors will be exposed (that is, available) in the current frame. -If you compiled a file with the old system compiler, you will have an NRLIB -present, for example, DOPLER.NRLIB, where DOPLER is a constructor -abbreviation. The command )library DOPLER will then do the analysis and -database updates as above. +If you compiled a file you will have an NRLIB present, for example, +DOPLER.NRLIB, where DOPLER is a constructor abbreviation. The command +)library DOPLER will then do the analysis and database updates as above. To tell the system about all libraries in a directory, use )library )dir dirName where dirName is an explicit directory. You may specify ``.'' as the @@ -22672,7 +22527,7 @@ command in the interpreter. The current list is: Variable Description Current Value ----------------------------------------------------------------- -compiler Library compiler options ... +compile Library compiler options ... breakmode execute break processing on error break expose control interpreter constructor exposure ... functions some interpreter function options ... @@ -23123,7 +22978,7 @@ interpreter as parens are used for grouping expressions. (|on| |off|) |off|) @ -\section{compiler} +\section{compile} \begin{verbatim} Current Values of compiler Variables @@ -23131,31 +22986,27 @@ Variable Description Current Value ----------------------------------------------------------------- output library in which to place compiled code input controls libraries from which to load compiled code -args arguments for compiling AXIOM code - -O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete - -DAxiom -Y $AXIOM/algebra \end{verbatim} -<>= +<>= (|compiler| "Library compiler options" |interpreter| TREE |novar| ( -<> -<> -<> +<> +<> )) @ -\section{compiler output} +\section{compile output} \begin{verbatim} ---------------------- The output Option ---------------------- Description: library in which to place compiled code \end{verbatim} -<>= +<>= (|output| "library in which to place compiled code" |interpreter| @@ -23196,7 +23047,7 @@ args arguments for compiling AXIOM code (defun |describeOutputLibraryArgs| () "Describe the set output library arguments" (|sayBrightly| (list - '|%b| ")set compiler output library" + '|%b| ")set compile output library" '|%d| "is used to tell the compiler where to place" '|%l| "compiled code generated by the library compiler. By default it goes" '|%l| "in a file called" @@ -23220,19 +23071,19 @@ The input-libraries and output-library are now truename based. @ -\section{compiler input} +\section{compile input} \begin{verbatim} ---------------------- The input Option ----------------------- Description: controls libraries from which to load compiled code - )set compiler input add library is used to tell AXIOM to add + )set compile input add library is used to tell AXIOM to add library to the front of the path which determines where compiled code is loaded from. - )set compiler input drop library is used to tell AXIOM to remove + )set compile input drop library is used to tell AXIOM to remove library from this path. \end{verbatim} -<>= +<>= (|input| "controls libraries from which to load compiled code" |interpreter| @@ -23288,13 +23139,13 @@ The input-libraries is now maintained as a list of truenames. (defun |describeInputLibraryArgs| () "Describe the set input library arguments" (|sayBrightly| (list - '|%b| ")set compiler input add library" + '|%b| ")set compile input add library" '|%d| "is used to tell AXIOM to add" '|%b| "library" '|%d| "to" '|%l| "the front of the path used to find compile code." '|%l| - '|%b| ")set compiler input drop library" + '|%b| ")set compile input drop library" '|%d| "is used to tell AXIOM to remove" '|%b| "library" '|%d| @@ -23325,82 +23176,6 @@ The input-libraries variable is now maintained as a list of truenames. @ -\section{compiler args} -\begin{verbatim} ------------------------ The args Option ----------------------- - - Description: arguments for compiling AXIOM code - - )set compiler args is used to tell AXIOM how to invoke the - library compiler when compiling code for AXIOM. - The args option is followed by a string enclosed in double - quotes. - - The current setting is - "-O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete - -DAxiom -Y $AXIOM/algebra" -\end{verbatim} -\defdollar{asharpCmdlineFlags} -<>= -(defvar |$asharpCmdlineFlags| - "-O -Fasy -Fao -Flsp -laxiom -Mno-AXL__W__WillObsolete -DAxiom -Y $AXIOM/algebra" - "arguments for compiling AXIOM code") - -@ -<>= - (|args| - "arguments for compiling AXIOM code" - |interpreter| - FUNCTION - |setAsharpArgs| - (("enter compiler options " - STRING - |$asharpCmdlineFlags| - |chkDirectory| - "-O -Fasy -Fao -Flsp -laxiom -Mno-AXL__W__WillObsolete -DAxiom -Y $AXIOM/algebra")) - NIL) -@ - -\section{Variables Used} -\section{Functions} -\defunsec{setAsharpArgs}{Handle the set compiler command arguments} -\calls{setAsharpArgs}{describeAsharpArgs} -\usesdollar{setAsharpArgs}{asharpCmdlineFlags} -<>= -(defun |setAsharpArgs| (arg) - "Handle the set compiler command arguments" - (declare (special |$asharpCmdlineFlags|)) - (cond - ((eq arg '|%initialize%|) - (setq |$asharpCmdlineFlags| - "-O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -Y $AXIOM/algebra")) - ((eq arg '|%display%|) |$asharpCmdlineFlags|) - ((or (null arg) (eq arg '|%describe%|) (eq (car arg) '?)) - (|describeAsharpArgs|)) - (t (setq |$asharpCmdlineFlags| (car arg))))) - -@ - -\defunsec{describeAsharpArgs}{Describe the set compiler command arguments} -\calls{describeAsharpArgs}{sayBrightly} -\usesdollar{describeAsharpArgs}{asharpCmdlineFlags} -<>= -(defun |describeAsharpArgs| () - "Describe the set compiler command arguments" - (declare (special |$asharpCmdlineFlags|)) - (|sayBrightly| (list - '|%b| ")set compiler args " - '|%d| "is used to tell AXIOM how to invoke the library compiler " - '|%l| " when compiling code for AXIOM." - '|%l| " The args option is followed by a string enclosed in double quotes." - '|%l| - '|%l| " The current setting is" - '|%l| - '|%b| "\"" |$asharpCmdlineFlags| "\"" - '|%d|))) - -@ - \section{expose} \begin{verbatim} ---------------------- The expose Option ---------------------- @@ -25383,7 +25158,7 @@ recurrence specially compile recurrence relations on @ <>= - (|compile| + (|compiler| "compile, don't just define function bodies" |interpreter| LITERALS @@ -26196,7 +25971,7 @@ command: Variable Description Current Value ----------------------------------------------------------------- -fullscreen use full screen for this facility off +fullscreen use full screen for this facility off mathwidth screen width for history output 120 \end{verbatim} @@ -26270,7 +26045,7 @@ mathwidth screen width for history output 120 Variable Description Current Value ----------------------------------------------------------------- -fullscreen use fullscreen facility, if possible off +fullscreen use fullscreen facility, if possible on \end{verbatim} <>= @@ -26292,15 +26067,15 @@ fullscreen use fullscreen facility, if possible off The fullscreen option may be followed by any one of the following: - on - -> off + -> on + off The current setting is indicated. \end{verbatim} \defdollar{useFullScreenHelp} <>= -(defvar |$useFullScreenHelp| nil "use fullscreen facility, if possible") +(defvar |$useFullScreenHelp| t "use fullscreen facility, if possible") @ <>= @@ -26310,7 +26085,7 @@ fullscreen use fullscreen facility, if possible off LITERALS |$useFullScreenHelp| (|on| |off|) - |off|) + |on|) @ \section{history} \begin{verbatim} @@ -29316,7 +29091,7 @@ prettyprint prettyprint BOOT func's as they compile off <>= (defvar |$setOptions| '( <> -<> +<> <> <> <> @@ -35514,14 +35289,13 @@ running of the interpreter users can extend the system by do a to be read and hashed. \end{itemize} -In the old system each constructor (e.g. LIST) had one library directory -(e.g. LIST.nrlib). this directory contained a random access file called -the index.kaf file. the interpreter needed this kaf file at runtime for -two entries, the operationAlist and the ConstructorModemap. -During the redesign for the new compiler we decided to merge all of -these .nrlib/index.kaf files into one database, INTERP.daase. -requests to get information from this database are intended to be -cached so that multiple references do not cause additional disk i/o. +Each constructor (e.g. LIST) had one library directory (e.g. LIST.nrlib). +This directory contained a random access file called the index.kaf file. +These files contain runtime information such as the operationAlist and +the ConstructorModemap. At system build time we merge all of these +.nrlib/index.kaf files into one database, INTERP.daase. Requests to +get information from this database are cached so that multiple +references do not cause additional disk i/o. This database is left open at all times as it is used frequently by the interpreter. one minor complication is that newly compiled files @@ -40155,7 +39929,6 @@ This needs to work off the internal exposure list, not the file. <> <> <> -<> <> <> <> @@ -40998,7 +40771,6 @@ This needs to work off the internal exposure list, not the file. <> <> <> -<> <> <> <> diff --git a/books/bookvol7.1.pamphlet b/books/bookvol7.1.pamphlet index 28e3f31..db722e7 100644 --- a/books/bookvol7.1.pamphlet +++ b/books/bookvol7.1.pamphlet @@ -2718,8 +2718,6 @@ individual .ht files that are of a local nature. \newcommand{\SpadName}{\Language} \newcommand{\LangName}{\Language} \newcommand{\HyperName}{HyperDoc} -\newcommand{\axiomxl}{Aldor} -\newcommand{\anatural}{Aldor} \newcommand{\Clef}{Clef} \newcommand{\Lisp}{Common LISP} \newcommand{\naglib}{NAG Foundation Library} @@ -67498,7 +67496,6 @@ Appendices. {What's New for May 2008} No image here because the page changes every release. \pagefrom{Reference}{TopReferencePage} -\pageto{Aldor compiler - Enhancements and Additions}{ugTwoTwoAldorPage} \pageto{New polynomial domains and algorithms}{ugTwoTwoPolynomialsPage} \pageto{Enhancements to Hyperdoc...}{ugTwoTwoHyperdocPage} \pageto{Enhancements to NAGLink}{ugTwoTwoNAGLinkPage} @@ -67509,8 +67506,6 @@ No image here because the page changes every release. \beginscroll \beginmenu - \menudownlink{{0.1. Aldor compiler - Enhancements and Additions}} -{ugTwoTwoAldorPage} \menudownlink{{0.2. New polynomial domains and algorithms}} {ugTwoTwoPolynomialsPage} \menudownlink{{0.3. Enhancements to HyperDoc and Graphics}} @@ -67523,71 +67518,6 @@ No image here because the page changes every release. \end{page} @ -\pagetitle{ugTwoTwoAldorPage}{ug00.ht} -{Aldor compiler - Enhancements and Additions} -<>= -\begin{page}{ugTwoTwoAldorPage}{0.1. Aldor compiler - Enhancements and Additions} -\beginscroll - -Numerous bug fixes and improvements have been implemented in version -1.1.12 of Aldor which is included in this release. You may also -notice the name {\it Aldor} being used when referring to - -The format of {\bf .ao} files has changed somewhat so you need -to recompile your {\bf .as} source files. - -An updated User's Guide is included for on-line use. We provide -TeX {\bf .dvi} format (including hyper-references), Acrobat {\bf .pdf} -format, PostScript {\bf .ps} format and plain ASCII {bf .txt}. -An up-to-date {\bf .dvi} -viewer should be able to allow you to follow the cross-references. -These files can be found in -{\bf \env{AXIOM}/compiler/doc/axlugII.*}. - -An exception mechanism has been implemented. You can now throw and -catch exceptions which are fully-fledged domains that can carry information. -See Chapter 31 in the on-line guide for details. - -Support for linking with Fortran-77 code has been added. You can call -Fortran-77 code from {\it Aldor} and vice-versa. See Chapter 32 -in the on-line guide for details. - -The \spad{ref} keyword has been added. You must use \spad{_ref} to -enable use as an identifier. - -A generic configurable C compiler and linker driver i{\bf unicl} has been -implemented. You can now select C compiler and linker options with -greater ease and you can give names to specific configurations. -See Chapter 28 in the on-line guide for details. - -There is now support for accessing IEEE floating-point rounding modes -and exception flags. You must ensure however that your C compiler -and linker will respect the IEEE standard by enabling the appropriate -options through {\bf unicl}. -See BasicIeeeControlPackage (26.7) in the on-line guide. - -Special runtime libraries ({\bf libfoam-gmp.a}) have been prepared to -enable a drop-in replacement of Aldor's big-integer arithmetic with -the GNU gmp big-integer library. The executable script -{\bf axiomxl.gmp} (in the same place as {\bf axiomxl}) expects the -{\bf GmpDir} environment variable to be set to the directory where a -compiled GNU gmp library resides ({\bf libgmp.a}) and arranges for the -appropriate libraries to be linked in when generating a stand-alone -executable. - -The language-defined type TrailingArray has been introduced. See -TrailingArray (13.7) in the on-line guide. - -The supplied library {\bf libaxllib.al}, supporting stand-alone programs, -has been updated. Automatically -generated documentation can be found in Chapters 25 and 26 of the on-line -guide. - -\endscroll -\autobuttons -\end{page} - -@ \pagetitle{ugTwoTwoPolynomialsPage}{ug00.ht} {New polynomial domains and algorithms} <>= @@ -115870,8 +115800,6 @@ we describe many of the more important topics here. \beginmenu \menudownlink{{15.1. Important Things to Read First}} {ugWhatsNewImportantPage} -\menudownlink{{15.2. The New Axiom Library Compiler}} -{ugWhatsNewAsharpPage} \menudownlink{{15.3. The NAG Library Link}}{nagLinkIntroPage} \menudownlink{{15.4. Interactive Front-end and Language}} {ugWhatsNewLanguagePage} @@ -115908,33 +115836,6 @@ by recomputing in Release 2.0, please contact NAG for assistance. \end{page} @ -\pagetitle{ugWhatsNewAsharpPage}{ug15.ht}{The New Axiom Library Compiler} -<>= -\begin{page}{ugWhatsNewAsharpPage}{15.2. The New Axiom Library Compiler} -\beginscroll - -A new compiler is now available for Axiom. The programming language -is referred to as the Axiom Extension Language (or Aldor for short), -and improves upon the old Axiom language in many ways. The -\spadcmd{)compile} command has been upgraded to be able to invoke the -new or old compilers. The language and the compiler are described in -the hard-copy documentation which came with your Axiom system. - -To ease the chore of upgrading your {\it .spad} files (old compiler) -to {\it .as} files (new compiler), the \spadcmd{)compile} command has -been given a {\tt )translate} option. This invokes a special version -of the old compiler which parses and analyzes your old code and -produces augmented code using the new syntax. Please be aware that -the translation is not necessarily one hundred percent complete or -correct. You should attempt to compile the output with the Aldor -compiler and make any necessary corrections. - - -\endscroll -\autobuttons -\end{page} - -@ \pagetitle{nagLinkIntroPage}{ug15.ht}{The NAG Library Link} \pageto{notitle}{htxl1} \pageto{notitle}{nagDocumentationPage} @@ -117757,11 +117658,6 @@ Curly braces are now used to enclose a block (see section 5.2\ignore{ugLangBlocks} for more information). For compatibility, a block can still be enclosed by parentheses as well. -``Free functions'' created by the Aldor compiler can now be -loaded and used within the Axiom interpreter. A {\it free -function} is a library function that is implemented outside a -domain or category constructor. - New coercions to and from type \axiomType{Expression} have been added. For example, it is now possible to map a polynomial represented as an expression to an appropriate polynomial type. @@ -117972,15 +117868,6 @@ middle of the section \downlink{``Rules and Pattern Matching''}{ugUserRulesPage} in Section 6.21\ignore{ugUserRules} for details. -Documentation for the \spadcmd{)compile}, \spadcmd{)library} and -\spadcmd{)load} commands has been greatly changed. This reflects -the ability of the \spadcmd{)compile} to now invoke the Aldor -compiler, the impending deletion of the \spadcmd{)load} command -and the new \spadcmd{)library} command. -The \spadcmd{)library} command replaces \spadcmd{)load} and is -compatible with the compiled output from both the old and new -compilers. - \endscroll \autobuttons \end{page} @@ -118519,23 +118406,10 @@ system function and constructor caches. \begin{items} \item {\tt )compile} \item {\tt )compile {\it fileName}} -\item {\tt )compile {\it fileName}.as} -\item {\tt )compile {\it directory/fileName}.as} -\item {\tt )compile {\it fileName}.ao} -\item {\tt )compile {\it directory/fileName}.ao} -\item {\tt )compile {\it fileName}.al} -\item {\tt )compile {\it directory/fileName}.al} -\item {\tt )compile {\it fileName}.lsp} -\item {\tt )compile {\it directory/fileName}.lsp} \item {\tt )compile {\it fileName}.spad} \item {\tt )compile {\it directory/fileName}.spad} -\item {\tt )compile {\it fileName} )new} -\item {\tt )compile {\it fileName} )old} -\item {\tt )compile {\it fileName} )translate} \item {\tt )compile {\it fileName} )quiet} \item {\tt )compile {\it fileName} )noquiet} -\item {\tt )compile {\it fileName} )moreargs} -\item {\tt )compile {\it fileName} )onlyargs} \item {\tt )compile {\it fileName} )break} \item {\tt )compile {\it fileName} )nobreak} \item {\tt )compile {\it fileName} )library} @@ -118546,277 +118420,94 @@ system function and constructor caches. \par\noindent{\bf Command Description:} -You use this command to invoke the new Axiom library compiler or -the old Axiom system compiler. -The {\tt )compile} system command is actually a combination of -Axiom processing and a call to the Aldor compiler. -It is performing double-duty, acting as a front-end to -both the Aldor compiler and the old Axiom system -compiler. -(The old Axiom system compiler was written in Lisp and was -an integral part of the Axiom environment. -The Aldor compiler is written in C and executed by the operating system -when called from within Axiom.) - -The command compiles files with file extensions {\it .as, .ao} -and {\it .al} with the -Aldor compiler and files with file extension {\it .spad} with the -old Axiom system compiler. -It also can compile files with file extension {\it .lsp}. These -are assumed to be Lisp files genererated by the Aldor -compiler. -If you omit the file extension, the command looks to see if you -have specified the {\tt )new} or {\tt )old} option. -If you have given one of these options, the corresponding compiler -is used. -Otherwise, the command first looks in the standard system -directories for files with extension {\it .as, .ao} and {\it -.al} and then files with extension {\it .spad}. -The first file found has the appropriate compiler invoked on it. -If the command cannot find a matching file, an error message is -displayed and the command terminates. - -The {\tt )translate} option is used to invoke a special version -of the old system compiler that will translate a {\it .spad} file -to a {\it .as} file. That is, the {\it .spad} file will be parsed and -analyzed and a file using the new syntax will be created. By default, -the {\it .as} file is created in the same directory as the -{\it .spad} file. If that directory is not writable, the current -directory is used. If the current directory is not writable, an -error message is given and the command terminates. -Note that {\tt )translate} implies the {\tt )old} option so the -file extension can safely be omitted. If {\tt )translate} is -given, all other options are ignored. -Please be aware that the translation is not necessarily one -hundred percent complete or correct. -You should attempt to compile the output with the Aldor compiler -and make any necessary corrections. - -We now describe the options for the new Aldor compiler. - -The first thing {\tt )compile} does is look for a source code -filename among its arguments. -Thus -\begin{verbatim} -)compile mycode.as -)compile /u/jones/as/mycode.as -)compile mycode -\end{verbatim} -all invoke {\tt )compiler} on the file {\tt -/u/jones/as/mycode.as} if the current Axiom working -directory is {\tt /u/jones/as.} (Recall that you can set the -working directory via the {\tt )cd} command. If you don't set it -explicitly, it is the directory from which you started -Axiom.) - -This is frequently all you need to compile your file. -This simple command: -\indent{4} -\beginitems -\item[1. ] Invokes the Aldor compiler and produces Lisp output. -\item[2. ] Calls the Lisp compiler if the Aldor compilation was -successful. -\item[3. ] Uses the {\tt )library} command to tell Axiom about -the contents of your compiled file and arrange to have those -contents loaded on demand. -\enditems -\indent{0} - -Should you not want the {\tt )library} command automatically -invoked, call {\tt )compile} with the {\tt )nolibrary} option. -For example, -\begin{verbatim} -)compile mycode.as )nolibrary -\end{verbatim} - -The general description of Aldor command line arguments is in -the Aldor documentation. -The default options used by the {\tt )compile} command can be -viewed and set using the {\tt )set compiler args} Axiom -system command. -The current defaults are -\begin{verbatim} --O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -\end{verbatim} -These options mean: -\indent{4} -\beginitems -\item[-] {\tt -O}: perform all optimizations, -\item[-] {\tt -Fasy}: generate a {\tt .asy} file, -\item[-] {\tt -Fao}: generate a {\tt .ao} file, -\item[-] {\tt -Flsp}: generate a {\tt .lsp} (Lisp) -file, -\item[-] {\tt -laxiom}: use the {\tt axiom} library {\tt libaxiom.al}, -\item[-] {\tt -Mno-AXL\_W\_WillObsolete}: do not display messages -about older generated files becoming obsolete, and -\item[-] {\tt -DAxiom}: define the global assertion {\tt Axiom} -so that the Aldor libraries for generating stand-alone code -are not accidentally used with Axiom. -\enditems -\indent{0} - -To supplement these default arguments, use the {\tt )moreargs} option on -{\tt )compile.} -For example, -\begin{verbatim} -)compile mycode.as )moreargs "-v" -\end{verbatim} -uses the default arguments and appends the {\tt -v} (verbose) -argument flag. -The additional argument specification {\bf must be enclosed in -double quotes.} - -To completely replace these default arguments for a particular -use of {\tt )compile}, use the {\tt )onlyargs} option. -For example, -\begin{verbatim} -)compile mycode.as )onlyargs "-v -O" -\end{verbatim} -only uses the {\tt -v} (verbose) and {\tt -O} (optimize) -arguments. -The argument specification {\bf must be enclosed in double quotes.} -In this example, Lisp code is not produced and so the compilation -output will not be available to Axiom. - -To completely replace the default arguments for all calls to {\tt -)compile} within your Axiom session, use {\tt )set compiler args.} -For example, to use the above arguments for all compilations, issue -\begin{verbatim} -)set compiler args "-v -O" -\end{verbatim} -Make sure you include the necessary {\tt -l} and {\tt -Y} -arguments along with those needed for Lisp file creation. -As above, {\bf the argument specification must be enclosed in double -quotes.} - -By default, the {\tt )library} system command {\it exposes} all -domains and categories it processes. -This means that the Axiom intepreter will consider those -domains and categories when it is trying to resolve a reference -to a function. -Sometimes domains and categories should not be exposed. -For example, a domain may just be used privately by another -domain and may not be meant for top-level use. -The {\tt )library} command should still be used, though, so that -the code will be loaded on demand. -In this case, you should use the {\tt )nolibrary} option on {\tt -)compile} and the {\tt )noexpose} option in the {\tt )library} -command. For example, -\begin{verbatim} -)compile mycode.as )nolibrary +You use this command to invoke the Axiom library compiler. This +compiles files with file extension {\tt .spad} with the Axiom system +compiler. The command first looks in the standard system directories +for files with extension {\tt .spad}. + +Should you not want the {\tt )library} command automatically invoked, +call {\tt )compile} with the {\tt )nolibrary} option. For example, +\begin{verbatim} +)compile mycode )nolibrary +\end{verbatim} +By default, the {\tt )library} system command exposes all domains and +categories it processes. This means that the Axiom intepreter will consider +those domains and categories when it is trying to resolve a reference to a +function. +Sometimes domains and categories should not be exposed. For example, a domain +may just be used privately by another domain and may not be meant for +top-level use. The {\tt )library} command should still be used, though, so +that the code will be loaded on demand. In this case, you should use the +{\tt )nolibrary} option on {\tt )compile} and the {\tt )noexpose} option in +the {\tt )library} command. For +example, +\begin{verbatim} +)compile mycode.spad )nolibrary )library mycode )noexpose -\end{verbatim} - -Once you have established your own collection of compiled code, -you may find it handy to use the {\tt )dir} option on the -{\tt )library} command. -This causes {\tt )library} to process all compiled code in the -specified directory. For example, -\begin{verbatim} -)library )dir /u/jones/as/quantum -\end{verbatim} -You must give an explicit directory after {\tt )dir}, even if you -want all compiled code in the current working directory -processed, e.g. -\begin{verbatim} +\end{verbatim} +Once you have established your own collection of compiled code, you may find +it handy to use the )dir option on the )library command. This causes )library +to process all compiled code in the specified directory. For example, +\begin{verbatim} +)library )dir /u/jones/quantum +\end{verbatim} +You must give an explicit directory after )dir, even if you want all compiled +code in the current working directory processed. +\begin{verbatim} )library )dir . -\end{verbatim} - -The {\tt )compile} command works with several file extensions. We saw -above what happens when it is invoked on a file with extension {\tt -.as.} A {\tt .ao} file is a portable binary compiled version of a -{\tt .as} file, and {\tt )compile} simply passes the {\tt .ao} file -onto Aldor. The generated Lisp file is compiled and {\tt )library} -is automatically called, just as if you had specified a {\tt .as} file. - -A {\tt .al} file is an archive file containing {\tt .ao} files. The -archive is created (on Unix systems) with the {\tt ar} program. When -{\tt )compile} is given a {\tt .al} file, it creates a directory whose -name is based on that of the archive. For example, if you issue -\begin{verbatim} -)compile mylib.al -\end{verbatim} -the directory {\tt mylib.axldir} is created. All -members of the archive are unarchived into the -directory and {\tt )compile} is called on each {\tt .ao} file found. It -is your responsibility to remove the directory and its contents, if you -choose to do so. - -A {\tt .lsp} file is a Lisp source file, presumably, in our context, -generated by Aldor when called with the {\tt -Flsp} option. When -{\tt )compile} is used with a {\tt .lsp} file, the Lisp file is -compiled and {\tt )library} is called. You must also have present a -{\tt .asy} generated from the same source file. - -The following are descriptions of options for the old system compiler. - -You can compile category, domain, and package constructors -contained in files with file extension {\it .spad}. -You can compile individual constructors or every constructor -in a file. - -The full filename is remembered between invocations of this command and -{\tt )edit} commands. -The sequence of commands -\begin{verbatim} +\end{verbatim} +You can compile category, domain, and package constructors contained in files +with file extension {\tt .spad}. You can compile individual constructors or +every constructor in a file. + +The full filename is remembered between invocations of this command and +{\tt )edit} commands. The sequence of commands +\begin{verbatim} )compile matrix.spad )edit )compile -\end{verbatim} -will call the compiler, edit, and then call the compiler again on the -file {\bf matrix.spad.} If you do not specify a {\it directory,} the -working current directory (see -\downlink{``)cd''}{ugSysCmdcdPage} in Section -B.4\ignore{ugSysCmdcd}) is searched for the file. If -the file is not found, the standard system directories are searched. - -If you do not give any options, all constructors within a file are -compiled. Each constructor should have an {\tt )abbreviation} command -in the file in which it is defined. We suggest that you place the -{\tt )abbreviation} commands at the top of the file in the order in -which the constructors are defined. The list of commands serves as a -table of contents for the file. - -The {\tt )library} option causes directories containing the compiled -code for each constructor to be created in the working current -directory. The name of such a directory consists of the constructor -abbreviation and the {\bf .nrlib} file extension. For example, the -directory containing the compiled code for the \axiomType{MATRIX} -constructor is called {\bf MATRIX.nrlib.} The {\tt )nolibrary} option -says that such files should not be created. The default is {\tt -)library.} Note that the semantics of {\tt )library} and {\tt -)nolibrary} for the new Aldor compiler and for the old system -compiler are completely different. - -The {\tt )vartrace} option causes the compiler to generate extra code -for the constructor to support conditional tracing of variable -assignments. (see -\downlink{``)trace''}{ugSysCmdtracePage} in Section -B.26\ignore{ugSysCmdtrace}). Without this option, this -code is suppressed and one cannot use the {\tt )vars} option for the -trace command. - -The {\tt )constructor} option is used to -specify a particular constructor to compile. -All other constructors in the file are ignored. -The constructor name or abbreviation follows {\tt )constructor.} -Thus either -\begin{verbatim} +\end{verbatim} +will call the compiler, edit, and then call the compiler again on the file +matrix.spad. If you do not specify a directory, the working current directory +(see description of command )cd ) is searched for the file. If the file is +not found, the standard system directories are searched. + +If you do not give any options, all constructors within a file are compiled. +Each constructor should have an {\tt )abbreviation} command in the file in +which it is defined. We suggest that you place the {\tt )abbreviation} +commands at the top of the file in the order in which the constructors are +defined. The list of commands serves as a table of contents for the file. + +The {\tt )library} option causes directories containing the compiled code +for each constructor to be created in the working current directory. The +name of such a directory consists of the constructor abbreviation and the +{\tt .nrlib} file extension. For example, the directory containing the +compiled code for the {\tt MATRIX} constructor is called {\bf MATRIX.nrlib}. +The {\tt )nolibrary} option says that such files should not be created. + +The {\tt )vartrace} option causes the compiler to generate extra code for the +constructor to support conditional tracing of variable assignments. +Without this option, this code is suppressed +and one cannot use the )vars option for the trace command. + +The {\tt )constructor} option is used to specify a particular constructor to +compile. All other constructors in the file are ignored. The constructor name +or abbreviation follows {\tt )constructor}. Thus either + +\begin{verbatim} )compile matrix.spad )constructor RectangularMatrix \end{verbatim} or -\begin{verbatim} +\begin{verbatim} )compile matrix.spad )constructor RMATRIX \end{verbatim} -compiles the \axiomType{RectangularMatrix} constructor -defined in {\bf matrix.spad.} - -The {\tt )break} and {\tt )nobreak} options determine what the old -system compiler does when it encounters an error. {\tt )break} is the -default and it indicates that processing should stop at the first -error. The value of the {\tt )set break} variable then controls what -happens. - +compiles the {\tt RectangularMatrix} constructor defined in {\bf matrix.spad}. + +The {\tt )break} and {\tt )nobreak} options determine what the compiler does +when it encounters an error. {\tt )break} is the default and it indicates that +processing should stop at the first error. The value of the {\tt )set break} +variable then controls what happens. + \par\noindent{\bf Also See:} \downlink{``)abbreviation''}{ugSysCmdabbreviationPage} in section B.2 \downlink{``)edit''}{ugSysCmdeditPage} in section B.9 @@ -188642,7 +188333,6 @@ RootPage TopReferencePage YouTriedIt ugWhatsNewTwoTwoPage - ugTwoTwoAldorPage ugTwoTwoPolynomialsPage ugTwoTwoHyperdocPage ugTwoTwoNAGLinkPage diff --git a/changelog b/changelog index 776f2e5..c31c420 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,9 @@ +20100924 tpd src/axiom-website/patches.html 20100924.01.tpd.patch +20100924 tpd src/algebra/Makefile remove references to aldor +20100924 tpd books/bookvol7.1 remove references to aldor +20100924 tpd books/bookvol5 remove references to aldor +20100924 tpd books/bookvol1 remove references to aldor +20100924 tpd books/bookvol0 remove references to aldor 20100920 tpd src/axiom-website/patches.html 20100920.02.tpd.patch 20100920 tpd books/bookvolbib add Hamdy [Ham04] 20100920 tpd books/bookvol10.4 update Chinese Remainder documentation diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index 698dbff..e1bcea8 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -17178,12 +17178,15 @@ Axiom supports a )help command that takes a single argument. This argument is interpreted as the name of a flat ascii file which should live in \$AXIOM/doc/src/spadhelp. +To add a new syntax help file, add the name of the chunk to this list +and add the appropriate chunk to book volume 5. + <>= SYNTAXHELP=\ abbreviations.help assignment.help blocks.help boot.help \ browse.help cd.help clear.help clef.help \ -close.help collection.help compiler.help copyright.help \ +close.help collection.help compile.help copyright.help \ display.help describe.help edit.help fin.help \ for.help frame.help help.help history.help \ if.help include.help iterate.help leave.help \ diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 8b5af8c..5f57d12 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3135,5 +3135,7 @@ books/bookvol9 treeshake compiler
src/input/*.input clean up broken tests
20100920.02.tpd.patch books/bookvol10.4 update Chinese Remainder documentation
+20100924.01.tpd.patch +books/bookvol5 remove references to aldor