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

1.7     ! takayama    1: % $OpenXM: OpenXM/doc/issac2000/data-format.tex,v 1.6 2000/01/15 03:18:27 noro Exp $
1.2       takayama    2:
1.7     ! takayama    3: \section{Data Format}
1.2       takayama    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.
1.7     ! takayama   10: However  they should at least implement seven primitive
1.6       noro       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.
1.7     ! takayama   15: If a program sends an OX messages unknown to its peer,
1.2       takayama   16: an unrecoverable error may occur.
1.6       noro       17: By exchanging mathcaps a program knows its peer's capability
                     18: and such an error can be avoided.
1.7     ! takayama   19: Mathcap is also defined as a CMO.
        !            20: See \cite{noro-takayama} for the details.
1.2       takayama   21:
1.5       ohara      22: Mathematical encoding types of OX data are distinguished with tags
1.2       takayama   23: of OX messages.
                     24: For example,
                     25: an OX message with the tag
1.3       takayama   26: OX\_DATA is followed by a CMO packet.
1.2       takayama   27: An OX message with the tag
                     28: OX\_DATA\_OPENMATH\_XML is followed by
1.7     ! takayama   29: an OpenMath XML string.
1.3       takayama   30:
1.2       takayama   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.
1.7     ! takayama   36: Following tags are registered in the OpenXM.
1.2       takayama   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
1.4       noro       45:
1.2       takayama   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}
1.7     ! takayama   67: The first seven primitive types should be implemented
        !            68: on all OpenXM compliant systems.
        !            69: The formats are as follows. \\
1.2       takayama   70: \begin{tabular}{|c|c|}
                     71: \hline
1.5       ohara      72: {\sl int32} {\tt CMO\_ERROR2} & {\sl CMObject} {\rm ob} \\
1.2       takayama   73: \hline
                     74: \end{tabular} \\
                     75: \begin{tabular}{|c|c|}
                     76: \hline
1.5       ohara      77: {\sl int32} {\tt CMO\_NULL}  \\
1.2       takayama   78: \hline
                     79: \end{tabular} \\
                     80: \begin{tabular}{|c|c|}
                     81: \hline
1.5       ohara      82: {\sl int32} {\tt CMO\_INT32}& {\sl int32} {\rm n}  \\
1.2       takayama   83: \hline
                     84: \end{tabular} \\
                     85: \begin{tabular}{|c|c|c|}
                     86: \hline
1.5       ohara      87: {\sl int32} {\tt CMO\_DATUM}& {\sl int32} {\rm n} & {\sl byte} {\rm  data[0]} \\
1.2       takayama   88: \hline
1.5       ohara      89: $\cdots$ & {\sl byte} {\rm  data[n-1]} \\
1.2       takayama   90: \cline{1-2}
                     91: \end{tabular} \\
                     92: \begin{tabular}{|c|c|c|}
                     93: \hline
1.5       ohara      94: {\sl int32} {\tt CMO\_STRING}& {\sl int32} {\rm n} & {\sl byte} {\rm data[0]} \\
1.2       takayama   95: \hline
1.5       ohara      96: $\cdots$ & {\sl byte} {\rm data[n-1]} \\
1.2       takayama   97: \cline{1-2}
                     98: \end{tabular} \\
                     99: \begin{tabular}{|c|c|}
                    100: \hline
1.5       ohara     101: {\sl int32} {\tt CMO\_MATHCAP} & {\sl CMObject} {\rm ob} \\
1.2       takayama  102: \hline
                    103: \end{tabular} \\
                    104: \begin{tabular}{|c|c|c|}
                    105: \hline
1.5       ohara     106: {\sl int32} {\tt CMO\_LIST}& {\sl int32} {\rm n} & {\sl CMObject} {\rm ob[0]} \\
1.2       takayama  107: \hline
1.5       ohara     108: $\cdots$ & {\sl CMObject} {\rm ob[n-1]} \\
1.2       takayama  109: \cline{1-2}
                    110: \end{tabular} \\
                    111:
1.7     ! takayama  112: When one wants to implement CMO on a server, the person proceeds
1.2       takayama  113: as follows.
                    114: \begin{enumerate}
                    115: \item Look for the CMO list at the web cite \cite{openxm-web}.
1.7     ! takayama  116: If there is a CMO that fits to one's requirement, then use this CMO.
1.2       takayama  117: \item If there is no suitable CMO, design a new CMO and register
                    118: the new CMO to \cite{openxm-web} with a description and examples.
                    119: \end{enumerate}

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