Changes between Version 4 and Version 6 of Ticket #19970


Ignore:
Timestamp:
07/12/18 08:08:01 (17 months ago)
Author:
nthiery
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19970

    • Property Milestone changed from sage-7.1 to sage-wishlist
  • Ticket #19970 – Description

    v4 v6  
    1 To provide an !OpenMath interface or "phrasebook", we need
     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 .
    22
    3 - abstract classes for !OpenMath objects that can be serialized
    4   into and imported from !OpenMath XML format,
    5   possibly even !OpenMath binary format.
     3Support for !OpenMath serialization (importing from and exporting to !OpenMath) would improve the interoperability between !SageMath
     4and other mathematics software (both ways: accessing other software from Sage, and accessing Sage from other software).
    65
    7   Both are described at https://openmath.org/standard
    86
    9 - accessors to the abstract classes.
     7[[py-openmath|GitHub: https://github.com/OpenMath/py-openmath]] is an implementation of !OpenMath for Python; it provides
     8a 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.
    109
    11 See also:
     10Installation of the [[https://pypi.org/project/openmath|package on Pypi]]:
     11{{{
     12    sage -pip install openmath
     13}}}
    1214
    13 -  #19971 "Provide an SCSCP interface".
    1415
    15   Both tickets would improve interoperability of !SageMath
    16   and other mathematics software (both ways: accessing other
    17   software from Sage, and accessing Sage from other software).
     16To export more SageMath objects the standard approach would be to use
     17the existing Content Dictionaries (or creating new ones if non existing), and manually implement the conversions for each type of Sage object.
    1818
    19 - py-!OpenMath package:
    20   - on PyPI: https://pypi.org/project/openmath
    21   - on !GitHub: https://github.com/OpenMath/py-openmath
     19An 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.
     20
     21See this [[https://github.com/OpenDreamKit/MitM-Sage#generic-system-near-openmath-export-for-python-and-sage-objects|demo]]
     22
     23By construction, the resulting OpenMath is `system near`; importing or exporting from another system requires an additional translation step,
     24using 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. those [[https://opendreamkit.org/2017/10/15/WP6-Usecase/|papers]].
     25
     26See also: #19971 "Provide an SCSCP interface".