[BACK]Return to appendix.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / OpenXM-specs

Annotation of OpenXM/doc/OpenXM-specs/appendix.tex, Revision 1.1.1.1

1.1       noro        1: %% $OpenXM$
                      2: //&C \section{Appendix: English translation}
                      3:
                      4: /*&C
                      5: \noindent
                      6: (This section has not been updated.)
                      7:
                      8: \subsection{Common Mathematical Object format}
                      9:
                     10: \begin{verbatim}
                     11: #define LARGEID  0x7f000000
                     12: #define CMO_ERROR2 (LARGEID+2)
                     13: #define CMO_NULL   1
                     14: #define CMO_INT32  2
                     15: #define CMO_DATUM  3
                     16: #define CMO_STRING 4
                     17: #define CMO_LIST 17
                     18: \end{verbatim}
                     19:
                     20: \bigbreak
                     21: \noindent
                     22: Group CMObject/Basic0  requires nothing. \\
                     23: Error2, Null, Integer32, Datum, Cstring, List $\in$ CMObject/Basic0. \\
                     24: Document of CMObject/Basic0 is at {\tt http://www.math.kobe-u.ac.jp/openxxx}
                     25: (in Japanese) \\
                     26: \begin{eqnarray*}
                     27: \mbox{Error2}&:& ({\tt CMO\_ERROR2}, {\sl CMObject}\, \mbox{ob}) \\
                     28: \mbox{Null}  &:& ({\tt CMO\_NULL}) \\
                     29: \mbox{Integer32}
                     30:              &:& ({\tt CMO\_INT32}, {\sl int32}\ \mbox{n}) \\
                     31: \mbox{Datum} &:& ({\tt CMO\_DATUM}, {\sl int32}\, \mbox{n}, {\sl byte}\,
                     32:                  \mbox{data[0]},
                     33:                   \ldots , {\sl byte}\, \mbox{data[n-1]}) \\
                     34: \mbox{Cstring}&:& ({\tt CMO\_STRING},{\sl int32}\,  \mbox{n},
                     35:                    {\sl string}\, \mbox{s}) \\
                     36: \mbox{List} &:&
                     37: \mbox{({\tt CMO\_LIST}, {\sl int32}\, m, {\sl CMObject}\, ob[1], $\ldots$,
                     38:                                        {\sl CMObject}\, ob[m])} \\
                     39:              & & \mbox{---  m is the length of the list.} \\
                     40: \end{eqnarray*}
                     41:
                     42: In the definition of ``Cstring'', if we decompose  ``{\sl string} s'' into
                     43: bytes, then  ``Cstring'' should be defined as
                     44: \begin{eqnarray*}
                     45: \mbox{Cstring}&:& ({\tt CMO\_STRING},{\sl int32}\,  n,
                     46:                   {\sl byte}\, \mbox{s[0]},
                     47:                   \ldots, {\sl byte}\ \mbox{s[n-1]})
                     48: \end{eqnarray*}
                     49:
                     50: \noindent
                     51: Example:
                     52: \begin{center}
                     53: ({\tt CMO\_INT32}, 1234)
                     54: \end{center}
                     55: Example:
                     56: \begin{center}
                     57: ({\tt CMO\_STRING}, 5, "Hello")
                     58: \end{center}
                     59:
                     60: \begin{verbatim}
                     61: #define     CMO_MONOMIAL32  19
                     62: #define     CMO_ZZ          20
                     63: #define     CMO_QQ          21
                     64: #define     CMO_ZERO        22
                     65: #define     CMO_DMS          23   /* Distributed monomial system */
                     66: #define     CMO_DMS_GENERIC  24
                     67: #define     CMO_DMS_OF_N_VARIABLES  25
                     68: #define     CMO_RING_BY_NAME   26
                     69: \end{verbatim}
                     70: \bigbreak
                     71: \noindent
                     72: Group CMObject/Basic1 requires CMObject/Basic0. \\
                     73: ZZ, QQ, Zero $\in$ CMObject/Basic1. \\
                     74: \begin{eqnarray*}
                     75: \mbox{Zero} &:& ({\tt CMO\_ZERO}) \\
                     76:             & & \mbox{ --- universal zero } \\
                     77: \mbox{ZZ}         &:& ({\tt CMO\_ZZ},{\sl int32}\, f, {\sl byte}\, \mbox{a[1]}, \ldots
                     78:                            {\sl byte}\, \mbox{a[m]} ) \\
                     79:                  &:& \mbox{ --- bignum }\\
                     80: \mbox{QQ}        &:& ({\tt CMO\_QQ}, {\sl ZZ}\, a, {\sl ZZ}\, b) \\
                     81:                  & & \mbox{ --- rational number $a/b$. } \\
                     82: \end{eqnarray*}
                     83:
                     84: \bigbreak
                     85: Let us define a group for distributed polynomials.
                     86:
                     87: \medbreak
                     88: \noindent
                     89: Group CMObject/DistributedPolynomials requires CMObject/Basic0,
                     90: CMObject/Basic1. \\
                     91: Monomial, Monomial32, Coefficient, Dpolynomial, DringDefinition,
                     92: Generic DMS ring, RingByName, DMS of N variables $\in$
                     93: CMObject/DistributedPolynomials. \\
                     94: \begin{eqnarray*}
                     95: \mbox{Monomial} &:& \mbox{Monomial32}\, |\, \mbox{Zero} \\
                     96: \mbox{Monomial32}&:& ({\tt CMO\_MONOMIAL32}, {\sl int32}\, n,
                     97:                       {\sl int32}\, \mbox{e[1]}, \ldots,
                     98:                       {\sl int32}\, \mbox{e[n]}, \\
                     99:                  & & \ \mbox{Coefficient}) \\
                    100:                  & & \mbox{ --- e[i] is the exponent $e_i$ of the monomial
                    101:                       $x^e = x_1^{e_1} \cdots x_n^{e_n}$. } \\
                    102: \mbox{Coefficient}&:& \mbox{ZZ} | \mbox{Integer32} \\
                    103: \mbox{Dpolynomial}&:& \mbox{Zero} \\
                    104:                  & & |\ ({\tt CMO\_LIST},{\sl int32} m, \\
                    105:                  & & \ \ {\tt CMO\_DMS}, \mbox{DringDefinition},
                    106:                     [\mbox{Monomial32}|\mbox{Zero}], \\
                    107:                  & &\ \
                    108:                     \{\mbox{Monomial32}\})  \\
                    109:                  & &\mbox{--- Distributed polynomial is a sum of monomials}\\
                    110:                  & &\mbox{--- m is equal to the number of monomials $+2$.}\\
                    111: \mbox{DringDefinition}
                    112:                  &:& \mbox{DMS of N variables} \\
                    113:                  & & |\ \mbox{RingByName} \\
                    114:                  & & |\ \mbox{Generic DMS ring} \\
                    115:                  & & \mbox{ --- definition of the ring of distributed polynomials. } \\
                    116: \mbox{Generic DMS ring}
                    117:                  &:& ({\tt CMO\_INT32, CMO\_DMS\_GENERIC}) \\
                    118: \mbox{RingByName}&:& ({\tt CMO\_RING\_BY\_NAME}, {\sl Cstring} s) \\
                    119:                  & & \mbox{ --- The ring definition refered by the name ``s''.} \\
                    120: \mbox{DMS of N variables}
                    121:                  &:& ({\tt CMO\_DMS\_OF\_N\_VARIABLES}, \\
                    122:                  & & \ ({\tt CMO\_LIST}, {\sl int32}\, \mbox{m},
                    123:                   {\sl Integer32}\,  \mbox{n}, {\sl Integer32}\,\mbox{p} \\
                    124:                  & & \ \ [,{\sl Cstring}\,\mbox{s}, {\sl List}\, \mbox{vlist},
                    125:                           {\sl List}\, \mbox{wvec}, {\sl List}\, \mbox{outord}]) \\
                    126:                  & & \mbox{ --- m is the number of elements.} \\
                    127:                  & & \mbox{ --- n is the number of variables, p is the characteristic} \\
                    128:                  & & \mbox{ --- s is the name of the ring, vlist is the list of variables.} \\
                    129:                  & & \mbox{ --- wvec is the weight vector.} \\
                    130:                  & & \mbox{ --- outord is the order of variables to output.} \\
                    131: \end{eqnarray*}
                    132:
                    133:
                    134: \subsection{ Stackmachine commands}
                    135:
                    136: \begin{verbatim}
                    137: #define SM_popSerializedLocalObject 258
                    138: #define SM_popCMO 262
                    139: #define SM_popString 263
                    140:
                    141: #define SM_mathcap 264
                    142: #define SM_pops 265
                    143: #define SM_setName 266
                    144: #define SM_evalName 267
                    145: #define SM_executeStringByLocalParser 268
                    146: #define SM_executeFunction 269
                    147: #define SM_beginBlock  270
                    148: #define SM_endBlock    271
                    149: #define SM_shutdown    272
                    150:
                    151:
                    152: #define SM_control_kill 1024
                    153: #define SM_control_reset_connection  1030
                    154: \end{verbatim}
                    155:
                    156:
                    157: \subsection{OX messages}
                    158:
                    159: Top level messages are OX messages.
                    160: These messages start with one of the following tags.
                    161:
                    162: \begin{verbatim}
                    163: #define   OX_COMMAND         513        // for stackmachine commands
                    164: #define   OX_DATA            514        // for CMO
                    165: #define   OX_SECURED_DATA    521
                    166:
                    167: #define   OX_SYNC_BALL       515
                    168: \end{verbatim}
                    169:
                    170: \noindent
                    171: Example:
                    172: \begin{center}
                    173:  (OX\_COMMAND, SM\_popCMO)
                    174: \end{center}
                    175:
                    176: \noindent
                    177: Example:
                    178: \begin{center}
                    179:  (OX\_DATA, ({\tt CMO\_STRING}, 5, "Hello"))
                    180: \end{center}
                    181:
                    182: */
                    183:
                    184:

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