Instead of answering your questions in detail, how do you want to access
the axiom library?
Suppose set something up where the axiom lib is compiled to haskell
virtual machine code (i.e. runs on HM if I understood you correctly).
With some effort that should be possible, but it would still be unclear
how to actually call functions from the library.
But suppose even that has been done somehow. Then there is the problem
of "destructive functions", i.e. functions like
setelt!(a, 5, 1)
which set the 5th element of (an array) a to 1. The axiom library is
non-functional in quite some places. If you connect it to Haskell, you
surely want to put a wrapper around it so that it will look functional.
What was also mentioned by Waldek was that some types are not
representable in Haskell (just think of dependent types). How should the
connection be done in this case?
Furthermore, if you don't translate code from SPAD to Haskell, but
rather have only running them on the same virtual machine, you still
have the problem that bugfixes and improvements have to be written in SPAD.
Personally, I tend to believe that quite a lot of mathematical code
should be written in a functional setup. One wouldn't have to think
about side effects and such. But I somehow don't believe that functional
code shoule be the only way. In fact, there must have been a reason why
Haskell abstracted every side effecting code into Monads.
So in some sense I'd like SPAD to be similar to Haskell, i.e. there
should be some nice way of asserting that a certain function has no side
effect. Maybe one could do this by restricting on a functional
sublanguage of SPAD so that "asserting" would just mean just "using only
constructs from that sublanguage", and thus the compiler could figure
out whether the function has side effects or not.
OK... I already started dreaming... ;-)
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.