POPLOG(1)

Poplog - a multi-language interactive software development environment

SYNOPSIS
pop11 [ +saved-image ... ] [ argument ... ] [ :command ]

ved [ filename ]

prolog [ -|+saved-image ]

clisp [ -|+saved-image ]

pml [ -|+saved-image ]

DESCRIPTION
Poplog is an integrated, interactive, multi-language software development environment. It provides incremental compilers for POP-11, PROLOG, COMMON LISP and ML. Features include a powerful extensible multi-window text editor (Ved), over 1700 documentation files, the Poplog Window Manager (Pwm), many demonstration and utility libraries including an object oriented extension to Pop-11 known as Flavours, compiler-building tools, and mechanisms for dynamically linking PASCAL, FORTRAN and C programs so that they can be called from Poplog. Since Version 14, it has included a sophisticated interface to The X Window System (X11R4), with facilities for dynamically linking in widget sets (e.g. Motif or Open Look), handling toolkit events, and remote access via X terminals. Poplog includes the source code for a large number of library packages, which are usually programs that the user can read, copy and modify.

At the heart of Poplog is the Poplog Virtual Machine. The Poplog compilers translate program text and into a sequence of Poplog Virtual Machine (VM) instructions, that are in turn compiled into real machine code instructions. This system provides the programmer with a suitable environment for rapid-prototyping, whilst also ensuring efficient code execution. The provision of the Poplog Virtual Machine as a target for compilers simplifies porting of Poplog languages, and programs written using them, to new machines. Programs written using AlphaPop on a Macintosh will run on implementations of Poplog on Workstations running UNIX, and DEC VAX machines running VMS. A list of currently supported hardware bases is available (see below for address).

The Poplog Virtual Machine provides support for a large variety of datatypes, including linked lists, arrays, strings, integers and floating point numbers. Users can define new datatypes. Poplog variables and constants can either be dynamically or lexically scoped, and are weakly typed. Poplog provides a trace and debugging facilities. It also has a very efficient storage manager, using a mark-and-sweep copying garbage collector, which is automatically replaced by a non-copying algorithm when there is not enough space for copying. Pop-11 processes start from under a megabyte in size. Prolog, Lisp or ML require more, but all start in less than two megabytes. Poplog processes can grow to whatever size the machine and the operating system will allow.

The core language of Poplog is Pop-11. Pop-11 combines the features found in other AI languages like Lisp with a syntax that is similar in form to Pascal or C. Pop-11 code is easy to read, and includes many control structures. For example, the following Pop-11 code prints the word "hello" out five times:

repeat 5 times
    "hello" =>   ;;; print hello out five times
endrepeat;

Because the syntax of Pop-11 is very readable, it is easy to learn, and has been found to be very effective as a teaching tool. However, Pop-11 programmers can also make use of rich syntactic structures, and the large numbers of utilities, to write very complex and diverse packages. Since the editor, the compiler and the debugging tools are all part of the same environment, programmers are saved from the laborious task of switching between editors and compilers, waiting for error messages from the compilers, and switching back to the editor again.

Poplog is far too complex to describe fully in a manual page entry. This document serves only as a pointer to the large amount of on-line documentation that is available within the Poplog environment.

COMMANDS

pop11
    Loads the default Poplog system, with only the Pop-11 compiler.

ved First loads the default Poplog system, with the Pop-11 compiler, and then loads the Poplog editor, Ved. This command can take one argument (a filename) that is passed to Ved as the name of the initial file to edit.

prolog, pop11 +prolog
    First loads the default Poplog system, with the Pop-11 compiler, and then starts the Prolog compiler (provided as a saved image).

clisp, pop11 +lisp
    First loads the default Poplog system, with the Pop-11 compiler, and then starts the Common Lisp compiler (provided as a saved image).

pml, pop11 +pml
    First loads the default Poplog system, with the Pop-11 compiler, and then starts the Standard ML compiler.

OPTIONS

For more information on Poplog parameter passing, see the Poplog help file HELP PARAMETERS, or the more detailed specification in REF

+saved-image ...
    Loads the Poplog environment and then looks for the specified Poplog saved image. Poplog will search the directories specified in $popsavepath, and in the current directory. The suffix .psv is added to the filename if no suffix is specified. Several incremental saved images can be loaded using the "+saved-image" form. Additional arguments specified using the "-" flag will be passed into the Poplog environment. By default, such arguments are ignored, although the programmer may wish to define interpretations for them. If this option is given the :command option must be omitted. For more information about saved images, see REFSYSTEM.

:command
    Loads the Poplog environment, and then executes the Pop-11 instruction command.

ved filename
    Loads the Poplog environment, sets up the editor (Ved), and reads filename into a ved buffer, ready for editing.

POPLOG INITIALIZATION
Poplog uses environent variables to store information about the location of files, defaults and documentation. These variables are usually initialized using a shell script. For details see your local system administrator or the Poplog Users' Guide. The Guide also explains how to use initialization files, such as init.p, vedinit.p, init.pl, init.lsp, and init.ml. Default scripts reside in the pop/com directory of the Poplog tree. These scripts are usually executed as part of the users .login script. A typical login script would contain the following:

setenv usepop /usr/local/pop14 (or whatever) source $usepop/pop/com/poplog

Poplog initialization often prints out a message giving the Poplog version, and adds the Poplog executables to the users PATH.

For more information, contact your system administrator, or see the User Guide, or the online information in POPLOG HELP INITIAL.

ENVIRONMENT VARIABLES

$usepop
    Holds the path to the root of the Poplog directory tree.

$poplocal
    Holds the path to the root of the Poplog local tree. This is used to store site-specific libraries and documentation.

$popcom
    Set to $usepop/pop/com. This directory holds several csh(1) scripts for making default saved images, and setting up the poplog environment.

$popsrc
    Set to $usepop/pop/src. This directory contains the sources for the Poplog environment, if provided. The sources may be in object file form.

$popsys
    Set to $usepop/pop/pop. Contains the Poplog executable commands, including pop11, prolog, pml, clisp. Other commands include:

    pwmtool runs the Suntools Poplog Window Manager.

$popautolib, $poplocalauto
    Set to $usepop/pop/lib/auto and $poplocal/local/auto respectively. The compiler searches these directories when it is trying to evaluate an undefined identifier. If a file is found with the same name as the identifier, it is compiled. This enables the Poplog environment to be invisibly extended, whilst conserving memory usage.

$poplocalbin
    Directory containing local saved images.

$popliblib, $popdatalib, $poppwmlib, $popsunlib, $popvedlib
    Set to directories containing library packages for Pop-11, Pwm, Sun consoles and Ved.

$popsavelib
    Set to $usepop/pop/psv. This directory contains some standard saved images, including the Prolog, Lisp and ML saved images.

$popsavepath
    Lists of directories containing Poplog saved images. Users may add paths to directories containing their own saved images. By default, this is set to $poplib:$poplocalbin:$popsavelib.

$poplib
    User definable. Holds the path to the users library directory. Poplog will look in this directory for saved images and initialization files (see below).

$pop_{name}
    When Poplog is executed, it checks the name of the command that it was executed by (ie. argv[0]). If this command was not "pop11", Poplog looks for an environment variable starting with "pop_" and ending with argv[0]. If such a variable exists, Poplog treats the contents of the variable as the arguments to Poplog. This is a convenient way of making new commands. To make a command myved, which loads pop11 with the saved image called myved.psv, make a symbolic link between $popsys/pop11 and myved, and set the environment variable pop_myved to "+myved":

    ln -s $popsys/pop11 myved
    setenv pop_myved +myved

FILES

$poplib/init.p
    After Poplog is loaded, the Pop-11 code in this file is compiled. Users can use this file define useful procedures and variables to tailor the Poplog environment to their own tastes.

$poplib/vedinit.p
    This Pop-11 file is compiled when the Ved editor is evoked. Users can write programs to tailor the operation of Ved, so that for example it behaves sensibly when different terminals are being used. This file can also be used to define extra VED <ENTER> commands, or to modify the default actions that Ved takes when a new file is edited (see HELP VEDFILETYPES, HELP VEDVEDDEFAULTS).

$poplib/init.pl
    A file containing PROLOG code that is compiled when Poplog is loaded with the PROLOG compiler.

$poplib/init.lsp
    A file containing LISP code that is compiled when Poplog is loaded with the LISP compiler.

$poplib/init.ml
    A file containing ML code that is compiled when Poplog is loaded with the ML compiler.

All of the above files are optional. If Poplog does not find them in the $poplib directory, it searches the current directory.

BUGS

The Poplog help file HELP *NEWS provides the latest information on problems and changes in Poplog. See HELP *BUGFORM for details of how to report bugs and get support.

SEE ALSO
Poplog HELP files:

HELP POPLOG, HELP INITIAL, REF SYSTEM

B. R. Barret, A. Ramsey and A. Sloman, POP-11, A practical Language for Artificial Intelligence, Ellis Horwood, 1986.

FURTHER INFORMATION

Poplog is the property of the University of Sussex. For sales information, contact:

Integral Solutions Ltd
Berk House
Basing View
Basingstoke
Hampshire
RG21 4RG
UK
Tel: +44 (0)1256 55899
Fax: +44 (0)1256 63467
Email: isl@isl.co.uk

AUTHOR
Copyright University of Sussex 1995. All rights reserved.
   Jonathan Meyer, December 15 1989.