axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Re: defintrf.spad


From: Gregory Vanuxem
Subject: [Axiom-developer] Re: defintrf.spad
Date: Fri, 06 Jul 2007 19:08:50 +0200

Le jeudi 05 juillet 2007 à 12:41 -0500, address@hidden a
écrit :
> Greg,
> 
> Attached is a diff of defintrf. Waldek points out that this code
> change was due to a spad compiler bug. 
> 
> Is there a mailing list discussion on this?

No, I posted some times ago an url to a port of part of Axiom to
SBCL/Clisp/CMUCL. This patch comes from this port.

> Do you have the bad code.lsp file?

It is already buggy. Lisp load int/algebra/DFINTTLS.NRLIB/code.lsp and
try to read mapleok.input, you'll end up with an error: |dir| is not
bound. In fact |dir| is just a selector of a Record. The wrong Lisp
generated code is: 

           (EXIT 
            (COND (|incl?| |l|) 
                  ('T
                   (SPADCALL 
                    (CONS #'|DFINTTLS;findRealZero!1|
                          (VECTOR $ |dir| |endpoint| |i|))
                                    ^^^^^ ^^^^^^^^^^
|dir| and |endpoint| are not variables so they have nothing to do here.
There are apparently some collisions in the Spad compiler however when
the code is compiled with low level safety the execution seems correct,
in other words you can replace |dir| and |endpoint| with nil without
problem.


> This could cause problems elsewhere.
> I'd really like to find out why the compiler failed
> so we can fix the root cause of the problem.

Yes me too, it's on my TODO list but right now I haven't the time nor
the knowledge to fix it.

Greg

PS : If you apply this workaround please remove my name, I use it, among
others, to grep the code.

> 
> Tim
> 
> --- ../silver/src/algebra/defintrf.spad.pamphlet      2007-04-27 
> 04:44:35.000000000 -0400
> +++ wh-sandbox/src/algebra/defintrf.spad.pamphlet     2007-04-27 
> 21:29:46.000000000 -0400
> @@ -182,7 +182,10 @@
>            ["min"/[t.left for t in l], i.halfinf.endpoint]
>          l := [u::REC for t in l | (u := refine(p, t, bounds)) case REC]
>          incl? => l
> -        select_!(keeprec?(i.halfinf.endpoint, #1), l)
> +        -- greg, FIXME dirty workaround
> +        -- select_!(keeprec?(i.halfinf.endpoint, #1), l)
> +        ep := i.halfinf.endpoint
> +        select_!(keeprec?(ep, #1), l)
>        error "findRealZero: should not happpen"
>  
>      checkBudan(p, a, b, incl?) ==
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]