/usr/lib/swi-prolog/doc/Manual/cmdline.html is in swi-prolog-nox 5.10.4-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>SWI-Prolog 5.11.18 Reference Manual: Section 2.4</TITLE><LINK REL=home HREF="index.html">
<LINK REL=contents HREF="Contents.html">
<LINK REL=index HREF="DocIndex.html">
<LINK REL=summary HREF="summary.html">
<LINK REL=previous HREF="initgoal.html">
<LINK REL=next HREF="gemacs.html">
<STYLE type="text/css">
/* Style sheet for SWI-Prolog latex2html
*/
dd.defbody
{ margin-bottom: 1em;
}
dt.pubdef
{ background-color: #c5e1ff;
}
dt.multidef
{ background-color: #c8ffc7;
}
.bib dd
{ margin-bottom: 1em;
}
.bib dt
{ float: left;
margin-right: 1.3ex;
}
pre.code
{ margin-left: 1.5em;
margin-right: 1.5em;
border: 1px dotted;
padding-top: 5px;
padding-left: 5px;
padding-bottom: 5px;
background-color: #f8f8f8;
}
div.navigate
{ text-align: center;
background-color: #f0f0f0;
border: 1px dotted;
padding: 5px;
}
div.title
{ text-align: center;
padding-bottom: 1em;
font-size: 200%;
font-weight: bold;
}
div.author
{ text-align: center;
font-style: italic;
}
div.abstract
{ margin-top: 2em;
background-color: #f0f0f0;
border: 1px dotted;
padding: 5px;
margin-left: 10%; margin-right:10%;
}
div.abstract-title
{ text-align: center;
padding: 5px;
font-size: 120%;
font-weight: bold;
}
div.toc-h1
{ font-size: 200%;
font-weight: bold;
}
div.toc-h2
{ font-size: 120%;
font-weight: bold;
margin-left: 2em;
}
div.toc-h3
{ font-size: 100%;
font-weight: bold;
margin-left: 4em;
}
div.toc-h4
{ font-size: 100%;
margin-left: 6em;
}
span.sec-nr
{
}
span.sec-title
{
}
span.pred-ext
{ font-weight: bold;
}
span.pred-tag
{ float: right;
padding-top: 0.2em;
font-size: 80%;
font-style: italic;
color: #202020;
}
/* Footnotes */
sup.fn { color: blue; text-decoration: underline; }
span.fn-text { display: none; }
sup.fn span {display: none;}
sup:hover span
{ display: block !important;
position: absolute; top: auto; left: auto; width: 80%;
color: #000; background: white;
border: 2px solid;
padding: 5px; margin: 10px; z-index: 100;
font-size: smaller;
}
</STYLE>
</HEAD>
<BODY BGCOLOR="white">
<DIV class="navigate"><A class="nav" href="index.html"><IMG SRC="home.gif" BORDER=0 ALT="Home"></A>
<A class="nav" href="Contents.html"><IMG SRC="index.gif" BORDER=0 ALT="Contents"></A>
<A class="nav" href="DocIndex.html"><IMG SRC="yellow_pages.gif" BORDER=0 ALT="Index"></A>
<A class="nav" href="summary.html"><IMG SRC="info.gif" BORDER=0 ALT="Summary"></A>
<A class="nav" href="initgoal.html"><IMG SRC="prev.gif" BORDER=0 ALT="Previous"></A>
<A class="nav" href="gemacs.html"><IMG SRC="next.gif" BORDER=0 ALT="Next"></A>
</DIV>
<H2><A NAME="sec:2.4"><SPAN class="sec-nr">2.4</SPAN> <SPAN class="sec-title">Command-line
options</SPAN></A></H2>
<A NAME="sec:cmdline"></A>
<P>The full set of command-line options is given below:
<DL class="latex">
<DT><STRONG>--arch</STRONG> <VAR></VAR></DT>
<DD class="defbody">
When given as the only option, it prints the architecture identifier
(see Prolog flag <A class="flag" href="flags.html#flag:arch">arch</A>)
and exits. See also
<STRONG>-dump-runtime-variables</STRONG>. Also available as
<STRONG>-arch</STRONG>.</DD>
<DT><STRONG>--dump-runtime-variables</STRONG> <VAR></VAR></DT>
<DD class="defbody">
When given as the only option, it prints a sequence of variable settings
that can be used in shell-scripts to deal with Prolog parameters. This
feature is also used by <B>swipl-ld</B> (see <A class="sec" href="plld.html">section
9.5</A>). Below is a typical example of using this feature. Also
available as
<STRONG>-dump-runtime-variables</STRONG>.
<PRE class="code">
eval `swipl --dump-runtime-variables`
cc -I$PLBASE/include -L$PLBASE/lib/$PLARCH ...
</PRE>
<P>The option can be followed by <CODE>=sh</CODE> to dump in POSIX shell
format (default) or <CODE>cmd</CODE> to dump in MS-Windows <B>cmd.exe</B>
compatible format.</DD>
<DT><STRONG>--help</STRONG> <VAR></VAR></DT>
<DD class="defbody">
When given as the only option, it summarises the most important options.
Also available as <STRONG>-h</STRONG> and <STRONG>-help</STRONG>.</DD>
<DT><STRONG>--home=DIR</STRONG> <VAR></VAR></DT>
<DD class="defbody">
Use DIR as home directory. See <A class="sec" href="findhome.html">section
9.6</A> for details.</DD>
<DT><STRONG>--quiet</STRONG> <VAR></VAR></DT>
<DD class="defbody">
<A NAME="idx:verbose:63"></A><A NAME="idx:quiet:64"></A>Set the Prolog
flag <A class="flag" href="flags.html#flag:verbose">verbose</A> to <CODE>silent</CODE>,
suppressing informational and banner messages. Also available as <STRONG>-q</STRONG>.</DD>
<DT><STRONG>--nodebug</STRONG> <VAR></VAR></DT>
<DD class="defbody">
Disable debugging. See the <A NAME="idx:currentprologflag2:65"></A><A class="pred" href="flags.html#current_prolog_flag/2">current_prolog_flag/2</A>
flag
<A class="flag" href="flags.html#flag:generate_debug_info">generate_debug_info</A>
for details.</DD>
<DT><STRONG>--nosignals</STRONG> <VAR></VAR></DT>
<DD class="defbody">
Inhibit any signal handling by Prolog, a property that is sometimes
desirable for embedded applications. This option sets the flag
<A class="flag" href="flags.html#flag:signals">signals</A> to <CODE>false</CODE>.
See <A class="sec" href="foreigninclude.html">section 9.4.21.1</A> for
details.</DD>
<DT><STRONG>-tty</STRONG> <VAR></VAR></DT>
<DD class="defbody">
Unix only. Switches controlling the terminal for allowing
single-character commands to the tracer and <A NAME="idx:getsinglechar1:66"></A><A class="pred" href="chario.html#get_single_char/1">get_single_char/1</A>.
By default manipulating the terminal is enabled unless the system
detects it is not connected to a terminal or it is running as a
GNU-Emacs inferior process. This flag is sometimes required for smooth
interaction with other applications.</DD>
<DT><STRONG>--version</STRONG> <VAR></VAR></DT>
<DD class="defbody">
When given as the only option, it summarises the version and the
architecture identifier. Also available as <STRONG>-v</STRONG>.</DD>
<DT><STRONG>--win_app</STRONG> <VAR></VAR></DT>
<DD class="defbody">
This option is available only in <B>swipl-win.exe</B> and is used for
the start-menu item. If causes <B>plwin</B> to start in the folder
<CODE>...\My Documents\Prolog</CODE> or local equivalent thereof (see
<A NAME="idx:winfolder2:67"></A><A class="pred" href="system.html#win_folder/2">win_folder/2</A>).
The <CODE>Prolog</CODE> subdirectory is created if it does not exist.</DD>
<DT><STRONG>--</STRONG> <VAR></VAR></DT>
<DD class="defbody">
<A NAME="idx:commandlinearguments:68"></A>Stops scanning for more
arguments, so you can pass arguments for your application after this
one. See <A NAME="idx:currentprologflag2:69"></A><A class="pred" href="flags.html#current_prolog_flag/2">current_prolog_flag/2</A>
using the flag <A class="flag" href="flags.html#flag:argv">argv</A> for
obtaining the command-line arguments.
</DD>
</DL>
<H3><A NAME="sec:2.4.1"><SPAN class="sec-nr">2.4.1</SPAN> <SPAN class="sec-title">Controlling
the stack-sizes</SPAN></A></H3>
<A NAME="sec:stacksizes"></A>
<P>As of SWI-Prolog 5.9.8, the default limit for the stack-sizes is
128Mb on 32-bit and 256Mb on 64-bit hardware. The 128Mb limit on 32-bit
system is the highest possible value and this option can thus only be
used to lower the limit. On 64-bit systems, the limit can both be
reduced and enlarged. See <A class="sec" href="limits.html">section 2.18</A>.
Here are two examples, the first reducing the local stack limit to catch
unbounded recursion really quickly and the second using a really big
(32Gb) global limit on a 64-bit machine:
<PRE class="code">
$ swipl -L8m
$ swipl -G32g
</PRE>
<DL class="latex">
<DT><STRONG>-G</STRONG><VAR>size[kmg]</VAR></DT>
<DD class="defbody">
Limit for the global stack (sometimes also called <EM>term-stack</EM> or
<EM>heap</EM>). This is where compound terms and large numbers live.</DD>
<DT><STRONG>-L</STRONG><VAR>size[kmg]</VAR></DT>
<DD class="defbody">
Limit for the local stack ((sometimes also called
<EM>environment-stack</EM>). This is where environments and
choice-points live.</DD>
<DT><STRONG>-T</STRONG><VAR>size[kmg]</VAR></DT>
<DD class="defbody">
Limit for the trail stack. This is where we keep track of assignments,
so we can rollback on backtracking or exceptions.
</DD>
</DL>
<H3><A NAME="sec:2.4.2"><SPAN class="sec-nr">2.4.2</SPAN> <SPAN class="sec-title">Running
goals from the commandline</SPAN></A></H3>
<A NAME="sec:runoptions"></A>
<DL class="latex">
<DT><STRONG>-g</STRONG> <VAR>goal</VAR></DT>
<DD class="defbody">
<VAR>Goal</VAR> is executed just before entering the top level. Default
is a predicate which prints the welcome message. The welcome message can
be be suppressed with <STRONG>--quiet</STRONG>, but also with
<STRONG>-g</STRONG> <VAR>true</VAR>. <VAR>goal</VAR> can be a complex
term. In this case quotes are normally needed to protect it from being
expanded by the shell. A safe way to run a goal non-interactively is
here:
<PRE class="code">
% swipl <options> -g go,halt -t 'halt(1)'
</PRE>
</DD>
<DT><STRONG>-t</STRONG> <VAR>goal</VAR></DT>
<DD class="defbody">
Use <VAR>goal</VAR> as interactive top-level instead of the default goal
<A NAME="idx:prolog0:70"></A><A class="pred" href="toplevel.html#prolog/0">prolog/0</A>. <VAR>goal</VAR>
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. If the toplevel raises
an exception, this is printed as an uncaught error and the toplevel is
restarted. This flag also determines the goal started by <A NAME="idx:break0:71"></A><A class="pred" href="toplevel.html#break/0">break/0</A>
and <A NAME="idx:abort0:72"></A><A class="pred" href="toplevel.html#abort/0">abort/0</A>.
If you want to stop the user from entering interactive mode start the
application with `<STRONG>-g</STRONG> <VAR>goal</VAR>' and give `halt'
as top-level.
</DD>
</DL>
<H3><A NAME="sec:2.4.3"><SPAN class="sec-nr">2.4.3</SPAN> <SPAN class="sec-title">Compiler
options</SPAN></A></H3>
<A NAME="sec:compoptions"></A>
<DL class="latex">
<DT><STRONG>-c</STRONG> <VAR>file ...</VAR></DT>
<DD class="defbody">
Compile files into an `intermediate code file'. See <A class="sec" href="compilation.html">section
2.10</A>.</DD>
<DT><STRONG>-o</STRONG> <VAR>output</VAR></DT>
<DD class="defbody">
Used in combination with <STRONG>-c</STRONG> or <STRONG>-b</STRONG> to
determine output file for compilation.</DD>
<DT><STRONG>-O</STRONG> <VAR></VAR></DT>
<DD class="defbody">
Optimised compilation. See <A NAME="idx:currentprologflag2:73"></A><A class="pred" href="flags.html#current_prolog_flag/2">current_prolog_flag/2</A>
flag
<A class="flag" href="flags.html#flag:optimise">optimise</A> for
details.</DD>
<DT><STRONG>-s</STRONG> <VAR>file</VAR></DT>
<DD class="defbody">
Use <VAR>file</VAR> as a script-file. The script file is loaded after
the initialisation file specified with the <STRONG>-f</STRONG> <VAR>file</VAR>
option. Unlike <STRONG>-f</STRONG> <VAR>file</VAR>, using <STRONG>-s</STRONG>
does not stop Prolog from loading the personal initialisation file.</DD>
<DT><STRONG>-f</STRONG> <VAR>file</VAR></DT>
<DD class="defbody">
Use <VAR>file</VAR> as initialisation file instead of the default
<CODE>.plrc</CODE> (Unix) or <CODE>pl.ini</CODE> (Windows). `<STRONG>-f</STRONG> <VAR>none</VAR>'
stops SWI-Prolog from searching for a startup file. This option can be
used as an alternative to <STRONG>-s</STRONG> <VAR>file</VAR> that stops
Prolog from loading the personal initialisation file. See also
<A class="sec" href="initfile.html">section 2.2</A>.</DD>
<DT><STRONG>-F</STRONG> <VAR>script</VAR></DT>
<DD class="defbody">
Selects a startup-script from the SWI-Prolog home directory. The
script-file is named <CODE><<VAR>script</VAR>>.rc</CODE>. The
default
<VAR>script</VAR> name is deduced from the executable, taking the
leading alphanumerical characters (letters, digits and underscore) from
the program-name. <STRONG>-F</STRONG> <VAR>none</VAR> stops looking for
a script. Intended for simple management of slightly different versions.
One could for example write a script <CODE>iso.rc</CODE> and then select
ISO compatibility mode using <CODE>pl -F iso</CODE> or make a link from <B>iso-pl</B>
to
<B>pl</B>.</DD>
<DT><STRONG>-x</STRONG> <VAR>bootfile</VAR></DT>
<DD class="defbody">
Boot from <VAR>bootfile</VAR> instead of the system's default boot file.
A bootfile is a file resulting from a Prolog compilation using the
<STRONG>-b</STRONG> or <STRONG>-c</STRONG> option or a program saved
using
<A NAME="idx:qsaveprogram12:74"></A><A class="pred" href="runtime.html#qsave_program/1">qsave_program/[1,2]</A>.</DD>
<DT><STRONG>-p</STRONG> <VAR>alias=path1[:path2 ... ]</VAR></DT>
<DD class="defbody">
Define a path alias for file_search_path. <VAR>alias</VAR> is the name
of the alias, <VAR>path1 ...</VAR> is a list of values for the alias. On
Windows the list-separator is <CODE><CODE>;</CODE></CODE>. On other
systems it is <CODE><CODE>:</CODE></CODE>. A value is either a term of
the form alias(value) or pathname. The computed aliases are added to <A NAME="idx:filesearchpath2:75"></A><A class="pred" href="consulting.html#file_search_path/2">file_search_path/2</A>
using <A NAME="idx:asserta1:76"></A><A class="pred" href="db.html#asserta/1">asserta/1</A>,
so they precede predefined values for the alias. See <A NAME="idx:filesearchpath2:77"></A><A class="pred" href="consulting.html#file_search_path/2">file_search_path/2</A>
for details on using this file-location mechanism.
</DD>
</DL>
<H3><A NAME="sec:2.4.4"><SPAN class="sec-nr">2.4.4</SPAN> <SPAN class="sec-title">Maintenance
options</SPAN></A></H3>
<A NAME="sec:maintoptions"></A>
<P>The following options are for system maintenance. They are given for
reference only.
<DL class="latex">
<DT><STRONG>-b</STRONG> <VAR>initfile ...<STRONG>-c</STRONG> file ...</VAR></DT>
<DD class="defbody">
Boot compilation. <VAR>initfile ...</VAR> are compiled by the C-written
bootstrap compiler, <VAR>file ...</VAR> by the normal Prolog compiler.
System maintenance only.
</DD>
<DT><STRONG>-d</STRONG> <VAR>level</VAR></DT>
<DD class="defbody">
Set debug level to <VAR>level</VAR>. Only has effect if the system is
compiled with the <CODE>-DO_DEBUG</CODE> flag. System maintenance only.
</DD>
</DL>
<P></BODY></HTML>
|