Martin Rubey wrote:
>
> Another question:
>
> do we want to maintain i-coerfn.boot (and probably add LAUPOL there), or try
> to
> move the functionality there into the algebra and start to understand the
> coercion algorithm?
>
> (I think I'll be unable to do both)
>
We _have to_ do both. Currently i-coerfn.boot contains several
conversion functions which ideally would be available inside
algebra. But at least some functions in i-coerfn.boot are only
partial coercions -- they only work for some values. Also, the
final type may depend on value to be coerced (and not only on
its type). So it is not possible to express the same thing
in Spad.
In other words, we should try to move as much as possible to
algebra, but some parts for technical reasons must stay inside
interpreter and certainly we need to maintain i-coerfn.boot.
Concerning LAUPOL: we probably should have (or maybe already have)
retractIfCan form rational functions to LAUPOL. retractIfCan
is part of interpreter coercion algorithm.
More generally, interpreter tries to synthetize coecions from
corece, retractIfCan, convert, map and some special cases
in i-coerfn.boot. We should try to provide enough building
blocks in algebra and even in special cases it may be
possible to move part of them to algebra (AFAICS some
operations are done at Boot level because it is much
faster than using general algebra mechanizms). But much
of coercion code must remain part of interpreter. Actually,
I would like to make coercions in compiler smarter, so
for example machinery to synthetize complex coercions
form building blocks could be shared by compiler and
interpreter. But unless we want to dumb down the
interpreter we will need a lot code for special cases.
--
Waldek Hebisch
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---