Changes between Version 6 and Version 7 of Ticket #19970
 Timestamp:
 07/12/18 09:09:34 (15 months ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #19970 – Description
v6 v7 1 !OpenMath is a W3C standard for representing mathematical objects in xml format (or binary); the syntax and semantic for specific objects (polynomials, ...) is specified in content dictionaries, a standard collection of which is available on http://openmath.org . 1 !OpenMath is a W3C standard for representing mathematical objects in XML (or binary) 2 format; the syntax and semantic for specific objects (polynomials, ...) is specified in 3 "content dictionaries", a standard collection of which is available at http://openmath.org . 2 4 3 Support for !OpenMath serialization (importing from and exporting to !OpenMath) would improve the interoperability between !SageMath 4 and other mathematics software (both ways: accessing other software from Sage, and accessing Sage from other software). 5 Support for !OpenMath serialization (importing from and exporting to !OpenMath) would 6 improve the interoperability between !SageMath and other mathematics software 7 (both ways: accessing other software from Sage, and accessing Sage from other software). 5 8 6 7 [[pyopenmathGitHub: https://github.com/OpenMath/pyopenmath]]is an implementation of !OpenMath for Python; it provides9 [[https://github.com/OpenMath/pyopenmathpyopenmath]] 10 is an implementation of !OpenMath for Python; it provides 8 11 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. 9 12 10 Installation of the [[https://pypi.org/project/openmathpackage on Pypi]]: 13 To install pyopenmath using the [[https://pypi.org/project/openmathopenmath package on Pypi]]: 11 14 {{{ 12 sagepip install openmath15 sage pip install openmath 13 16 }}} 14 17 15 16 To export more SageMath objects the standard approach would be to use 18 To export more !SageMath objects the standard approach would be to use 17 19 the existing Content Dictionaries (or creating new ones if non existing), and manually implement the conversions for each type of Sage object. 18 20 19 21 An alternative approach is to use pyopenmath'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. 20 22 21 See this [[https://github.com/OpenDreamKit/MitMSage#genericsystemnearopenmathexportforpythonandsageobjectsdemo]] 23 See this [[https://github.com/OpenDreamKit/MitMSage#genericsystemnearopenmathexportforpythonandsageobjectsdemo]]. 22 24 23 By construction, the resulting OpenMath is `system near`; importing or exporting from another system requires an additional translation step,24 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 MathintheMiddle research project; see e.g. those [[https://opendreamkit.org/2017/10/15/WP6Usecase/papers]].25 By construction, the resulting OpenMath is "systemnear"; importing or exporting from another system requires an additional translation step, 26 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 MathintheMiddle research project; see e.g. [[https://opendreamkit.org/2017/10/15/WP6Usecase/these papers]]. 25 27 26 28 See also: #19971 "Provide an SCSCP interface".