axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Re: debugging


From: Camm Maguire
Subject: Re: [Axiom-developer] Re: debugging
Date: 15 Jul 2007 17:04:03 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Greetings, and thanks!  The problem is that the global entries to the
functions returning double float etc. are not being writtin into
DFLOAT.c.  I'm trying to debug by reproducing the compile-file step on
DFLOAT.lsp.  This fails at the lisp prompt:

(compile-file "DFLOAT.NRLIB/DFLOAT.lsp")

; (DEFUN |DFLOAT;manexp| ...) is being compiled.
;;; The tag #:G2017215 is undefined.
; (DEFUN |DFLOAT;rationalApproximation;$2NniF;84| ...) is being compiled.
;;; The tag #:G2017237 is undefined.
;;; The tag G190 is undefined.
; (DEFUN |DFLOAT;**;$F$;85| ...) is being compiled.
;;; The tag #:G2017246 is undefined.
;;; The tag #:G2017246 is undefined.
No FASL generated.

Error: 
Fast links are on: do (si::use-fast-links nil) for debugging
Signalled by BREAK.
Condition in BREAK [or a callee]: INTERNAL-SIMPLE-PROGRAM-ERROR: Compilation of 
"DFLOAT.NRLIB/DFLOAT.lsp" failed.

Broken at BREAK.  Type :H for Help.
 1 Retry compiling file "DFLOAT.NRLIB/DFLOAT.lsp".
 2 Retry compiling file "DFLOAT.NRLIB/DFLOAT.lsp".
 3 (Abort) Return to debug level 2.
 4 (Continue) Return from break.
 5 Return to top level.
COMPILER>>

Then I try )co "DFLOAT.spad" from the axiom prompt:

)co "DFLOAT.spad"
   Your command is ambiguous. The following are abbreviated by co :
      compiler 
      copyright 
(1) -> )quit
   Please enter y or yes if you really want to leave the interactive 
      environment and return to the operating system:
y
   You have chosen to remain in the AXIOM interactive environment.
(1) -> 
(1) -> 
Program exited normally.

So I try a fresh interpsys, set the stage 1 bootstrap mode flag, And
find a very long chain of compiles which must proceed before I can
compile DFLOAT.  

I'm sure I'm just making some simple mistake, but how can one rebuild
just DFLOAT from any given stage in the build?  This will enable me to
fix this.

Take care,


Waldek Hebisch <address@hidden> writes:

> Camm Maguire wrote:
> > Waldek Hebisch <address@hidden> writes:
> > > I wrote:
> > > > There are several functions involved.  In case of #<OBJNULL> using
> > > > traces I see that |compDefineCapsuleFunction| function (defined
> > > > in 'define.boot.pamphlet') gets:
> > > > 
> > > >  1> (|compDefineCapsuleFunction|
> > > >          (DEF (|base|) (NIL) (NIL)
> > > >               ((|elt| |Lisp| FLOAT-RADIX) (|elt| $ (|Zero|))))
> > > > ...
> > > > ...
> > > > 
> > 
> > In which package is this?  Is it present in interpsys?
> >
> 
> First a little correction: there are two versions on 
> |compDefineCapsuleFunction|, one in 'define.boot.pamphlet' and
> the second one in 'br-saturn.boot.pamphlet'.  Normally version
> from 'br-saturn.boot.pamphlet' is in use.  
> 
> All functions in question are defined in "BOOT" package.  The
> files are autoloaded.  To get the traces I did (in the algebra
> build directory):
> 
> (export AXIOM=/h/axp62/ax-build2/target/x86_64-unknown-linux; export 
> DAASE=/h/axp62/wh-sandbox/src/share; 
> /h/axp62/ax-build2/build/x86_64-unknown-linux/bin/interpsys )
> )lisp (|oldCompilerAutoloadOnceTrigger|)
> )lisp (trace |compElt| |compileCases| |compDefineCapsuleFunction| |compForm1|)
> )compile "DFLOAT.spad"
>  
> That produced about 150 Mb trace.
> 
> To be extra careful you may also do (before tracing):
> 
> )lisp (|browserAutoloadOnceTrigger|)
> 
> to load correct version of |compDefineCapsuleFunction|.
> 
> > > > 
> > > > It seems that (|elt| $ (|Zero|)) give us '#<OBJNULL>.  |elt| is
> > > > handled in 'compiler.boot.pamphlet':
> > > > 
> > > > 
> > > >     2> (|compForm1| ((|elt| |Lisp| FLOAT-RADIX) (|elt| $ (|Zero|)))
> > > > 
> > > >       3> (|compElt| (|elt| $ (|Zero|)) |$EmptyMode|
> > > > ....
> > > > ....
> > > >       <3 (|compElt|
> > > >              ((|call| (XLAM |ignore| '#<OBJNULL>)) $
> > > > 
> > > 
> > 
> > Can you please post the full call to compElt in 3> above?
> >
> 
> The third argument is large (75 kb), so I have put call to |compElt|
> and return value at:
> 
> http://www.math.uni.wroc.pl/~hebisch/compElt.txt
> 
>  
> > > I have narrowed down the problem:
> > > 
> > >    compiling exported base : () -> PositiveInteger
> > >   1> (|genDeltaEntry| (|Zero| ($ $) (T (CONST $ 18))))
> > >     2> (|optDeltaEntry| |Zero| ($) $ CONST)
> > >       3> (|compiledLookup| |Zero| ((|DoubleFloat|))
> > >              #<vector 0000000002b66f90>)
> > >       <3 (|compiledLookup|
> > >              (|makeSpadConstant|
> > >                  #<compiled-function |DFLOAT;Zero;$;15|>
> > >                  #<vector 0000000002b66f90> 25))
> > >     <2 (|optDeltaEntry| (XLAM |ignore| '#<OBJNULL>))
> > >   <1 (|genDeltaEntry| (XLAM |ignore| '#<OBJNULL>))
> > > 
> > > 
> > > |makeSpadConstant| calls its argument.  Checking this I get:
> > > 
> > 
> > Why are there 3 arguments above?  The definition appears to take one.
> >
> 
> (|makeSpadConstant|
>                  #<compiled-function |DFLOAT;Zero;$;15|>
>                  #<vector 0000000002b66f90> 25)
> 
> is not a call, it is just a list of length four.  This list is
> passed to the SPADCALL macro with the effect that car of the list
> is called with cdr as na argument (using SPADCALL is an abuse here...).
>  
> > > )lisp (|DFLOAT;Zero;$;15| nil)
> > > 
> > > Value = #<OBJNULL>
> > > 
> > > )lisp (disassemble '|DFLOAT;Zero;$;15|)
> > > ^M
> > >    >> System error:
> > >    Condition in DISASSEMBLE [or a callee]: INTERNAL-SIMPLE-END-OF-FILE: 
> > > Stream error on stream #<input stream "/tmp/gazonk0.c">: Unexpected end 
> > > of file:
> > > 
> > 
> > This is a simple .h file naming bug I'll try to fix soon.
> > 
> > 
> > > Looking at "/tmp/gazonk0.c" I see:
> > > 
> > > 
> > > #include "cmpinclude.h"
> > > #include "gazonk0.h"
> > > void init__tmp_gazonk0(){do_init((void *)VV);}
> > > /*      local entry for function DFLOAT;Zero;$;15       */
> > > 
> > > static double LI1__DFLOAT$Zero$$$15___gazonk0(V2)
> > > 
> > > object V2;
> > > {        VMB1 VMS1 VMV1
> > >         goto TTL;
> > > TTL:;
> > >         /*(FLOAT 0 MOST-POSITIVE-DOUBLE-FLOAT)*/
> > >         {fixnum V3;
> > >         V3= (fixnum)0;
> > >         V3= (fixnum)0;
> > >         {double V4 = (    1.    )*((fixnum)0);VMR1
> > >         (V4);}}
> > >         /* END (FLOAT 0 MOST-POSITIVE-DOUBLE-FLOAT)*/
> > >         {double V5 = lf(Cnil);VMR1
> > >         (V5);}
> > 
> > This is correct but unpleasant C which needs tidying.  There can be
> > extra 'unwinds' scheduled currently in GCL -- these are harmless but
> > misleading.  The function returns from the macro VMR1.  I'll try to
> > clean this up too.
> > 
> 
> I mean that 'lf(Cnil)' looks strange -- Axiom expects double
> precision 0 as the result.
> 
> > Why does this function take an argument which is ignored -- is this right? 
> > 
> 
> Yes, |DFLOAT;Zero;$;15| is a Spad function.  All Spad function receive
> an extra argument:  the domain or package to which they belong.  This
> extra argument appears last in the argument list.  |DFLOAT;Zero;$;15|
> does not need any extra information from its domain, so the
> argument is ignored, but in general it may be used.  If one wants
> to pass "correct" value of the argument one has to do:
> 
> )lisp (|DoubleFloat|)
> )lisp (|DFLOAT;Zero;$;15| (|DoubleFloat|))
> 
> the first call to |DoubleFloat| is triggers autolading of DFLOAT.o file.
> 
> If I do the above in 2.6.8 compiled interpsys I get floating point
> 0.  In 2.7.0 compiled interpsys (the one from the failing build) I get
> #<OBJNULL>
>  
> 
> -- 
>                               Waldek Hebisch
> address@hidden 
> 
> 
> _______________________________________________
> Axiom-developer mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/axiom-developer
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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