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

Annotation of OpenXM/doc/issac2000/data-format.tex, Revision 1.6

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

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