Annotation of OpenXM/doc/calc2000/data-format.tex, Revision 1.1
1.1 ! noro 1: % $OpenXM: OpenXM/doc/issac2000/data-format.tex,v 1.9 2000/01/16 10:55:40 takayama Exp $
! 2:
! 3: \section{Data Format}
! 4:
! 5: OpenXM admits multiple mathematical 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 mathematical data carrier and an OpenXM compliant system do not need to
! 9: implement all possible data formats.
! 10: However they should at least implement seven primitive
! 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.
! 15: If a program sends an OX messages unknown to its peer,
! 16: an unrecoverable error may occur.
! 17: By exchanging mathcaps, a program knows its peer's capability
! 18: and such an error can be avoided.
! 19: Mathcap is also defined as a CMO.
! 20: See \cite{noro-takayama} for the details.
! 21:
! 22: Encoding types of OX data are distinguished with tags
! 23: of OX messages.
! 24: For example,
! 25: an OX message with the tag
! 26: {\tt OX\_DATA} is followed by a CMO packet.
! 27: An OX message with the tag
! 28: {\tt OX\_DATA\_OPENMATH\_XML} is followed by
! 29: an OpenMath XML string.
! 30:
! 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.
! 36: Following tags are registered in the OpenXM.
! 37: \begin{verbatim}
! 38: CMO_ERROR2, CMO_NULL, CMO_INT32, CMO_DATUM, CMO_STRING,
! 39: CMO_MATHCAP, CMO_LIST, CMO_MONOMIAL32, CMO_ZZ, CMO_QQ, CMO_ZERO,
! 40: CMO_DMS_GENERIC, CMO_DMS_OF_N_VARIABLES, CMO_RING_BY_NAME,
! 41: CMO_RECURSIVE_POLYNOMIAL, CMO_LIST_R, CMO_INT32COEFF,
! 42: CMO_DISTRIBUTED_POLYNOMIAL, CMO_POLYNOMIAL_IN_ONE_VARIABLE,
! 43: CMO_RATIONAL, CMO_64BIT_MACHINE_DOUBLE,
! 44: CMO_ARRAY_OF_64BIT_MACHINE_DOUBLE, CMO_BIGFLOAT,
! 45: CMO_IEEE_DOUBLE_FLOAT, CMO_INDETERMINATE, CMO_TREE, CMO_LAMBDA
! 46: \end{verbatim}
! 47: The first seven primitive types should be implemented
! 48: on all OpenXM compliant systems.
! 49: The formats are as follows. \\
! 50: \begin{tabular}{|c|c|}
! 51: \hline
! 52: {\sl int32} {\tt CMO\_ERROR2} & {\sl CMObject} {\rm ob} \\
! 53: \hline
! 54: \end{tabular} \\
! 55: \begin{tabular}{|c|c|}
! 56: \hline
! 57: {\sl int32} {\tt CMO\_NULL} \\
! 58: \hline
! 59: \end{tabular} \\
! 60: \begin{tabular}{|c|c|}
! 61: \hline
! 62: {\sl int32} {\tt CMO\_INT32}& {\sl int32} {\rm n} \\
! 63: \hline
! 64: \end{tabular} \\
! 65: \begin{tabular}{|c|c|c|c|c|}
! 66: \hline
! 67: {\sl int32} {\tt CMO\_STRING}& {\sl int32} {\rm n} & {\sl byte} {\rm data[0]} $\cdots$ & {\sl byte} {\rm data[n-1]} \\ \hline
! 68: \end{tabular} \\
! 69: \begin{tabular}{|c|c|}
! 70: \hline
! 71: {\sl int32} {\tt CMO\_MATHCAP} & {\sl CMObject} {\rm ob} \\
! 72: \hline
! 73: \end{tabular} \\
! 74: \begin{tabular}{|c|c|c|c|c|}
! 75: \hline
! 76: {\sl int32} {\tt CMO\_LIST}& {\sl int32} {\rm n} & {\sl CMObject} {\rm ob[0]}
! 77: $\cdots$ & {\sl CMObject} {\rm ob[n-1]} \\ \hline
! 78: \end{tabular} \\
! 79:
! 80: As to the formats of other CMO's, see \cite{noro-takayama}.
! 81:
! 82: When one wants to implement CMO on a server, the person proceeds
! 83: as follows.
! 84: \begin{enumerate}
! 85: \item Look for the list of CMO's at the web cite \cite{openxm-web}.
! 86: If there is a CMO that fits to one's requirement, then use this CMO.
! 87: \item If there is no suitable CMO, design a new CMO and register
! 88: the new CMO to \cite{openxm-web} with a description and examples.
! 89: \end{enumerate}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>