[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.5

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

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