assistance with fourier_elim bug



Barton Willis wrote:
> I've been appending /share rtest files to the share_testsuite. With 5.15.0
> + gcl this test
> from rtest_fourier_elim works OK:
> 
>  (%i1)
>  load("C:/maximacvs/maxima/share/contrib/fourier_elim/fourier_elim.lisp")$
>  (%i2) fourier_elim([x[2]+x[1]<1,x[1]-x[2]>-1],[x[1],x[2]]);
>  (%o2) [x[2]-1<x[1],x[1]<1-x[2],x[2]<1]
> 
> But with CVS Maxima compiled with SBCL + XP, it fails:
> 
>  (%i1) load(fourier_elim)$
>  (%i2) fourier_elim([x[2]+x[1]<1,x[1]-x[2]>-1],[x[1],x[2]]);
> 
> Maxima encountered a Lisp error:
> 
>  Error during processing of --eval option "(cl-user::run)":
> 
>   The value NIL is not of type CHARACTER.
> 
> SBCL for XP is experimental---if somebody could verify this bug
> using CVS Maxima + SBCL (or CMUCL or ...) + non-windows, it might save me
> some time.

You should be able to use the -g option with maxima so you get dumped 
into the debugger.  When I do this with maxima and cmucl, I get the 
following

(%i2) fourier_elim([x[2]+x[1]<1,x[1]-x[2]>-1],[x[1],x[2]]);

Type-error in KERNEL::OBJECT-NOT-BASE-CHAR-ERROR-HANDLER:
    NIL is not of type BASE-CHAR
    [Condition of type TYPE-ERROR]

Restarts:
   0: [MACSYMA-QUIT] Maxima top-level
   1: [ABORT       ] Skip remaining initializations.

Debug  (type H for help)

(LISP::STRING-OUCH #<String-Output Stream> NIL)
Source:
; File: target:code/stream.lisp
(SETF (AREF WORKSPACE CURRENT) CHARACTER)
0] back 9

0: (LISP::STRING-OUCH #<String-Output Stream> NIL)
1: (WRITE-CHAR NIL #<String-Output Stream>)
2: (OUTPUT-TEXT* #<String-Output Stream> NIL NIL NIL NIL)
3: (AFORMAT NIL "~:M" (($X SIMP ARRAY) 1))
4: (GENSYM-READABLE (($X SIMP ARRAY) 1))
5: (ORDERPOINTER ((($X SIMP ARRAY) 1) (($X SIMP ARRAY) 2)))

So it looks like OUTPUT-TEXT* is the problem.  I haven't figured out why 
output-text* wants to print NIL.  It seems that it's only expecting 
characters and NIL somehow is on the list to be printed.

Ray