prolog(1)
NAME
prolog - Quintus Prolog Development System
SYNOPSIS
prolog [ +f ] [ +l file ] [ +L file ]
[ +p [path-name] ] [ +P [path-name] ] [+tty ]
[ +z user’s-arguments | + [emacs-arguments] ]
DESCRIPTION
prolog is the command to invoke the Quintus Prolog Develop- ment System. The prompt | ?- indicates that the execution of Quintus Prolog Development System is in top-level mode. In this mode, Prolog queries may be issued and executed interactively. A program written in the Prolog programming language can be compiled during the execution of prolog as additional information for subsequent execution. The Prolog command halt/[0,1] is used to exit from prolog; under the GNU Emacs editor, exit is ^X^C.
Compiled programs can be saved into a file as a saved-state. The file can be restored either through Quintus Prolog built-in restore command or issued as a command the under Unix shell. The Unix command head -1 saved-state displays how the saved-state file is restored in the latter case. The saved-state file can also be passed to qld(1) to be linked into an executable program.
prolog depends on preset paths to locate the license files, Prolog libraries, system-dependent foreign object files, and certain executables. There are three main paths, <quintus-directory>, <runtime-directory> and <host-type>, which are set during the installation of the Quintus Prolog Development System. The paths can be checked with qgetpath(1), and changed with qsetpath(1). Upon startup, prolog checks the files in <quintus-directory>/license<quintus-version> for authorization of execution. prolog locates its libraries under the directory <quintus-directory>/generic/qplib<quintus-version> where <quintus-version> is the Quintus Prolog release number built into the executables. prolog searches the system dependent foreign object files in directories based on <host-type>. The default Emacs editor is located under <quintus-directory>/bin<quintus-version>/<host-type>.
Quintus Prolog Development System can be linked with other Quintus products, and user’s application programs. For mre detail, see qld(1), qpc(1), and the add-on products QUI, ProXT, and ProXL which are shipped with Quintus Prolog.
OPTIONS
Any argument which does not match options described in this section and does not start with a + is regarded as a user’s argument. The user’s arguments may be obtained using the prolog command unix(argv(ListOfArgs)). If a user’s argument needs to begin with a +, it should be issued as ++ instead or given after the +z option. Double pluses will be translated into a single plus, so the user’s code will not see the ++. Arguments beginning with + are reserved for prolog, and an unrecognized argument starting with a + is treated as an error.
+ emacs-arguments
Invoke Quintus Prolog with the Emacs interface. Any arguments following + are taken as arguments to the Emacs editor. If the environment variable QUINTUS_EDITOR_PATH is set then that Emacs invoked. Otherwise, by default, GNU emacs is assumed to be in the path as "emacs".
+fFast start. The initialization file $HOME/prolog.ini will not be read upon startup.
+l fileLoad the specified file upon startup. file can be a Prolog or a QOF file, and it may be specified either as a string (eg. ’file’, ’~/prolog/file.pl) or as a file search path specification (eg. ’library(file)’, ’home(language(file))’). Note, however, that the latter needs to be quoted to escape the shell interpretation of the parentheses. Giving the extension is not necessary; if both source (.pl) and QOF (.qof) files exist, the more recent of the two will be loaded.
+L file
Similar to +l but the user’s environment variable PATH will be searched for the specified file.
+p [path-name]
Print the Prolog file search path definitions that begin with the string path-name (eg. library if "+p lib" is specified); path-name is optional, and if not given, all file search path definitions are printed; prolog exits after producing the required output to stdout.
+P [path-name]
Similar to +p, but the absolutized versions of the file search path definitions are printed.
+ttyForce the three standard stream associated with a Prolog process to act as tty streams. A tty stream is usually line buffered and handles prompt automatically.
+z user’s-arguments
Any arguments following +z are taken as user’s arguments. User’s arguments can then be obtained through unix(argv(ListOfArgs)).
ENVIRONMENT
HOME
Login home directory of user.
PAGER
A program to use for interactively delivering the help-system’s output to the screen. The default is either more or pg depending on the host operating system.
PATHDirectories to search for the executables and saved-states.
QUINTUS_LISP_PATH
Full pathname for the emacslisp directories. The default is: <quintus-directory>/editor3.2/gnu.
QUINTUS_EDITOR_PATH
Full pathname of the GNU Emacs executable. By default the command "emacs" is looked for in your path.
SHELL
Default shell interpreter to be used for Prolog commands unix(shell) and unix(shell(<command>)).
FILES
file.plProlog source file
file.qof
Quintus Object File (QOF) files
$HOME/prolog.ini
Quintus Prolog initialization file
/tmp/qp∗
Temporary files for loading foreign object files and for Emacs editor interface.
<quintus-directory>/license<quintus-version>
Location of license files
SEE ALSO
qgetpath(1), qld(1), qpc(1), qsetpath(1), unix/1, QP_initialize()
Quintus Prolog 3.1 — Last change: August 1994