You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenMath is a W3C standard for representing mathematical objects in XML (or binary)
format; the syntax and semantic for specific objects (polynomials, ...) is specified in
"content dictionaries", a standard collection of which is available at https://openmath.org .
Support for OpenMath serialization (importing from and exporting to OpenMath) would
improve the interoperability between SageMath and other mathematics software
(both ways: accessing other software from Sage, and accessing Sage from other software).
py-openmath
is an implementation of OpenMath for Python; it provides
a data structure for OpenMath expression trees (with serialization to from xml representation), together with converters between Python objects and OpenMath expression trees. The default converter can handle basic Python objects (integers, lists, ...) exported using the standard OpenMath content dictionaries. Additional conversions can be registered.
To export more SageMath objects the standard approach would be to use
the existing Content Dictionaries (or creating new ones if non existing), and manually implement the conversions for each type of Sage object.
An alternative approach is to use py-openmath's generic serialization to OpenMath. With it, any (picklable) Python object is converted to an OpenMath expression describes how to reconstruct the object from basic Python objects and global functions; it's based on Python's pickle protocol, and can be seen as an alternative pickle format.
By construction, the resulting OpenMath is "system-near"; importing or exporting from another system requires an additional translation step,
using alignments. The hope is that decoupling the serialization and the translation steps makes it easier to maintain the conversions. This is being explored as part of the Math-in-the-Middle research project; see e.g. these papers.
OpenMath is a W3C standard for representing mathematical objects in XML (or binary)
format; the syntax and semantic for specific objects (polynomials, ...) is specified in
"content dictionaries", a standard collection of which is available at https://openmath.org .
Support for OpenMath serialization (importing from and exporting to OpenMath) would
improve the interoperability between SageMath and other mathematics software
(both ways: accessing other software from Sage, and accessing Sage from other software).
py-openmath
is an implementation of OpenMath for Python; it provides
a data structure for OpenMath expression trees (with serialization to from xml representation), together with converters between Python objects and OpenMath expression trees. The default converter can handle basic Python objects (integers, lists, ...) exported using the standard OpenMath content dictionaries. Additional conversions can be registered.
To install py-openmath using the openmath package on Pypi:
To export more SageMath objects the standard approach would be to use
the existing Content Dictionaries (or creating new ones if non existing), and manually implement the conversions for each type of Sage object.
An alternative approach is to use py-openmath's generic serialization to OpenMath. With it, any (picklable) Python object is converted to an OpenMath expression describes how to reconstruct the object from basic Python objects and global functions; it's based on Python's pickle protocol, and can be seen as an alternative pickle format.
See this demo.
By construction, the resulting OpenMath is "system-near"; importing or exporting from another system requires an additional translation step,
using alignments. The hope is that decoupling the serialization and the translation steps makes it easier to maintain the conversions. This is being explored as part of the Math-in-the-Middle research project; see e.g. these papers.
See also: #19971 "Provide an SCSCP interface".
CC: @alex-konovalov @JohnCremona @defeo @dimpase @slel @sagetrac-markuspf @mezzarobba @sagetrac-mkohlhase @nthiery @sagetrac-twiesing
Component: interfaces: optional
Keywords: OpenMath, interface, interoperability
Issue created by migration from https://trac.sagemath.org/ticket/19970
The text was updated successfully, but these errors were encountered: