[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Mar 9 15:23:02 2003 
Subject:pdnargs bug and fix to objectclass 
From:Aaron Sloman 
Volume-ID:1030309.01 


Dave Gurnell discovered and Steve Leach has now fixed a long standing
bug in Objectclass (Pop-11's object-oriented CLOS-like) extension.

The bug may have given users some incomprehensible mishaps in the past.

The latest version of objectclass with the bugfix is available from

    http://www.cs.bham.ac.uk/research/poplog/src/new/objectclass-10202.tar.gz
        148937 bytes

If you untar the file you'll find instructions for testing and
installation, also here
    http://www.cs.bham.ac.uk/research/poplog/src/new/objectclass/README

The problem is described in
    http://www.cs.bham.ac.uk/research/poplog/bugfixes/

Summary:
The problem is that if you define a method, then its updater, the method
gets the wrong value for pdnargs. This gets fixed the first time you run
he method, but if you trace it before running it (see TEACH TRACE)
then the wrong value causes the traced procedure not to work.

Here's an example:

    define :class thing;
    enddefine;

    define :method foo(x:thing);
    enddefine;

    define :method updaterof foo(y, x:thing);
    enddefine;

    pdnargs(foo) =>
    ** 2
    ;;; that should be 1

    ;;; so:
    trace foo;

    foo(newthing());

    ;;; MISHAP - TOO FEW ARGUMENTS FOR foo
    ;;; INVOLVING:  <thing>
    ;;; FILE     :  /home/staff/axs/news/objectlcass-pdnargs   LINE NUMBER:  20
    ;;; DOING    :  sys_exception_final sys_exception_handler
    ;;;     sys_raise_exception() systrace_proc systrace <false> sysEXECUTE
        .....

    pdnargs(frozval(1, foo)) =>
    ** 2
    ;;; should be 1

The problem does not manifest itself if you run foo once before
tracing it, or if foo does not have an updater.

I hope to have the downloadable files rebuilt soon.

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