Preparing to use SICStus Prolog for the first time

There are some things you need to know to get around the Unix/linux system and there are some things you can do to make your life easier.

Own a valid username
You must have a valid username on the computer system you are using.

Know a few operating system commands
You should know the following commands for your system. In the following, the Unix commands are given:
List a directory of files
ls
List a file on the screen
more filename
Make a new directory
mkdir directory_name
Change your working directory
cd directory-name

Create a directory for your Prolog work
You will find it helpful if you have a directory in which you keep all your Prolog work.
Create a directory called "prolog.dir" in your userarea
mkdir prolog.dir
Change the "permissions" on it so that no one can copy your work
chmod 700 prolog.dir
Move into the new directory
cd prolog.dir

To set the name of SICStus Prolog to another name

You should make sure that SICStus Prolog always starts in ISO Prolog mode. The easiest way to do this is to include an initialisation program in your top-level unix/linux directory. This is how to make an initialisation program.
Change to your top-level directory
Just enter the command: cd
Create a file
Using an editor, open a file called .sicstus.init.
The name "sicstus" is probably not very memorable. (The name prolog is already taken by another Prolog implementation which is significantly different from the one used in this module.) You can set an "alias" so that you can use any name for "sicstus". To declare an alias, you should edit your ".cshrc" file to include an alias line.

Change to your top-level directory
Just enter the command: cd
Add the alias
Using an editor, add the following line into your .cshrc file:
alias prolog        sicstus -l ~/.sicstus.init

To start SICStus Prolog, now all you need to type is: prolog. This change will take effect from the next time you login. If you want it to take effect immediately, you must type:

       source .cshrc
You do not need to type this command each time you login.


© P.J.Hancox@bham.ac.uk