Poplog includes the incrementally compiled (not interpreted) core language Pop-11, and various additional incrementally compiled languages: Prolog, Common Lisp, and Standard ML. Various combinations of the languages, with pre-compiled libraries, are provided as saved images. There are two main modes of starting up one of these saved images, either by running the language system, or by starting up the editor with the language system enabled.
When starting up there are two types of shell commands, depending on whether you have set up the Poplog environment variables or not. If you have not, you can run the generic command "poplog" followed by arguments specifying what exactly you want to run. If you have set up the environment variables (as explained below) you can then directly run the relevant executables, without running the "poplog" command.
These two types of shell commands are now explained.
which is partly mirrored at http://www.poplog.org a site developed and mained by two freelance programmers who use Pop-11.
Poplog provides incremental compilers for several powerful languages: POP-11, PROLOG, COMMON LISP and ML. A Poplog-based incremental compiler for Scheme is also available.
Features include a powerful extensible text editor (Ved) which can also be run as a multi-window editor (XVed). There are many hundreds of online documentation files, tailored for use in Ved, or a programmable editor such as Emacs. On Unix/Linux systems there is an interface to the X window system (providing control panels and graphical capabilities). There are also many demonstration and utility libraries including an object oriented extension to Pop-11 known as Objectclass, compiler-building tools, and mechanisms for dynamically linking PASCAL, FORTRAN and C programs so that they can be called from Poplog.
Since the early 1980s Poplog has included a sophisticated interface, initially based on Sunview then replaced by the X Window System, with facilities for dynamically linking in widget sets (e.g. Motif or Poplog's own X widget set). It can handle toolkit events, and supports remote access to Poplog via X terminals, workstations or a PC running eXceed or linux. It is possible to sit at a terminal supporting X, and interact with Poplog graphical facilities running on a machine on another continent.
On systems that include Motif the default Poplog interface tools use
Motif "widgets", e.g. for menus and file browsers. An alternative user
interface, developed in Birmingham, which does not depend on Motif is
available from the free poplog site:
http://www.cs.bham.ac.uk/research/poplog/rcmenu.tar.gz (At Birmingham these are pre-installed by default.) For some examples of what the graphical tools can do see http://www.cs.bham.ac.uk/research/poplog/figs/rclib/
The use of interface tools based on the X window system makes it possible for a user in one building sitting at a workstation, an X terminal or a PC, to interact with sophisticated programs on a powerful Unix or VMS machine in another building, as if using a very powerful graphical workstation on one's desk. Poplog supported such interaction long before the world wide web.
Poplog includes the source code for a large number of library packages, which are usually programs that the user can read, copy and modify. These programs are written in Pop-11, Prolog, Lisp and standard ML. The widest variety of utilities and demonstration programs is in Pop-11.
These include many teaching libraries for students of Artificial Intelligence (and more general programming).
This "incremental compilation" 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.
Poplog is available on a variety of Unix and VMS platforms, including Sun, Hewlett Packard, Silicon Graphics and Digital Alpha. A version for a PC running Linux or Solaris is also available. Additional Unix/Linux versions may become available at the Free Poplog site.
There is also a version without graphics and with some restricted facilities for a PC running NT, which also works on windows95/98, also accessible at the Free Poplog site.
In addition there is a growing collection of libraries and teaching documentation and software for AI and programming.
The Poplog Virtual Machine provides support for a large variety of datatypes, including linked lists, arrays, strings, integers, `big' integers, floating point numbers, rational numbers, and complex numbers. The Objectclass extension supports Object Oriented proramming with inheritance. Users can define new datatypes. Poplog variables and constants can either be dynamically or lexically scoped, and are weakly typed. It provides trace and debugging facilities supporting rapid prototyping of complex software.
Poplog 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.
Thus users do not need to worry about reclaiming inaccessible data areas. Pop-11 processes start from about two megabytes in size (including the Pop-11 compiler, the editor VED, and many utilities). Prolog, Lisp or ML require more, but all start in less than about three megabytes. Poplog processes can grow as required, to whatever size the machine and the operating system will allow.
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. More information about Poplog is available at this location:
;;; print hello out five times repeat 5 times "hello" => endrepeat;Pop-11 also includes a high level pattern-based syntax for list manipulation. For instance the following declares two variables middle and list, asks the user to type in a line of words to be made into a list of words and assigned to list, then if the user's list starts with "I" and ends with "you" prints out a new list containing the middle bit, between "We" and "each other".
;;; declare two variables vars middle, list; ;;; assign a list of words typed by user to list readline() -> list; ;;; Check whether to respond if list matches [I ??middle you] then [We ^^middle each other] => endif;So if the user types in
I like talking to you
The program will respond
** [We like talking to each other]
Because the syntax of Pop-11 is very readable, it is relatively easy to learn, and has been found to be very effective as a teaching tool, for beginners, whether for general programming or for AI and Cognitive Science students. However, experienced Pop-11 programmers can also make use of rich syntactic structures, and the large numbers of utilities, to write very complex and diverse packages, such as Poplog itself, which is mostly implemented in Pop-11.
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.
A lot more information about Pop-11 is available in online documentation files accessible when running Poplog and also at the Free Poplog directory, including the Pop-11 primer, at http://www.cs.bham.ac.uk/research/poplog/primer/
Another source of information is at this web site: http://www.poplog.org Files at that site and at the Free Poplog site contain pointers to additional sites with information about Poplog and Pop-11.
poplog xved myfile.p
"poplog" invokes a shell script which sets up a collection of environment variables, then runs the appropriate Poplog program, passing on the arguments.
In the second format, without the word "poplog", users can invoke the Poplog programs directly, provided they have already set up the environment variables, e.g. in the user's .login file. This will be slightly faster than the first format, as well as being less verbose.
The first format is more suitable for the occasional user, though it depends on the poplog shell script being in a directory included in the user's $PATH. If this appears not to be available at your site, contact your system administrator, who should read this man file.
At Birmingham the second format is made available by means of the command:
setup Poplogin the user's .login file. Different startup conventions will be available at different sites.
An alternative way to make the system work in the second format is to put a set of commands in your .login file, e.g. something like the following, depending on where the Poplog system and the poplog local directories are located on your machine:
setenv usepop /usr/local/poplog/v15.53 setenv poplocal /usr/local/poplog/ setenv local $poplocal/local source $usepop/pop/com/poplog setenv poplib ~/poplib
If your login shell is bash, or ksh, or sh, then you will need the following instead in your .profile file:
usepop=/usr/local/poplog/v15.53 poplocal=/usr/local/poplog/ local=$poplocal/local export usepop poplocal local . $usepop/pop/com/poplog.sh poplib=$HOME/poplib export poplib
The last command can be changed to specify the location where you would like to install your personal poplog startup files, init.p, vedinit.p, init.pl, init.lsp, init.ml and other pop-11 files.
The following two formats are equivalent:
It is possible to have additional saved images that start up XVed with two of the language compilers installed. For instance in Birmingham there is a saved image that allows the following
Sample shell scripts for building saved images can be found in the directory $usepop/pop/com and also in this directory http://www.cs.bham.ac.uk/research/poplog/image-scripts
poplog help initial poplog help initial.ex poplog ref systemThe first file 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 user's .login script. There may be additional "local" startup scripts at your site, e.g. in $poplocal/local/com/poplog and $poplocal/local/com/popenv
As explained above, a typical login script sourced from the .login directory of a user whose login shell is csh or tcsh might contain the following:
setenv usepop /usr/local/poplog.v15.53 (or whatever) source $usepop/pop/com/poplogIt might also set the environment variable $poplib, for the directory containing the user's startup files (e.g. init.p, vedinit.p) and possibly also the variable $poplocal, which defines where the local extensions to poplog are kept. For a user of bash, ksh or sh alternative commands, given above, could be used in the .profile file.
At Birmingham, Poplog is available on the school of Computer Science Sun network, and also on the Digital (Compaq) Alpha servers run by the central Information Service. In the School of Computer science Poplog users should include, in their .login files the line
Users of the Alpha Servers at Birmingham (e.g. isdugp, isdugi) should include in their .profile files the command
Poplog initialization often prints out a message giving the Poplog version, and adds the Poplog executables to the users PATH.
Sites elsewhere wishing to obtain the facilities used at Birmingham can fetch various packages from the Free Poplog site, e.g. http://www.cs.bham.ac.uk/research/poplog/bhamteach.tar.gz and other things in the same directory.
For more information, contact your system administrator, or see the User Guide, or the online information in
poplog help initial
ln -s $popsys/pop11 myved setenv pop_myved +myved
All of the above files are optional. If Poplog does not find them in the $poplib directory, it searches the current directory.
Lists of known bugs and some bug fixes can be found at this site: http://www.cs.bham.ac.uk/research/poplog/bugfixes/
HELP INITIAL, DOC SYSPEC, HELP POPLOG, TEACH TEACH, REF SYSTEM
(The primer, mentioned above, also gives information about Pop-11).
There is a lot of tutorial information available at Birmingham in the directory $poplocal/local/teach/, also available externally at http://www.cs.bham.ac.uk/research/poplog/teach/
See also the following Web pages
Enthusiastic users often respond to requests for help posted to comp.lang.pop. If the problem involves common lisp, prolog, or ML, copy the file to comp.lang.lisp, comp.lang.prolog or comp.lang.ml as well as to comp.lang.pop.
The FAQ (frequently asked questions) file for the news group and email list can be found at http://www.cs.bham.ac.uk/research/poplog/comp.lang.pop.faq.html
There is also an email list email@example.com which anyone can join by following instructions given in the FAQ file.
--- Copyright University of Birmingham 2007. All rights reserved. ------