By default, SWI-Prolog is installed as `swipl'. The command line arguments of SWI-Prolog itself and its utility programs are documented using standard Unix man pages. SWI-Prolog is normally operated as an interactive application simply by starting the program:
machine% swipl Welcome to SWI-Prolog ... ... 1 ?-
After starting Prolog, one normally loads a program into it using
which may be abbreviated by putting the name of the program file between
square brackets. The following goal loads the file
likes.pl containing clauses for the predicates likes/2 :
?- [likes]. % likes compiled, 0.00 sec, 17 clauses true. ?-
After this point, Unix and Windows users unite, so if you are using Unix please continue at section 2.1.2.
After SWI-Prolog has been installed on a Windows system, the following important new things are available to the user:
- A folder (called directory in the remainder of this
swiplcontaining the executables, libraries, etc., of the system. No files are installed outside this directory.
- A program swipl-win.exe, providing a window for interaction with Prolog. The program swipl.exe is a version of SWI-Prolog that runs in a console window.
- The file extension
.plis associated with the program swipl-win.exe. Opening a
.plfile will cause swipl-win.exe to start, change directory to the directory in which the file to open resides, and load this file.
The normal way to start the
likes.pl file mentioned in
section 184.108.40.206 is by simply
double-clicking this file in the Windows explorer.