Need help -- redefining existing functions (reloading modified source)



What James is suggesting may make sense in a traditional C-based lisp
programming environment, but looks really really crude compared
to what can be done in lisp, as he alluded to...

First I would usually try loading the non-compiled version of
the same file into the lisp system and see if the same problem
occurs. If it does not occur, then it is a bug in the compiled
version only, and it is not going to be easy to fix.  (In this
case it appears to be a bug only on clisp... and maybe not even
all of those versions/)

If the non-compiled version has the same behavior, I would use
the debugging system (different in each lisp...) to find which
procedure exactly exhibits the error, and then insert debugging
(if *debug* (format t "~%parameters x=~x, y=~s"  x y))    etc
in the relevant code.

The idea that one should re-make the binary  (except once, to
see if the bug goes away!) strikes me as really awful!

RJF


James Amundson wrote:

>On Fri, 2003-11-28 at 16:14, Robert Dodier wrote:
>  
>
>>Hello,
>>
>>I'm attempting to figure out a bug fix (#834729).
>>    
>>
>
>Great. I heartily encourage that sort of behavior.
>
>  
>
>>Toward this end I want to hack on a source file
>>(plot.lisp) and then reload it and see if the 
>>modified functions work correctly.
>>    
>>
>
>That is a sensible plan.
>
>  
>
>> I am running 
>>Maxima 5.9.0 on Clisp 2.29, on RedHat 7.1 (kernel 2.4.2).
>>    
>>
>
>It really makes much more sense to do bug fixing with the current cvs
>version of Maxima. We should be getting close to a 5.9.1 release, so
>every bug fix will help.
>
>  
>
>>However, I find that just reloading the unmodified
>>file is problematic: with Maxima 5.9.0 (-r1.18 plot.lisp)
>>if I do load("plot.lisp") then plot(x^3,[x,-1,1]) yields
>>
>>  *** - THE: (- XEND X) evaluated to the values (2.0), not of type 
>>LONG-FLOAT
>>
>>and if I load the most recent CVS version (-r1.32 plot.lisp)
>>then plot(x^3,[x,-1,1]) yields
>>
>>  *** - argument to MINUSP should be a real number: NIL
>>
>>The problem with rev 1.18 is especially puzzling, since
>>it is the same version that is executed when I just do
>>plot(x^3,[x,-1,1]) by itself (which does work correctly).
>>    
>>
>
>I have tried the current cvs version of maxima (running Clisp) and
>maxima 5.9.0 (running GCL.) I tried the "native" version of plot.lisp
>and with 5.9.0 and the current version of plot.lisp with the cvs maxima.
>I can't reproduce your problem.
>
>  
>
>>I'm guessing that some functions or macros are getting
>>redefined in a different namespace or something. 
>>Can someone comment on this?
>>    
>>
>
>It is, unfortunately, possible that some functions or macros are getting
>redefined. As I said, however, I can't reproduce the problem here. You
>should probably try doing a rebuild from the source distribution.
>
>  
>
>>How do other people go about testing possible fixes?
>>    
>>
>
>More often than not, I do a "make" in the source directory, then run the
>maxima-local script. Dynamically reloading the source file is a more
>lisp-like way of doing things, though.
>
>  
>
>>I'd rather not rebuild the binary, since it seems
>>unnecessary, and besides I spent some time trying to
>>do that and couldn't get it working.
>>    
>>
>
>Compling the binary should be trivial. Although there are many known
>bugs in Maxima, few if any are in the compile. If you get the current
>version of clisp (2.31), the cvs version of maxima should compile with
>	./bootstrap
>	./configure
>	make
>If it doesn't, we want to know about it.
>
>--Jim
>
>_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
>  
>