Oct 31, 2018 Next, you can download SWI-Prolog as a source archive or using GIT. After installing all dependencies SWI-Prolog can be build according to the generic instructions using cmake that can be found here. Homebrew provides an alternative to Macports. The command below installs the latest stable version of SWI-Prolog: brew install swi.
TL;DR for 'Install development version on Linux'
- Find SWI-Prolog software downloads at CNET Download.com, the most comprehensive source for safe, trusted, and spyware-free downloads on the Web.
- Not that to compile & test JPL; the Java-Prolog bridge, you need to have a valid Java JDK on your system and the above script needs to find the jars for hamcrest and junit in a directory called jars at the same level as the directory into which the SWI-Prolog distribution is cloned: jars/hamcrest-2.2.jar jars/junit-4.13.jar. You get those jars from.
- SWI-Prolog offers a comprehensive free Prolog environment. Since its start in 1987, SWI-Prolog development has been driven by the needs of real world applications. SWI-Prolog is widely used in research and education as well as commercial applications. Join over a million users who have downloaded SWI-Prolog.
- For usage in a classroom-environment you do this: After the download of the SWI-Prolog-Editor in the. 32-bit version; 64-bit version; you unzip the files into a temporary folder und execute the setup.exe program. The installation-program has special support for school-situations. It is possible to install the SWI-Prolog-Editor local or on a server.
With bash.
Building is done using cmake, and it uses ninja-build to compute dependencies and build.
- CMAKE must have been installed (on Fedora this is done with `dnf install cmake` but your system may have some different package tool than
dnf, for exampleapt) ninja-buildmust have been installed (on Fedora: `dnf install ninja-build`)
Swi Prolog Editor Download Mac Download
Suppose we want to install SWIPL into this directory:
You can also install it somewhere in your home directory, or at some other place, it's up to you. If you install it in your home directory, there is no need to change to user root below.
As root:
You may want to prepare the installation directory:
As non-root, in your home directory
By default the system configures all features. In particular, GMP, ODBC, JPL, graphics.
Soon you will see:
Then actually compile and run the tests:
(Note that if you want to compile the Prolog-Java bridge 'JPL', you will have to have a discoverable JDK on the system; for testing you will need the hamcrest jar and junit jar but this is going too far now)
Then, install as root:
To make sure SWI-Prolog is found on-PATH, add the following script as 'logic.sh' to `/etc/profile.d/` (this should work but may depend on the system) :
And create the symlink corresponding to `/usr/local/logic/swipl`, linking to `/usr/local/logic/swipl/swiplexe_8.3.7` or similar. As user root:
Check using tree
Drop root privileges. As non-root:
Prolog Editor Download
Build script
Here is a little bash script I use to set up a some SWIPL versions I used for development. It's too complex for general use, but it's all-in-one and rather foolproof:
- Grab it
- Modify the values at the top to your liking:
system_install_dirtoplevel_dir_fq
- The command to execute is:
- `swiprologpull.sh clone system` to download the SWI-Prolog distro
- `swiprologpull.sh build system` to build the SWI-Prolog distro
Swi Prolog Download
It will ask you before letting loose:
Not that to compile & test JPL; the Java-Prolog bridge, you need to have a valid Java JDK on your system and the above script needs to find the jars for hamcrest and junit in a directory called jars at the same level as the directory into which the SWI-Prolog distribution is cloned:
You get those jars from
how to use swi-prolog editor
To use the Editor first you need to download SWI-Prolog to your computer. But this editor supports only 32 bit SWI-prolog system, so you have to download 32-bit SWI-Prolog version. After downloading the editor, you don't even need to open the main SWI-Prolog. You can directly use the editor to create file and run queries and it is actually more user friendly than the main SWI-Prolog. You can download the editor using below provided link.
Download SWI-Prolog Editor
Above screen is the main SWI-Prolog-Editor interface.
From File menu you can create new prolog file and it will directly create file with .pl extension and default 'File1.pl' name.
Below image shows the new created file.
New File will be created with default File1.pl name and when you will click on save,
it will ask for the name of file and you can save it at your desired space.
In this figure, the highlighted window is the place where you can write your prolog program.
Here also you need to use Consult option before asking any query, and that option you can find from Start menu and you can load the file into prolog memory or you can directly use the short cut key F9 for Consult. To consult multiple files you need to open desired files and click on Consult all from Start menu.
This is the interface after using Consult which shows that file has been compiled.
In this figure, the highlighted window is the place where you can write your queries.
Most amazing thing about this editor is, you can actually see your prolog programs in above window and you can ask queries in below window.

While learning the Prolog you can also enjoy playing with the editor, choosing your desired fonts,
as you can see in above figure prolog program window fonts are bit changed (though it is not advisable to do so).
TOP