Lisp stack overflow



On 6/5/10 1:32 PM, Robert Dodier wrote:
> On 6/4/10, Barton Willis <willisb at unk.edu> wrote:
>
>   
>> This is a bug; here is a related example:
>>
>>  (%i1) dpart(sin(a+b),1);
>>  Maxima encountered a Lisp error:
>>     
> Seems to be a bug of recent origin; works OK in Maxima 5.20.0,
> not in 5.21.0.
>
> The problem might or might not be in dpart, I can't tell;
> I can't get a useful stack trace out of GCL (no relevant info),
> Clisp (crash), or Clozure CL (crash).
>   
FWIW, I tested this with cmucl and pressed C-c to stop it.  The back
trace appears to indicate that the problem is in simp-%sin which calls
apply-reflection-simp which calls odd-reflection-select which calls
simp-%sin.  The argument to simp-%sin appears to alternate between

(SIMP-%SIN ((%SIN) ((MTIMES SIMP) -1 ((MBOX SIMP) (# $A $B))))
               ((MTIMES SIMP) -1 ((MBOX SIMP) ((MPLUS SIMP) $A $B)))
               MTIMES)

and

(SIMP-%SIN ((%SIN) ((MBOX SIMP) ((MPLUS SIMP) $A $B)))
               ((MBOX SIMP) ((MPLUS SIMP) $A $B))
               MBOX)

I guess the mbox is confusing odd-reflection-select.

I haven't investigated more yet....

Ray