> > > whuss at some point added something like this for both Mma and Maple,
> > > though very basic, as part of another ticket (symbolic sums?).  I
> > > can't remember where it is and am unfortunately having some internet
> > > issues :( but anyway I believe this code was merged into Sage at some
> > > point.
> > > - kcrisman
> > Unless I'm *very* mistaken, doing this would be a non-trivial project,
> > so I doubt someone would have done it for both Mathematica and Maple
> > as part of another ticket. But of course I may be wrong.
>
> If I recall correctly, it was truly basic, and certainly likely to not
> work in many situations - but for a few very specific purposes it was
> better than nothing.   I think the following was the relevant bit.

I think there's some confusion here.  kcrisman seems to be talking
about allowing the Mathematica interface to parse mathematica output,
importing it to Sage.  Dave seems to be proposing writing something
that lets Sage run mathematica code natively, i.e. without calling
Mathematica.

Incidentally, I think whuss's patch implemented parsing for symbolic
variables and broke the existing functionality for parsing mma's
output (trac seems to be down at the moment so I can't check).  A
ticket is ready for review with a patch that improves the mathematica
output parser: it reimplements the old functionality, keeps whuss's
functionality and supports some new things.

The ticket is available here (when trac recovers):
http://trac.sagemath.org/sage_trac/ticket/8495

It doesn't support syntax such as \\, and it is rather cavalier (if
there's no known Sage equivalent to a mma function, it just converts
the function to lower case and hopes for the best!) but it might not
be a bad start for a Mathematica parser.

100% compatibility is an unrealistic goal (especially with things such
as mathlink) since mma's language seems to be a moving target, but it
should be possible to do the basics.

Cheers,
Felix
>
> - kcrisman
>
> sage: sage.calculus.calculus.symbolic_sum??
> <snip>
>        #. Sage can currently only understand a subset of the output of
> Maxima, Maple and
>           Mathematica, so even if the chosen backend can perform the
> summation the
>           result might not be convertable into a Sage expression.
> <snip>
> sage: sage.interfaces.mathematica??
> <snip>
>
>     def _sage_(self):
>         r"""
>         Try to convert a mathematica expression back to a Sage
> expression.
>
>         This currently does not implement a parser for the Mathematica
> output language,
>         therefore only very simple expressions will convert
> successfully.
>
>         EXAMPLES::
>
>             sage: m = mathematica('x^2 +
> 5*y')                            # optional - mathematica
>             sage:
> m.sage()                                                # optional -
> mathematica
>             x^2 + 5*y

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to