Changes between Version 4 and Version 6 of Ticket #19970

07/12/18 08:08:01 (2 years ago)


  • 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 .
    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).
    7   Both are described at
    9 - accessors to the abstract classes.
     7[[py-openmath|GitHub:]] 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.
    11 See also:
     10Installation of the [[|package on Pypi]]:
     12    sage -pip install openmath
    13 -  #19971 "Provide an SCSCP interface".
    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.
    19 - py-!OpenMath package:
    20   - on PyPI:
    21   - on !GitHub:
     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.
     21See this [[|demo]]
     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 [[|papers]].
     26See also: #19971 "Provide an SCSCP interface".