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

1.4     ! noro        1: % $OpenXM: OpenXM/doc/issac2000/data-format.tex,v 1.3 2000/01/03 04:27:52 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.4     ! noro       19: Mathcap is also defined as a CMO and its elements are 32bit integers
1.2       takayama   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
1.4     ! noro       50:
1.2       takayama   51: #define CMO_MONOMIAL32                     19
                     52: #define CMO_ZZ                             20
                     53: #define CMO_QQ                             21
                     54: #define CMO_ZERO                           22
                     55: #define CMO_DMS_GENERIC                    24
                     56: #define CMO_DMS_OF_N_VARIABLES             25
                     57: #define CMO_RING_BY_NAME                   26
                     58: #define CMO_RECURSIVE_POLYNOMIAL           27
                     59: #define CMO_LIST_R                         28
                     60: #define CMO_INT32COEFF                     30
                     61: #define CMO_DISTRIBUTED_POLYNOMIAL         31
                     62: #define CMO_POLYNOMIAL_IN_ONE_VARIABLE     33
                     63: #define CMO_RATIONAL                       34
                     64: #define CMO_64BIT_MACHINE_DOUBLE           40
                     65: #define CMO_ARRAY_OF_64BIT_MACHINE_DOUBLE  41
                     66: #define CMO_128BIT_MACHINE_DOUBLE          42
                     67: #define CMO_ARRAY_OF_128BIT_MACHINE_DOUBLE 43
                     68: #define CMO_BIGFLOAT                       50
                     69: #define CMO_IEEE_DOUBLE_FLOAT              51
                     70: #define CMO_INDETERMINATE                  60
                     71: #define CMO_TREE                           61
                     72: #define CMO_LAMBDA                         62
                     73: \end{verbatim}
                     74: The first seven types should be implemented on all OpenXM compliant systems.
1.3       takayama   75: The format of the first seven CMO's are as follows. \\
1.2       takayama   76: \begin{tabular}{|c|c|}
                     77: \hline
                     78: {\tt int32 CMO\_ERROR2} & {\sl CMObject} {\rm ob} \\
                     79: \hline
                     80: \end{tabular} \\
                     81: \begin{tabular}{|c|c|}
                     82: \hline
                     83: {\tt int32 CMO\_NULL}  \\
                     84: \hline
                     85: \end{tabular} \\
                     86: \begin{tabular}{|c|c|}
                     87: \hline
                     88: {\tt int32 CMO\_INT32}& {\tt int32} {\rm n}  \\
                     89: \hline
                     90: \end{tabular} \\
                     91: \begin{tabular}{|c|c|c|}
                     92: \hline
                     93: {\tt int32 CMO\_DATUM}& {\tt int32} {\rm n} & {\tt byte} {\rm  data[0]} \\
                     94: \hline
                     95: $\cdots$ & {\tt byte} {\rm  data[n-1]} \\
                     96: \cline{1-2}
                     97: \end{tabular} \\
                     98: \begin{tabular}{|c|c|c|}
                     99: \hline
                    100: {\tt int32 CMO\_STRING}& {\tt int32} {\rm n} & {\tt byte} {\rm data[0]} \\
                    101: \hline
                    102: $\cdots$ & {\tt byte} {\rm data[n-1]} \\
                    103: \cline{1-2}
                    104: \end{tabular} \\
                    105: \begin{tabular}{|c|c|}
                    106: \hline
                    107: {\tt int32 CMO\_MATHCAP} & {\it CMObject} {\rm ob} \\
                    108: \hline
                    109: \end{tabular} \\
                    110: \begin{tabular}{|c|c|c|}
                    111: \hline
                    112: {\tt int32 CMO\_LIST}& {\tt int32} {\rm n} & {\tt CMObject} {\rm ob[0]} \\
                    113: \hline
                    114: $\cdots$ & {\tt CMObject} {\rm ob[n-1]} \\
                    115: \cline{1-2}
                    116: \end{tabular} \\
                    117:
                    118:
1.3       takayama  119: A mathematical programmer who wants to implement CMO on a server proceeds
1.2       takayama  120: as follows.
                    121: \begin{enumerate}
                    122: \item Look for the CMO list at the web cite \cite{openxm-web}.
                    123: If there is a CMO tht fits to her or his requirement, then use this CMO.
                    124: \item If there is no suitable CMO, design a new CMO and register
                    125: the new CMO to \cite{openxm-web} with a description and examples.
                    126: \end{enumerate}
                    127:
                    128:
1.1       takayama  129:

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