Errors in the testsuite



Am Dienstag, den 30.03.2010, 20:17 -0400 schrieb Raymond Toy:
> On 3/30/10 3:01 PM, Dieter Kaiser wrote:
> > I get errors in testsuite with the current CVS version. The error is
> > triggered in the routine res after a call from the routine unitcir.
> >
> > This is a trace for the functions unitcir and res for one example:
> >
> > (%i8) integrate(1/(2+cos(x)),x,0,%pi);
> >   0: (UNITCIR
> >       ((MTIMES SIMP) 2
> >        ((MEXPT SIMP)
> >         ((MPLUS SIMP) 1 ((MTIMES SIMP RATSIMP) 4 YY)
> >          ((MEXPT SIMP RATSIMP) YY 2))
> >         -1))
> >       YY)
> >     1: (RES 2
> >             ((MPLUS SIMP) 1 ((MTIMES SIMP RATSIMP) 4 YY)
> >              ((MEXPT SIMP RATSIMP) YY 2))
> >             #<FUNCTION (LAMBDA #) {B20D885}> #<FUNCTION (LAMBDA #)
> > {B20D9ED}>)
> > Maxima encountered a Lisp error:
> >
> >  The value $NEG is not of type LIST.
> >   
> Although I sometimes forget to run the testsuite, I did run the
> testsuite before checking in this change.  I ran it again and cmucl and
> clozure cl both handle the integrals just fine.
> 
> The backtrace above seems to indicate that the error is in RES.  But RES
> doesn't call region or region1.  
> 
> Can you run it again but start maxima with the -g flag so you get dumped
> into the Lisp debugger?  That will produce a better backtrace and
> perhaps also give the offending source line.

Hello Ray,

this is a complete backtrace I have got for the example from above:

(%i3) integrate(1/(2+cos(x)),x,0,%pi);

debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread"
RUNNING {C2BBBA1}>:
  The value $NEG is not of type LIST.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [MACSYMA-QUIT] Maxima top-level
  1: [CONTINUE    ] Ignore runtime option --eval "(cl-user::run)".
  2: [ABORT       ] Skip rest of --eval and --load options.
  3:                Skip to toplevel READ/EVAL/PRINT loop.
  4: [QUIT        ] Quit SBCL (calling #'QUIT, killing the process).

(RES1
 2
 #<unavailable argument>
 (((MPLUS SIMP) -2 ((MEXPT SIMP) 3 ((RAT SIMP) 1 2))) . $NEG))
0] backtrace

0: (RES1
    2
    #<unavailable argument>
    (((MPLUS SIMP) -2 ((MEXPT SIMP) 3 ((RAT SIMP) 1 2))) . $NEG))
1: (RES
    2
    ((MPLUS SIMP) 1 ((MTIMES SIMP RATSIMP) 4 YY) ((MEXPT SIMP RATSIMP)
YY 2))
    #<FUNCTION (LAMBDA #) {B20D885}>
    #<FUNCTION (LAMBDA #) {B20D9ED}>)
2: (UNITCIR
    ((MTIMES SIMP) 2
     ((MEXPT SIMP)
      ((MPLUS SIMP) 1 ((MTIMES SIMP RATSIMP) 4 YY) ((MEXPT SIMP RATSIMP)
YY 2))
      -1))
    YY)
3: (ZTO%PI2
    ((MEXPT SIMP)
     ((MPLUS SIMP) 2
      ((MTIMES SIMP) ((RAT SIMP) 1 2) ((MPLUS SIMP) (# YY -1) YY)))
     -1)
    YY)
4: (SCRAT ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1) $%PI)
5: (INTSC0 ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1) $%PI $X)
6: (INTSC ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1) $%PI $X)
7: (TRY-INTSC ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1) $%PI
$X)
8: (INTSC1
    #<unavailable argument>
    $%PI
    ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1))
9: (DINTEGRATE ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1) $X 0
$%PI)
10: (METHOD-BY-LIMITS
     ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1)
     $X
     0
     $%PI)
11: (PARSE-INTEGRAND
     ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1)
     $X
     0
     $%PI)
12: (INITIAL-ANALYSIS
     ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1)
     $X
     0
     $%PI)
13: (DEFINT ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1) $X 0 $%
PI)
14: ($DEFINT
     #<unavailable argument>
     #<unavailable argument>
     #<unavailable argument>
     #<unavailable argument>)
15: ($INTEGRATE ((MEXPT SIMP) ((MPLUS SIMP) 2 ((%COS SIMP) $X)) -1) $X 0
$%PI)
16: (MEVAL1 #<unavailable argument>)
17: (MEVAL (($INTEGRATE) ((MQUOTIENT) 1 ((MPLUS) 2 ((%COS) $X))) $X 0 $%
PI))
18: (MEVAL* (($INTEGRATE) ((MQUOTIENT) 1 ((MPLUS) 2 ((%COS) $X))) $X 0
$%PI))
19: (TOPLEVEL-MACSYMA-EVAL
     (($INTEGRATE) ((MQUOTIENT) 1 ((MPLUS) 2 ((%COS) $X))) $X 0 $%PI))
20: (CONTINUE #<unavailable argument> #<unavailable argument>)
21: (MACSYMA-TOP-LEVEL #<unavailable argument> #<unavailable argument>)
22: (RUN)
23: (SB-INT:SIMPLE-EVAL-IN-LEXENV (RUN) #<NULL-LEXENV>)
24: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(cl-user::run)")))
25: (SB-IMPL::TOPLEVEL-INIT)
26: ((LABELS SB-IMPL::RESTART-LISP))

Dieter Kaiser