REDUCE

19.2 Fast Loading Code Generation Program

In most versions of REDUCE, it is possible to take any set of Lisp, Rlisp or REDUCE commands and build a fast loading version of them. In Rlisp or REDUCE, one does the following:

         faslout <filename>;  
         <commands or IN statements>  
         faslend;

To load such a file, one uses the command LOAD, e.g. load foo; or load foo,bah;

This process produces a fast-loading version of the original file. In some implementations, this means another file is created with the same name but a different extension. For example, in PSL-based systems, the extension is b (for binary). In CSL-based systems, however, this process adds the fast-loading code to a single file in which all such code is stored. Particular functions are provided by CSL for managing this file, and described in the CSL user documentation.

In doing this build, as with the production of a Standard Lisp form of such statements, it is important to remember that some of the commands must be instantiated during the building process. For example, macros must be expanded, and some property list operations must happen. The REDUCE sources should be consulted for further details on this.

To avoid excessive printout, input statements should be followed by a $ instead of the semicolon. With LOAD however, the input doesn’t print out regardless of which terminator is used with the command.

If you subsequently change the source files used in producing a fast loading file, don’t forget to repeat the above process in order to update the fast loading file correspondingly. Remember also that the text which is read in during the creation of the fast load file, in the compiling process described above, is not stored in your REDUCE environment, but only translated and output. If you want to use the file just created, you must then use LOAD to load the output of the fast-loading file generation program.

When the file to be loaded contains a complete package for a given application, LOAD_PACKAGE rather than LOAD should be used. The syntax is the same. However, LOAD_PACKAGE does some additional bookkeeping such as recording that this package has now been loaded, that is required for the correct operation of the system.