gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] Re: Patches


From: Camm Maguire
Subject: Re: [Gcl-devel] Re: Patches
Date: 28 Jun 2004 19:11:57 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

Martin Rubey <address@hidden> writes:

> Camm Maguire writes:
>  > Greetings!
>  > 
>  > Martin Rubey <address@hidden> writes:
>  > 
>  > > Dear Prof. Bronstein,
>  > > 
>  > > thanks a lot for your answer!
>  > > 
>  > > Manuel Bronstein writes:
>  > >  > - new()$Symbol is working properly in the NAG version, so 9298 is
>  > >  >   probably a lisp problem.
>  > > 
>  > > Good. I remember that somebody was building axiom on cmucl -- I think it 
> was 
>  > > Juergen Weiss. Could he try to reproduce bug #9298 on cmucl? Camm 
> Muguire (GCL)
>  > > already offered to track down the bug:
>  > > 
>  > > Camm Maguire wrote:
>  > >  > If you suspect a GCL error here, and preferably can boil it down to a 
> simple
>  > >  > lisp example, I'd be happy to take a look.
>  > > 
>  > > However, I don't know how to "boil it down" :-(
>  > > 
>  > 
>  > OK, I'm afraid I've lost the thread.  If you could please give me the
>  > commands you are using in axiom, what the result is, and what you
>  > think it should be, in of course as simple an example as you can, I'll
>  > be happy to take a look.
> 
> Here you go:
> 
>                         AXIOM Computer Algebra System 
>                Version of Wednesday June 9, 2004 at 15:38:25 
> -----------------------------------------------------------------------------
>    Issue )copyright to view copyright notices.
>    Issue )summary for a summary of useful system commands.
>    Issue )quit to leave AXIOM and return to shell.
> -----------------------------------------------------------------------------
>  
>    Re-reading compress.daase   Re-reading interp.daase
>    Re-reading operation.daase
>    Re-reading category.daase
>    Re-reading browse.daase
> (1) -> %A::Symbol
> 
>    (1)  %A
>                                                                  Type: Symbol
> (2) -> new()$Symbol
> 
>    (2)  %A
>                                                                  Type: Symbol

OK, I've had a brief look at this, and from what I can see thus far,
|SYMBOL;new;$;27| in SYMBOL.lsp is not being called in the former
case, but is in the latter, as is proper.  This function increments an
element in the symbol constructor vector to keep track of which
symbols it has interned/generated:

(SPADCALL (QREFELT |$| 9) (|+| (SPADCALL (QREFELT |$| 9) (QREFELT |$| 90)) 1) 
(QREFELT |$| 91))

I can only find references to this ninth element in |SYMBOL;new;2$;28|
and |SYMBOL;resetNew;V;29| of the same file.  I think the former is
the one that should be invoked but is not for some reason.  

This is all just preliminary, but I wanted to ask -- is the adjustment
to the constructor vector supposed to happen at the same time the
symbol is interned?  Any idea of a generic place to look for updates
to this vector?


Some lisp debugging info in case it triggers anything: 


Lisp backtraces set at |Symbol|:

#0   BREAK {loc0="Symbol",loc1=((system::arglist 
nil)),loc2=nil,loc3=nil,loc4=((cons (quote...} [ihs=41]
#1   Symbol {} [ihs=40]
#2   TRACE-CALL {} [ihs=39]
#3   Symbol {} [ihs=38]
#4   EVAL {loc0=nil,loc1=nil,loc2=nil,loc3=(lambda-block |Symbol| (&rest 
system::args) ......} [ihs=37]
#5   TRACE-CALL {} [ihs=36]
#6   evalDomain {(|Symbol|)=nil,} [ihs=35]
#7   coerceByFunction {|OutputForm|=nil,} [ihs=27]
#8   TRACE-CALL {} [ihs=26]
#9   coerceByFunction {((|Symbol|) wrapped . %s)=(|OutputForm|),} [ihs=25]
#10   coerceIntTableOrFunction {loc0=((|Symbol|) wrapped . 
%s),loc1=(|OutputForm|),loc2=((|Symbol|) wrapped . %...} [ihs=24]
#11   coerceIntTower {loc0=((|Symbol|) wrapped . %s),loc1=(|OutputForm|)} 
[ihs=23]
#12   coerceInt1 {loc0=((|Symbol|) wrapped . 
%s),loc1=(|OutputForm|),loc2=#:g1443,loc3=((wrapped ...} [ihs=22]
#13   coerceInt {loc0=((|Symbol|) wrapped . 
%s),loc1=(|OutputForm|),loc2=nil,loc3=((|isWrapped| ...} [ihs=21]
#14   coerceInt0 {loc0=((|Symbol|) wrapped . %s),loc1=(|OutputForm|)} [ihs=20]
#15   coerceInteractive {loc0=((|Symbol|) wrapped . 
%s),loc1=(|OutputForm|),loc2=((system::args (%s #)))} [ihs=19]
#16   output {expr=%s,domain=(|Symbol|),loc2=((system::trace-call (quote 
#:g1458) system::arg...} [ihs=18]
#17   recordAndPrint {loc0=%s,loc1=(|Symbol|),loc2=((system::args (#)))} 
[ihs=17]
#18   processInteractive1 {loc0=(|::| %s symbol),loc1=(|Coerceto| ((|id| #) . 
%s) ((|id| #) . symbol)),loc...} [ihs=16]
#19   processInteractive {loc0=(|::| %s symbol),loc1=(|Coerceto| ((|id| #) . 
%s) ((|id| #) . symbol)),loc...} [ihs=15]
#20   intInterpretPform {loc0=(|Coerceto| ((|id| #) . %s) ((|id| #) . symbol))} 
[ihs=14]
#21   ncConversationPhase {fn=#<compiled-function 
|phInterpret|>,args=(((|carrier| # # ...))),loc2=(((# . ...} [ihs=13]
#22   intloopSpadProcess,interp {loc0=((|carrier| (|ok?| . t) (|ptreePremacro| 
. #0=(|Coerceto| # #)) ...)),loc1...} [ihs=12]
#23   intloopSpadProcess {loc0=10,loc1=(((# . 1) . 
"%S::SYMBOL")),loc2=(|Coerceto| ((|id| #) . %s) ((|id|...} [ihs=11]
#24   intloopProcess {loc0=10,loc1=t,loc2=(((#) (|Coerceto| # #)) 
|nonnullstream| #<compiled-function...} [ihs=10]
#25   intloopProcessString {loc0="%S::SYMBOL",loc1=10} [ihs=9]
#26   intloopReadConsole {loc0="",loc1=1,loc2="",loc3="%S::SYMBOL",loc4=nil} 
[ihs=8]
#27   SpadInterpretStream {loc0=1,loc1=(tim daly 
?),loc2=t,loc3=nil,loc4=nil,loc5=string-char,loc6=string-...} [ihs=7]
#28   RESTART {} [ihs=6]
#29   TOP-LEVEL 
{loc0=nil,loc1=0,loc2=0,loc3=nil,loc4=nil,loc5=nil,loc6=nil,loc7="/fix/k/camm/gc...}
 [ihs=5]
#30   FUNCALL {loc0=#<compiled-function system:top-level>} [ihs=4]
NIL


vs 

#0   BREAK {loc0="Symbol",loc1=((system::arglist 
nil)),loc2=nil,loc3=nil,loc4=((cons (quote...} [ihs=30]
#1   Symbol {} [ihs=29]
#2   TRACE-CALL {} [ihs=28]
#3   Symbol {} [ihs=27]
#4   EVAL {loc0=nil,loc1=nil,loc2=nil,loc3=(lambda-block |Symbol| (&rest 
system::args) ......} [ihs=26]
#5   evalDomain {loc0=(|Symbol|),loc1=(|Symbol|),loc2=(|Symbol|)} [ihs=25]
#6   evalForm {loc0=#<vector 08d40604>,loc1=|new|,loc2=nil,loc3=(((#0=# #0#) 
($) nil)),loc4=|m...} [ihs=24]
#7   bottomUpForm2 {loc0=(#<vector 08d40604>),loc1=#<vector 
08d40604>,loc2=|new|,loc3=nil,loc4=nil,...} [ihs=23]
#8   bottomUpForm3 {loc0=(#<vector 08d40604>),loc1=#<vector 
08d40604>,loc2=|new|,loc3=nil,loc4=nil,...} [ihs=22]
#9   bottomUpForm {loc0=(#<vector 08d40604>),loc1=#<vector 
08d40604>,loc2=|new|,loc3=nil,loc4=nil} [ihs=21]
#10   bottomUp {loc0=(#<vector 08d40604>),loc1=0} [ihs=20]
#11   upDollar {loc0=(#<vector 08d405e8> |Symbol| (#<vector 08d40604>)),loc1=0} 
[ihs=19]
#12   bottomUp {loc0=(#<vector 08d405e8> |Symbol| (#<vector 
08d40604>)),loc1=(#<vector 08d405e8...} [ihs=18]
#13   interpret1 {loc0=((|$elt| |Symbol| |new|)),loc1=nil,loc2=(|Application| 
(|Fromdom| (# . |ne...} [ihs=17]
#14   interpret {g3899=((|$elt| |Symbol| |new|)),loc1=(|Application| (|Fromdom| 
(# . |new|) (# ....} [ihs=16]
#15   interpretTopLevel {loc0=((|$elt| |Symbol| |new|)),loc1=(|Application| 
(|Fromdom| (# . |new|) (# . ...} [ihs=15]
#16   processInteractive1 {loc0=((|$elt| |Symbol| |new|)),loc1=(|Application| 
(|Fromdom| (# . |new|) (# . ...} [ihs=14]
#17   processInteractive {loc0=((|$elt| |Symbol| |new|)),loc1=(|Application| 
(|Fromdom| (# . |new|) (# . ...} [ihs=13]
#18   intInterpretPform {loc0=(|Application| (|Fromdom| (# . |new|) (# . 
|Symbol|)) (|Tuple| (|listOf|))...} [ihs=12]
#19   ncConversationPhase {fn=#<compiled-function 
|phInterpret|>,args=(((|carrier| # # ...))),loc2=(((# . ...} [ihs=11]
#20   intloopSpadProcess,interp {loc0=((|carrier| (|ok?| . t) (|ptreePremacro| 
. #0=(|Application| # #)) ...)),l...} [ihs=10]
#21   intloopSpadProcess {loc0=7,loc1=(((# . 1) . 
"new()$Symbol")),loc2=(|Application| (|Fromdom| (# . |n...} [ihs=9]
#22   intloopProcess {loc0=7,loc1=t,loc2=(((#) (|Application| # #)) 
|nonnullstream| #<compiled-functi...} [ihs=8]
#23   intloopProcessString {loc0="new()$Symbol",loc1=7} [ihs=7]
#24   RESTART {} [ihs=6]
#25   TOP-LEVEL 
{loc0=nil,loc1=0,loc2=0,loc3=nil,loc4=nil,loc5=nil,loc6=nil,loc7="/fix/k/camm/gc...}
 [ihs=5]
#26   FUNCALL {loc0=#<compiled-function system:top-level>} [ihs=4]
NIL


and the constructor itself:

)lisp (dotimes (i (length foo)) (format t "~S ~S~%" i (aref foo i)))
0 (|Symbol|)
1 (#<compiled-function |lookupComplete|> #<vector 08e04230> #<vector 08dbab98>)
2 NIL
3 0
4 (#<vector 08e0424c> #<vector 08dbab60> . #<vector 08dbaaf0>)
5 NIL
6 #<vector 08e04268>
7 #<vector 08e042a0>
8 (#<compiled-function |REF;ref;S$;2|> . #<vector 08e042a0>)
9 (3)
10 #<vector 08e042f4>
11 (#<compiled-function |ALIST;empty;$;2|> . #<vector 08e042f4>)
12 (NIL)
13 (|List| 28)
14 #<vector 08e0463c>
15 (#<compiled-function |A1AGG-;construct;LA;21|> . #<vector 08e04674>)
16 #<vector 08e046ac>
17 "0123456789"
18 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
19 "abcdefghijklmnopqrstuvwxyz"
20 (|Boolean|)
21 (#<compiled-function |SYMBOL;scripted?;$B;30|> . #<vector 08e04230>)
22 (|Void|)
23 (|Symbol|)
24 (|OpenMathDevice|)
25 (|newGoGet| #<vector 08e04230> 14 . |OMputVariable|)
26 (|OpenMathEncoding|)
27 (|newGoGet| #<vector 08e04230> 20 . |OMencodingXML|)
28 #<vector 08e04498>
29 (|newGoGet| #<vector 08e04230> 24 . |OMopenString|)
30 (|newGoGet| #<vector 08e04230> 30 . |OMputObject|)
31 (|newGoGet| #<vector 08e04230> 35 . |OMputEndObject|)
32 (|newGoGet| #<vector 08e04230> 40 . |OMclose|)
33 (#<compiled-function |SYMBOL;OMwrite;$S;2|> . #<vector 08e04230>)
34 (#<compiled-function |SYMBOL;OMwrite;$BS;3|> . #<vector 08e04230>)
35 (#<compiled-function |SYMBOL;OMwrite;Omd$V;4|> . #<vector 08e04230>)
36 (#<compiled-function |SYMBOL;OMwrite;Omd$BV;5|> . #<vector 08e04230>)
37 "*"
38 1
39 #<vector 08e044b4>
40 (#<compiled-function |CHAR;char;S$;20|> . #<vector 08e044b4>)
41 (#<compiled-function |CHAR;ord;$I;7|> . #<vector 08e044b4>)
42 48
43 (|InputForm|)
44 (|newGoGet| #<vector 08e04230> 55 . |convert|)
45 (#<compiled-function |SYMBOL;convert;$If;6|> . #<vector 08e04230>)
46 (#<compiled-function |SYMBOL;convert;2$;7|> . #<vector 08e04230>)
47 (#<compiled-function |SYMBOL;coerce;S$;8|> . #<vector 08e04230>)
48 (#<compiled-function |SYMBOL;=;2$B;9|> . #<vector 08e04230>)
49 (#<compiled-function |SYMBOL;<;2$B;10|> . #<vector 08e04230>)
50 #<vector 08e04524>
51 (#<compiled-function |OUTFORM;outputForm;S$;8|> . #<vector 08e04524>)
52 (#<compiled-function |SYMBOL;coerce;$Of;11|> . #<vector 08e04230>)
53 (|List| 55)
54 (#<compiled-function |SYMBOL;script;$L$;22|> . #<vector 08e04230>)
55 (|List| 50)
56 (#<compiled-function |SYMBOL;subscript;$L$;12|> . #<vector 08e04230>)
57 (#<compiled-function |SYMBOL;elt;$L$;13|> . #<vector 08e04230>)
58 (#<compiled-function |SYMBOL;superscript;$L$;14|> . #<vector 08e04230>)
59 (#<compiled-function |SYMBOL;argscript;$L$;15|> . #<vector 08e04230>)
60 (|PatternMatchResult| 6 23)
61 (|Pattern| 6)
62 (|PatternMatchSymbol| 6)
63 (|newGoGet| #<vector 08e04230> 65 . |patternMatch|)
64 (|PatternMatchResult| 6 $)
65 (#<compiled-function |SYMBOL;patternMatch;$P2Pmr;16|> . #<vector 08e04230>)
66 (|PatternMatchResult| (|Float|) 23)
67 (|Pattern| (|Float|))
68 (|PatternMatchSymbol| (|Float|))
69 (|newGoGet| #<vector 08e04230> 72 . |patternMatch|)
70 (|PatternMatchResult| (|Float|) $)
71 (#<compiled-function |SYMBOL;patternMatch;$P2Pmr;17|> . #<vector 08e04230>)
72 (|newGoGet| #<vector 08e04230> 79 . |coerce|)
73 (#<compiled-function |SYMBOL;convert;$P;18|> . #<vector 08e04230>)
74 (|newGoGet| #<vector 08e04230> 84 . |coerce|)
75 (#<compiled-function |SYMBOL;convert;$P;19|> . #<vector 08e04230>)
76 (|List| $)
77 (|newGoGet| #<vector 08e04230> 89 . |concat|)
78 (|newGoGet| #<vector 08e04230> 94 . |concat|)
79 (|Record| (|:| |sub| 55) (|:| |sup| 55) (|:| |presup| 55) (|:| |presub| 55) 
(|:| |args| 55))
80 (#<compiled-function |SYMBOL;script;$R$;23|> . #<vector 08e04230>)
81 (#<compiled-function |SYMBOL;name;2$;31|> . #<vector 08e04230>)
82 (#<compiled-function |SYMBOL;string;$S;24|> . #<vector 08e04230>)
83 (#<compiled-function |ISTRING;elt;$IC;30|> . #<vector 08d40000>)
84 (|newGoGet| #<vector 08e04230> 106 . =)
85 (#<compiled-function |SYMBOL;scripts;$R;32|> . #<vector 08e04230>)
86 (|newGoGet| #<vector 08e04230> 112 . |latex|)
87 (#<compiled-function |SYMBOL;latex;$S;25|> . #<vector 08e04230>)
88 (#<compiled-function |ISTRING;minIndex;$I;11|> . #<vector 08d40000>)
89 (#<compiled-function |LNAGG-;concat;S2A;4|> . #<vector 08d40188>)
90 (#<compiled-function |REF;elt;$S;3|> . #<vector 08e042a0>)
91 (#<compiled-function |REF;setelt;$2S;4|> . #<vector 08e042a0>)
92 ((LAMBDA-BLOCK |SYMBOL;new;$;27| ($) (BREAK "new") (PROG (|sym|) (RETURN 
(SEQ (LETT |sym| (|SYMBOL;anyRadix| (SPADCALL (QREFELT $ 9) (QREFELT $ 90)) 
(QREFELT $ 18) $) |SYMBOL;new;$;27|) (SPADCALL (QREFELT $ 9) (+ (SPADCALL 
(QREFELT $ 9) (QREFELT $ 90)) 1) (QREFELT $ 91)) (EXIT (SPADCALL (STRCONC "%" 
|sym|) (QREFELT $ 47))))))) . #<vector 08e04230>)
93 (|Union| 6 (QUOTE "failed"))
94 (|newGoGet| #<vector 08e04230> 139 . |search|)
95 (|newGoGet| #<vector 08e04230> 145 . |setelt|)
96 (|newGoGet| #<vector 08e04230> 152 . |maxIndex|)
97 (|newGoGet| #<vector 08e04230> 157 . |position|)
98 (#<compiled-function |SYMBOL;new;2$;28|> . #<vector 08e04230>)
99 (|List| $$)
100 (|newGoGet| #<vector 08e04230> 163 . |keys|)
101 (|newGoGet| #<vector 08e04230> 168 . |remove!|)
102 (|newGoGet| #<vector 08e04230> 174 . |void|)
103 (#<compiled-function |SYMBOL;resetNew;V;29|> . #<vector 08e04230>)
104 (#<compiled-function |SYMBOL;list;$L;34|> . #<vector 08e04230>)
105 (|newGoGet| #<vector 08e04230> 178 . |first|)
106 (|newGoGet| #<vector 08e04230> 183 . |digit?|)
107 (|UniversalSegment| 6)
108 (|newGoGet| #<vector 08e04230> 188 . SEGMENT)
109 (|newGoGet| #<vector 08e04230> 194 . |elt|)
110 (|List| 112)
111 (|newGoGet| #<vector 08e04230> 200 . |minIndex|)
112 (|NonNegativeInteger|)
113 (|newGoGet| #<vector 08e04230> 205 . |setelt|)
114 (|newGoGet| #<vector 08e04230> 212 . |concat|)
115 (|newGoGet| #<vector 08e04230> 218 . |rest|)
116 (|newGoGet| #<vector 08e04230> 223 . |minIndex|)
117 (|newGoGet| #<vector 08e04230> 228 . |#|)
118 (|newGoGet| #<vector 08e04230> 233 . |first|)
119 (|newGoGet| #<vector 08e04230> 239 . |setelt|)
120 (|newGoGet| #<vector 08e04230> 246 . |rest|)
121 (|newGoGet| #<vector 08e04230> 252 . |elt|)
122 (|makeSpadConstant| #<compiled-function |SYMBOL;sample;$;35|> #<vector 
08e04230> 122)
123 (|SingleInteger|)
Value = NIL


Take care,



> (3) -> G1419::SYMBOL
> 
> 
>    (3)  G1419
>                                                                  Type: Symbol
> (4) -> symbol(GENSYM()$Lisp)
>    Loading /home/rubey/axiom/mnt/linux/algebra/SEX.o for domain 
>       SExpression 
>    Loading /home/rubey/axiom/mnt/linux/algebra/DFLOAT.o for domain 
>       DoubleFloat 
>    Loading /home/rubey/axiom/mnt/linux/algebra/SEXOF.o for domain 
>       SExpressionOf 
> 
>    (4)  G1419
>                                                                  Type: Symbol
> 
> (5) -> b:=%B
> 
>    (5)  %B
>                                                             Type: Variable %B
> (6) -> new()$Symbol
> 
>    (6)  %B
> 
>  
> The problem seems to be, that somehow the lisp doesn't realize that the 
> symbols
> are already around.
> 
> Would be great...
> 
> Thanks,
> 
> Martin
> 
> 
> 
> 

-- 
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]