Next: Memory Management
Up: System Description
Previous: Dynamically loading predicates in
  Contents
  Index
Command Line Arguments
There are several command line options for the emulator. The general
synopsis is:
xsb [flags] [-l] [-i]
xsb [flags] -n
xsb [flags] module
xsb [flags] -B boot_module [-D cmd_loop_driver] [-t] [-e goal]
xsb [flags] -B module_to_disassemble -d
xsb -[h | v]
xsb --help | --version | --nobanner | --quietload | --noprompt
memory management flags:
-c tcpsize | -m glsize | -o complsize | -u pdlsize | -r | -g gc_type
miscellaneous flags:
-s | -S | -T
module:
Module to execute after XSB starts up.
Module should have no suffixes, no directory part, and
the file module.O must be on the library search path.
boot_module:
This is a developer's option.
The -B flags tells XSB which bootstrapping module to use instead
of the standard loader. The loader must be specified using its
full pathname, and boot_module.O must exist.
module_to_disassemble:
This is a developer's option.
The -d flag tells XSB to act as a disassembler.
The -B flag specifies the module to disassemble.
cmd_loop_driver:
The top-level command loop driver to be used instead of the
standard one. Usually needed when XSB is run as a server.
-i : bring up the XSB interpreter
-e goal : evaluate goal when XSB starts up
-l : the interpreter prints unbound variables using letters
-n : used when calling XSB from C
-B : specify the boot module to use in lieu of the standard loader
-D : Sets top-level command loop driver to replace the default
-t : trace execution at the SLG-WAM instruction level
(for this to work, build XSB with the --debug option)
-d : disassemble the loader and exit
-c N : allocate N KB for the trail/choice-point stack
-m N : allocate N KB for the local/global stack
-o N : allocate N KB for the SLG completion stack
-u N : allocate N KB for the SLG unification stack
-r : turn off automatic stack expansion
-g gc_type : choose garbage collection ("none", "indirection", "sliding", or "copying")
-s : maintain detailed statistical information
-S : set default tabling method to subsumption-based
-T : print a trace of each called predicate
-v, --version : print the version and configuration information about XSB
-h, --help : print this help message
--nobanner : don't show the XSB banner on startup
--quietload : don't show the `module loaded' messages
--noprompt : don't show prompt (for non-interactive use)
The order in which these options appear makes no difference.
- -i
- Brings up the XSB interpreter. This is the normal use
and because of this, use of this option is optional and is
only kept for backwards compatibility.
- -l
- Forces the interpreter to print unbound variables as
letters, as opposed to the default setting which prints
variables as memory locations prefixed with an underscore.
For example, starting XSB's interpreter with this option will
print the following:
| ?- Y = X, Z = 3, W = foo(X,Z).
Y = A
X = A
Z = 3
W = foo(A,3)
as opposed to something like the following:
| ?- Y = X, Z = 3, W = foo(X,Z).
Y = _10073976
X = _10073976
Z = 3
W = foo(_10073976,3);
- -n
- used in conjunction with the -i option, to
indicate that the usual read-eval-print top-loop is not to be
entered, but instead will interface to a calling C program. See
the chapter Calling XSB from C in Volume 2 for details.
- -d
- Produces a disassembled dump of byte_code_file to
stdout and exits.
- -c size
- Allocates initial size KBytes of space
to the trail/choice-point stack area. The trail stack grows
upward from the bottom of the region, and the choice point stack
grows downward from the top of the region. Because this region is
expanded automatically from Version 1.6.0 onward, this option
is rarely needed. Default initial size: 768 KBytes.
- -m size
- Allocates size KBytes
of space to the local/global stack area. The global stack grows
upward from the bottom of the region, and the local stack grows
downward from the top of the region. Default: 768 KBytes.
- -o size
- Allocates size KBytes of space
to the completion stack area. Because this region is expanded
automatically from Version 1.6.0 onward, this option is rarely
needed. Default initial size 64 KBytes.
- -u size
- Allocates size KBytes of space
to the unification (and table copy) stack. Default 64 KBytes.
(This option is rarely needed.)
- -D
- Tells XSB to use a top-level command loop driver specified
here instead of the standard XSB interpreter. This is most useful when
XSB is used as a server.
- -r
- Turns off automatic stack expansion.
- -g gc_type
- Chooses the garbage collection strategy that
is employed; choice of the strategy is between "none" (meaning
perform no garbage collection), or garbage collection based on sliding on copying, or on indirection (See
[20] for descriptions of the first two garbage
collectors, and [8] for a description of the third).
- -s
- Maintains information on the size of program stacks
for the predicate statistics/0. This option may be expected
to slow execution by around 10%. Default: off.
- -S
- Indicates that tabled predicates are to be evaluated
using subsumption-based tabling as a default for tabled predicates
whose tabling method is not specified by using use_variant_tabling/1 or use_subsumptive_tabling/1 (see
Section 6.13.1). If this option is not
specified, variant-based tabling will be used as the default tabling
method by XSB.
- -T
- Generates a trace at entry to each called predicate
(both system and user-defined). This option is available mainly
for people who want to modify and/or extend XSB, and it is
not the normal way to trace XSB programs. For the
latter, the builtin predicates trace/0 or debug/0
should be used (see Chapter 8).
Note: This option is not available when the system is being used
at the non-tracing mode (see Section 8).
- -t
- Traces through code at SLG-WAM instruction level. This
option is for internal debugging and is not fully supported.
It is also not available when the system is being used at the non-debug
mode (see Section 8).
- -e goal
- Pass goal to XSB at startup. This goal is evaluated
right before the first prompt is issued. For instance,
xsb -e "write(
Hello!'), nl."'
will print a heart-warming message when XSB starts up.
- -nobanner
- Start XSB without showing the startup banner.
Useful in batch scripts and for interprocess communication (when XSB is
launched as a subprocess).
- -quietload
- Do not tell when a new module gets loaded. Again, is
useful in non-interactive activities and for interprocess communication.
- -noprompt
- Do not show the XSB prompt. This is useful only in batch
mode and in interprocess communication when you do not want the prompt
to clutter the picture.
As an example, a program which uses more heap and local stack than the
default configuration of XSB might be run by invoking XSB with the command.
xsb -m 2000
Next: Memory Management
Up: System Description
Previous: Dynamically loading predicates in
  Contents
  Index
Luis Fernando P. de Castro
2003-06-27