Skip to content
Peter Flach edited this page Feb 5, 2019 · 13 revisions

SWISH

SWISH is the online version of SWI-Prolog. You can use it to execute most of Prolog programs in a fancy web-based interface.

Using SWISH environment

Another way of executing Prolog code is to create a SWISH notebook (read more), which is equivalent to Jupyter environment in Python.

Running SWISH on the lab machines

To run SWISH on the lab machines:

  1. copy swish into your home directory: cp -r /opt/swish ~/,
  2. go to your brand new swish copy: cd ~/swish,
  3. start a SWISH server: swipl run.pl,
  4. open your favourite web browser and go to http://localhost:3050/.

SWISH examples and help are available through its interface.

Using SWISH on your own computer

You can also use SWISH on your own machine. For that you need version 7.6.4 (stable) or 7.7.7 (devel) of SWI-Prolog and our version of SWISH. (It may throw some warnings and errors but should work just fine.)

Using the course examples

If you want to use external code with SWISH the easiest way is to put it in the examples directory located in the SWISH root (e.g. ~/swish/examples). The additional examples we prepared for COMS30106 are available here. You can then access them at http://localhost:3050/example/name_of_file.pl (e.g., http://localhost:3050/example/graphviz_intro.swinb`).

Clone this wiki locally