[BACK]Return to data-format.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / ascm2001

Annotation of OpenXM/doc/ascm2001/data-format.tex, Revision 1.1

1.1     ! noro        1: % $OpenXM$
        !             2:
        !             3: \section{Data Format}
        !             4:
        !             5: OpenXM admits multiple mathematical encodings such as OpenMath, MP, CMO
        !             6: (Common Mathematical Object format).
        !             7: OpenXM itself does not exhibit a bias towards a particular encodings
        !             8: as a main mathematical data carrier and an OpenXM compliant system do not need to
        !             9: implement all possible data formats.
        !            10: However  they should at least implement seven primitive
        !            11: data types of the CMO, which are necessary to
        !            12: carry several control informations such as a {\it mathcap}.
        !            13: Mathcap is a list of supported CMO's, OpenXM stack machine codes,
        !            14: and necessary extra informations.
        !            15: If a program sends an OX messages unknown to its peer,
        !            16: an unrecoverable error may occur.
        !            17: By exchanging mathcaps, a program knows its peer's capability
        !            18: and such an error can be avoided.
        !            19: Mathcap is also defined as a CMO.
        !            20: See \cite{noro-takayama} for the details.
        !            21:
        !            22: Encoding types of OX data are distinguished with tags
        !            23: of OX messages.
        !            24: For example,
        !            25: an OX message with the tag
        !            26: {\tt OX\_DATA} is followed by a CMO packet.
        !            27: An OX message with the tag
        !            28: {\tt OX\_DATA\_OPENMATH\_XML} is followed by
        !            29: an OpenMath XML string.
        !            30:
        !            31: Let us explain the data format of CMO.
        !            32: Any CMO packet consists of a header and a body.
        !            33: The size of the header is 4 bytes that tags the data type of the body.
        !            34: Data type tags are signed 32 bit integers which is called {\sl int32} in this
        !            35: paper.
        !            36: Following tags are registered in the OpenXM.
        !            37: \begin{verbatim}
        !            38: #define CMO_ERROR2                         0x7f000002
        !            39: #define CMO_NULL                           1
        !            40: #define CMO_INT32                          2
        !            41: #define CMO_DATUM                          3
        !            42: #define CMO_STRING                         4
        !            43: #define CMO_MATHCAP                        5
        !            44: #define CMO_LIST                           17
        !            45:
        !            46: #define CMO_MONOMIAL32                     19
        !            47: #define CMO_ZZ                             20
        !            48: #define CMO_QQ                             21
        !            49: #define CMO_ZERO                           22
        !            50: #define CMO_DMS_GENERIC                    24
        !            51: #define CMO_DMS_OF_N_VARIABLES             25
        !            52: #define CMO_RING_BY_NAME                   26
        !            53: #define CMO_RECURSIVE_POLYNOMIAL           27
        !            54: #define CMO_LIST_R                         28
        !            55: #define CMO_INT32COEFF                     30
        !            56: #define CMO_DISTRIBUTED_POLYNOMIAL         31
        !            57: #define CMO_POLYNOMIAL_IN_ONE_VARIABLE     33
        !            58: #define CMO_RATIONAL                       34
        !            59: #define CMO_64BIT_MACHINE_DOUBLE           40
        !            60: #define CMO_ARRAY_OF_64BIT_MACHINE_DOUBLE  41
        !            61: #define CMO_BIGFLOAT                       50
        !            62: #define CMO_IEEE_DOUBLE_FLOAT              51
        !            63: #define CMO_INDETERMINATE                  60
        !            64: #define CMO_TREE                           61
        !            65: #define CMO_LAMBDA                         62
        !            66: \end{verbatim}
        !            67: The first seven primitive types should be implemented
        !            68: on all OpenXM compliant systems.
        !            69: The formats are as follows. \\
        !            70: \begin{tabular}{|c|c|}
        !            71: \hline
        !            72: {\sl int32} {\tt CMO\_ERROR2} & {\sl CMObject} {\rm ob} \\
        !            73: \hline
        !            74: \end{tabular} \\
        !            75: \begin{tabular}{|c|c|}
        !            76: \hline
        !            77: {\sl int32} {\tt CMO\_NULL}  \\
        !            78: \hline
        !            79: \end{tabular} \\
        !            80: \begin{tabular}{|c|c|}
        !            81: \hline
        !            82: {\sl int32} {\tt CMO\_INT32}& {\sl int32} {\rm n}  \\
        !            83: \hline
        !            84: \end{tabular} \\
        !            85: \begin{tabular}{|c|c|c|}
        !            86: \hline
        !            87: {\sl int32} {\tt CMO\_DATUM}& {\sl int32} {\rm n} & {\sl byte} {\rm  data[0]} \\
        !            88: \hline
        !            89: $\cdots$ & {\sl byte} {\rm  data[n-1]} \\
        !            90: \cline{1-2}
        !            91: \end{tabular} \\
        !            92: \begin{tabular}{|c|c|c|}
        !            93: \hline
        !            94: {\sl int32} {\tt CMO\_STRING}& {\sl int32} {\rm n} & {\sl byte} {\rm data[0]} \\
        !            95: \hline
        !            96: $\cdots$ & {\sl byte} {\rm data[n-1]} \\
        !            97: \cline{1-2}
        !            98: \end{tabular} \\
        !            99: \begin{tabular}{|c|c|}
        !           100: \hline
        !           101: {\sl int32} {\tt CMO\_MATHCAP} & {\sl CMObject} {\rm ob} \\
        !           102: \hline
        !           103: \end{tabular} \\
        !           104: \begin{tabular}{|c|c|c|}
        !           105: \hline
        !           106: {\sl int32} {\tt CMO\_LIST}& {\sl int32} {\rm n} & {\sl CMObject} {\rm ob[0]} \\
        !           107: \hline
        !           108: $\cdots$ & {\sl CMObject} {\rm ob[n-1]} \\
        !           109: \cline{1-2}
        !           110: \end{tabular} \\
        !           111:
        !           112: As to the formats of other CMO's, see \cite{noro-takayama}.
        !           113:
        !           114: When one wants to implement CMO on a server, the person proceeds
        !           115: as follows.
        !           116: \begin{enumerate}
        !           117: \item Look for the list of CMO's at the web cite \cite{openxm-web}.
        !           118: If there is a CMO that fits to one's requirement, then use this CMO.
        !           119: \item If there is no suitable CMO, design a new CMO and register
        !           120: the new CMO to \cite{openxm-web} with a description and examples.
        !           121: \end{enumerate}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>