In terms of text, there are lots of things
that could be just parsed by the mockmma parser and
spit out as lisp. Probably 99.9% of the files
containing programs.
However most of it would look like calls to
undefined functions, or functions whose semantics
were different from those in mma.
Mockmma bridges this gap with some modeling of
the semantics of some of the functionality, including
a simple evaluator and pattern matcher.
There are many files of documentation, declarations
involving packages, and, I suspect, very specific
uses of advanced mma functionality. Each of these
would have to be examined by someone who knows about
lisp, mma, and probably math/physics.
My guess is that a knowledgeable person would also
know where to start, and keep careful records of
how to "translate".
You might consider converting not to lisp but to
"macsyma level" code, in which case you have about
a 50% nominal translation just by converting [] to ().
The semantics will generally be wrong, of course,
but it will look like macsyma.
RJF
Camm Maguire wrote:
>Greetings!
>
>Richard Fateman <fateman@cs.berkeley.edu> writes:
>
>
>
>>Mathematica doesn't compile its code to Lisp.
>>There is a mode of output called FullForm
>>which reveals the structure of Mathematica code
>>in a format that looks almost like lisp, but the
>>semantics attached to the names are not lisp semantics.
>>
>>e.g. FullForm[a+b] is Plus[a,b].
>>In lisp that would be (plus a b).
>>
>>In Maxima that would be ((mplus) $a $b) or something similar.
>>
>>However the model of evaluation in Mathematica is
>>rule-based and pattern driven, not like lisp or maxima.
>>
>>Sometimes these are indistinguishable in practice, but not
>>always.
>>
>>
>>
>
>In your opinion, would a FullForn dump get us over half-way through
>the translation effort?
>
>Take care,
>
>
>
>>RJF
>>
>>
>>Camm Maguire wrote:
>><snip>
>>
>>
>>
>>> I don't
>>>suppose that mathematica happens to compile its code to lisp at an
>>>intermediary stage which can then be inspected by the user?
>>>
>>>
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>>
>
>
>