Forrest logo
back to the swipl tool

swipl:tldr:c7833

swipl: Execute a script.
$ swipl ${filename-pl}
try on your machine

This command swipl ${filename-pl} is used to run a Prolog program with the SWI-Prolog interpreter.

Here's the breakdown of the command:

  • swipl is the command to invoke the SWI-Prolog interpreter. It stands for "SWI-Prolog interpreter."
  • ${filename-pl} is a placeholder for the actual filename of your Prolog program. The .${filename-pl} syntax is commonly used to represent a variable or placeholder in command-line instructions. You need to replace ${filename-pl} with the actual name of your Prolog file, including the file extension .pl.

For example, if your Prolog program is named "hello.pl," the command would be:

swipl hello.pl

This command will execute the Prolog program using the SWI-Prolog interpreter and print any output or errors generated by the program.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the swipl tool