[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Oct 30 02:49:34 2003 
Subject:New poplog with bug in Pop-11/Poplog back-end compiler fixed 
From:Aaron Sloman 
Volume-ID:1031030.03 

Some time ago I passed on this bug reported by David Young. A new poplog
is available for PC+Linux with the bug fixed and a new much simpler
installation process,

Here's the report of the bug

> This code
>
>     if true then
>         not(true or "anything")
>     else
>         "irrelevant"
>     endif
>
> leaves <true> on the stack, instead of the correct <false>.
> ...
> I'm fairly sure that the problem is that the call to "not" is
> being optimised incorrectly. The VM code is correct, and if you
> trace (and optionally untrace) "not", the code then works
> correctly. I can't really get any further than this myself.
> ....
 
> This (equivalent to David's example, but shorter) is NOT OK
>    if true then not(true or 77) else 88 endif =>
>    ** <true>
>
> This is NOT OK
>    if true then not(66 or 77) else 88 endif =>
>    ** 66
>
> This is NOT OK
>    if true then true or 77; .not else 88 endif =>
>    ** <true>
>
> This is OK
> 	procedure(); not(true or 77) endprocedure() =>
>     ** <false>
 
> ...
> So it looks like a buggy optimisation is being done when 'not'
> is applied to an 'or' expression starting 'true' or an 'and'
> expression starting 'false', but only after 'then' and not
> after 'else'.

After further discussion (on the poplogdev email list) and checking of
a proposed solution, by David Young, Steve Leach and Waldek Hebisch,
a fixed version of the compiler code was produced, and a new version of
linux poplog packaged with a new much easier installation script, which
offers the option of specifying an installation directory other than
the default /usr/local/poplog, which is not always convenient.

Anyone who has a working poplog and merely wants the compiler bug fixed
can fetch the fixed source file and a 'rebuilding' script from here:
    http://www.cs.bham.ac.uk/research/poplog/src/new/v15.53dpatch/src/
The files are:
    vm_conspdr.p
    rebuild_poplog

If anyone would like to install the whole poplog system with the
compiler fix already included, along with the Birmingham extensions,
this file is available for downloading:

    http://www.cs.bham.ac.uk/research/poplog/bham-linux-poplog.tar.gz
        It's about 21 Mbytes.

After untarring it you'll find two scripts available for installing,
    INSTALL_EVERYTHING_WITH_MOTIF
    INSTALL_EVERYTHING_WITHOUT_MOTIF

as described in the file
    SHORT-CUT-INSTALLATION.txt

Each of the scripts can be run with an argument giving an installation
directory. If omitted it defaults to /usr/local/poplog, as before.

All the documentation on installation options can be browsed in advance
here:
    http://www.cs.bham.ac.uk/research/poplog/linux-cd/

(The documentation now needs to be cleaned up - it's rather complex
with too much repetiion.)

If anyone does try it I'd like to know, and to know on which versions of
linux or freebsd or debian it has been tried.

The 21 Mbyte file includes the SimAgent toolkit described here
    http://www.cs.bham.ac.uk/research/cogaff/talks/#simagent

and David Young's popvision package, described here
    http://www.cs.bham.ac.uk/research/poplog/popvision/help/

among other things.

Aaron
====
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   (ReadATas@please !)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html