simp.lisp



On Jan 24, 2008 3:07 PM, Barton Willis <willisb at unk.edu> wrote:

>
> One thing that would be useful: As you work through simp.lisp,
> write tests that try to reach every branch of the main
> functions (addk, timesk, for example...). That would be a valuable
> contribution


Excellent suggestion!  This will be very useful to the project as well as
helping Rupert understand the code.

One thing to watch for in simp.lisp: look for bugs similar to ...


Yes, very little code should be either adding a simp flag explicitly or
assuming that simplification is not needed.


> But it's easy to break stuff that the testsuite doesn't catch.


Agreed!  And with a proper testsuite, we could address longstanding (bug
report is 4+ years old; bug itself is 30+ years old!) bugs like
Nontransitivity of orderlessp/great (776441):

    q: x^2;
    r: (x+1)^2;
    s: x*(x+2);
   (q+s+r)-(q+s+r)  ==> x^2-x^2

Various solutions have been proposed, but presumably the reason none of them
has been implemented (in 5.13 at least) is that we don't know how existing
simplifier depends (subtly, perhaps) on the current 'great' behavior.

           -s