qpc-- Quintus Prolog compiler
qpc [-cvhDHMN] [-o output] [-i initialization-file] [ -L library-directory ] [ -a quintus-product ] [ -f path-name:path-spec ] [ -F path-name:path-spec ] [ -p path-name ] filename ... [ -QLD qld-options ]
qpc compiles the specified
Prolog files into QOF (Quintus Object Format) files. It then invokes
qld(1) to link them together and produce an executable image (unless
-c option is given). The QOF
files are not deleted after processing terminates.
Each filename must be the name of a valid Prolog source file or a QOF
file. Either absolute or relative filenames may be specified. If
filename does not name an existing file, and if it does not already
have an extension, then
.qof extensions are sought in that
File names may be specified as simple paths (e.g.
or as file search paths of the form
In the latter case, the path specification must be quoted to escape
the shell's interpretation of the parentheses.
-o option is given, the name of the output file is the name
of the input file with the trailing
.pl, if any, replaced by
If the input filename does not have a
.pl extension, then a
extension is appended. The argument to
-o may also be specified the file
search path form (see above).
Source files specified on the
qpc command line are always recompiled
even if the corresponding QOF files are up to date (unless the
switch is specified). QOF files, on the other hand, are only
recompiled if they are out of date compared to the corresponding
All the "dependencies" of a file, that is all the files named in
embedded load commands in that file (or in its source if it is a QOF
file), are checked to ensure that they are up-to-date, and they are
recompiled if necessary. This checking and recompiling of
dependencies can be disabled using the
A filename of
- can be used to specify that Prolog source code is to
be read from the standard input. The corresponding QOF file will be
Command line options may alter the above behavior as indicated
below. Unrecognized options and their arguments, if any, are passed
qld(1). Furthermore, the arguments following a
-QLD option are
not processed by
qpc but are passed to
qld(1). Note also that the
command line is parsed from left to right. This will affect how the
file search path or library directory definitions are added
-a options are used.
-Lswitches. Note that the libraries shipped with Quintus Prolog (
proxl) are automatically available in the system, and, therefore, require no
-Loption, but path-name:path-spec defines a general file search, which instructs
qpcto look for a file in directory path-spec whenever a file specification of the form path-name(file-spec) is encountered (in embedded load commands, in QOF file dependencies, or on the command line). The path-name and the directory, path-spec, are separated by
:, and, therefore, path-name cannot contain a colon. If path-spec is given in the file search path form (as in
library:mylib(library)), then the argument must be quoted to escape the shell's interpretation of the parentheses. path-spec may be
.or null, in which case
There may be a list of path definitions (i.e.
-F options) for the same
qpc searches the list, just like Prolog, whenever it needs to
expand a file search path specification. The
-f options appends (like
assertz in Prolog) the new path to the end of the list of
paths for path-name, while
-F prepends (like asserta in Prolog).
File search paths may also be defined using asserts in the Prolog source
being compiled or in initializaiton files (see
-a options given on the
line, and file_search_path and library_directory definitions asserted
in source files or initialization files, are passed on to
.pl) or QOF (
.qof) file. Currently, source files cannot load foreign code; in other words, they cannot contain calls to
load_foreign_executable/1. The definitions in the initialization file apply during the compilation of all files specified to the right of the
-iswitch on the command line. The definitions in the initialization file apply only during compile time. Therefore, no QOF file is generated from an initialization file and its content is not included in any of the generated QOF files. The initialization file may be specified in the file search path form (eg.
-coption, the qof file will be produced into the given file. In this case, there may be several
-ooptions for each qof file. If the
-onames a directory, all qof files will be placed in the given directory. If the
-coption is not used, the
-ois passed onto
qld(1)along with its argument, asking
qld(1)to print out the file search definition for path-name.
qpcechoes its activities, including the call to
qld(1), to the standard output. This flag is also passed on to
qld(1)indicating that the Quintus Development System should be linked in.
-f, but the path is added at the front of the list of paths for path-name. Note that
-F library:library-directoryis identical to
-hbut in this case the hiding (locking) is done also to any files that are compiled because of embedded load commands in the file.
)encountered in embedded load commands are searched for in the library search paths. The initial search paths are the same as in the Development System (see
prolog(1)). Additional directories may be prepended to the list of library search paths with this option. Note that the command line is parsed from left to right. Also note that the
-Lmust be followed by a space; otherwise,
qpcassumes that the option specifies a library directory for
Library directories may also be specified with the
library-directory may be a path to a directory (e.g.
~/dir) or a
file search path specification of the form
mylib(library). In the latter
case, the path-name
mylib must be defined either in the Prolog source
code being compiled or by