People,
The function defined in domain "ORESUS UnivariateSkewSeries" can't be
applied for a generation of infinite stream?The problem made me confused
and depressed.As follows,
the test.spad file,
)abb domain ORESUS UnivariateSkewSeries
I ==> Integer
INF ==> OrderedCompletion I
SC ==> Stream R
UnivariateSkewSeries(R:Ring, Var:Symbol, sigma:Automorphism R, delta: R ->
R) : Exports == Implementation where
Exports == Join(Ring, BiModule(R, R)) with
function1: (R) -> SC
Implementation == add
Rep := Record(coef:SC, hi: I, lo: INF)
0 : % == [[0$R]::SC,0,0$INF]
function1(s:R):SC ==
[s for i in 1..]::SC
the Test.input file,
)clear all
)compile test.spad
R := EXPR INT
S : Symbol := 'D
F := (operator 'f)[t]
sigma : Automorphism(R) := 1
delta : R -> R := f +-> D(f,t)
PDO := ORESUS(R,S,sigma,delta)
coefList1: Stream R := [F,2*F]
function1(F) $ PDO
so, )r Test.input
R := EXPR INT
(1) Expression(Integer)
Type:
Type
S : Symbol := 'D
(2) D
Type:
Symbol
F := (operator 'f)[t]
(3) f(t)
Type:
Expression(Integer)
sigma : Automorphism(R) := 1
(4) R -> R
Type:
Automorphism(Expression(Integer))
delta : R -> R := f +-> D(f,t)
(5) theMap(*1;anonymousFunction;3;frame1;internal)
Type: (Expression(Integer) ->
Expression(Integer))
PDO := ORESUS(R,S,sigma,delta)
(6)
UnivariateSkewSeries(Expression(Integer),D,R ->
R,theMap(*1;anonymousFunction
;3;frame1;internal))
Type:
Type
coefList1: Stream R := [F,2*F]
(7) [f(t),2f(t)]
Type:
Stream(Expression(Integer))
function1(F) $ PDO
Heap exhausted during garbage collection: 0 bytes available, 8 requested.
Gen StaPg UbSta LaSta LUbSt Boxed Unboxed LB LUB !move Alloc Waste
Trig WP GCs Mem-age
0: 0 0 0 0 0 0 0 0 0 0 0
2000000 0 0 0.0000
1: 0 0 0 0 0 0 0 0 0 0 0
2000000 0 0 0.0000
......
for what? Yet a function defined directly in the Test.input file turns out
all right,
)r fun.input
fun1: (INT) -> (Stream INT)
Compiled code for fun1 has been cleared.
Type:
Void
fun1(s:INT):Stream INT ==
[s for i in 1..]::Stream INT
Function declaration fun1 : Integer -> Stream(Integer) has been
added to workspace.
1 old definition(s) deleted for function or rule fun1
Type:
Void
fun1(1)
Compiling function fun1 with type Integer -> Stream(Integer)
(5) [1,1,1,1,1,1,1,1,1,1,...]
Type:
Stream(Integer)
fun1 looks as similar to function1, but the results are completely
different .
Negligence in test.spad ?
Best wishes,
siqi
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.