|Did you know ...||Search Documentation:|
|Title for pldoc(object(section(2,'2.4',swi('/doc/Manual/cmdline.html'))))|
SWI-Prolog can be executed in one of the following modes:
swipl[option ...] script-file [arg ...]
#!/path/to/executable[option ...] is executed. Arguments after the script file are made available in the Prolog flag argv.
swipl[option ...] prolog-file ... [[
--] arg ...]
.prologor (on Windows) the user preferred extension registered during installation), these files are loaded. The first file is registered in the Prolog flag associated_file. In addition, pl-win[.exe] switches to the directory in which this primary source file is located using working_directory/2.
swipl-o output -c prolog-file ...
swipl-o output -b bootfile prolog-file ...
eval `swipl --dump-runtime-variables` cc -I$PLBASE/include -L$PLBASE/lib/$PLARCH ...
The option can be followed by
=sh to dump in POSIX shell
format (default) or
=cmd to dump in MS-Windows cmd.exe
silent, suppressing informational and banner messages. Also available as -q.
false. See section 220.127.116.11 for details. Note that the handler to unblock system calls is still installed. This can be prevented using
--sigalert=0additionally. See --sigalert.
http://localhost:port. If port is specified, the server is started at the given port and the browser is not launched.
SIGUSR2. If NUM is 0 (zero), this handler is not installed. See prolog_alert_signal/2 to query or modify this value at runtime.
...\My Documents\Prologor local equivalent thereof (see win_folder/2). The
Prologsubdirectory is created if it does not exist.
swipl.ini(Windows). `-f none' stops SWI-Prolog from searching for a startup file. This option can be used as an alternative to -s file that stops Prolog from loading the personal initialisation file. See also section 2.2.
<script>.rc. The default script name is deduced from the executable, taking the leading alphanumerical characters (letters, digits and underscore) from the program name. -F none stops looking for a script. Intended for simple management of slightly different versions. One could, for example, write a script
iso.rcand then select ISO compatibility mode using
pl -F isoor make a link from iso-pl to pl.
. On other systems it is
. A value is either a term of the form alias(value) or pathname. The computed aliases are added to file_search_path/2 using asserta/1, so they precede predefined values for the alias. See file_search_path/2 for details on using this file location mechanism.
The default limit for the Prolog stacks is 128 MB on 32-bit and 256 MB on 64-bit hardware. The 128 MB limit on 32-bit systems is the highest possible value and the command line options can thus only be used to lower the limit. On 64-bit systems, the limit can both be reduced and enlarged. See section 2.20. Below are two examples, the first reducing the local stack limit to catch unbounded recursion quickly and the second using a big (32 GB) global limit, which is only possible on 64-bit hardware. Note that setting the limit using the command line only sets a soft limit. Stack parameters can be changed (both reduced and enlarged) at any time using the predicate set_prolog_stack/2.
$ swipl -L8m $ swipl -G32g
% swipl <options> -g go -g halt
The following options are for system maintenance. They are given for reference only.
-DO_DEBUGflag. System maintenance only.