I've been confronted with the following oddness when accidentally a wrong
entry (i.e. 1 instead of a symbol) is used:
(1) -> foo(L:List Symbol):OutputForm == first [outputForm(s)$OutputForm for
s in L]
(2) -> foo [a,b,c,1]
Compiling function foo with type List(Symbol) -> OutputForm
Conversion failed in the compiled user function foo .
Cannot convert the value from type List(Polynomial(Integer)) to List
(Symbol) .
(4) -> foo [a,b,c,d,e,1]
Conversion failed in the compiled user function foo .
Cannot convert the value from type List(Polynomial(Integer)) to List
(Symbol) .
(5) -> foo [a,b,c,d,e,f,1]
Conversion failed in the compiled user function foo .
Cannot convert the value from type List(Polynomial(Integer)) to List
(Symbol) .
time needed grows exponentially with the length of the list !?
foo [a,b,c,d,e,f,g,1] hangs already ...
This is an isolated example. The same occurs whether compiled or
interpreted (as below).
What's going on?
--- same
foo.spad
)abbrev domain FOO foo
foo() : Exports == Implementation where
Exports == with
mkfoo : Integer -> %
dsp: (%,List Symbol) -> OutputForm
Implementation == Integer add
Rep := Integer
mkfoo(x:Integer) == x@%
dsp(x:%,il:List Symbol):OutputForm ==
l:List OutputForm := [outputForm(s)$OutputForm for s in il]
first l
Example: dsp(5,[a,b,c,d,s,r])
foo.input:
dsp(x:Integer,il:List Symbol):OutputForm ==
l:List OutputForm := [outputForm(s)$OutputForm for s in il]
first l
Example: dsp(5,[a,b,c,d,5,5,t,s,r,s,s,s,s]) (killed after 1h)
Thanks
Kurt
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/a9c97164-5fce-499b-a951-8cea68846b6f%40googlegroups.com.