[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Re: Bug #359
From: |
Waldek Hebisch |
Subject: |
Re: [Axiom-developer] Re: Bug #359 |
Date: |
Wed, 6 Jun 2007 21:57:23 +0200 (CEST) |
> I investigated a little further bug #359. Thanks to a helpful anonymous, we
> can now trigger it simply by saying
>
> (1) -> eq := 1=1
>
> (1) 1= 1
> Type: Equation PositiveInteger
>
> (2) -> )se bre bre
> (2) -> [eq::Boolean]
>
> (2) [true]
> Type: List Boolean
> (3) -> [eq::Boolean for i in 1..1]
> Internal Error
> Generated code is incorrect for equation
>
>
>
> Break.
> Broken at |UPCOLLECT|. Type :H for Help.
> BOOT>>:bt
>
> #0 upCOLLECT {loc0=(#<vector 08d0d4ec> (step |i| #<vector 08d0d578> ...)
> (#<vector 08d0d604> ...} [ihs=8]
> #1 upconstruct {loc0=(#<vector 08d0d4d0> (#<vector 08d0d4ec> (step |i|
> #<vector 08d0d578> ...) ...} [ihs=7]
> #2 RESTART
>
> {loc0="/tmp/.d",loc1=0,loc2=nil,loc3=0,loc4=0,loc5=nil,loc6=nil,loc7=nil,loc8=ni...}
> [ihs=6]
> #3 TOP-LEVEL
>
> {loc0=nil,loc1=0,loc2=0,loc3=nil,loc4=nil,loc5=nil,loc6=nil,loc7="/usr/local/lib...}
> [ihs=5]
> #4 FUNCALL {loc0=#<compiled-function system:top-level>} [ihs=4]
> NIL
> BOOT>>
>
> [coerce(eq)@Boolean for i in 1..1] works, by the way, [(1=1)::Boolean for i in
> 1..1], too. upCollect and upconstruct are defined in i-spec1.boot.pamphlet.
> The only location where this error message is thrown is in coerceByFunction in
> i-coerce.boot.pamphlet, the error code is S2IC0015.
>
> I tried to read upconstruct, upCOLLECT and coerceByFunction, but I have no
> idea
> what they are doing. In fact, I don't even see how upconstruct calls
> upCOLLECT
> and coerceByFunction.
>
Martin, when you debug with gcl do first
)lisp (si:use-fast-links nil)
that gives more informative backtrace, in particular what looks like
the real way from upCOLLECT to coerceByFunction:
#5 coerceByFunction {loc0=(#0=(|Equation| (|PositiveInteger|))
|getValueFromEnvironment| (quote |eq|...} [ihs=33]
#6 intCodeGenCOERCE {loc0=(#0=(|Equation| (|PositiveInteger|))
|getValueFromEnvironment| (quote |eq|...} [ihs=32]
#7 coerceInt0 {loc0=(#0=(|Equation| (|PositiveInteger|))
|getValueFromEnvironment| (quote |eq|...} [ihs=31]
#8 coerceInteractive {loc0=(#0=(|Equation| (|PositiveInteger|))
|getValueFromEnvironment| (quote |eq|...} [ihs=30]
#9 coerceOrRetract {loc0=(#0=(|Equation| (|PositiveInteger|))
|getValueFromEnvironment| (quote |eq|...} [ihs=29]
#10 getArgValue1 {loc0=#<vector 0000000001c01db0>,loc1=(|Boolean|)} [ihs=28]
#11 getArgValue {loc0=#<vector 0000000001c01db0>,loc1=(|Boolean|),loc2=t}
[ihs=27]
#12 evalCOERCE {loc0=#<vector 0000000001c01de0>,loc1=#<vector
0000000001c01db0>,loc2=(|Boolean|...} [ihs=26]
#13 upCOERCE {loc0=(#<vector 0000000001c01de0> #<vector 0000000001c01db0>
|Boolean|),loc1=|up...} [ihs=25]
#14 bottomUp {loc0=(#<vector 0000000001c01de0> #<vector 0000000001c01db0>
|Boolean|),loc1=(((...} [ihs=24]
#15 bottomUpCompile {loc0=(#<vector 0000000001c01de0> #<vector
0000000001c01db0> |Boolean|),loc1=nil} [ihs=23]
#16 upCOLLECT1 {loc0=(#<vector 0000000001c01ea0> (step |i| #<vector
0000000001c01e70> ...) (#<v...} [ihs=22]
#17 upCOLLECT0 {loc0=(#<vector 0000000001c01ea0> (step |i| #<vector
0000000001c01e70> ...) (#<v...} [ihs=21]
#18 upCOLLECT {loc0=(#<vector 0000000001c01ea0> (step |i| #<vector
0000000001c01e70> ...) (#<v...} [ihs=20]
#19 bottomUp {loc0=(#<vector 0000000001c01ea0> (step |i| #<vector
0000000001c01e70> ...) (#<v...} [ihs=19]
#20 upconstruct {loc0=(#<vector 0000000001c01ed0> (#<vector 0000000001c01ea0>
(step |i| #<vector...} [ihs=18]
#21 bottomUp {loc0=(#<vector 0000000001c01ed0> (#<vector 0000000001c01ea0>
(step |i| #<vector...} [ihs=17]
sbcl gives sligthly more informative backtrace:
2: (|coerceByFunction|
((|Equation| (|PositiveInteger|)) |getValueFromEnvironment| '|eq|
'(|Equation| (|PositiveInteger|)))
(|Boolean|))
3: (|coerceInteractive|
((|Equation| (|PositiveInteger|)) |getValueFromEnvironment| '|eq|
'(|Equation| (|PositiveInteger|)))
#<unavailable argument>)
4: (|coerceOrRetract|
((|Equation| (|PositiveInteger|)) |getValueFromEnvironment| '|eq|
'(|Equation| (|PositiveInteger|)))
(|Boolean|))
5: (|getArgValue1|
#(|eq| NIL
((|Equation| (|PositiveInteger|)) |getValueFromEnvironment| '|eq|
'(|Equation| (|PositiveInteger|)))
((|Equation| (|PositiveInteger|))) NIL)
(|Boolean|))
6: (|getArgValue|
#(|eq| NIL
((|Equation| (|PositiveInteger|)) |getValueFromEnvironment| '|eq|
'(|Equation| (|PositiveInteger|)))
((|Equation| (|PositiveInteger|))) NIL)
(|Boolean|))
7: (|evalCOERCE|
#(COERCE NIL NIL NIL NIL)
#(|eq| NIL
((|Equation| (|PositiveInteger|)) |getValueFromEnvironment| '|eq|
'(|Equation| (|PositiveInteger|)))
((|Equation| (|PositiveInteger|))) NIL)
(|Boolean|))
8: (|upCOERCE|
(#(COERCE NIL NIL NIL NIL)
#(|eq| NIL
((|Equation| (|PositiveInteger|)) |getValueFromEnvironment| '|eq|
'(|Equation| (|PositiveInteger|)))
((|Equation| (|PositiveInteger|))) NIL)
|Boolean|))
9: (|bottomUp|
(#(COERCE NIL NIL NIL NIL)
#(|eq| NIL
((|Equation| (|PositiveInteger|)) |getValueFromEnvironment| '|eq|
'(|Equation| (|PositiveInteger|)))
((|Equation| (|PositiveInteger|))) NIL)
|Boolean|))
10: (|bottomUpCompile|
(#(COERCE NIL NIL NIL NIL)
#(|eq| NIL
((|Equation| (|PositiveInteger|)) |getValueFromEnvironment| '|eq|
'(|Equation| (|PositiveInteger|)))
((|Equation| (|PositiveInteger|))) NIL)
|Boolean|))
11: (|upCOLLECT1|
(#(COLLECT NIL NIL NIL NIL)
(STEP
|i|
#(|--immediateData--| NIL ((|PositiveInteger|) . 1)
((|PositiveInteger|)) NIL)
#(|--immediateData--| NIL ((|PositiveInteger|) . 1)
((|PositiveInteger|)) NIL)
#(|--immediateData--| NIL ((|PositiveInteger|) . 1)
((|PositiveInteger|)) NIL))
(#(COERCE NIL NIL NIL NIL)
#(|eq| NIL
((|Equation| #) |getValueFromEnvironment| '|eq| '(|Equation| #))
((|Equation| #)) NIL)
|Boolean|)))
12: (|upCOLLECT0|
(#(COLLECT NIL NIL NIL NIL)
(STEP
|i|
#(|--immediateData--| NIL ((|PositiveInteger|) . 1)
((|PositiveInteger|)) NIL)
#(|--immediateData--| NIL ((|PositiveInteger|) . 1)
((|PositiveInteger|)) NIL)
#(|--immediateData--| NIL ((|PositiveInteger|) . 1)
((|PositiveInteger|)) NIL))
(#(COERCE NIL NIL NIL NIL)
#(|eq| NIL
((|Equation| #) |getValueFromEnvironment| '|eq| '(|Equation| #))
((|Equation| #)) NIL)
|Boolean|)))
13: (|bottomUp|
(#(COLLECT NIL NIL NIL NIL)
(STEP
|i|
#(|--immediateData--| NIL ((|PositiveInteger|) . 1)
((|PositiveInteger|)) NIL)
#(|--immediateData--| NIL ((|PositiveInteger|) . 1)
((|PositiveInteger|)) NIL)
#(|--immediateData--| NIL ((|PositiveInteger|) . 1)
((|PositiveInteger|)) NIL))
(#(COERCE NIL NIL NIL NIL)
#(|eq| NIL
((|Equation| #) |getValueFromEnvironment| '|eq| '(|Equation| #))
((|Equation| #)) NIL)
|Boolean|)))
14: (|upconstruct|
(#(|construct| NIL NIL NIL NIL)
(#(COLLECT NIL NIL NIL NIL)
(STEP
|i|
#(|--immediateData--| NIL (# . 1) (#) NIL)
#(|--immediateData--| NIL (# . 1) (#) NIL)
#(|--immediateData--| NIL (# . 1) (#) NIL))
(#(COERCE NIL NIL NIL NIL)
#(|eq| NIL (# |getValueFromEnvironment| '|eq| '#) (#) NIL) |Boolean|))))
15: (|bottomUp|
(#(|construct| NIL NIL NIL NIL)
(#(COLLECT NIL NIL NIL NIL)
(STEP
|i|
#(|--immediateData--| NIL (# . 1) (#) NIL)
#(|--immediateData--| NIL (# . 1) (#) NIL)
#(|--immediateData--| NIL (# . 1) (#) NIL))
(#(COERCE NIL NIL NIL NIL)
#(|eq| NIL (# |getValueFromEnvironment| '|eq| '#) (#) NIL) |Boolean|))))
--
Waldek Hebisch
address@hidden