I just stumpled upon LazyStreamAggregate. There we have
LazyStreamAggregate(S:Type): Category == StreamAggregate(S) with
...
add
...
--% STAGG functions
possiblyInfinite? x ==
y := x
for i in 0.. repeat
explicitlyEmpty? y => return false
lazy? y => return true
if odd? i then x := rst x
y := rst y
eq?(x,y) => return true
explicitlyFinite? x == not possiblyInfinite? x
whereas
StreamAggregate(S:Type): Category ==
Join(UnaryRecursiveAggregate S, LinearAggregate S) with
explicitlyFinite?: % -> Boolean
++ explicitlyFinite?(s) tests if the stream has a finite
++ number of elements, and false otherwise.
++ Note: for many datatypes, \axiom{explicitlyFinite?(s) = not
possiblyInfinite?(s)}.
possiblyInfinite?: % -> Boolean
++ possiblyInfinite?(s) tests if the stream s could possibly
++ have an infinite number of elements.
++ Note: for many datatypes, \axiom{possiblyInfinite?(s) = not
explictlyFinite?(s)}.
add
explicitlyFinite? x == not cyclic? x
possiblyInfinite? x == cyclic? x
...
Where is it defined how this multiple inheritance is resolved. As far as
I remember, Aldor leaves that undefined, which basically means, one
shouldn't use such constructions.
What is the rule for SPAD and where is that written down. Currently I
cannot interpret the code without relying on a specific implementation
of the SPAD compiler. :-(
Ralf
--
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.