prolog
-- Quintus Prolog Development Systemprolog [ +f ] [ +l file ] [ +L file ] [ +p [path-name] ] [ +P [path-name] ] [+tty ] [ +z user's-arguments | + [emacs-arguments] ]
qpwin [ +f ] [ +l file ] [ +L file ] [ +p [path-name] ] [ +P [path-name] ] [+tty ] [ +z user's-arguments | + [emacs-arguments] ]
prolog
is the command to invoke the Quintus Prolog Development
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.
Under Windows, prolog.exe
is a console-based
program that can run in a command prompt window, whereas qpwin.exe
runs in its own window and directs the Prolog standard streams to that
window. qpwin.exe
is a "windowed" executable; see
sap-srs-qld-iin.
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 to the command
interpreter. 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.
Under UNIX,
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.
Under Windows,
prolog
locates its libraries under the directory
quintus-directory
/src
.
prolog
searches the system dependent
foreign object files in directories based on host-type.
Quintus Prolog Development System can be linked with other
Quintus products, and user's application programs. For more
detail, see qld(1)
, qpc(1)
, and the add-on products QUI, ProXT,
and ProXL, which are shipped with Quintus Prolog.
Any argument that 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
+
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
.
+f
prolog.ini
will
not be read upon startup.
+l
file
file
, ~/prolog/file.pl
) or as a file search path specification
(e.g. 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
+l
but the user's
environment variable PATH
will be searched for the specified file.
+p [
path-name]
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]
+p
, but the absolutized versions of
the file search path definitions are printed.
+tty
+z
user's-arguments
+z
are taken as
user's arguments. User's arguments can then be obtained through
unix(argv(ListOfArgs))
.
}
PAGER
more
or pg
depending on the host operating system.
PATH
QUINTUS_LISP_PATH
quintus-directory/editor
quintus-version/gnu
.
QUINTUS_EDITOR_PATH
emacs
is looked for in your path.
SHELL
unix(shell)
and unix(shell(
command))
.
file.pl
file.qof
prolog.ini
/tmp/qp*
quintus-directory/license
quintus-version
qgetpath(1)
, qld(1)
, qpc(1)
,
qsetpath(1)
, unix/1
, QP_initialize()
ref-pro