← 返回命令列表

Linux command

sicstus 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start SICStus Prolog

sicstus

Load a Prolog file

sicstus -l [path/to/file.pl]

Restore a saved state

sicstus -r [path/to/saved.sav]

Start in forced interactive mode

sicstus -i

Start without the banner

sicstus --nologo

Execute a goal

sicstus -e "[goal]"

Start with additional arguments

sicstus -- [arg1] [arg2]

说明

sicstus is the command-line interface for SICStus Prolog, a commercial Prolog development system developed by the Swedish Institute of Computer Science (SICS). It provides an interactive interpreter for running Prolog programs and supports both ISO Prolog and SICStus-specific extensions. After startup, the interpreter displays a prompt (| ?-) where you can enter queries. After each answer, pressing Return terminates the query, while ; followed by Return requests the next solution. Execution can be interrupted with ^C, and the interpreter is exited with ^D or the halt. goal. SICStus Prolog includes features for constraint solving, interfacing with C and Java, and developing robust applications. It requires a valid license to run the development system.

参数

-l _file_
Load a Prolog file on startup. This is done before any initialization file is loaded. Only one -l argument is allowed.
-r _file_
Restore a saved state on startup.
-i
Force interactive mode. Prompts for user input even if standard input is redirected.
-e _goal_
Execute the specified goal on startup.
--nologo
Suppress the startup banner and version information.
--iso
Start in ISO Prolog mode.
--sicstus
Start in SICStus Prolog mode (default).
--
End of flags. Remaining arguments are passed as Prolog arguments.

FAQ

What is the sicstus command used for?

sicstus is the command-line interface for SICStus Prolog, a commercial Prolog development system developed by the Swedish Institute of Computer Science (SICS). It provides an interactive interpreter for running Prolog programs and supports both ISO Prolog and SICStus-specific extensions. After startup, the interpreter displays a prompt (| ?-) where you can enter queries. After each answer, pressing Return terminates the query, while ; followed by Return requests the next solution. Execution can be interrupted with ^C, and the interpreter is exited with ^D or the halt. goal. SICStus Prolog includes features for constraint solving, interfacing with C and Java, and developing robust applications. It requires a valid license to run the development system.

How do I run a basic sicstus example?

Run `sicstus` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -l _file_ do in sicstus?

Load a Prolog file on startup. This is done before any initialization file is loaded. Only one -l argument is allowed.