SWI(1) SWI(1)
September 3rd 1993
NAME
PL - SWI-Prolog
SYNOPSIS
PL [-help]
PL [options]
PL [options] [-o output] -c file ...
PL [options] [-o output] -b file ...
DESCRIPTION
SWI-Prolog is an implementation of Prolog in the Edinburgh tradition.
It is based on a restricted form of the WAM (RISC-WAM?). It has a good
collection of built-in predicates, a large set of which it shares with
C-Prolog, Quintus Prolog and SICStus Prolog. It has a fairly good
performance, with a fast compiler. It includes a Quintus-like module
system, a library autoload facility, a garbage collector, on-line
help, a trasparent and fast C interface (in both directions), and a
profiler.
Options
-help
Gives a summary of the usage of this command.
-Asize
Give the argument stack size on K bytes (default 5K). For
machines with dynamic stack allocation, the default is 1M. See -L
for more details.
-Gsize
Give the global stack size on K bytes (default 100K). For
machines with dynamic stack allocation, the default is 4M. See -L
for more details.
-Lsize
Give the local stack size on K bytes (default 200K). Note that
there is no space between the size option and its argument. For
machines with dynamic stack allocation, this flag sets the
maximum value to which the stack is allowed to grow (default 2M).
A maximum is useful to prevent buggy programs from claiming all
the memory resources. -L0 sets the limit to the highest possible
value.
-O Optimised compilation. See please/3 in the SWI-Prolog Reference
Manual.
-Tsize
Give the trail stack size on K bytes (default 50K). For machines
with dynamic stack allocation, the default is 4M. See -L for more
details.
- 1 - Formatted: October 26, 2025
SWI(1) SWI(1)
September 3rd 1993
-b initfile ... -c file ...
Boot compilation. initfile ... are compiled by the C written
bootstrap compiler, file ... by the normal Prolog compiler into
an intermediate code file. This option is for system maintenance
and is given for reference only.
-c file ...
Compiles file ... into an intermediate code file.
-d level
Set debug level to level. This option is for system maintenance
and is given for reference only.
-f file
Use file as initialisation file instead of `.PLrc'. `-f none'
stops SWI-Prolog from searching for an initialisation file.
-g goal
Goal is executed just before entering the top level. The default
is a predicate which prints the welcome message. The welcome
message can thus be supressed by giving -g true. goal can be a
complex term. In this case, quotes are normally needed to protect
it from being expanded by the Unix shell.
-o output
Used in combination with -b or -c to determine the output file
for compilation.
-t goal
Use goal as an interactive top level instead of the default goal
prolog/0. goal can be a complex term. If the top level goal
succeeds, SWI-Prolog exits with status 0. If it fails, the exit
status is 1. This flag also determines the goal started by
break/0and abort/0. If you want to stop the user from entering
interactive mode, start the application with `-g goal' and give
`halt' as the top level.
-xstate
Load from an intermediate code file resulting from a Prolog
compilation using the -b or -c option.
+/-tty
Switches tty control (using ioctl(2)) on (+tty) or off (-tty).
Normally tty control is switched on. This default depends on the
installation. You may wish to switch tty control off if SWI-
Prolog is used from an editor such as GNU EMACS. If switched off,
get_single_char/1 and the tracer will wait for a carriage return.
On-line Help
SWI-Prolog has on-line help. This provides a fast lookup and browsing
facility to the SWI-Prolog Reference manual. The on-line manual can
- 2 - Formatted: October 26, 2025
SWI(1) SWI(1)
September 3rd 1993
show predicate definitions as well as entire sections of the manual.
help Equivalent to help(help/1).
help(+What)
Show a specified part of the manual. What is one of:
Name/Arity
give help on the specified predicate
Name give help on the named predicate with any arity or a C
interface function with that name.
Section
display the specified section of the SWI-Prolog Reference
Manual. Section numbers are dash separated numbers: e.g.
2-3 refers to section 2-3 of the manual.
SEE ALSO
Jan Wielemaker SWI-Prolog 1.6 Reference Manual, University of
Amsterdam, Dept. of Social Science and Informatics (SWI).
W. F. Clocksin & C. S. Mellish, Programming in Prolog, third edition,
Springer Verlag, Berlin 1987.
COPYRIGHT
Copyright (C) 1991, 1992, Jan Wielemaker
AUTHOR
Jan Wielemaker
- 3 - Formatted: October 26, 2025