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

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

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