INSTRUCTIONS FOR INSTALLING AND USING POPLOG
Aaron Sloman
21 Aug 2020

This document is:
    http://www.cs.bham.ac.uk/research/projects/poplog/V16/INSTRUCTIONS.txt
and will be downloaded automatically when Poplog is installed using

    http://www.cs.bham.ac.uk/research/projects/poplog/V16/getpoplog.sh

Before attempting to set up poplog, please make sure pre-requisites for
your version of linux have been installed, as instructed in

    https://www.cs.bham.ac.uk/research/projects/poplog/V16/required-packages.html

Fetch and run this command file to download poplog program files and
documentation:

    https://www.cs.bham.ac.uk/research/projects/poplog/V16/getpoplog.sh

(It ends by downloading this INSTRUCTIONS.txt file.)

After fetching and running the getpoplog.sh script, you'll find that it has
created a new directory

    poplog_base

which is the root of the poplog installation (though local poplog libraries
produced by expert users may be located elsewhere).

The poplog_base directory includes a file named USEPOP, created during
installation recording the path name of the directory.

In order to test a new poplog installation, change directory to poplog_base
and use the contents of the file USEPOP to assign the path name to the
environment variable $usepop, then use that to set up additional commands
and environment variables, as follows, depending on which linux shell you
use:

    If you use sh or bash run this command IN THE poplog_base DIRECTORY:

        export usepop=`cat USEPOP`

    If you use csh or tcsh do this instead:

        setenv usepop `cat USEPOP`

The file USEPOP can be saved anywhere, providing a record of the value to
be assigned to $usepop. Alternatively, just save the contents of the output
of the 'pwd' command in the poplog_base directory, or any equivalent.

The following should then print out the full path name:

     echo $usepop

That value of $usepop is stored in the file USEPOP and can be
saved to set $usepop later, to set up paths, as shown below.
(The use of this file may be removed in a later version of getpoplog.sh)

AFTER THE DOWNLOAD IS COMPLETE:

Set up shell commands for running poplog and its components.

After setting up and recording the value of $usepop, and using it to source
relevant startup scripts, as described below, you can later run commands in
one of the poplog languages

    -- pop11
    -- prolog
    -- common lisp (run as clisp)
    -- Poplog ml (run as pml)

To set up paths and environment variables do one of these:

sh/bash users:

    source $usepop/pop/com/poplog.sh

csh/tcsh users:

    source $usepop/pop/com/poplog.csh

After that, a variety of commands will be available to you, including

    pop11, prolog, clisp or pml

depending which of the four programming languages you wish to use. (From
each of them you can, in principle, invoke any or all of the others, as
they are all part of the run-time system, partly because they all run
within the Poplog virtual machine. A later version of this document will
provide pointers to introductory documentation.

NB IF YOU INTEND TO USE MOTIF,
MAKE SURE THE LINUX MOTIF LIBRARY HAS BEEN INSTALLED, E.G.
motif-devel IN FEDORA, libmotif-dev IN UBUNTU AND openmotif IN ARCH

To link poplog with motif first make sure that $usepop is set to
the correct value, as above.

Then do

$usepop/pop/src/newpop -link -x=-xm -norsv


HAVE FUN

Aaron Sloman
University of Birmingham UK
http://www.cs.bham.ac.uk/~axs