version 1.5, 2000/01/02 07:35:15 |
version 1.7, 2000/01/17 22:09:47 |
|
|
%% $OpenXM: OpenXM/src/kxx/openxxx.tex,v 1.4 1999/11/22 08:52:55 takayama Exp $ |
%% $OpenXM: OpenXM/src/kxx/openxxx.tex,v 1.6 2000/01/13 01:52:19 takayama Exp $ |
/*&jp |
/*&jp |
%\documentclass{jarticle} |
%\documentclass{jarticle} |
\documentstyle{jarticle} |
\documentstyle{jarticle} |
|
|
} , |
} , |
¹â»³¿®µ£\thanks{¿À¸ÍÂç³ØÍý³ØÉô¿ô³Ø¶µ¼¼} |
¹â»³¿®µ£\thanks{¿À¸ÍÂç³ØÍý³ØÉô¿ô³Ø¶µ¼¼} |
} |
} |
\date{ 1999ǯ, 12·î31Æü} |
\date{ 2000ǯ, 1·î18Æü} |
*/ |
*/ |
/*&eg |
/*&eg |
%\documentclass{article} |
%\documentclass{article} |
|
|
} , |
} , |
Nobuki Takayama\thanks{Department of Mathematics, Kobe University} |
Nobuki Takayama\thanks{Department of Mathematics, Kobe University} |
} |
} |
\date{ December 31, 1999} |
\date{ January 18, 2000 } |
*/ |
*/ |
/*&C |
/*&C |
\begin{document} |
\begin{document} |
Line 139 CMO (Common Mathematical Object format) ¥°¥ë¡¼¥× Basic |
|
Line 139 CMO (Common Mathematical Object format) ¥°¥ë¡¼¥× Basic |
|
(Common Mathematical Object) ¤ò·Á¼°Åª¤ÊÊýË¡¤ò¤Ä¤«¤ï¤ºÆ³Æþ¤·¤è¤¦. |
(Common Mathematical Object) ¤ò·Á¼°Åª¤ÊÊýË¡¤ò¤Ä¤«¤ï¤ºÆ³Æþ¤·¤è¤¦. |
*/ |
*/ |
/*&eg |
/*&eg |
Objects in CMO (Common Mathematical Object format) Group Basic0 |
Objects in CMO (Common Mathematical Object format) group Basic0 |
are primitive data such as {\tt int}, {\tt string}. |
are primitive data such as {\tt int}, {\tt string}. |
All OpenXM compliant systems should implement all data types |
All OpenXM compliant systems should implement all data types |
in Group Basic0. |
in the group Basic0. |
In this section, as an introduction, we will introduce |
In this section, as an introduction, we will introduce |
CMObject (Common Mathematical Object) of group Basic0 without formal |
CMObject (Common Mathematical Object) of the group Basic0 without |
method. |
using the Backus-Nauer form. |
*/ |
*/ |
/*&jp |
/*&jp |
¤³¤Î¥°¥ë¡¼¥×¤ÎÀµ¼°¤Ê̾Á°¤Ï, |
¤³¤Î¥°¥ë¡¼¥×¤ÎÀµ¼°¤Ê̾Á°¤Ï, |
Line 160 The canonical name of this group is |
|
Line 160 The canonical name of this group is |
|
CMObject/Basic0. |
CMObject/Basic0. |
In the sequel, |
In the sequel, |
{\tt int32} means the signed 32 bit integer expressed by two's complement |
{\tt int32} means the signed 32 bit integer expressed by two's complement |
(Most internal expressions of {\tt int} of the language C take this expression). |
(internal expressions of {\tt int} of the language C usually use |
|
this expression). |
{\tt byte} means 8 bit data. |
{\tt byte} means 8 bit data. |
*/ |
*/ |
|
|
//&C |
//&C |
/*&jp |
/*&jp |
|
CMObject ¤Î TCP/IP ÍѤμÂÁõ¤Ç¤Ï, |
CMO ¤Î object ¤Ï \\ |
CMO ¤Î object ¤Ï \\ |
\begin{tabular}{|c|c|} |
\begin{tabular}{|c|c|} |
\hline |
\hline |
Line 177 CMO ¤Î object ¤Ï \\ |
|
Line 179 CMO ¤Î object ¤Ï \\ |
|
{\tt int32} ¤Çɽ¸½¤¹¤ë¤â¤Î¤Èµ¬Ì󤹤ë. |
{\tt int32} ¤Çɽ¸½¤¹¤ë¤â¤Î¤Èµ¬Ì󤹤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
CMO consists of a tag and a body: \\ |
In our encoding of the CMO's for TCP/IP, |
|
any CMObject consists of a tag and a body: \\ |
\begin{tabular}{|c|c|} |
\begin{tabular}{|c|c|} |
\hline |
\hline |
{\tt cmo\_tag}& {\tt cmo\_body} \\ |
{\tt cmo\_tag}& {\tt cmo\_body} \\ |
\hline |
\hline |
\end{tabular} \\ |
\end{tabular} \\ |
{\tt cmo\_tag} should be given a positive |
{\tt cmo\_tag} should be given by a positive |
{\tt int32}. |
{\tt int32}. |
*/ |
*/ |
|
|
|
|
{\tt CMO\_ERROR2}, {\tt CMO\_NULL}, |
{\tt CMO\_ERROR2}, {\tt CMO\_NULL}, |
{\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_MATHCAP}, {\tt CMO\_LIST} |
{\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_MATHCAP}, {\tt CMO\_LIST} |
are primitive data and |
are primitive data and |
all servers and clients should implement them. |
all servers and clients have to implement them. |
*/ |
*/ |
|
|
/*&C |
/*&C |
|
|
\noindent |
\medbreak \noindent |
*/ |
*/ |
//&jp CMObject Error2 ¤Ï \\ |
//&jp CMObject Error2 ¤Ï \\ |
//&eg CMObject Error2 is of the form \\ |
//&eg CMObject Error2 is of the form \\ |
Line 250 ob ¤Ï¥ê¥¹¥È¤Ç¤¢¤ê, TCP/IP ¤Ë¤è¤ë¥¹¥È¥ê¡¼¥à·¿Àܳ¤Î¾ì¹ |
|
Line 253 ob ¤Ï¥ê¥¹¥È¤Ç¤¢¤ê, TCP/IP ¤Ë¤è¤ë¥¹¥È¥ê¡¼¥à·¿Àܳ¤Î¾ì¹ |
|
¥·¥ê¥¢¥ëÈÖ¹æ¤Ï Integer32 ¤Çɽ¸½¤¹¤ë. |
¥·¥ê¥¢¥ëÈÖ¹æ¤Ï Integer32 ¤Çɽ¸½¤¹¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
It is an object when a server makes an error. |
It is an object used when a server makes an error. |
{\it CMObject} ob carries error informations. |
{\it CMObject} ob carries error informations. |
ob is a list and in case of the stream connection like TCP/IP |
The instance ob is a list and in case of a stream connection like TCP/IP |
the first element must be the serial number of the OX message causes the error. |
the first element must be the serial number of the OX message |
The serial number is Integer32. |
that caused the error. |
|
The serial number is given by the data type Integer32. |
*/ |
*/ |
|
|
/*&C |
/*&C |
|
|
\noindent |
\medbreak \noindent |
*/ |
*/ |
|
|
//&jp CMObject Null ¤Ï \\ |
//&jp CMObject Null ¤Ï \\ |
Line 281 The serial number is Integer32. |
|
Line 285 The serial number is Integer32. |
|
*/ |
*/ |
|
|
//&jp 32 bit integer n ¤Ï CMObject ¤È¤·¤Æ¤Ï Integer32 ¤È¸Æ¤Ð¤ì, \\ |
//&jp 32 bit integer n ¤Ï CMObject ¤È¤·¤Æ¤Ï Integer32 ¤È¸Æ¤Ð¤ì, \\ |
//&eg 32 bit integer n is called Integer32 as CMObject and has the format \\ |
//&eg 32 bit integer n is called Integer32 as a CMObject and has the format \\ |
/*&C |
/*&C |
\begin{tabular}{|c|c|} |
\begin{tabular}{|c|c|} |
\hline |
\hline |
Line 293 The serial number is Integer32. |
|
Line 297 The serial number is Integer32. |
|
|
|
/*&C |
/*&C |
|
|
\noindent |
\medbreak \noindent |
*/ |
*/ |
|
|
|
|
//&jp Ťµ n ¤Î ¥Ð¥¤¥ÈÎó data ¤Ï CMObject ¤È¤·¤Æ¤Ï, Datum ·¿¤È¤è¤Ð¤ì \\ |
//&jp Ťµ n ¤Î ¥Ð¥¤¥ÈÎó data ¤Ï CMObject ¤È¤·¤Æ¤Ï, Datum ·¿¤È¤è¤Ð¤ì \\ |
//&eg A byte array of the length n is called Datum as CMObject and has the format \\ |
//&eg A byte array of the length n is called Datum as a CMObject and has the format \\ |
/*&C |
/*&C |
\begin{tabular}{|c|c|c|c|} |
\begin{tabular}{|c|c|c|c|} |
\hline |
\hline |
Line 338 $\cdots$ & {\tt byte} {\rm data[n-1]} \\ |
|
Line 342 $\cdots$ & {\tt byte} {\rm data[n-1]} \\ |
|
\noindent |
\noindent |
*/ |
*/ |
//&jp CMObject Mathcap ¤Ï \\ |
//&jp CMObject Mathcap ¤Ï \\ |
//*eg CMObject Mathcap has the format \\ |
//&eg CMObject Mathcap has the format \\ |
/*&C |
/*&C |
\begin{tabular}{|c|c|} |
\begin{tabular}{|c|c|} |
\hline |
\hline |
Line 348 $\cdots$ & {\tt byte} {\rm data[n-1]} \\ |
|
Line 352 $\cdots$ & {\tt byte} {\rm data[n-1]} \\ |
|
*/ |
*/ |
/*&jp |
/*&jp |
¤Ê¤ë·Á¤Çɽ¸½¤¹¤ë. |
¤Ê¤ë·Á¤Çɽ¸½¤¹¤ë. |
{\tt ob} ¤Ï¥ê¥¹¥È¤Ç¤¢¤ê¾¯¤Ê¤¯¤È¤â2¤Ä¤ÎÍ×ÁǤò¤â¤Ä. |
{\tt ob} ¤Ï¥ê¥¹¥È¤Ç¤¢¤ê¾¯¤Ê¤¯¤È¤â3¤Ä¤ÎÍ×ÁǤò¤â¤Ä. |
0 ÈÖÌܤÎÍ×ÁǤÏ, Integer32 ¤Çɽ¤·¤¿ OpenXM protocol version number ¤È, |
0 ÈÖÌܤÎÍ×ÁǤÏ, Integer32 ¤Çɽ¤·¤¿ OpenXM protocol version number ¤È, |
Cstring ¤Çɽ¤·¤¿¥·¥¹¥Æ¥à̾, Server version, CPU type, ¤½¤Î¾¤Î¾ðÊó |
Cstring ¤Çɽ¤·¤¿¥·¥¹¥Æ¥à̾, Server version, CPU type, ¤½¤Î¾¤Î¾ðÊó |
¤Î¥ê¥¹¥È¤Ç¤¢¤ë. |
¤Î¥ê¥¹¥È¤Ç¤¢¤ë. |
1 ÈÖÌܤÎÍ×ÁǤÏ, ¥·¥¹¥Æ¥à xxx ¤¬°·¤¦¤³¤È¤Î²Äǽ¤Ê |
1 ÈÖÌܤÎÍ×ÁǤÏ, ¥·¥¹¥Æ¥à xxx ¤¬°·¤¦¤³¤È¤Î²Äǽ¤Ê |
SM ¥¿¥°, OX DATA ¥¿¥¤¥×¤È¤½¤ÎÉղþðÊó (CMO ¥¿¥°¤Ê¤É) |
SM ¥¿¥°¤ò, Integer32 ¤Çɽ¸½¤·¤¿¤â¤Î¤ò½¸¤á¤¿¥ê¥¹¥È¤Ç¤¢¤ë. |
¤ò, Integer32 ¤Çɽ¸½¤·¤¿¤â¤Î¤ò½¸¤á¤¿¥ê¥¹¥È¤Ç¤¢¤ë. |
3 ÈÖÌܤÎÍ×ÁǤÏ, ¥·¥¹¥Æ¥à xxx ¤¬¤¢¤Ä¤«¤¦¤³¤È¤Î²Äǽ¤Ê |
|
¥Ç¡¼¥¿·Á¼°¤ò¤¢¤Ä¤á¤¿¥ê¥¹¥È¤Ç¤¢¤ë. |
|
¾ÜºÙ¤Ï mathcap ¤ÎÀá¤ÇÀâÌÀ¤¹¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
ob is a list of which length is more than or equal to two. |
ob is a list of which length is more than or equal to three. |
The first element is a list of |
The first element is a list of |
OpenXM protocol version number in Integer32, |
OpenXM protocol version number in Integer32, |
the server name in Cstring, |
the server name in Cstring, |
the server version and CPU type in Cstring, |
the server version and CPU type in Cstring, |
and extra informations. |
and extra informations. |
The second element is a list of SM tags and OX data type tags with |
The second element is a list of SM tags in Integer 32. |
suplementary informations (e.g., a list of available CMO tags) |
The third element is a list of data type tags which the server or the client |
in Integer 32. |
can understand. |
|
The details will be explained in the section on mathcap. |
*/ |
*/ |
|
|
/*&C |
/*&C |
|
|
\noindent |
\medbreak \noindent |
*/ |
*/ |
//&jp Ťµ m ¤Î¥ê¥¹¥È¤Ï \\ |
//&jp Ťµ m ¤Î¥ê¥¹¥È¤Ï \\ |
//&eg A list of the length m has the form \\ |
//&eg A list of the length m has the form \\ |
Line 394 CMO ¤ÎBasic0 ¤Îɽ¸½Ë¡¤òÀâÌÀ¤·¤¿¤¬, |
|
Line 401 CMO ¤ÎBasic0 ¤Îɽ¸½Ë¡¤òÀâÌÀ¤·¤¿¤¬, |
|
¤³¤³¤Ç¤Ï, CMO ¤Î Lisp É÷ɽ¸½ (Lisp-like expression) |
¤³¤³¤Ç¤Ï, CMO ¤Î Lisp É÷ɽ¸½ (Lisp-like expression) |
¤Ç¤¢¤ë |
¤Ç¤¢¤ë |
CMOexpression |
CMOexpression |
¤ª¤è¤Ó CMO ¤Îɸ½à encoding Ë¡¤òÀâÌÀ¤¹¤ë. |
¤ª¤è¤ÓÁ°Àá¤ÇÀâÌÀ¤·¤¿ CMO ¤Îɸ½à encoding Ë¡¤ò¤â¤¦°ìÅÙÀâÌÀ¤¹¤ë. |
% (¥¿¥°¤Î¾ÊάµË¡¤¬¤Û¤·¤¤.) |
% (¥¿¥°¤Î¾ÊάµË¡¤¬¤Û¤·¤¤.) |
*/ |
*/ |
/*&eg |
/*&eg |
In the previous setion, we have explained the format of CMO's in the |
In the previous setion, we have explained the format of CMO's in the |
Basic0 group. |
Basic0 group. |
In this section, we will introduce CMOexpression which is like the |
In this section, we will introduce CMOexpression which is like the |
bracket expression of Lisp and a standard encoding method of CMO. |
bracket expression of Lisp. |
|
We again explain a standard encoding method of CMO, |
|
which we have already explained in the previous section. |
*/ |
*/ |
|
|
/*&jp |
/*&jp |
Line 411 bracket expression of Lisp and a standard encoding met |
|
Line 420 bracket expression of Lisp and a standard encoding met |
|
``:'' ¤ÏÄêµÁ¤ò°ÕÌ£¤¹¤ë. ``$|$'' ¤Ï''¤Þ¤¿¤Ï''¤ò°ÕÌ£¤¹¤ë. |
``:'' ¤ÏÄêµÁ¤ò°ÕÌ£¤¹¤ë. ``$|$'' ¤Ï''¤Þ¤¿¤Ï''¤ò°ÕÌ£¤¹¤ë. |
\{ X \} ¤Ï X ¤Î 0 ²ó°Ê¾å¤Î·«¤êÊÖ¤·¤òɽ¤¹. |
\{ X \} ¤Ï X ¤Î 0 ²ó°Ê¾å¤Î·«¤êÊÖ¤·¤òɽ¤¹. |
[ x ] ¤Ï X ¤¬ 0 ²ó¤Þ¤¿¤Ï 1 ²ó½Ð¸½¤¹¤ë¤³¤È¤òɽ¤¹. |
[ x ] ¤Ï X ¤¬ 0 ²ó¤Þ¤¿¤Ï 1 ²ó½Ð¸½¤¹¤ë¤³¤È¤òɽ¤¹. |
|
¤³¤ÎµË¡¤òÍѤ¤¤ë¤È CMOexpression ¤Ï¼¡¤Î¤è¤¦¤ËÄêµÁ¤Ç¤¤ë. |
|
|
*/ |
*/ |
/*&eg |
/*&eg |
|
|
Line 420 Symbols in the type writer fonts mean terminals. |
|
Line 431 Symbols in the type writer fonts mean terminals. |
|
``$|$'' means ''or''. |
``$|$'' means ''or''. |
\{ X \} is a repetition of X of more than or equal to 0 times. |
\{ X \} is a repetition of X of more than or equal to 0 times. |
[ x ] stands for X or nothing. |
[ x ] stands for X or nothing. |
|
By using this notation, CMOexpression is defined as follows. |
|
|
*/ |
*/ |
|
|
|
|
32 bit integer $n$ ¤òɽ¸½¤·¤Æ¤¤¤ë¤ó¤À¤È¤¤¤¦¤³¤È¤¬, 1 ¹Ô¤Ç¤ï¤«¤ë. |
32 bit integer $n$ ¤òɽ¸½¤·¤Æ¤¤¤ë¤ó¤À¤È¤¤¤¦¤³¤È¤¬, 1 ¹Ô¤Ç¤ï¤«¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
(Example part has not yet been translated.) |
(This part has not yet been translated.) |
*/ |
*/ |
/*&jp |
/*&jp |
¤³¤ÎµË¡¤òÍѤ¤¤Æ, Á°Àá¤ÇƳÆþ¤·¤¿, Basic0 ¤Î CMObject ¤ò |
¤³¤ÎµË¡¤òÍѤ¤¤Æ, Á°Àá¤ÇƳÆþ¤·¤¿, Basic0 ¤Î CMObject ¤ò |
Line 627 CMOexpression ¤È, CMObject ¤Î¶èÊ̤òÍý²ò¤·¤Æ¤ª¤¯¤Î¤Ï½ÅÍ |
|
Line 639 CMOexpression ¤È, CMObject ¤Î¶èÊ̤òÍý²ò¤·¤Æ¤ª¤¯¤Î¤Ï½ÅÍ |
|
"Hello" |
"Hello" |
</CMO_STRING> |
</CMO_STRING> |
\end{verbatim} |
\end{verbatim} |
|
*/ |
|
|
|
/*&C |
|
|
|
*/ |
|
|
|
/*&jp |
¼¡¤Ë, ɸ½à encoding Ë¡¤òÀâÌÀ¤·¤è¤¦. |
¼¡¤Ë, ɸ½à encoding Ë¡¤òÀâÌÀ¤·¤è¤¦. |
ɸ½à encoding Ë¡¤Ç¤Ï, cmo\_tag ¤ò ¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤Î |
ɸ½à encoding Ë¡¤Ç¤Ï, cmo\_tag ¤ò ¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤Î |
32 bit integer {\tt int32} ¤Ë, |
32 bit integer {\tt int32} ¤Ë, |
¤½¤Î¾¤Î¥Õ¥£¡¼¥ë¥É¤Ï, ÄêµÁ¤Ëµ½Ò¤µ¤ì¤Æ¤¤¤ë¥Ç¡¼¥¿·¿¤Ë½¾¤¤, |
¤½¤Î¾¤Î¥Õ¥£¡¼¥ë¥É¤Ï, ÄêµÁ¤Ëµ½Ò¤µ¤ì¤Æ¤¤¤ë¥Ç¡¼¥¿·¿¤Ë½¾¤¤, |
byte ¥Ç¡¼¥¿ {\tt byte} ¤«¤Þ¤¿¤Ï |
byte ¥Ç¡¼¥¿ {\tt byte} ¤«¤Þ¤¿¤Ï |
¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤Î 32 bit integer {\tt int32} ¤Ë, ÊÑ´¹¤¹¤ë. |
¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤Î 32 bit integer {\tt int32} ¤Ë, ÊÑ´¹¤¹¤ë. |
|
*/ |
|
/*&eg |
|
Let us explain the standard encoding method. |
|
All {\tt int32} data are encoded into network byte order 32 bit integers |
|
and byte data are encoded as it is. |
|
*/ |
|
|
|
/*&C |
|
|
|
*/ |
|
|
|
/*&jp |
¹â®¤ÎÄÌ¿®ÊýË¡¤òÍѤ¤¤Æ |
¹â®¤ÎÄÌ¿®ÊýË¡¤òÍѤ¤¤Æ |
¸úΨ¤ò½Å»ë¤¹¤ëÀܳ¤Î¾ì¹ç¤Ë¤Ï, {\tt int32} ¤ò network byte order |
¸úΨ¤ò½Å»ë¤¹¤ëÀܳ¤Î¾ì¹ç¤Ë¤Ï, {\tt int32} ¤ò network byte order |
¤ËÊÑ´¹¤¹¤ëÁàºî¤¬¤ª¤ª¤¤Ê¥ª¡¼¥Ð¥Ø¥Ã¥É¤È¤Ê¤ë¤³¤È¤¬ |
¤ËÊÑ´¹¤¹¤ëÁàºî¤¬¤ª¤ª¤¤Ê¥ª¡¼¥Ð¥Ø¥Ã¥É¤È¤Ê¤ë¤³¤È¤¬ |
Line 643 byte ¥Ç¡¼¥¿ {\tt byte} ¤«¤Þ¤¿¤Ï |
|
Line 672 byte ¥Ç¡¼¥¿ {\tt byte} ¤«¤Þ¤¿¤Ï |
|
Ìó 90\% ¤Î»þ´Ö¤¬ network byte order ¤Ø¤ÎÊÑ´¹¤Ë¤Ä¤¤¤ä¤µ¤ì¤Æ¤¤¤ë¤È¤¤¤¦ |
Ìó 90\% ¤Î»þ´Ö¤¬ network byte order ¤Ø¤ÎÊÑ´¹¤Ë¤Ä¤¤¤ä¤µ¤ì¤Æ¤¤¤ë¤È¤¤¤¦ |
¼Â¸³¥Ç¡¼¥¿¤â¤¢¤ë. |
¼Â¸³¥Ç¡¼¥¿¤â¤¢¤ë. |
¸úΨ¤ò½Å»ë¤·¤¿ encoding Ë¡¤Ë¤Ä¤¤¤Æ¤Ï¸å½Ò¤¹¤ë. |
¸úΨ¤ò½Å»ë¤·¤¿ encoding Ë¡¤Ë¤Ä¤¤¤Æ¤Ï¸å½Ò¤¹¤ë. |
|
*/ |
|
/*&eg |
|
When we are using a high speed network, |
|
the translation from the internal expression of 32 bit integers to |
|
network byte order may become a bottle neck. |
|
There are experimental data which presents that 90 percents of the transmission |
|
time are |
|
for the translation to the network byte order to send {\tt CMO\_ZZ} of size |
|
12M bytes on a 100Mbps network. |
|
In a later section, we will discuss a protocol to avoid the translation. |
|
*/ |
|
|
|
/*&C |
|
|
ɸ½à encoding Ë¡¤ÏÁ´¤Æ¤Î¥·¥¹¥Æ¥à¤¬´ðÁäȤ·¤ÆÈ÷¤¨¤ë¤Ù¤ÊÑ´¹Ë¡¤Ç¤¢¤ë. |
*/ |
|
|
|
/*&jp |
ɸ½à encoding ¤È CMOexpression ¤Î´Ö¤ÎÊÑ´¹¤ÏÍưפǤ¢¤ë. |
ɸ½à encoding ¤È CMOexpression ¤Î´Ö¤ÎÊÑ´¹¤ÏÍưפǤ¢¤ë. |
Á°Àá¤ÇÍѤ¤¤¿¥Ç¡¼¥¿¤ÎɽµË¡, |
Á°Àá¤ÇÍѤ¤¤¿¥Ç¡¼¥¿¤ÎɽµË¡, |
¤¿¤È¤¨¤Ð, |
¤¿¤È¤¨¤Ð, |
|
*/ |
|
/*&eg |
|
The translation between the standard encoding and CMOexpression |
|
is easy. |
|
For example, |
|
*/ |
|
/*&C |
\begin{center} |
\begin{center} |
\begin{tabular}{|c|c|} |
\begin{tabular}{|c|c|} |
\hline |
\hline |
Line 656 byte ¥Ç¡¼¥¿ {\tt byte} ¤«¤Þ¤¿¤Ï |
|
Line 706 byte ¥Ç¡¼¥¿ {\tt byte} ¤«¤Þ¤¿¤Ï |
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
\end{center} |
\end{center} |
|
*/ |
|
/*&jp |
¤Ï, CMOexpression |
¤Ï, CMOexpression |
|
*/ |
|
/*&eg |
|
is the encoding of the CMOexpression |
|
*/ |
|
/*&C |
\begin{center} |
\begin{center} |
({\tt CMO\_INT32}, 1234) |
({\tt CMO\_INT32}, 1234) |
\end{center} |
\end{center} |
|
*/ |
|
/*&jp |
¤Î ɸ½à encoding Ë¡¤Ë¤è¤ëɽ¸½¤Ç¤¢¤ë. |
¤Î ɸ½à encoding Ë¡¤Ë¤è¤ëɽ¸½¤Ç¤¢¤ë. |
|
|
*/ |
*/ |
/*&eg |
|
(This part has not yet been translated.) |
|
*/ |
|
|
|
|
|
//&jp \section{ Open XM ¤ÎÄÌ¿®¥â¥Ç¥ë} |
//&jp \section{ Open XM ¤ÎÄÌ¿®¥â¥Ç¥ë} |
//&eg \section{ Communication model of Open XM} (This part has not yet been translated) |
//&eg \section{ Communication model of Open XM} (This part has not yet been translated) |
|
|
Line 1967 Tree, Lambda $\in$ CMObject/Basic1. \\ |
|
Line 2023 Tree, Lambda $\in$ CMObject/Basic1. \\ |
|
\end{eqnarray*} |
\end{eqnarray*} |
*/ |
*/ |
|
|
/*&jp |
/*&C |
|
|
|
*/ |
|
|
|
/*&jp |
¿ô¼°¤ò½èÍý¤¹¤ë¥·¥¹¥Æ¥à¤Ç¤Ï, Tree ¹½Â¤¤¬°ìÈ̤ˤâ¤Á¤¤¤é¤ì¤ë. |
¿ô¼°¤ò½èÍý¤¹¤ë¥·¥¹¥Æ¥à¤Ç¤Ï, Tree ¹½Â¤¤¬°ìÈ̤ˤâ¤Á¤¤¤é¤ì¤ë. |
¤¿¤È¤¨¤Ð, $\sin(x+e)$ ¤Ï, |
¤¿¤È¤¨¤Ð, $\sin(x+e)$ ¤Ï, |
{\tt (sin, (plus, x, e))} |
{\tt (sin, (plus, x, e))} |
Line 1986 Tree ¹½Â¤¤Ï Open Math É÷¤Îɽ¸½¤ò¤â¤Á¤¤¤¿ CMO ¤òƳÆþ¤¹¤ |
|
Line 2045 Tree ¹½Â¤¤Ï Open Math É÷¤Îɽ¸½¤ò¤â¤Á¤¤¤¿ CMO ¤òƳÆþ¤¹¤ |
|
¤Þ¤¿¤³¤Î¤Û¤¦¤¬, ¤ï¤ì¤ï¤ì¤ÎÁÛÄꤹ¤ë¥·¥¹¥Æ¥à xxx ¤Ë¤ª¤¤¤Æ, Open XM Âбþ¤¬ |
¤Þ¤¿¤³¤Î¤Û¤¦¤¬, ¤ï¤ì¤ï¤ì¤ÎÁÛÄꤹ¤ë¥·¥¹¥Æ¥à xxx ¤Ë¤ª¤¤¤Æ, Open XM Âбþ¤¬ |
¤Ï¤ë¤«¤ËÍưפǤ¢¤ë. |
¤Ï¤ë¤«¤ËÍưפǤ¢¤ë. |
¤Ê¤ª, Tree ¤Ï, Open Math ¤Ç¤Ï, Symbol, Application ¤Î¥á¥«¥Ë¥º¥à¤ËÁêÅö¤¹¤ë. |
¤Ê¤ª, Tree ¤Ï, Open Math ¤Ç¤Ï, Symbol, Application ¤Î¥á¥«¥Ë¥º¥à¤ËÁêÅö¤¹¤ë. |
|
*/ |
|
/*&eg |
|
In many computer algebra systems, mathematical expressions are usually |
|
expressed in terms of a tree structure. |
|
For example, |
|
$\sin(x+e)$ is expressed as |
|
{\tt (sin, (plus, x, e))} |
|
as a tree. |
|
We can @@@ |
|
*/ |
|
|
|
|
|
/*&C |
|
|
|
*/ |
|
/*&jp |
Lambda ¤Ï´Ø¿ô¤òÄêµÁ¤¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. |
Lambda ¤Ï´Ø¿ô¤òÄêµÁ¤¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. |
Lisp ¤Î Lambda ɽ¸½¤ÈƱ¤¸. |
Lisp ¤Î Lambda ɽ¸½¤ÈƱ¤¸. |
|
|
|
|
(OX\_DATA, ({\tt CMO\_STRING}, 5, "Hello")) |
(OX\_DATA, ({\tt CMO\_STRING}, 5, "Hello")) |
\end{center} |
\end{center} |
|
|
|
*/ |
|
|
|
/*&jp |
|
\section{ OX ¥µ¡¼¥Ð¤ËÂФ¹¤ë C ¥é¥¤¥Ö¥é¥ê¥¤¥ó¥¿¥Õ¥§¡¼¥¹ } |
|
|
|
°ìÉô¤ÎOX ¥µ¡¼¥Ð¤Ç¤Ï C ¤Î¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¥ê¥ó¥¯¤·¤Æ»ÈÍѤ¹¤ë¤â¤Ç¤¤ë. |
|
¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Î C ¤Î´Ø¿ô¤Ï |
|
Asir ¤Î OX ¥µ¡¼¥ÐÍÑ¥¯¥é¥¤¥¢¥ó¥È´Ø¿ô¤Ë»÷¤¿¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò»ý¤Ä. |
|
|
|
¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Ë¤Ï, CMO ¤ò binary encoding ¤·¤ÆÅϤ¹. |
|
¥é¥¤¥Ö¥é¥ê´Ø¿ô¤«¤é¤Ï, CMO ¤¬ binary encoded form ¤ÇÌá¤ë. |
|
|
|
*/ |
|
/*&eg |
|
\section{ OX servers as a C library} |
|
|
|
In some OX servers, one can use the OX server as a C library. |
|
The interface functions of the C library |
|
are similar to Asir OX client functions such as |
|
\verb+ ox_push_cmo() +, \verb+ ox_pop_cmo() +. |
|
|
|
CMO should be in the binary encoded form to call these functions. |
|
*/ |
|
/*&C |
|
|
|
\medbreak |
|
\begin{verbatim} |
|
int xxx_ox_byte_order(int type) |
|
\end{verbatim} |
|
*/ |
|
/*&eg |
|
Specify the byte order to send int32 to the OX server xxx. |
|
When type = 0, the network byte order will be used. |
|
In case of error, -1 will be returned. |
|
*/ |
|
/*&jp |
|
OX ¥µ¡¼¥Ð xxx ¤Ø int32 ¤òÁ÷¤ë¤¿¤á¤Î byte order ¤ò type ¤Ç»ØÄꤹ¤ë. |
|
¥é¥¤¥Ö¥é¥ê¤Ç¤Ï¤¢¤ë¤¬, |
|
type = 0 ¤Ç, network byte order ¤ò»ÈÍѤǤ¤Ê¤¤¤È¤¤¤±¤Ê¤¤?? |
|
¼ºÇÔ¤·¤¿¾ì¹ç, -1 ¤òÌ᤹. |
|
*/ |
|
|
|
/*&C |
|
|
|
\smallskip |
|
\begin{verbatim} |
|
void xxx_ox_push_cmo(void *cmo, int size) |
|
\end{verbatim} |
|
*/ |
|
/*&eg |
|
Push the binary encoded CMO {\tt cmo} of the size {\tt size} |
|
onto the stack of the OX server xxx. |
|
*/ |
|
/*&jp |
|
Binary encoded ¤µ¤ì¤¿ CMO (¥µ¥¤¥º¤Ï size) ¤ò, OX ¥µ¡¼¥Ð xxx |
|
¤Î stack ¤Ë push ¤¹¤ë. |
|
*/ |
|
/*&C |
|
|
|
\smallskip |
|
\begin{verbatim} |
|
int xxx_ox_pop_cmo(void *cmo, int limit) |
|
\end{verbatim} |
|
*/ |
|
/*&eg |
|
Pop a binary encoded CMO from the OX server xxx |
|
and write it at {\tt cmo}. |
|
The return value is the size of the CMO in bytes. |
|
In case of the stack underflow, the return value is 0. |
|
If the size exceeds the {\tt limit}, -1 will be returned |
|
and the CMO is not popped and will not be written to {\tt cmo}. |
|
*/ |
|
/*&jp |
|
Binary encoded ¤µ¤ì¤¿ CMO (¥µ¥¤¥º¤Ï size) ¤ò, OX ¥µ¡¼¥Ð¤è¤ê |
|
pop ¤·¤Æ, cmo ¤Ë½ñ¤¹þ¤à. |
|
Ìá¤êÃÍ¤Ï CMO ¤Î¥µ¥¤¥º¤ò byte ¤ÇÌ᤹. |
|
Stack underflow ¤Î¾ì¹ç¤ÎÌá¤êÃÍ¤Ï 0 ¤Ç¤¢¤ë. |
|
¤¿¤À¤·, limit ¤è¤êÂ礤¤¥µ¥¤¥º¤Î CMO ¤Ï½ñ¤¹þ¤Þ¤ì¤Ê¤¤. |
|
¤³¤Î¾ì¹ç, Ìá¤êÃÍ¤Ï -1 ¤È¤Ê¤ë. |
|
*/ |
|
|
|
/*&C |
|
|
|
\smallskip |
|
\begin{verbatim} |
|
int xxx_ox_peek_cmo_size() |
|
\end{verbatim} |
|
*/ |
|
/*&eg |
|
Return the size of the CMO at the top of the stack. |
|
*/ |
|
|
|
/*&C |
|
|
|
\smallskip |
|
\begin{verbatim} |
|
int xxx_ox_peek_cmo_size() |
|
\end{verbatim} |
|
*/ |
|
/*&jp |
|
stack ¤Î°ìÈÖ¾å¤Ë¤¢¤ë CMO ¤Î¥µ¥¤¥º¤ò byte ¤ÇÌ᤹. |
|
( ¥é¥¤¥Ö¥é¥êÈÇÆÃÍ ) |
|
*/ |
|
|
|
/*&C |
|
|
|
\smallbreak |
|
\begin{verbatim} |
|
ox_push_cmd(), ox_execute_string() |
|
\end{verbatim} |
|
*/ |
|
/*&eg |
|
These functions have the same specification with those |
|
in Asir client functions. See Asir document. |
|
Numbers should be given in int 32 and strings should be given |
|
by char * |
|
*/ |
|
/*&jp |
|
¤Ë¤Ä¤¤¤Æ¤Ï, Asir ¥¯¥é¥¤¥¢¥ó¥È¤ÈƱ¤¸¥¤¥ó¥¿¥Õ¥§¡¼¥¹. |
|
¿ô¤Ï int32 ¤Ç, ʸ»úÎó¤Ï char * ¤Ç. |
|
*/ |
|
|
|
|
|
/*&C |
|
|
\begin{thebibliography}{99} |
\begin{thebibliography}{99} |
\bibitem{openmath} {\tt http://www.openmath.org} |
\bibitem{openmath} {\tt http://www.openmath.org} |
\bibitem{openxxx} {\tt http://www.math.kobe-u.ac.jp/openxxx/ ¤Þ¤À¤Ç¤¹.} |
\bibitem{openxxx} {\tt http://www.math.kobe-u.ac.jp/OpenXM/ (under construction)} |
\bibitem{openasir-intro} ¾®¸¶, ¹â»³, ÌîϤ: Open Asir ÆþÌç, 1999, |
\bibitem{openasir-intro} Ohara, Takayama, Noro: Introduction to Open Asir , |
¿ô¼°½èÍý, Vol 7, No 2, 2--17. (ISBN4-87243-086-7, SEG ½ÐÈÇ, Tokyo). \\ |
1999, (in Japanese), |
{\tt http://www.math.kobe-u.ac.jp/openxxx/} |
Suushiki-Shyori, Vol 7, No 2, 2--17. (ISBN4-87243-086-7, SEG , Tokyo). \\ |
|
{\tt http://www.math.kobe-u.ac.jp/OpenXM/} |
\end{thebibliography} |
\end{thebibliography} |
*/ |
*/ |
|
|