On 3/15/12 11:01 AM, Franck Ditter wrote:
> I saw MockMma but I find there a parser from Mma to Lisp
> and a formatter from Lisp to 2d-display, but my
> problem is to be able from within Lisp to get something
> like :
>
> ? (integrate '(log x) 'x)
> (- (* x (log x)) x)
>
> It seems strange that Maxima has not such a thing...
> What do I miss ?
>
> franck
maybe that it is easy to do... you want to write a program P
such that (P '((f stuff) x y z)) is rewritten as (f (P x) (P y) (P z))
recursively. There is some translation of atoms like f,
e.g. mplus --> + , mtimes--> *, %sin --> sin, etc. An association
list of these translations should be around somewhere in MockMMA's
files. As for why Maxima does not have such a thing built in -- it
is not especially useful unless you want to try to execute some code.
There is a command translate, and a command compile. However they are
more elaborate most likely.