Adding some to Jim's comments on FFI Corba etc...
I agree with his assessment,generally
I could provide a common lisp translator
from the Mathematica expression language to Maxima.
That is Sin[x] would become sin(x)
3x would become 3*x
etc.
There is no obvious counterpart to
f[r[x_]+y_,s[z_]+w___]:= ....
in the maxima world. So the trick would be
to have an alternative front end AND CORRESPONDING
BACK END in which the evaluation
is done by pattern matching in the Mathematica way.
Note that producing the corresponding data structures
in maxima from mathematica is in some sense trivial
if you write out all your commands in FullFormat in
Mathematica. Then 3x is Times[3,x] which is
trivially converted to maxima.
This is doable, especially since I also wrote a
pattern matcher. But kind of unpleasant.
If all you want is mathematica's version of the common
intersection, e.g. +*-sin/cos , that's not bad at all.
Similarly, if you really want Maple, it would not
be hard to write a Maple parser, but to make it all
work you would have to write a Maple kernel. This
could be done, I think, with a lot less work in Lisp,
than it was done originally. There would be no need
to write a memory allocation system or bignums.
I have thought about this some, and the big advantage
that you'd have if you could just snarf up all the
Maple source code that you can print out from a
copy of Maple. (I don't know what fair use of this
constitutes, but it is obvious that redistribution
to people who don't also have a Maple license would
be questionable!)
I think that one could also communicate via Java
tools, but I've never tried it.
I think the difficulty of doing FFI by hand is
overestimated. If you have a few, you can do each one.
If you have a lot, then maybe you should have one new
C function that is the only one in the FFI interface and in a
Lisp-system independent fashion does
interfacefun("string-name-of-function", "argument-count",
"array-of-args")
There are issues of return values and changed reference
parameters that may need to be addressed.
RJF