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