From: Aaron Sloman See text for reply address
Subject: Re: FAQ for comp.lang.pop
Date: 
Message-ID: <7brkfc$ctt$1@soapbox.cs.bham.ac.uk>
········@indexes.u-net.com (J R Sampson) posted a message in
the comp.lang.pop group:

> Date: Wed, 03 Mar 1999 10:15:03 GMT
>
> Simply, can anyone give me a pointer to the FAQ for this newsgroup, if there is one?


I don't think there is an "official" FAQ, but I have put a lot of
relevant information in the file

    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/comp.lang.pop.newsgroup

I'll append its contents belwo.

Since comp.lang.pop was originally set up for discussion of pop-11
and the Poplog system, which also supports lisp, prolog and standard
ML, I am posting this to a few other relevant news groups, including
comp.ai, since pop-11 is an AI language (similar in many ways to Lisp).

Although I used to be involved in the development and marketing of
Poplog and Pop-11 when I was at Sussex Universiyt, I am not anymore.

My interest lies solely in the fact that I still use Pop-11 for teaching
AI and Cognitive Science and also for research purposes, as do several
of my colleagues. Pop-11 is the main introductory AI teaching language
for the AI undergraduate half-degree here in Birmingham, and for the
Cognitive Science MSc students whom I teach. Some of our PhD students
also use it for their work in AI.

Maybe one day JAVA will be good enough to replace Pop-11, if it evolves
in the right directions....????


=======================================================================
This file is
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/comp.lang.pop.newsgroup

Newsgroups: comp.lang.pop
Subject: The role of this newsgroup

Maintained by Aaron Sloman
Last updated: 6 Mar 1999


    CONTENTS

 -- INTRODUCTION: WHAT IS COMP.LANG.POP FOR?
 -- WHAT IS THE "POP" FAMILY OF LANGUAGES?
 -- THE MOST SOPHISTICATED VERSION
 -- EXTENDABILITY USING INCREMENTAL COMPILATION
 -- COMMERCIAL AVAILABILITY
 -- SOME HISTORY
 -- ALPHAPOP ON MAC
 -- BOOK ON POP-11, AND A PRIMER
 -- WHAT DOES POP11 LOOK LIKE?
 -- THE POPLOG VIRTUAL MACHINE AND TWO LEVEL COMPILER
 -- ONLINE INFORMATION
 -- AVAILABILITY

-- INTRODUCTION: WHAT IS COMP.LANG.POP FOR?

From time to time people post queries to this news group concerning
email (POP3 protocols) because they misinterpret the name of the
group.

People wishing to discuss that sort of thing should post to a news
group that is more directly relevant, e.g.

    comp.mail.misc

or one of the other comp.mail groups. Their questions and answers
are then more likely to be read by people with relevant knowledge
and interests.

The newsgroup comp.lang.pop was set up for discussion of the programming
language Pop-11 and other languages in the pop family (pop2, pop10,
wpop, alphapop) and the other languages in the Poplog system, namely
Prolog, Common Lisp and ML.


-- WHAT IS THE "POP" FAMILY OF LANGUAGES?

The "pop" family of languages, all have an open stack (like Forth),
incremental compilers (like Basic, Prolog, etc.) rich support for list
processing (like Lisp), procedures as first class objects (like Scheme),
and the compiler as a procedure which can be accessed at run time by
users.

They  vary in other details, e.g.:

o the syntax used for function definitions and other things. E.g.

    pop2 used
        function f x y => z; ... end;
        with a generally rather terse syntax

    pop-11 uses
        define f(x,y) -> z; .... enddefine;
        with a more verbose syntax (e.g. multiple closing brackets)

o whether there is support for full lexical scoping or only dynamic
scoping of local variables (like old Lisp systems),

o whether there is an integrated editor (VED, the pop-11 based
programmable editor in poplog is comparable in power to Emacs, but
differs in its style, parly because it was from the beginning aimed at
novice students and secretaries as well as expert users),

o whether there is a built in pattern matcher (e.g. for rule-based
programming and clearer list-processing code),

o whether autoloading and library search lists are supported

o whether there is support for external languages and callbacks, and
    what sort of support. E.g. the latest version supports a rich
    interface to C and the X window system, including automatic
    converters between C and Pop-11 datatypes and support for callbacks
    and structures shared between C and Pop-11 (which therefore must not
    be moved by the garbage collector).

o whether there is an interface to the X window system

o whether there are tools for building incremental compilers,

o whether there is a light-weight process mechanism,

o whether there is support for object oriented programming (as in the
latest version of pop-11 which includes Objectclass, an extension to
Pop-11 similar in power to Lisp's CLOS).

o whether there is support for asynchronous event handling (e.g. mouse
or keyboard events which occur while programs are running).


-- THE MOST SOPHISTICATED VERSION

The most sophisticated version of the pop family is pop-11, developed
since about 1975 at Sussex University (where John Gibson has been its
main architect, though with contributions from many others), and later
extended into the multi-language Poplog system. It includes all the
features listed above (and more!)

-- EXTENDABILITY USING INCREMENTAL COMPILATION

Because Poplog incremental compiler facilities are available in a
suite of pop11 procedures which compile code incrementally to a
powerful general purpose virtual machine, it is not hard to develop new
languages or extensions to old ones. This is how Common Lisp, Prolog and
ML are implemented in Poplog, and many people have implemented various
extensions to Pop-11.

E.g. I have extended Pop-11 with Poprulebase, a sophisticated forward
chaining rule based system for building expert systems, cognitive
models, etc. described in
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/prb/help/poprulebase

That in turn is the heart of the sim_agent toolkit for exploring
architectures for interacting intelligent agents, summarised in
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/sim/help/sim_agent
        (Overview help file)
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/sim/teach/sim_feelings
        (Tutorial introduction)
    The system is still being actively developed. Its philosophy and
    some uses are outlined in
        A Sloman & B Logan, Building cognitively rich agents using the
        Sim_agent toolkit,
        Communications of the Association of Computing Machinery,
        42, 3, pp. 71--77 March, 1999

Other users have at various times used pop-11 (and other Poplog
languages) to develop various systems either for research purposes or
as products or tools used in-house. E.g. I believe the company COGSYS
sells a package based on Pop-11 for developing process control systems.
Pop-11 is also at the heart of the prize-winning Clementine data mining
system marketed world wide by ISL (Integral Solutions Ltd., address
below).


-- COMMERCIAL AVAILABILITY

Poplog has been sold commercially since around 1983, when it ran on a
VAX under VMS at Sussex University, and supported only pop-11 and
prolog, along with a very simple lisp system. Common Lisp was added a
few years later, followed by Standard ML. It was later ported to many
Unix platforms as well as VMS on DEC Alpha, and linux on a PC. It is
currently marketed by ISL in the UK, but since ISL was taken over by
SPSS (December 1998), it is not yet clear what will happen.

My view is that it is time for the system, including sources, to be put
in the public domain to help revive interest especially in Pop-11, which
is far better for teaching AI than Java or Prolog, and probably more
approachable to most (ordinary) people than Lisp.

There is a version of poplog which runs under windows NT, though without
the graphical facilitites using X, but for some reason that has never
been sold separately by ISL even though they use it for Clementine on
PCs. Perhaps if the sources were made available someone could port
Poplog's graphical tools to the Windows environment. (ISL use a
commercial package which emulates X on a PC, but that's out of the
question for most users because of costs.)

-- SOME HISTORY

The first of the Pop family of languages was originally developed in the
late 1960s by Robin Popplestone. After some evolution (and re-naming) it
was used for research in Artificial Intelligence at Edinburgh University
throughout most of the 1970s and beyond, though other languages (e.g.
Prolog, Common Lisp, ML) were favoured by some of the AI research
groups.

I learnt Pop2 there running on an Elliot 4130 computer in 1972-3. Most
of the multi-user operating system was implemented in pop2. (There was a
single heap shared by all users!) A Pop2 manual ("the silver book") was
published by Edinburgh University Press sin 1972 or 1973, but has long
been out of print.

The other Pop languages grew out of pop2, with the usual divergence as
languages evolve, but the only version that has survived as far as I
know is Pop-11 in the Poplog environment.

-- ALPHAPOP ON MAC

Alphapop was a Mac based version of a subset of pop-11 (e.g. not
including lexically scoped variables), developed and sold by Cognitive
Applications in the late 1980s, but has not been updated for the latest
versions of the Mac operating system and used an out of date C compiler.
If they put the sources in the public domain perhaps someone will bring
it up to date.

-- BOOK ON POP-11, AND A PRIMER

There is a book that provides more information about the history of
Pop-11 and Poplog up to the late 1980s, though I don't know whether it
is still in print.

    POP-11 Comes of Age: The Advancement of an AI Programming Language,
    1989, Ed. J.A.D.W. Anderson,
    Ellis Horwood, Chichester

The occasion was the 21st birthday of Popplestone's original language.

My chapter in that book, written when I was at Sussex, can be found in
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/doc/pop11.at.sussex.ps

A fairly detailed introduction to a subset of Pop-11 can be found in the
Pop-11 Primer available in various formats (plain text, latex source,
postscript, html) from the Birmingham Poplog ftp directory

    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/

A browsable version of the primer (with one postscript figure), produced
using LaTex2html is in:

    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/primer/START.html

The html version can be fetched in a tar file and unpacked for local
use:

    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/primerhtml.tar.gz
        (The graphical symbols won't work, but they are inessential.)

The most complete specification of the latest version of Pop-11 is
available only in the REF and HELP directories that come with the poplog
system.

There is quite a lot of Pop-11 teaching material in these directories:

    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/teach/
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/rclib/teach/
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/prb/teach/
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/sim/teach/

There is also a lot at Sussex University and in other places, though not
made accessible externally.


-- WHAT DOES POP11 LOOK LIKE?

Pop-11 is an incrementally compiled language with power comparable
to Common Lisp but with a syntax closer to more conventional
languages.  E.g. here is a typical procedure definition in Pop-11,
for testing whether an item is in a list (equivalent to the built in
pop-11 procedure member):

    define is_in(item, list) -> result;
        ;;; Return true if item is in the list, otherwise false

        lvars thing;
        for thing in list do
            if thing = item then
                true -> result; return();
            endif
        endfor;

        ;;; not found, so
        false -> result;
    enddefine;

    ;;; Test it: the result is left on the stack. Stack contents are
    ;;; printed out using the "=>" operator:
    is_in(3, [2 3 5 8])=>
    ** <true>

    is_in(3, [one two three]) =>
    ** <false>

The same thing can be defined recursively, in a more familiar functional
style as often used in Lisp or Scheme, and without using an output
variable in the header (unused results are left on the "user stack" in
any case).

    define is_in(item, list);
        if null(list) then false
        elseif item = hd(list) then true
        else is_in(item, tl(list))
        endif
    enddefine;

    ;;; Test it:
    is_in("cat", [bat cat dog elephant])=>
    ** <true>

    is_in(3, [one two three])=>
    ** <false>

Compare a Lisp (or Scheme?) equivalent:

    (defun is_in(item list)
        (cond
            ((null list) nil)
            ((eq item (car list)) t)
            (t (is_in item (cdr list)))))

    ; Test it
    (is_in `cat `(bat cat dog elephant))
    T


Pop-11 also has pattern matching built in, support for developing new
incrementally compiled languages, an object oriented subsystem similar
to CLOS, an interface to the X window system, and many other features.

This is how the pattern matcher could be used to define is_in:

    define is_in(item, list) -> result;
        list matches [== ^item == ] -> result;
    enddefine;

Where "==" matches arbitrary segments of a list. The use of a pattern
matcher makes it much easier to develop knowledge-based systems.

Lots more examples of Pop-11 code can be found in the Primer and online
teach files, described above, and in source code libraries in the Poplog
ftp directory:
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/

See also the FAQ assembled by Steve Leach:
   http://www.popforum.org.uk/about/faq-list.html
     (Some of the information here is out of date.)


-- THE POPLOG VIRTUAL MACHINE AND TWO LEVEL COMPILER

Poplog is a multi-language Artificial Intelligence development
environment, in which Pop-11 is the core language and Prolog, Common
Lisp, and Standard ML are also supported in any combination.

The implementation of Pop-11 and all the other language is based on
pop-11 tools for developing incremental compilers that can also be used
to implement other languages which will then run wherever Poplog does.

Poplog provides a high level language-independent and machine-
independent virtual machine (the Poplog Virtual Machine) which is rich
enough to support a wide range of languages. There are Pop-11 procedures
for planting instructions for this virtual machine. When the
instructions reach the end of a procedure definition, the high level PVM
instructions are compined in a machine independent fashion to a low
level Poplog Implementation Machine. The instructions at that level are
then compiled incrementally (a procedure at a time) using a machine
dependent "back end" compiler to instructions for the current machine.
This two level incremental compiler is used by all the Poplog languages.

Poplog compiled procedurs are data-structures in the heap and can be
garbage collected, unlike compiled procedures in some other AI
languages.


During system development and porting to a new machine a different back
end is used which produces files of assembler for the target machine
(and other information required during the linking phase).

Because of all this most of the core of the poplog system is implemented
in Pop-11 (in a special dialect with some C-like extensions to provide
more efficient low level mechanism.) Building a new version therefore
always requires access to a running Poplog. The advantage of using
Pop-11 as the main implementation language rather than C or C++ is that
Pop-11 (like Lisp) is a higher level language making system development
much easier and more reliable. Also new features can be developed as
Pop-11 code in libraries available to users, and then after thorough
testing can later be incorporated into the system.

-- ONLINE INFORMATION

For more information on Pop-11 and Poplog, and a collection of AI
teaching material in Pop-11, see the Birmingham ftp poplog directory

    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/

including the README file, and
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/poplog.info.html

Further information is available in:
   http://www.cogs.susx.ac.uk/users/adrianh/poplog.html
   http://www.cogs.susx.ac.uk/users/adrianh/pop11.html
   http://www.cvg.cs.reading.ac.uk/poplog/

-- AVAILABILITY

Poplog was developed mainly at Sussex University, and is marketed by
ISL, who use Pop-11 in their Clementine data-mining system:

    Integral Solutions Limited
    Berk House
    Basing View
    Basingstoke, Hants
    RG21 4RG,
    UK

    Tel. +44 (0)1256 355899
    Fax. +44 (0)1256 363467

    Email:  ···@isl.co.uk
    http://www.isl.co.uk

There is an online web site devoted to Poplog and Pop-11:

    http://www.popforum.org.uk/

This includes a FAQ which overlaps with this file:

     http://www.popforum.org.uk/about/faq-list.html

None of this has anything to do with POP3, although, as it happens a
precursor of pop-11, developed in Edinburgh University and used for
much of their research in AI in the 1970s and after, was known as
POP2.


Aaron
===
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
Professor of Artificial Intelligence and Cognitive Science
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL   A.Sloman AT cs.bham.ac.uk  (Anti spammer version).
Phone: +44-121-414-4775 (Sec 3711)       Fax:   +44-121-414-4281
===
-- 
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac . uk   (NB: Anti Spam address)
Phone: +44-121-414-4775 (Sec 3711)       Fax:   +44-121-414-4281