13.1 sicstus — SICStus Prolog Development System


     % sicstus [options] [-a argument...]


The prompt `| ?-' indicates that the execution of is top-level mode. In this mode, Prolog queries may be issued and executed interactively. To exit from the top-level and return to the shell, either type ^D at the top-level, or call the built-in predicate halt/0, or use the e (exit) command following a ^C interruption.

Under Windows, sicstus.exe is a console-based program that can run in a command prompt window, whereas spwin.exe runs in its own window and directs the Prolog standard streams to that window. spwin.exe is a “windowed” executable.


Fast start. Don't read any initialization file on startup. If the option is omitted and the initialization file exists, SICStus Prolog will consult it on startup after running any initializations and printing the version banners. The initialization file is .sicstusrc or sicstus.ini in the users home directory, i.e. ~/.sicstusrc or ~/sicstus.ini. See ref-fdi-syn, for an explanation of how a file specification starting with `~/' is interpreted.
Forced interactive. Prompt for user input, even if the standard input stream does not appear to be a terminal.
Start with the informational Prolog flag set to off initially, suppressing informational messages. The flag is set before any prolog-file or initialization file is loaded or any saved-state is restored.
Start without the initial version message.
-l prolog-file
Ensure that the file prolog-file is loaded on startup. This is done before any initialization file is loaded. Only one -l option is allowed.
-r saved-state
Restore the saved-state saved-state on startup. This is done before any prolog-file or initialization file is loaded. Only one -r option is allowed.
--goal Goal
Read a term from the text Goal and pass the resulting term to call/1 after all files have been loaded. As usual Goal should be terminated by a full stop (`.'). Only one --goal option is allowed.
Display a help message and exit.
-a argument...
where the arguments can be retrieved from Prolog by prolog_flag(argv, Args), which will unify Args with argument... represented as a list of atoms.
Creates a saved-state for a development system. This option is not needed for normal use. If abspath is given, it specifies the absolute pathname for the saved-state. Please note: There must not be a space before the path, lest it be interpreted as a separate option.
Equivalent to the -B option, except that it builds a saved-state for a runtime system instead.


The following environment variables can be set before starting SICStus Prolog. Some of these override the default sizes of certain areas. The sizes are given in bytes, but may be followed by `K' or `M' meaning kilobytes or megabytes respectively.

This environment variable can be used to specify the location of the Runtime Library. In most cases there is no need to use it, but see CPL Notes.
Governs the initial size of the global stack.
Governs the initial size of the local stack.
Governs the initial size of the choicepoint stack.
Governs the initial size of the trail stack.
Governs the size of Prolog's initial memory allocation.
Defines a limit on the amount of data space that Prolog will use.
Governs the amount of space Prolog asks the operating system for in any given memory expansion.
Governs the size of space Prolog retains after performing some computation. By default, Prolog gets memory from the operating system as the user program executes and returns all free memory back to the operating system when the user program does not need it any more. If the programmer knows that her program, once it has grown to a certain size, is likely to need as much memory for future computations, she can advise Prolog not to return all the free memory back to the operating system by setting this variable. Only memory that is allocated above and beyond PROLOGKEEPSIZE is returned to the OS; the rest will be kept.

In addition the following environment variables are set automatically on startup.

The absolute path to the directory that contains the executable. Also available as the application file search path.

The full path to the directory that contains the SICStus run-time. If the application has linked statically to the SICStus run-time, SP_RT_DIR is the same as SP_APP_DIR. Also available as the runtime file search path.

The absolute path to the directory that contains the SICStus library files. Also available as the initial value of the library file search path.

A directory suitable for storing temporary files. It is particularly useful with the open/4 option if_exists(generate_unique_name). Also available as the temp file search path.


Prolog source file
Prolog Object file
SICStus Prolog initialization file, looked up in the home directory

See Also


Send feedback on this subject.