maple to maxima translator



Writing code in the Macsyma language is portable to
other Macsyma systems.  Writing in Common Lisp means
that it can be run (sometimes, at least) in any
Common Lisp system.  This would seem to be more
portable, but in a way that you may not care about.

My suggestion is to just take wholesale someone
else's state-of-the-art GPL GB package, even if it
is written in C,  and hook it to Maxima.  This
would be non portable across different lisps,
but the foreign function interfaces are very
similar.  The advantage to this though is that
when someone comes up with a super-speedy program,
we just gobble it up.  That is, the GB program
  is as fast as the fastest GB program.

As far as the general question goes, you can
take Macsyma language code and translate it
to lisp.  You can look at the lisp and perhaps
edit it or add declarations to make it run
faster.  There may be substantial speedups between
compiling with/without optimization.  (declare (optimize(speed 3)(safety 
0)))




GB code can be very simple at the top level, but
the time-consuming parts should probably be looked
at very carefully.  Profiling programs before
optimization is always a good idea.  I don't
know what GCL has for tools, but there are
superb tools in Allegro CL.
RJF


a9104910@unet.univie.ac.at wrote:

> 
> On Thu, 10 Jan 2002 dan.stanger@ieee.org wrote:
> 
> 
>>I have also written to the author of CGBLisp, a grobner basis system
>>written in lisp, and he has a prototype interface to maxima.
>>I think that any grobner code that we start now should be written
>>in maxima, so that if we change the underlying implementation,
>>the work is still usable.
>>
> 
> This adresses a general question I have. Should packages generally be
> written in CL or in Maxima? I wrote for testing purposes the
> Robinson-Schensted-Knuth correspondence in Mathematica, Maxima, and GCL.
> 
> After compiling, the maxima code was faster than MMA by a factor of two,
> but the lisp code was faster by a factor of eight (!). (Well, not very
> thoroughly tested, though)
> 
> Should we really write packages for which speed is an issue and for which
> not much maxima stuff is needed in the maxima language? Of course, a
> package written in lisp should run on all lisps that maxima supports, but
> this is probably rarely a problem (or isn't it?)
> 
> Martin
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>