Prolog Quick Run

A Quick Way of Running SWI-Prolog on the Linux Machines

Reason

At the moment on the Linux PC's at the University of Bristol, you have to run two export programs and then the pl command. I personally found this a nuisance. So I've developed a very tiny bash script so that you can just run prolog by calling "prolog" from your home directory

Steps

  1. Download the following file and put it in your home directory (usually the linux folder on the uni linux machines): prolog
  2. Run it by going on to the command line and typing this followed by an enter: prolog
  3. If you get a message about it not being executable then you can change it's permissions, it would be quite safe just to do this on the command line: chmod ugo=rwx prolog
  4. If you get a message about the program not being able to be found then you may have to run it like this on the command line: ./prolog

What's in the Bash Script

Really simple, you can open it up if you like using gedit, emacs, vi or pico/nano, but it's just this:

export PATH=/usr/local/ml/swipl/swipl/bin:$PATH
export MANPATH=/usr/local/ml/swipl/swipl/man:$MANPATH
pl

Note

Note that this probably only works on the computers in the Computer Science Linux Labs. At home you may have a different command to run SWI-Prolog, for instance I have to run xpce.

If you find any bugs that are specifically about my three lines of code, or if have a problem with this tutorial, or have any suggestions then please email me: dl7836 at bristol dot ac dot uk. Or come see me if you see me around.

A site by Daniel Lewis