New ECL with better type propagator finds bug in maxima
Subject: New ECL with better type propagator finds bug in maxima
From: Richard Fateman
Date: Mon, 03 Aug 2009 15:00:10 -0700
The program was written by (Prof) Michael Genesereth, now at Stanford.
The whole "db" assumptions stuff could be rewritten and documented to
some benefit.
What is apparent though is that this piece of code is not a major bug.
If it were a major bug it would
cause problems with the running of the program. Instead it seems to
have been unnoticed for 35 years.
Perhaps the section of code with the wrong type has never ever been
executed.
Whether the patch is "correct" or not may be quite irrelevant.
I suggest, at a minimum, clearly documenting the reason for the change,
who changed it, and why it seems more plausible than (say) commenting
out the line entirely.
RJF
Andreas Eder wrote:
> Hi David,
>
>
>>>>>> "David" == David Kirkby <david.kirkby at onetel.net> writes:
>>>>>>
>
> David> The comments of Juanjo are:
> David> -------------------------------------------
> David> Ooops, ECL now implements a better type propagator, which has detected
> David> an error in the following function
>
> David> (defun queue+p (nd lab)
> David> (cond ((null (setq *db* (+labs nd)))
> David> [...] (t
> David> (iorm *db* (logior +lab-high-bit+ (unlab lab))))))
>
> David> Based on this definition
>
> David> (defmacro iorm (cell n)
> David> `(rplaca ,cell (logior (car ,cell) (car ,n))))
>
> David> the second argument to (IORM *db* ...) should be a cons, not an
> David> integer.
>
> this is a known problem, that manifests itself also with SBCL,
> though doesn't hinder generating a compiled files.
> The problem is that db.lisp is not well documented and nobody
> seems to know what queue+p should really be doing. I can make a
> guess what it should look like, but that's it. :-(
>
> 'Andreas
>