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] ]
     
     qpwin [ +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 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/licensequintus-version for authorization of execution. Under UNIX, prolog locates its libraries under the directory quintus-directory/generic/qplibquintus-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.

Options

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
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.
+f
Fast start. The initialization file prolog.ini will not be read upon startup.
+l file
Load the specified file upon startup. file can be a Prolog or a QOF file, and it may be specified either as a string (e.g. 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
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 (e.g. 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.
+tty
Force 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

}

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.
PATH
Directories to search for the executables and saved-states.
QUINTUS_LISP_PATH
Absolute filename for the Emacs-Lisp directories. The default is: quintus-directory/editorquintus-version/gnu.
QUINTUS_EDITOR_PATH
Absolute filename 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.pl
Prolog source file
file.qof
Quintus Object File (QOF) files
prolog.ini
Quintus Prolog initialization file, looked up in the home directory
/tmp/qp*
Temporary files for loading foreign object files and for Emacs editor interface
quintus-directory/licensequintus-version
Location of license files

See Also

qgetpath(1), qld(1), qpc(1), qsetpath(1), unix/1, QP_initialize() ref-pro