=================================================================== RCS file: /home/cvs/OpenXM/src/kxx/openxxx.tex,v retrieving revision 1.1.1.1 retrieving revision 1.7 diff -u -p -r1.1.1.1 -r1.7 --- OpenXM/src/kxx/openxxx.tex 1999/10/08 02:12:13 1.1.1.1 +++ OpenXM/src/kxx/openxxx.tex 2000/01/17 22:09:47 1.7 @@ -1,4 +1,5 @@ - +%% $OpenXM: OpenXM/src/kxx/openxxx.tex,v 1.6 2000/01/13 01:52:19 takayama Exp $ +/*&jp %\documentclass{jarticle} \documentstyle{jarticle} \title{{\bf Open XM ¤ÎÀ߷פȼÂÁõ} \\ @@ -7,19 +8,38 @@ } , ¹â»³¿®µ£\thanks{¿À¸ÍÂç³ØÍý³ØÉô¿ô³Ø¶µ¼¼} } -\date{ 1999ǯ, 9·î13Æü} +\date{ 2000ǯ, 1·î18Æü} +*/ +/*&eg +%\documentclass{article} +\documentstyle{article} +\title{{\bf Design and Implementation of OpenXM} \\ + --- Open message eXchange protocol for Mathematics \\ + (English Abstract of Japanese Original Document)} +\author{ Masayuki Noro\thanks{Fujitsu Laboratory +} , + Nobuki Takayama\thanks{Department of Mathematics, Kobe University} +} +\date{ January 18, 2000 } +*/ +/*&C \begin{document} \maketitle \def\noroa#1{ } \def\remove#1{ } +*/ +/*&jp {\tt kxx/openxxx.tex}. {\bf Draft} 1997, 11/20 --- . ¤³¤Îʸ½ñ¤Ï open XM ¤ÎÀß·×ÍѤΥá¥â¤È¤·¤Æ¤ÎÌòÌܤ⤢¤ë¤Î¤Ç, °ìÉô¤Î¥Õ¥¡¥¤¥ë̾¤Ï³«È¯¼Ô¤Î¤ß¤¬»²¾È¤Ç¤­¤ë. +*/ -\section{¤Ï¤¸¤á¤Ë} +//&jp \section{¤Ï¤¸¤á¤Ë} +//&eg \section{Introduction} (This part has not been translated) +/*&jp Open XM ¤Ï, ¤ª¤Ê¤¸¥¿¥¤¥×¤Þ¤¿¤Ï°Û¤Ê¤ë¥¿¥¤¥×¤Î¿ô³Ø¥×¥í¥»¥¹´Ö¤Î ¥á¥Ã¥»¡¼¥¸¤Î¤ä¤ê¤È¤ê¤Îµ¬Ìó¤Ç¤¢¤ë. ³«È¯¤ÎÆ°µ¡¤Ï, ¼êºî¤ê(¤Þ¤¿¤Ï¸¦µæŪ¤Ê)¿ô³Ø¥½¥Õ¥È¤ÎÁê¸ß¾è¤êÆþ¤ì¤Î¼Â¸½ @@ -104,24 +124,50 @@ SM ÁØ¤Ï (¥¹¥¿¥Ã¥¯¥Þ¥·¥ó)¥µ¡¼¥Ð¤òÀ©¸æ¤¹¤ë¤¿¤á¤ÎÌ¿Îá¤Î ¤¢¤Ä¤Þ¤ê¤Ç¤¢¤ê, ¥µ¡¼¥Ð¤ÏÈóƱ´üŪ¤ËÆ°ºî¤µ¤»¤ë¤³¤È¤¬²Äǽ¤Ç¤¢¤ë. ½ÀÆðÀ­¤¬¹â¤¤¤Î¤Ç, IMC ¤Ê¤É¤Î¥ê¥â¡¼¥È¥×¥í¥·¡¼¥¸¥ã¥³¡¼¥ë·Ï¤Î ¥×¥í¥È¥³¥ë¤â¥¨¥ß¥å¥ì¡¼¥È¤Ç¤­¤ë. +*/ - - -\section{CMO Basic0 ¤Î object} +//&jp \section{CMO Basic0 ¤Î object} +//&eg \section{CMO Basic0 object} +/*&jp CMO (Common Mathematical Object format) ¥°¥ë¡¼¥× Basic0 ¤Î Object ¤Ï, -¿¤¯¤Î·×»»µ¡¸À¸ì¤¬É¸½à¤È¤·¤Æ¤â¤Ä ¥í¡¼¥ì¥Ù¥ë¤Î¥Ç¡¼¥¿·¿, {\tt int} , {\tt string} -¤Ê¤É¤Ë ¥¿¥°ÉÕ¤±¤·¤¿ object ¤Ç¤¢¤ë. -¤³¤Î CMO ¤Ï¤¹¤Ù¤Æ¤Î open xxx ¤¬¼ÂÁõ¤·¤Æ¤¤¤ë¤È²¾Äꤵ¤ì¤ë. +¤Ê¤É¤ËÂбþ¤¹¤ë object ¤Ç¤¢¤ë. +¤³¤Î CMO ¤Ï¤¹¤Ù¤Æ¤Î OpenXM ¤¬¼ÂÁõ¤·¤Æ¤¤¤ë¤È²¾Äꤵ¤ì¤ë. ¤³¤ÎÀá¤Ç¤Ï, ¥¤¥ó¥È¥í¥À¥¯¥·¥ç¥ó¤È¤·¤Æ, ¥°¥ë¡¼¥× Basic0 ¤Ë°¤¹¤ë CMObject (Common Mathematical Object) ¤ò·Á¼°Åª¤ÊÊýË¡¤ò¤Ä¤«¤ï¤ºÆ³Æþ¤·¤è¤¦. +*/ +/*&eg +Objects in CMO (Common Mathematical Object format) group Basic0 +are primitive data such as {\tt int}, {\tt string}. +All OpenXM compliant systems should implement all data types +in the group Basic0. +In this section, as an introduction, we will introduce +CMObject (Common Mathematical Object) of the group Basic0 without +using the Backus-Nauer form. +*/ +/*&jp ¤³¤Î¥°¥ë¡¼¥×¤ÎÀµ¼°¤Ê̾Á°¤Ï, CMObject/Basic0 ¤Ç¤¢¤ë. °Ê²¼, {\tt int32} ¤Ç2¤ÎÊä¿ôɽ¸½¤µ¤ì¤¿ -network byte order ¤Î 32 bit integer ¤ò¤¢¤é¤ï¤¹. +32 bit integer ¤ò¤¢¤é¤ï¤¹ +(¤³¤ì¤Ï¤è¤¯»È¤ï¤ì¤ë·×»»µ¡¤Ç¤Î C ¸À¸ì¤Î int ¤ÎÆâÉôɽ¸½). {\tt byte} ¤Ç 8 bit ¥Ç¡¼¥¿¤ò¤¢¤é¤ï¤¹. +*/ +/*&eg +The canonical name of this group is +CMObject/Basic0. +In the sequel, +{\tt int32} means the signed 32 bit integer expressed by two's complement +(internal expressions of {\tt int} of the language C usually use +this expression). +{\tt byte} means 8 bit data. +*/ + +//&C +/*&jp +CMObject ¤Î TCP/IP ÍѤμÂÁõ¤Ç¤Ï, CMO ¤Î object ¤Ï \\ \begin{tabular}{|c|c|} \hline @@ -131,9 +177,28 @@ CMO ¤Î object ¤Ï \\ ¤Ê¤ë·Á¤ò¤·¤Æ¤¤¤ë. ¤³¤³¤Ç, {\tt cmo\_tag} ¤Ï, Àµ¤Î {\tt int32} ¤Çɽ¸½¤¹¤ë¤â¤Î¤Èµ¬Ì󤹤ë. +*/ +/*&eg +In our encoding of the CMO's for TCP/IP, +any CMObject consists of a tag and a body: \\ +\begin{tabular}{|c|c|} +\hline +{\tt cmo\_tag}& {\tt cmo\_body} \\ +\hline +\end{tabular} \\ +{\tt cmo\_tag} should be given by a positive +{\tt int32}. +*/ +/*&C + +*/ +/*&jp {\tt cmo\_tag} ¤Ï object ¤Î¥¿¥¤¥×¤ò¤¢¤é¤ï¤¹¥¿¥°¤Ç¤¢¤ê, °Ê²¼¤Î¤è¤¦¤Ë·è¤á¤Æ¤¤¤ë. +*/ +//&eg The following is a list of tags of CMObject/Basic0. +/*&C @../SSkan/plugin/cmotag.h \begin{verbatim} #define LARGEID 0x7f000000 @@ -145,126 +210,232 @@ CMO ¤Î object ¤Ï \\ #define CMO_MATHCAP 5 #define CMO_LIST 17 \end{verbatim} +*/ +/*&jp °Ê²¼, ³Æ object ¤Î ¥Õ¥©¡¼¥Þ¥Ã¥È¤òÀâÌÀ¤¹¤ë. -¥µ¡¼¥Ð¤Ï¤¹¤Ù¤Æ¤Î object ¤Î CMO ·Á¼°¤ò¥µ¥Ý¡¼¥È¤¹¤ëɬÍפϤʤ¤¤¬, -mathcap (¸å½Ò) Ì䤤¹ç¤ï¤»¤ËÂФ·¤Æ, -¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë CMO ·Á¼°¥Ç¡¼¥¿¤ò¥¯¥é¥¤¥¢¥ó¥È¤ËÃΤ餻¤ëɬÍפ¬ -¤¢¤ë. +¥µ¡¼¥Ð, ¥¯¥é¥¤¥¢¥ó¥È¤Ï¤¹¤Ù¤Æ¤Î object ¤Î CMO ·Á¼°¤ò¥µ¥Ý¡¼¥È¤¹¤ëɬÍפϤʤ¤¤¬, {\tt CMO\_ERROR2}, {\tt CMO\_NULL}, {\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_MATHCAP}, {\tt CMO\_LIST} ¤ÏºÇ¤â´ðËÜŪ¤Ê¥Ç¡¼¥¿¤Ç¤¢¤ê, ¤Þ¤¿Á´¤Æ¤Î¥µ¡¼¥Ð, ¥¯¥é¥¤¥¢¥ó¥È¤¬¼ÂÁõ¤¹¤Ù¤­ CMO ¥Ç¡¼¥¿¤Ç¤¢¤ë. +*/ +/*&eg +We will explain each object format. +Servers and clients do not need to implement all CMO's. +However, +{\tt CMO\_ERROR2}, {\tt CMO\_NULL}, +{\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_MATHCAP}, {\tt CMO\_LIST} +are primitive data and +all servers and clients have to implement them. +*/ +/*&C -CMObject Error2 ¤Ï \\ +\medbreak \noindent +*/ +//&jp CMObject Error2 ¤Ï \\ +//&eg CMObject Error2 is of the form \\ +/*&C \begin{tabular}{|c|c|} \hline -{\tt int32 CMO\_ERROR2} & {\it CMObject} ob \\ +{\tt int32 CMO\_ERROR2} & {\sl CMObject} {\rm ob} \\ \hline \end{tabular} \\ +*/ +/*&jp ¤Ê¤ë·Á¤Çɽ¸½¤¹¤ë. -¥¨¥é¡¼¤Î»þ¤ËÅꤲ¤ë object ¤Ç¤¢¤ê, {\it CMObject} ob ¤Î +¥¨¥é¡¼¤Î»þ¤Ë push ¤¹¤ë object ¤Ç¤¢¤ê, {\it CMObject} ob ¤Î Éôʬ¤Ë¾ÜºÙ¤Ê¥¨¥é¡¼¾ðÊ󤬤Ϥ¤¤ë. -ob ¤Ï¥ê¥¹¥È¤Ç¤¢¤ê, ºÇ½é¤ÎÀ®Ê¬¤Ï¥¨¥é¡¼¤òµ¯¤³¤·¤¿ OX ¥á¥Ã¥»¡¼¥¸(¸å½Ò) +ob ¤Ï¥ê¥¹¥È¤Ç¤¢¤ê, TCP/IP ¤Ë¤è¤ë¥¹¥È¥ê¡¼¥à·¿Àܳ¤Î¾ì¹ç, +ºÇ½é¤ÎÀ®Ê¬¤Ï¥¨¥é¡¼¤òµ¯¤³¤·¤¿ OX ¥á¥Ã¥»¡¼¥¸(¸å½Ò) ¤Î¥·¥ê¥¢¥ëÈÖ¹æ¤Ç¤Ê¤¤¤È¤¤¤±¤Ê¤¤. ¥·¥ê¥¢¥ëÈÖ¹æ¤Ï Integer32 ¤Çɽ¸½¤¹¤ë. +*/ +/*&eg +It is an object used when a server makes an error. +{\it CMObject} ob carries error informations. +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 +that caused the error. +The serial number is given by the data type Integer32. +*/ +/*&C -CMObject Null ¤Ï \\ +\medbreak \noindent +*/ + +//&jp CMObject Null ¤Ï \\ +//&eg CMObject Null has the format \\ +/*&C \begin{tabular}{|c|c|} \hline {\tt int32 CMO\_NULL} \\ \hline \end{tabular} \\ +*/ +/*&jp ¤Ê¤ë·Á¤Çɽ¸½¤¹¤ë. +*/ -32 bit integer n ¤Ï CMObject ¤È¤·¤Æ¤Ï Integer32 ¤È¸Æ¤Ð¤ì, \\ +/*&C + +\noindent +*/ + +//&jp 32 bit integer n ¤Ï CMObject ¤È¤·¤Æ¤Ï Integer32 ¤È¸Æ¤Ð¤ì, \\ +//&eg 32 bit integer n is called Integer32 as a CMObject and has the format \\ +/*&C \begin{tabular}{|c|c|} \hline -{\tt int32 CMO\_INT32}& {\tt int32 n} \\ +{\tt int32 CMO\_INT32}& {\tt int32} {\rm n} \\ \hline \end{tabular} \\ -¤Ê¤ë·Á¤Çɽ¸½¤¹¤ë. +*/ +//&jp ¤Ê¤ë·Á¤Çɽ¸½¤¹¤ë. +/*&C -Ťµ n ¤Î ¥Ð¥¤¥ÈÎó data ¤Ï CMObject ¤È¤·¤Æ¤Ï, Datum ·¿¤È¤è¤Ð¤ì \\ +\medbreak \noindent +*/ + + +//&jp Ťµ n ¤Î ¥Ð¥¤¥ÈÎó data ¤Ï CMObject ¤È¤·¤Æ¤Ï, Datum ·¿¤È¤è¤Ð¤ì \\ +//&eg A byte array of the length n is called Datum as a CMObject and has the format \\ +/*&C \begin{tabular}{|c|c|c|c|} \hline -{\tt int32 CMO\_DATUM}& {\tt int32 n} & {\tt byte data[0]} & {\tt byte data[1]} \\ +{\tt int32 CMO\_DATUM}& {\tt int32} {\rm n} & {\tt byte} {\rm data[0]} +& {\tt byte} {\rm data[1]} \\ \hline -$\cdots$ & {\tt byte data[n-1]} \\ +$\cdots$ & {\tt byte} {\rm data[n-1]} \\ \cline{1-2} \end{tabular} \\ -¤Èɽ¸½¤¹¤ë. -data ¤ÎÉôʬ¤ËľÎó²½ (serialized) ¤µ¤ì¤¿ CMO ¤¬Æþ¤ë¤³¤È¤â¤¢¤ê¤¦¤ë. +*/ +//&jp ¤Èɽ¸½¤¹¤ë. -Ťµ n ¤Î ʸ»úÎó data ¤Ï, CMObject ¤È¤·¤Æ¤Ï, Cstring ·¿¤È¤è¤Ð¤ì \\ +/*&C + +\noindent +*/ + +//&jp Ťµ n ¤Î ʸ»úÎó data ¤Ï, CMObject ¤È¤·¤Æ¤Ï, Cstring ·¿¤È¤è¤Ð¤ì \\ +//&eg String of n bytes is called Cstring as CMObject and has the format \\ +/*&C \begin{tabular}{|c|c|c|c|} \hline -{\tt int32 CMO\_STRING}& {\tt int32 n} & {\tt byte data[0]} & {\tt byte data[1]} \\ +{\tt int32 CMO\_STRING}& {\tt int32} {\rm n} & {\tt byte} {\rm data[0]} +& {\tt byte} {\rm data[1]} \\ \hline -$\cdots$ & {\tt byte data[n-1]} \\ +$\cdots$ & {\tt byte} {\rm data[n-1]} \\ \cline{1-2} \end{tabular} \\ +*/ +/*&jp ¤Èɽ¸½¤¹¤ë. C ¸À¸ì¤ÇÉáÄÌÍѤ¤¤é¤ì¤ë, ʸ»úÎó¤Î¤ª¤ï¤ê¤Î {\tt 0} ¤Ïʸ»úÎó ¤Ë´Þ¤á¤Ê¤¤. +*/ -\remove{ -Ťµ n ¤Î 32bit network byte order ¤Î data ¤Î array ¤Ï \\ -\begin{tabular}{|c|c|c|c|c|c|} -\hline -{\tt int32 CMO\_ARRAYOFINT32}& {\tt int32 n} & -{\tt data[0]} & {\tt data[1]}&$\cdots$ -& {\tt data[n-1]} \\ -\cline{1-2} -\end{tabular} \\ -¤Èɽ¸½¤¹¤ë. ³Æ {\tt data[i]} ¤ÎÉôʬ¤Ï 4 byte ¤ÎÂ礭¤µ¤ò»ý¤Ä. -} +/*&C \noindent -CMObject Mathcap ¤Ï \\ +*/ +//&jp CMObject Mathcap ¤Ï \\ +//&eg CMObject Mathcap has the format \\ +/*&C \begin{tabular}{|c|c|} \hline -{\tt int32 CMO\_MATHCAP} & {\it CMObject} ob \\ +{\tt int32 CMO\_MATHCAP} & {\it CMObject} {\rm ob} \\ \hline \end{tabular} \\ +*/ +/*&jp ¤Ê¤ë·Á¤Çɽ¸½¤¹¤ë. -{\tt ob} ¤Ï¥ê¥¹¥È¤Ç¤¢¤ê¾¯¤Ê¤¯¤È¤â2¤Ä¤ÎÍ×ÁǤò¤â¤Ä. -0 ÈÖÌܤÎÍ×ÁǤÏ, Integer32 ¤Çɽ¤·¤¿ Version number ¤È, -Cstring ¤Çɽ¤·¤¿¥·¥¹¥Æ¥à̾, Version number, CPUtype, ¤½¤Î¾¤Î¾ðÊó +{\tt ob} ¤Ï¥ê¥¹¥È¤Ç¤¢¤ê¾¯¤Ê¤¯¤È¤â3¤Ä¤ÎÍ×ÁǤò¤â¤Ä. +0 ÈÖÌܤÎÍ×ÁǤÏ, Integer32 ¤Çɽ¤·¤¿ OpenXM protocol version number ¤È, +Cstring ¤Çɽ¤·¤¿¥·¥¹¥Æ¥à̾, Server version, CPU type, ¤½¤Î¾¤Î¾ðÊó ¤Î¥ê¥¹¥È¤Ç¤¢¤ë. 1 ÈÖÌܤÎÍ×ÁǤÏ, ¥·¥¹¥Æ¥à xxx ¤¬°·¤¦¤³¤È¤Î²Äǽ¤Ê -CMO ¥¿¥°¤ò, Integer32 ¤Çɽ¸½¤·¤¿¤â¤Î¤ò½¸¤á¤¿¥ê¥¹¥È¤Ç¤¢¤ë. +SM ¥¿¥°¤ò, Integer32 ¤Çɽ¸½¤·¤¿¤â¤Î¤ò½¸¤á¤¿¥ê¥¹¥È¤Ç¤¢¤ë. +3 ÈÖÌܤÎÍ×ÁǤÏ, ¥·¥¹¥Æ¥à xxx ¤¬¤¢¤Ä¤«¤¦¤³¤È¤Î²Äǽ¤Ê +¥Ç¡¼¥¿·Á¼°¤ò¤¢¤Ä¤á¤¿¥ê¥¹¥È¤Ç¤¢¤ë. +¾ÜºÙ¤Ï mathcap ¤ÎÀá¤ÇÀâÌÀ¤¹¤ë. +*/ +/*&eg +ob is a list of which length is more than or equal to three. +The first element is a list of +OpenXM protocol version number in Integer32, +the server name in Cstring, +the server version and CPU type in Cstring, +and extra informations. +The second element is a list of SM tags in Integer 32. +The third element is a list of data type tags which the server or the client +can understand. +The details will be explained in the section on mathcap. +*/ -\noindent -Ťµ $m$ ¤Î¥ê¥¹¥È¤Ï \\ +/*&C + +\medbreak \noindent +*/ +//&jp Ťµ m ¤Î¥ê¥¹¥È¤Ï \\ +//&eg A list of the length m has the form \\ +/*&C \begin{tabular}{|c|c|c|c|c|} \hline -{\tt int32 CMO\_LIST}& {\tt int32 $m$} & {\tt CMObject}\, ob[0] & $\cdots$ & +{\tt int32 CMO\_LIST}& {\tt int32} {\rm m} & {\tt CMObject}\, ob[0] & $\cdots$ & {\tt CMObject}\, ob[$m-1$] \\ \hline \end{tabular}\\ -¤Çɽ¸½¤¹¤ë. +*/ +//&jp ¤Çɽ¸½¤¹¤ë. -\section{ CMO ¤Îɽ¸½ÊýË¡ } +//&jp \section{ CMO ¤Î·Á¼°ÅªÉ½¸½ÊýË¡ } +//&eg \section{ A formal expression of CMO } +/*&jp Á°¤ÎÀá¤Ç CMO ¤Îɽ¸½ÊýË¡¤ò·Á¼°Åª¤ËÄêµÁ¤»¤º, CMO ¤ÎBasic0 ¤Îɽ¸½Ë¡¤òÀâÌÀ¤·¤¿¤¬, ¤³¤³¤Ç¤Ï, CMO ¤Î Lisp É÷ɽ¸½ (Lisp-like expression) ¤Ç¤¢¤ë CMOexpression -¤ª¤è¤Ó CMO ¤Îɸ½à encoding Ë¡¤òÀâÌÀ¤¹¤ë. -(¥¿¥°¤Î¾Êάµ­Ë¡¤¬¤Û¤·¤¤.) -Á°¤ÎÀá¤Ç¤Ï¤³¤Î ɸ½à encoding Ë¡¤òÍѤ¤¤Æ CMO ¤Îɽ¸½ÊýË¡¤òÀâÌÀ¤·¤¿. +¤ª¤è¤ÓÁ°Àá¤ÇÀâÌÀ¤·¤¿ CMO ¤Îɸ½à encoding Ë¡¤ò¤â¤¦°ìÅÙÀâÌÀ¤¹¤ë. +% (¥¿¥°¤Î¾Êάµ­Ë¡¤¬¤Û¤·¤¤.) +*/ +/*&eg +In the previous setion, we have explained the format of CMO's in the +Basic0 group. +In this section, we will introduce CMOexpression which is like the +bracket expression of Lisp. +We again explain a standard encoding method of CMO, +which we have already explained in the previous section. +*/ +/*&jp + ¤Þ¤º, CMOexpression ¤ò·Á¼°Åª¤Ë ³ÈÄ¥ BNF µ­Ë¡¤òÍѤ¤¤ÆÄêµÁ¤·¤è¤¦. ¥¿¥¤¥×¥é¥¤¥¿¥Õ¥©¥ó¥È¤Ç¤«¤«¤ì¤¿µ­¹æ¤Ï½ªÃ¼µ­¹æ¤ò°ÕÌ£¤¹¤ë. ``:'' ¤ÏÄêµÁ¤ò°ÕÌ£¤¹¤ë. ``$|$'' ¤Ï''¤Þ¤¿¤Ï''¤ò°ÕÌ£¤¹¤ë. \{ X \} ¤Ï X ¤Î 0 ²ó°Ê¾å¤Î·«¤êÊÖ¤·¤òɽ¤¹. [ x ] ¤Ï X ¤¬ 0 ²ó¤Þ¤¿¤Ï 1 ²ó½Ð¸½¤¹¤ë¤³¤È¤òɽ¤¹. +¤³¤Îµ­Ë¡¤òÍѤ¤¤ë¤È CMOexpression ¤Ï¼¡¤Î¤è¤¦¤ËÄêµÁ¤Ç¤­¤ë. +*/ +/*&eg + +Let us define CMOexpression by the extended BNF expression. +Symbols in the type writer fonts mean terminals. +``:'' means a definition. +``$|$'' means ''or''. +\{ X \} is a repetition of X of more than or equal to 0 times. +[ x ] stands for X or nothing. +By using this notation, CMOexpression is defined as follows. + +*/ + +/*&C \begin{eqnarray*} \mbox{CMOexpression} &:& \quad @@ -276,21 +447,48 @@ CMOexpression & &|\ \mbox{\tt string} \\ & &|\ \mbox{\tt byte} \\ \end{eqnarray*} +*/ +/*&jp ½ªÃ¼µ­¹æ {\tt int32} ¤Ï, 32 bit integer ¤òɽ¤¹, 10 ¿Ê¤Þ¤¿¤Ï 16 ¿Ê¤Î¿ô»ú¤Î Îó¤Ç¤¢¤ë. ½ªÃ¼µ­¹æ {\tt string} ¤Ï''ʸ»ú''¤ÎÎó¤Ç¤¢¤ë. ½ªÃ¼µ­¹æ {\tt byte} ¤Ï 8 bit ¥Ç¡¼¥¿¤òɽ¤¹, 10 ¿Ê¤Þ¤¿¤Ï 16 ¿Ê¤Î¿ô»ú¤ÎÎó¤Ç¤¢¤ë. +*/ +/*&jp +Terminal {\tt int32} is signed 32 bit integer. +Terminal {\tt string} is a byte array which usually expresses a string. +Terminal {\tt byte} is 8 bit data. + +*/ + +/*&jp CMOexpression ¤Ë¤¢¤é¤ï¤ì¤ë³ÆÍ×ÁǤò¶èÀڤ뤿¤á¤Ë {\tt ,} (¥³¥ó¥Þ) ¤òÍѤ¤¤Æ¤â¤è¤¤. {\tt cmo\_tag} ¤Ï {\tt CMO\_} ¤Ç»Ï¤Þ¤ëÄê¿ô¤Ç¤¢¤ë. CMOexpression ¤Çɽ¸½¤µ¤ì¤ë object ¤ò CMObject ¤È¸Æ¤Ö. +*/ +/*&eg +The comma ({\tt ,}) may be used to separate each element in CMOexpressions. +{\tt cmo\_tag} is a constant that starts with {\tt CMO\_}. + +*/ + +/*&jp ¤³¤Îɽµ­Ë¡ CMOexpression ¤òÍøÍѤ·¤Æ, CMO Basic0 ¤Î object ¤òµ­½Ò ¤·¤Æ¤ß¤è¤¦. Object ¼«ÂΤι½Â¤¤òÀâÌÀ¤¹¤ë¤¿¤á, BNF ¤ò¤â¤¦¤¹¤³¤·³ÈÄ¥¤·¤Æ, Èó½ªÃ¼µ­¹æ, ½ªÃ¼µ­¹æ̾¤Î¤ß¤Ê¤é¤º, ÊÑ¿ô¤Î ̾Á°¤â½ñ¤¯¤³¤È¤Ë¤¹¤ë. ¤³¤¦¤¹¤ë¤³¤È¤Ë¤è¤ê, object ¤Î°ÕÌ£¤ÎÀâÌÀ¤âÍÆ°×¤Ë¤Ê¤ë ¤«¤é¤Ç¤¢¤ë. ¤Þ¤¿ ``---'' ¤Ç¥³¥á¥ó¥È¤Î¤Ï¤¸¤Þ¤ê¤òɽ¤¹¤â¤Î¤È¤¹¤ë. +*/ +/*&eg +Let us describe CMO's in the Basic0 group. +In order to explain the meaning of objects, +we may also put variable names to CMOexpressions. +The start of comments are denoted by ``---''. +*/ +/*&jp ¤¿¤È¤¨¤Ð, (CMObject ¤Î) 32 bit integer ¤Ç¤¢¤ë integer32 ¤ò BNF¤ÇÄêµÁ¤¹¤ì¤Ð, \begin{center} @@ -311,15 +509,27 @@ CMObject ¤Î ({\tt CMO\_INT32}, {\sl int32}\ n) ¤Ï, 32 bit integer $n$ ¤òɽ¸½¤·¤Æ¤¤¤ë¤ó¤À¤È¤¤¤¦¤³¤È¤¬, 1 ¹Ô¤Ç¤ï¤«¤ë. +*/ +/*&eg +(This part has not yet been translated.) +*/ +/*&jp ¤³¤Îµ­Ë¡¤òÍѤ¤¤Æ, Á°Àá¤ÇƳÆþ¤·¤¿, Basic0 ¤Î CMObject ¤ò ·Á¼°Åª¤ËÄêµÁ¤·¤è¤¦. +*/ +/*&eg +By using this notation, let us define formally CMObjects in the group +Basic0. +*/ +/*&C + \bigbreak \noindent Group CMObject/Basic0 requires nothing. \\ Error2, Null, Integer32, Datum, Cstring, Mathcap, List $\in$ CMObject/Basic0. \\ -Document of CMObject/Basic0 is at {\tt http://www.math.kobe-u.ac.jp/openxxx} -(in Japanese) \\ +Document of CMObject/Basic0 is at {\tt http://www.math.kobe-u.ac.jp/OpenXM} +(in English and Japanese) \\ \begin{eqnarray*} \mbox{Error2}&:& ({\tt CMO\_ERROR2}, {\sl CMObject}\, \mbox{ob}) \\ \mbox{Null} &:& ({\tt CMO\_NULL}) \\ @@ -328,7 +538,7 @@ Document of CMObject/Basic0 is at {\tt http://www.math \mbox{Datum} &:& ({\tt CMO\_DATUM}, {\sl int32}\, \mbox{n}, {\sl byte}\, \mbox{data[0]}, \ldots , {\sl byte}\, \mbox{data[n-1]}) \\ -\mbox{Cstring}&:& ({\tt CMO\_STRING},{\sl int32}\, \mbox{n}, +\mbox{Cstring}&:& ({\tt CMO\_STRING},{\sl int32}\, \mbox{ n}, {\sl string}\, \mbox{s}) \\ \mbox{Mathcap}&:& ({\tt CMO\_MATHCAP},{\sl CMObject}\, \mbox{ob} ) \\ \mbox{List} &:& @@ -337,13 +547,20 @@ Document of CMObject/Basic0 is at {\tt http://www.math & & \mbox{--- m is the length of the list.} \end{eqnarray*} -Cstring ¤Ç, {\sl string} s ¤ÎÉôʬ¤ò {\tt byte} ¤Ëʬ²ò¤¹¤ì¤Ð, +*/ + + +//&jp Cstring ¤Ç, {\sl string} s ¤ÎÉôʬ¤ò {\tt byte} ¤Ëʬ²ò¤¹¤ì¤Ð, +//&eg In the definition of ``Cstring'', if we decompose ``{\sl string} s'' into bytes, then ``Cstring'' should be defined as +/*&C \begin{eqnarray*} -\mbox{Cstring}&:& ({\tt CMO\_STRING},{\sl int32}\, n, +\mbox{Cstring}&:& ({\tt CMO\_STRING},{\sl int32}\, \mbox{ n}, {\sl byte}\, \mbox{s[0]}, \ldots, {\sl byte}\ \mbox{s[n-1]}) \end{eqnarray*} -¤È¤Ê¤ë. +*/ +//&jp ¤È¤Ê¤ë. +/*&jp ¤Þ¤¿, ``Group CMObject/Basic0 requires nothing'' ¤Ï, °Ê²¼¤Ï, ¥°¥ë¡¼¥× CMObject/Basic0 ¤ÎÄêµÁ¤Ç¤¢¤ê, @@ -353,20 +570,53 @@ Cstring ¤Ç, {\sl string} s ¤ÎÉôʬ¤ò {\tt byte} ¤Ëʬ²ò¤ $\in$ CMObject/Basic0'' ¤Ï, ¥°¥ë¡¼¥× CMObject/Basic0 ¤Ë¤Ï, Error2, Null, Integer32, Datum, Cstring ¤Ê¤ë¥¯¥é¥¹¤Î object ¤¬Â°¤¹¤ë¤³¤È¤ò¼¨¤¹. +*/ +/*&eg +¤Þ¤¿, +``Group CMObject/Basic0 requires nothing'' +means that there is no super group to define CMO's in the group Basic0. +``Error2, Null, Integer32, Datum, Cstring, Mathcap, List +$\in$ CMObject/Basic0'' +means that +Error2, Null, Integer32, Datum, Cstring +are members of the group CMObject/Basic0. +*/ +/*&C +*/ + +/*&jp ¤Ç¤Ï, ¼ÂºÝ¤Î¥Ç¡¼¥¿¤Îɽ¸½¤ÎÎã¤ò¤ß¤Æ¤ß¤è¤¦. ¤¿¤È¤¨¤Ð, 32 bit integer ¤Î 1234 ¤Ï, +*/ +/*&eg +Let us see examples. +32 bit integer 1234 is expressed as +*/ +/*&C \begin{center} ({\tt CMO\_INT32}, 1234) \end{center} +*/ +/*&jp ¤È¤«¤¯. ʸ»úÎó ``Hello'' ¤Ï +*/ +/*&eg +The string ``Hello'' is expressed as +*/ +/*&C \begin{center} ({\tt CMO\_STRING}, 5, "Hello") \end{center} -¤È½ñ¤¯. +*/ +//&jp ¤È½ñ¤¯. +/*&C + +*/ +/*&jp CMOexpression ¤È, CMObject ¤Î¶èÊ̤òÍý²ò¤·¤Æ¤ª¤¯¤Î¤Ï½ÅÍפǤ¢¤ë. ¤¿¤È¤¨¤Ð \begin{center} @@ -389,14 +639,31 @@ CMOexpression ¤È, CMObject ¤Î¶èÊ̤òÍý²ò¤·¤Æ¤ª¤¯¤Î¤Ï½ÅÍ "Hello" \end{verbatim} +*/ +/*&C + +*/ + +/*&jp ¼¡¤Ë, ɸ½à encoding Ë¡¤òÀâÌÀ¤·¤è¤¦. ɸ½à encoding Ë¡¤Ç¤Ï, cmo\_tag ¤ò ¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤Î 32 bit integer {\tt int32} ¤Ë, ¤½¤Î¾¤Î¥Õ¥£¡¼¥ë¥É¤Ï, ÄêµÁ¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ë¥Ç¡¼¥¿·¿¤Ë½¾¤¤, byte ¥Ç¡¼¥¿ {\tt byte} ¤«¤Þ¤¿¤Ï ¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤Î 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 ¤ËÊÑ´¹¤¹¤ëÁàºî¤¬¤ª¤ª¤­¤Ê¥ª¡¼¥Ð¥Ø¥Ã¥É¤È¤Ê¤ë¤³¤È¤¬ @@ -405,12 +672,33 @@ byte ¥Ç¡¼¥¿ {\tt byte} ¤«¤Þ¤¿¤Ï Ìó 90\% ¤Î»þ´Ö¤¬ network byte order ¤Ø¤ÎÊÑ´¹¤Ë¤Ä¤¤¤ä¤µ¤ì¤Æ¤¤¤ë¤È¤¤¤¦ ¼Â¸³¥Ç¡¼¥¿¤â¤¢¤ë. ¸úΨ¤ò½Å»ë¤·¤¿ 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 ¤Î´Ö¤ÎÊÑ´¹¤ÏÍưפǤ¢¤ë. Á°Àá¤ÇÍѤ¤¤¿¥Ç¡¼¥¿¤Îɽµ­Ë¡, ¤¿¤È¤¨¤Ð, +*/ +/*&eg +The translation between the standard encoding and CMOexpression +is easy. +For example, +*/ +/*&C \begin{center} \begin{tabular}{|c|c|} \hline @@ -418,16 +706,27 @@ byte ¥Ç¡¼¥¿ {\tt byte} ¤«¤Þ¤¿¤Ï \hline \end{tabular} \end{center} +*/ +/*&jp ¤Ï, CMOexpression +*/ +/*&eg +is the encoding of the CMOexpression +*/ +/*&C \begin{center} ({\tt CMO\_INT32}, 1234) \end{center} +*/ +/*&jp ¤Î ɸ½à encoding Ë¡¤Ë¤è¤ëɽ¸½¤Ç¤¢¤ë. +*/ +//&jp \section{ Open XM ¤ÎÄÌ¿®¥â¥Ç¥ë} +//&eg \section{ Communication model of Open XM} (This part has not yet been translated) -\section{ Open XM ¤ÎÄÌ¿®¥â¥Ç¥ë} - +/*&jp ¤ï¤ì¤ï¤ì¤Ï, ¿ô³Ø¥×¥í¥»¥¹¤¬¥á¥Ã¥»¡¼¥¸¤ò ¸ò´¹¤·¤Ê¤¬¤é·×»»¤¬¿Ê¹Ô¤·¤Æ¤¤¤¯¤È¤¤¤¦¥â¥Ç¥ë¤òÁÛÄꤷ¤ÆÀ߷פò¤¹¤¹¤á¤Æ¤¤¤ë. ³Æ¥×¥í¥»¥¹¤Ï¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Ç¤¢¤ê, ¤³¤ì¤ò OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤È¤è¤Ö. @@ -689,10 +988,12 @@ debug ¥â¡¼¥É¤òÈ´¤±¤¿¤¤, ¤Ê¤É¤ÎÍÑÅÓ¤ËÍøÍѤ¹¤ë. operator ¤Î¾ÜºÙ¤Ï¼¡¤ÎÀá¤ÇÀâÌÀ¤¹¤ë. ¤³¤ì¤é¤ÎÄê¿ô¤Î̾Á°¤Ï¥¤¥ó¥×¥ê¥á¥ó¥È¤Î¤È¤­Ã»½Ì·Á¤Çɽ¸½¤·¤Æ¤â¤è¤¤. +*/ +//&jp \section{ OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó } +//&eg \section{ OX stackmachine } (This section has not yet been translated.) -\section{ OX ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó } - +/*&jp ¤³¤ÎÀá¤Ç¤Ï, OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó operator ¤ÎÀâÌÀ (TCP/IP ¥½¥±¥Ã¥È¾å¤Ç¤Îɸ½à encoding Ë¡ ¤òÍѤ¤¤ë), ¤ª¤è¤Ó, ¥µ¥ó¥×¥ë¥µ¡¼¥Ð¤È¥ê¥ó¥¯¤¹¤ë¾ì¹ç¤Þ¤¿¤Ï @@ -755,15 +1056,18 @@ content dictionary (CD) ¤Î·Á¤ÇÄêµÁ¤·¤¿¤¤. {\tt int32 OX\_DATA} ¤Ï 32 bit network byte order ¤Î¿ô»ú {\tt OX\_DATA} ¤È¤¤¤¦°ÕÌ£¤Ç¤¢¤ë. -¥¤¥¿¥ê¥Ã¥¯¤Ç½ñ¤«¤ì¤Æ¤¤¤ë¥Õ¥£¡¼¥ë¥É¤Ï, +``¥¤¥¿¥ê¥Ã¥¯¤Ç½ñ¤«¤ì¤Æ¤¤¤ë¥Õ¥£¡¼¥ë¥É¤Ï, ÄêµÁ¤¬Ê̤ΤȤ³¤í¤Ç¤Ê¤µ¤ì¤Æ¤¤¤ë¤«²ò¼á¤Ë¸í²ò¤Î¤Ê¤¤¤è¤¦¤Ê¼«Á³¸À¸ì -¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë object ¤òɽ¤¹. +¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë object ¤òɽ¤¹.'' ¤¿¤È¤¨¤Ð, {\it String commandName} ¤Ï, String ¥Ç¡¼¥¿·¿¤Î local object {\it commandName} ¤ò°ÕÌ£¤¹¤ë. +(¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¾å¤Î object ¤Ï, CMO ·Á¼°¤Î object +¤È¤Ï¸Â¤é¤Ê¤¤¤³¤È¤ËÃí°Õ. +CMO ·Á¼°¤Ç½ñ¤¤¤Æ¤¢¤Ã¤Æ¤â, ¤½¤ì¤Ï¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î +local ·Á¼°¤Ç¥¹¥¿¥Ã¥¯¾å¤Ë¤¢¤ë¤È²ò¼á¤·¤Æ²¼¤µ¤¤.) - ¤¹¤Ù¤Æ¤Î¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Ï °Ê²¼¤Î´Ø¿ô¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¤È¤¤¤±¤Ê¤¤. \begin{enumerate} @@ -790,7 +1094,8 @@ CMObject/Basic0 ¤Î CMO ¥Ç¡¼¥¿¤Î¤¦¤Áɬ¿Ü¤Î¤â¤Î, ¤¿¤È¤¨¤Ð, {\tt CMO\_String} ¤Î¾ì¹ç¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. \\ Request: \begin{tabular}{|c|c|c|c|c|c|} \hline -{\tt int32 OX\_DATA} & {\tt int32 CMO\_String} &{\tt int32 size} &{\tt byte s1} & $\cdots$ &{\tt byte ssize}\\ +{\tt int32 OX\_DATA} & {\tt int32 CMO\_String} &{\tt int32} {\rm size} +&{\tt byte} {\rm s1} & $\cdots$ &{\tt byte} {\rm ssize}\\ \hline \end{tabular} \\ Stack after the request: @@ -809,13 +1114,14 @@ CMO ¥Ç¡¼¥¿¤Î¼õ¤±¼è¤ê¤Ë¼ºÇÔ¤·¤¿»þ¤Î¤ß \\ ¤ò¥¹¥¿¥Ã¥¯¤Ø push ¤¹¤ë. ¸½ºß¤Î¤È¤³¤í, ob ¤Ë¤Ï, \\ \centerline{ -{\it List} [{\it Integer32} OX ¥Ñ¥±¥Ã¥ÈÈÖ¹æ, {\it Integer32} ¥¨¥é¡¼ÈÖ¹æ, -{\it CMObject} optional ¾ðÊó] +[{\sl Integer32} OX ¥Ñ¥±¥Ã¥ÈÈÖ¹æ, {\sl Integer32} ¥¨¥é¡¼ÈÖ¹æ, +{\sl CMObject} optional ¾ðÊó] } -¤òÆþ¤ì¤ë¤¬, ¤³¤Î»ÅÍÍ¤Ï Common Error Object format ¤ÎÄêµÁ¤Ë¤è¤ê -Êѹ¹¤Î²ÄǽÀ­¤¬¤¢¤ë. +¤Ê¤ë¥ê¥¹¥È¤òÆþ¤ì¤ë (CMO ·Á¼°¤Ç¤«¤¤¤Æ¤¢¤ë¤¬, ¤³¤ì¤Ï¥µ¡¼¥ÐÆȼ«¤Î·Á¼°¤Ç¤è¤¤. +CMO ¤È¤·¤ÆÁ÷½Ð¤µ¤ì¤ë¤È¤­¤³¤Î¤è¤¦¤Ê·Á¼°¤Ç¤Ê¤¤¤È¤¤¤±¤Ê¤¤¤È¤¤¤¦°ÕÌ£¤Ç¤¢¤ë.) + \item \begin{verbatim} void *xxx_mathCap() @@ -1000,7 +1306,7 @@ object xxx_dupErrors(void) \end{tabular} \\ Result: \begin{tabular}{|c|c|c|} \hline -{\tt int32 OX\_DATA} & {\it CMObject} \ a list of errors\\ +{\tt int32 OX\_DATA} & {\sl CMObject} \ a list of errors\\ \hline \end{tabular} @@ -1020,14 +1326,14 @@ xxx ¤Î½é´ü²½¤ò¤ª¤³¤Ê¤¦. #include main() { -char tmp[1024]; -Asir_start(); -while (gets(tmp) != NULL) { -if (Asir_executeStringByLocalParser(tmp) != 0) { -printf("%s\n",Asir_popString()); + char tmp[1024]; + Asir_start(); + while (gets(tmp) != NULL) { + if (Asir_executeStringByLocalParser(tmp) != 0) { + printf("%s\n",Asir_popString()); + } + } } -} -} \end{verbatim} @@ -1283,8 +1589,12 @@ typedef FILE2 * ox_stream; \end{enumerate} -\section{¸½ºß¸¡Æ¤Ãæ¤Îµ¡Ç½} +*/ +//&jp \section{¸½ºß¸¡Æ¤Ãæ¤Îµ¡Ç½} +//&eg \section{Projects in work in progress} (This part has not been translated.) + +/*&jp \subsection{ OX DATA with Length ¤Î¹½Â¤ } Digital signature ÉդΠ{\tt OX\_DATA} ¤Ï @@ -1297,8 +1607,9 @@ Digital signature ÉդΠ{\tt OX\_DATA} ¤Ï \noindent \begin{tabular}{|c|c|c|c|c|} \hline -{\tt int32 OX\_DATA\_WITH\_LENGTH} & {\tt int32} {\sl serial} & {\tt int32 size} -& {\it CMObject} & {\it tail} \\ +{\tt int32 OX\_DATA\_WITH\_LENGTH} & {\tt int32} {\rm serial} +& {\tt int32} {\rm size} +& {\sl CMObject} {\rm o} & {\it tail} \\ \hline \end{tabular} @@ -1307,12 +1618,12 @@ Digital signature ÉդΠ{\tt OX\_DATA} ¤Ï {\it tail } ¤Ï¼¡¤Î¤è¤¦¤ËÄêµÁ¤¹¤ë. \\ \noindent \begin{tabular}{|c|c|c|} \hline -{\tt int32 CMO\_START\_SIGNATURE} & {\tt int32 size} +{\tt int32 CMO\_START\_SIGNATURE} & {\tt int32} {\rm size} & {\it signature} \\ \hline \end{tabular} -¤³¤³¤Ç, {\tt size} ¤Ï {\it signature} Éô¤ÎŤµ. +¤³¤³¤Ç, {\tt size} ¤Ï¥Ð¥¤¥ÈÎó {\it signature} Éô¤ÎŤµ. {\it signature} ¤Ï, Hash ´Ø¿ô¤òÍѤ¤¤¿, {\it CMO data} ¤Ë¤¿¤¤¤¹¤ë, ¥Ç¥¸¥¿¥ë½ð̾¤ò¤¤¤ì, ÉÔÀµ¤Ê serialized object ¤ò¸¡½Ð¤¹¤ë. @@ -1320,7 +1631,7 @@ Tail ¤Î {\tt size} ¥Õ¥£¡¼¥ë¥É¤¬ 0 ¤Î¾ì¹ç, ¥Ç¥¸¥¿¥ë½ð̾ ¥¯¥é¥¤¥¢¥ó¥È, ¥µ¡¼¥Ð¤Î¼ÂÁõ¤Ë¤Ï¼¡¤Î3¤Ä¤ÎÁªÂò¤¬¤¢¤ë. \begin{enumerate} -\item {\tt OX\_DATA} ¤Î¤ß¤òÍѤ¤¤Æ CMObject ¤òÁ÷¤ë. +\item {\tt OX\_DATA} ¤Î¤ß¤òÍѤ¤¤Æ CMObject ¤òÁ÷¤ë (mathcap ÉÕ). \item {\tt OX\_SECURED\_DATA} ¤Î¤ß¤òÍѤ¤¤Æ CMObject ¤òÁ÷¤ë. \item {\tt OX\_DATA} ¤ª¤è¤Ó {\tt OX\_SECURED\_DATA} ¤òº®ºß¤·¤Æ @@ -1341,7 +1652,15 @@ Tail ¤Î {\tt size} ¥Õ¥£¡¼¥ë¥É¤¬ 0 ¤Î¾ì¹ç, ¥Ç¥¸¥¿¥ë½ð̾ ¸½ºß¤Î¤¹¤Ù¤Æ¤Î¥µ¥ó¥×¥ë¥µ¡¼¥Ð¤Ï, 1, 4 ¤Î¤ß¤ò¼ÂÁõ¤·¤Æ¤¤¤ë. +mathcap ¤Î¸ò´¹¤Ï¥»¥Ã¥·¥ç¥ó¤Î³«»Ï»þÅÀ¤Çɬ¿Ü¤È¤¤¤¦Ìõ¤Ç¤Ï¤Ê¤¤ +¤³¤È¤ËÃí°Õ¤µ¤ì¤¿¤¤. +¤¿¤È¤¨¤Ð, +¥â¡¼¥É 4 ¤ÇÄÌ¿®¤·¤Æ, +¤½¤ì¤«¤é, +mathcap ¤ò¸ò´¹¤·¤Æ, +¥â¡¼¥É 1 ¤Ø°Ü¹Ô¤¹¤ë¤³¤È¤â²Äǽ¤Ê¤è¤¦¤Ë¼ÂÁõ¤¹¤Ù¤­¤Ç¤¢¤ë. + \subsection{¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Ï¥í¡¼¥«¥ë¤Ê³ÈÄ¥µ¡Ç½¤ò¤â¤Ã¤Æ¤è¤¤} \begin{verbatim} @@ -1369,9 +1688,12 @@ add, sub, mul, ¤Ê¤É¤Î´ðËÜŪ¤Ê·×»»¤Ï {\tt SM\_executeFu ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎÀ©¸æ¹½Â¤¤Ë¤Ä¤¤¤Æ¤â¸¡Æ¤¤·¤Æ¤¤¤ë. +*/ -\section{¥³¥ó¥È¥í¡¼¥ë¥á¥Ã¥»¡¼¥¸ (SMObject/TCPIP/Control)} +//&jp \section{¥³¥ó¥È¥í¡¼¥ë¥á¥Ã¥»¡¼¥¸ (SMObject/TCPIP/Control)} +//&eg \section{Control message (SMObject/TCPIP/Control)} (This section has not been translated.) +/*&jp \begin{enumerate} \item ¥µ¡¼¥Ð¤Ï {\tt SM\_control\_reset\_connection} @@ -1411,12 +1733,12 @@ add, sub, mul, ¤Ê¤É¤Î´ðËÜŪ¤Ê·×»»¤Ï {\tt SM\_executeFu \end{tabular} \\ Result: \begin{tabular}{|c|c|} \hline -{\tt int32 OX\_DATA} & {\it CMO\_INT32 result} \\ +{\tt int32 OX\_DATA} & {\tt CMO\_INT32} {\rm result} \\ \hline \end{tabular} +@@@ - \item ¥µ¡¼¥Ð¤Ï¤³¤Î¥á¥Ã¥»¡¼¥¸¤ò¼õ¿®¤·¤¿¤é¤¿¤À¤Á¤Ë¥³¥ó¥È¥í¡¼¥ë¥á¥Ã¥»¡¼¥¸¤Ø¤Î ÊÖÅú¤ò¤ª¤¯¤ê, ¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤ò¥¯¥í¡¼¥º¤·¤Æ½ªÎ»¤¹¤ë. @@ -1453,55 +1775,129 @@ Reset ¤ËÂФ¹¤ëÊÖ»ö. 0 0 2 03 (OX_SYNC_BALL) \end{verbatim} -\section{TCP/IP ¤Ç¤Î¥»¥Ã¥·¥ç¥ó¤Î¥¹¥¿¡¼¥È} +*/ + + +//&jp \section{TCP/IP ¤Ç¤Î¥»¥Ã¥·¥ç¥ó¤Î¥¹¥¿¡¼¥È} +//&eg \section{How to start a session on TCP/IP} (This section has not yet been translated.) + +/*&jp ¥³¥ó¥È¥í¡¼¥ë¥×¥í¥»¥¹, ·×»»¥×¥í¥»¥¹ ¤È¤â¤Ë, µ¯Æ°Ä¾¸å¤Ë 1 byte ¤Î¥Ç¡¼¥¿¤ò½ñ¤­½Ð¤· flush ¤¹¤ë. ¤½¤Î¤¢¤È, 1 byte ¤Î¥Ç¡¼¥¿¤òÆɤ߹þ¤à. ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥³¥ó¥È¥í¡¼¥ë¥×¥í¥»¥¹, ·×»»¥×¥í¥»¥¹ -¤Ë¤Ä¤Ê¤¬¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ÎξÊý¤Ø +¤Ë¤Ä¤Ê¤¬¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ÎξÊý¤«¤é +¤Þ¤º 1 byte ¤Î¥Ç¡¼¥¿¤òÆɤà. +¤½¤Î¤¢¤È 1 byte ¤Î¥Ç¡¼¥¿¤ò½ñ¤­½Ð¤· flush ¤¹¤ë. 1 byte ¤Î¥Ç¡¼¥¿¤Ï, {\tt 0}, {\tt 1}, {\tt FF} ¤Î¤É¤ì¤«¤Ç¤¢¤ê, {\tt 0} ¤Ï°Ê²¼¤ÎÄÌ¿®¤Ë¤ª¤¤¤Æ {\tt int32} ¤ò¤ª¤¯¤ë¤Î¤Ë, network byte order ¤ò»ÈÍѤ·¤¿¤¤, {\tt 1} ¤Ï°Ê²¼¤ÎÄÌ¿®¤Ë¤ª¤¤¤Æ {\tt int32} ¤ò¤ª¤¯¤ë¤Î¤Ë, -little indian ¤ò»ÈÍѤ·¤¿¤¤, +little endian ¤ò»ÈÍѤ·¤¿¤¤, {\tt FF} ¤Ï°Ê²¼¤ÎÄÌ¿®¤Ë¤ª¤¤¤Æ {\tt int32} ¤ò¤ª¤¯¤ë¤Î¤Ë, -big indian ¤ò»ÈÍѤ·¤¿¤¤, +big endian ¤ò»ÈÍѤ·¤¿¤¤, ¤È¤¤¤¦°ÕÌ£¤Ç¤¢¤ë. ξ¼Ô¤Î´õ˾¤¬°ìÃפ·¤Ê¤¤¾ì¹ç¤Ï¤Ä¤Í¤Ë {\tt 0} (network byte order) ¤ò»ÈÍѤ¹¤ë. Network byte order ¤·¤«¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¥·¥¹¥Æ¥à¤Ç¤Ï, -¥»¥Ã¥·¥ç¥ó¤Î¥¹¥¿¡¼¥Èľ¸å¤Ë {\tt 0} ¤ò¤ª¤¯¤ì¤Ð¤è¤¤. +{\tt 0} ¤ò¤ª¤¯¤ì¤Ð¤è¤¤. ¤¿¤À¤·¸úΨ¤¬ÌäÂê¤È¤Ê¤ëÄÌ¿®¤Ë¤ª¤¤¤Æ, network byte order ¤Ø¤ÎÊÑ´¹¤Ï ¤ª¤ª¤­¤Ê¥Ü¥È¥ë¥Í¥Ã¥¯¤È¤Ê¤ë¤³¤È¤¬¤¢¤ë¤³¤È¤òλ²ò¤·¤Æ¤ª¤¯¤Ù¤­¤Ç¤¢¤ë. \begin{verbatim} #define OX_BYTE_NETWORK_BYTE_ORDER 0 -#define OX_BYTE_LITTLE_INDIAN 1 -#define OX_BYTE_BIG_INDIAN 0xff +#define OX_BYTE_LITTLE_ENDIAN 1 +#define OX_BYTE_BIG_ENDIAN 0xff \end{verbatim} -\section{ ¥ª¥Ö¥¸¥§¥¯¥È¤Îʸ»úÎóɽ¸½ } +Ãí°Õ: {\tt OpenXM/src/kxx} ¤Ë´Þ¤Þ¤ì¤ë, {\tt ox} (¥³¥ó¥È¥í¡¼¥ë¥×¥í¥»¥¹, +·×»»¥×¥í¥»¥¹¤ò¤¿¤Á¤¢¤²¤ë¥í¡¼¥ó¥Á¥ã)¤Ï, ɸ½à¤Ç One Time Password +¤Îµ¡Ç½¤ò¤â¤Ã¤Æ¤¤¤Þ¤¹. +¤³¤Îµ¡Ç½¤ò OFF ¤Ë¤¹¤ë¤Ë¤Ï {\tt -insecure} option ¤ò»ÈÍѤ·¤Æ²¼¤µ¤¤. +One Time Password ¤Ï 0 ¤Ç½ªÎ»¤¹¤ë¥Ð¥¤¥ÈÎó¤Ç¤¢¤ê, +¥³¥ó¥È¥í¡¼¥ë, ·×»»ÁÐÊý¤Î¥×¥í¥»¥¹¤ò¤¿¤Á¤¢¤²¤ë¤Þ¤¨¤Ë, +{\tt ox} ¤Ï¥³¥ó¥È¥í¡¼¥ë, ·×»»ÁÐÊý¤Î¥×¥í¥»¥¹¤ËÂбþ¤¹¤ë, +¤Õ¤¿¤Ä¤Î¥Ý¡¼¥È¤Ë +One Time Password ¥Ð¥¤¥ÈÎó¤òÁ÷½Ð¤·¤Æ¤¤¤Þ¤¹. +{\tt ox} (¥½¡¼¥¹¤Ï {\tt oxmain.c}, {\tt kan96xx/plugin/oxmisc.c})¤Ë¤ª¤¤¤Æ¤Ï +{\tt oxTellMyByteOrder()} ¤¬, ¥µ¡¼¥Ð¤Ë¤Ä¤¤¤Æ¤Î byte order ¾ðÊó¤Î +Á÷½Ð, Æɤ߹þ¤ß¤ò¤ä¤Ã¤Æ¤¤¤ë. +¥¯¥é¥¤¥¢¥ó¥È¤Ë¤Ä¤¤¤Æ¤Ï, +{\tt oxSetByteOrder()} ¤¬, byte order ¾ðÊó¤ÎÆɤ߹þ¤ß, Á÷½Ð¤ò¤ª¤³¤Ê¤Ã¤Æ¤¤¤ë. + +One time ¥Ñ¥¹¥ï¡¼¥É¤Ï°ÂÁ´¤ÊÄÌ¿®Ï©¤ÇÇÛÁ÷¤µ¤ì¤ëɬÍפ¬¤¢¤ê¤Þ¤¹. +¤Þ¤¿, ¸½ºß¤Î {\rm ox} ¤Î¼ÂÁõ¤Ç¤Ï, One time ¥Ñ¥¹¥ï¡¼¥É¤ò +¥µ¡¼¥Ð, ¥¯¥é¥¤¥¢¥ó¥È¤Ë login ¤·¤Æ¤¤¤ë¿Í¤Ï¤¹¤Ù¤Æ¸«¤ë¤³¤È¤¬ +¤Ç¤­¤Þ¤¹¤Î¤Ç, ¥µ¡¼¥Ð, ¥¯¥é¥¤¥¢¥ó¥È¤Ë¤Ï°­°Õ¤Î¤¢¤ë¿Í¤Ï¤¤¤Ê¤¤¤È +²¾Äꤷ¤Ê¤¤¤È¤¤¤±¤Þ¤»¤ó. +One time ¥Ñ¥¹¥ï¡¼¥É¤ò°ÂÁ´¤ËÇÛÁ÷¤·, ¥ê¥â¡¼¥È¥Þ¥·¥ó¤Î {\rm ox} +¤òΩ¤Á¾å¤²¤ë¤Ë¤Ï +¤¿¤È¤¨¤Ð +{\tt ssh} ¤ò {\tt -f } ¥ª¥×¥·¥ç¥ó¤òÍѤ¤¤Æ»ÈÍѤ·¤Þ¤¹. + +°Ê²¼¤Ï {\rm sm1} ¤Ç¤Î¼ÂÁõ, Æ°ºîÎã¤Ç¤¹. +¤³¤³¤Ç¤Ï, {\tt yama} ¤Î {\tt sm1} ¤è¤ê {\tt dc1} ¤Î {\tt ox} +¤òΩ¤Á¾å¤²¤Æ¤¤¤Þ¤¹. +{\footnotesize +\begin{verbatim} +yama% sm1 +sm1>(ox.sm1) run ; +ox.sm1, --- open sm1 protocol module 10/1,1999 (C) N.Takayama. oxhelp for help +sm1>[(dc1.math.kobe-u.ac.jp) (taka)] sm1connectr-ssh /ox.ccc set ; +Hello from open. serverName is yama.math.kobe-u.ac.jp and portnumber is 0 +Done the initialization. port =1024 +Hello from open. serverName is yama.math.kobe-u.ac.jp and portnumber is 0 +Done the initialization. port =1025 +[ 4 , 1025 , 3 , 1024 ] +Executing the command : ssh -f dc1.math.kobe-u.ac.jp -l taka +"/home/taka/OpenXM/bin/oxlog /usr/X11R6/bin/xterm -icon +-e /home/taka/OpenXM/bin/ox -reverse -ox /home/taka/OpenXM/bin/ox_sm1 +-host yama.math.kobe-u.ac.jp -data 1025 -control 1024 -pass 518158401 " +[ +taka@dc1.math.kobe-u.ac.jp's password: +Trying to accept... Accepted. +Trying to accept... Accepted. + +Control port 1024 : Connected. + +Stream port 1025 : Connected. +Byte order for control process is network byte order. +Byte order for engine process is network byte order. +\end{verbatim} +} + +*/ + +//&jp \section{ ¥ª¥Ö¥¸¥§¥¯¥È¤Îʸ»úÎóɽ¸½ } +//&eg \section{ String expression of objects} + +/*&jp ʸ»úÎóɽ¸½¤Ï, ¥·¥¹¥Æ¥à xxx ¤Î¥Þ¥Ë¥å¥¢¥ë¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ë°ì¼¡¸µÅªÆþ½ÐÎÏ·Á¼°¤Ë ¤·¤¿¤¬¤¦. +*/ +/*&eg +The string expression of objects of the system xxx is also used +for a string expression for the OX xxx server. -\section{ ¿ô, ¿¹à¼° ¤Î CMO ɽ¸½ } +*/ -¥¿¥°¤Î¼ïÎà. +//&jp \section{ ¿ô, ¿¹à¼° ¤Î CMO ɽ¸½ } +//&eg \section{ CMOexpressions for numbers and polynomials } + +/*&C @../SSkan/plugin/cmotag.h \begin{verbatim} #define CMO_MONOMIAL32 19 #define CMO_ZZ 20 -/* #define CMO_ZZ 32 */ #define CMO_QQ 21 #define CMO_ZERO 22 -/* #define CMO_DMS 23 Distributed monomial system */ #define CMO_DMS_GENERIC 24 #define CMO_DMS_OF_N_VARIABLES 25 #define CMO_RING_BY_NAME 26 @@ -1514,14 +1910,23 @@ Network byte order ¤·¤«¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¥·¥¹¥Æ¥à¤Ç¤Ï, #define CMO_LAMBDA 62 /* for function definition */ \end{verbatim} +*/ + +/*&jp °Ê²¼, ¥°¥ë¡¼¥× CMObject/Basic1, CMObject/Tree ¤ª¤è¤Ó CMObject/DistributedPolynomial ¤Ë°¤¹¤ë CMObject ¤Î·Á¼°¤òÀâÌÀ¤¹¤ë. \noroa{ tagged list ¤òƳÆþ¤¹¤Ù¤­¤«? cf. SSkan/plugin/cmo.txt } -³ÈÄ¥ BNF µ­Ë¡¤È CMOexpression ¤ò¤Þ¤¼¤¿µ­Ë¡¤ÇÄêµÁ¤¹¤ë. ---- ¤Ç¤Ï¤¸¤Þ¤ëʸ¤Ï¥³¥á¥ó¥È¤Ç¤¢¤ë. +*/ +/*&eg +In the sequel, we will explain on the groups +CMObject/Basic1, CMObject/Tree +and CMObject/DistributedPolynomial. +*/ +/*&jp + \bigbreak \noindent Group CMObject/Basic1 requires CMObject/Basic0. \\ @@ -1529,17 +1934,42 @@ ZZ, QQ, Zero, Rational, Indeterminate,$\in$ CMObject/B \begin{eqnarray*} \mbox{Zero} &:& ({\tt CMO\_ZERO}) \\ & & \mbox{ --- ¥æ¥Ë¥Ð¡¼¥µ¥ë¤Ê ¥¼¥í¤òɽ¤¹. } \\ -\mbox{ZZ} &:& ({\tt CMO\_ZZ},{\sl int32}\, f, {\sl byte}\, \mbox{a[1]}, \ldots +\mbox{ZZ} &:& ({\tt CMO\_ZZ},{\sl int32}\, {\rm f}, {\sl byte}\, \mbox{a[1]}, \ldots {\sl byte}\, \mbox{a[m]} ) \\ &:& \mbox{ --- bignum ¤ò¤¢¤é¤ï¤¹. a[i] ¤Ë¤Ä¤¤¤Æ¤Ï¤¢¤È¤ÇÀâÌÀ}\\ -\mbox{QQ} &:& ({\tt CMO\_QQ}, {\sl ZZ}\, a, {\sl ZZ}\, b) \\ +\mbox{QQ} &:& ({\tt CMO\_QQ}, {\sl ZZ}\, {\rm a}, {\sl ZZ}\, {\rm b}) \\ & & \mbox{ --- Í­Íý¿ô $a/b$ ¤òɽ¤¹. } \\ -\mbox{Rational} &:& ({\tt CMO\_RATIONAL}, {\sl object}\, a, {\sl object}\, b) \\ +\mbox{Rational} &:& ({\tt CMO\_RATIONAL}, {\sl CMObject}\, {\rm a}, {\sl CMObject}\, {\rm b}) \\ & & \mbox{ --- $a/b$ ¤òɽ¤¹. } \\ -\mbox{Indeterminate} &:& ({\tt CMO\_INDETERMINATE}, {\sl Cstring}\, v) \\ +\mbox{Indeterminate} &:& ({\tt CMO\_INDETERMINATE}, {\sl Cstring}\, {\rm v}) \\ & & \mbox{ --- ÊÑ¿ô̾ $v$ . } \\ \end{eqnarray*} +*/ +/*&eg +\bigbreak +\noindent +Group CMObject/Basic1 requires CMObject/Basic0. \\ +ZZ, QQ, Zero, Rational, Indeterminate,$\in$ CMObject/Basic1. \\ +\begin{eqnarray*} +\mbox{Zero} &:& ({\tt CMO\_ZERO}) \\ +& & \mbox{ --- Universal zero } \\ +\mbox{ZZ} &:& ({\tt CMO\_ZZ},{\sl int32}\, {\rm f}, {\sl byte}\, \mbox{a[1]}, \ldots +{\sl byte}\, \mbox{a[m]} ) \\ +&:& \mbox{ --- bignum. The meaning of a[i] will be explained later.}\\ +\mbox{QQ} &:& ({\tt CMO\_QQ}, {\sl ZZ}\, {\rm a}, {\sl ZZ}\, {\rm b}) \\ +& & \mbox{ --- Rational number $a/b$. } \\ +\mbox{Rational} &:& ({\tt CMO\_RATIONAL}, {\sl CMObject}\, {\rm a}, {\sl CMObject}\, {\rm b}) \\ +& & \mbox{ --- Rational expression $a/b$. } \\ +\mbox{Indeterminate} &:& ({\tt CMO\_INDETERMINATE}, {\sl Cstring}\, {\rm v}) \\ +& & \mbox{ --- Variable name $v$ . } \\ +\end{eqnarray*} +*/ +/*&C + +*/ + +/*&jp Indeterminate ¤ÏÊÑ¿ô̾¤ò¤¢¤é¤ï¤¹. v ¤Ï¥Ð¥¤¥ÈÎó¤Ç¤¢¤ì¤Ð¤Ê¤Ë¤òÍѤ¤¤Æ¤â¤è¤¤¤¬, ¥·¥¹¥Æ¥àËè¤ËÊÑ¿ô̾¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¥Ð¥¤¥ÈÎó¤ÏÀ©¸Â¤¬¤¢¤ë. @@ -1549,22 +1979,55 @@ v ¤Ï¥Ð¥¤¥ÈÎó¤Ç¤¢¤ì¤Ð¤Ê¤Ë¤òÍѤ¤¤Æ¤â¤è¤¤¤¬, {\tt Dx} ¤Ï {\tt \#dx} ¤ÈÊÑ´¹¤¹¤ë¤Ê¤É¤Î escape sequence ¤òÍѤ¤¤Æ¼Â¸½¤¹¤ë¤Î¤Ï, ̵Íý¤¬¤¢¤ë¤è¤¦¤Ç¤¢¤ë. ¥Æ¡¼¥Ö¥ë¤òºîÀ®¤¹¤ëɬÍפ¬¤¢¤ë¤Ç¤¢¤í¤¦.) +*/ +/*&eg +Indeterminate is a name of a variable. +v may be any sequence of bytes, but each system has its own +restrictions on the names of variables. +Indeterminates of CMO and internal variable names must be translated +in one to one correspondence. +*/ +/*&jp + \noindent Group CMObject/Tree requires CMObject/Basic1. \\ Tree, Lambda $\in$ CMObject/Basic1. \\ \begin{eqnarray*} -\mbox{Tree} &:& ({\tt CMO\_TREE}, {\sl Cstring}\, name, - {\sl Cstring}\, cdname, {\sl List}\, leaves) \\ +\mbox{Tree} &:& ({\tt CMO\_TREE}, {\sl Cstring}\, {\rm name}, + {\sl Cstring}\, {\rm cdname}, {\sl List}\, {\rm leaves}) \\ & & \mbox{ --- ̾Á° name ¤ÎÄê¿ô¤Þ¤¿¤Ï´Ø¿ô. ´Ø¿ô¤Îɾ²Á¤Ï¤ª¤³¤Ê¤ï¤Ê¤¤. } \\ -& & \mbox{ --- cdname ¤Ï¶õʸ»úÎó¤Ç¤Ê¤±¤ì¤Ð name ¤Î°ÕÌ£¤¬ÀâÌÀ¤µ¤ì¤Æ¤¤¤ë - OpenMath CD (content dictionary) ¤Î̾Á°. } \\ -\mbox{Lambda} &:& ({\tt CMO\_LAMBDA}, {\sl List}\, args, - {\sl Tree} body) \\ +& & \mbox{ --- cdname ¤Ï¶õʸ»úÎó¤Ç¤Ê¤±¤ì¤Ð name ¤Î°ÕÌ£¤¬ÀâÌÀ¤µ¤ì¤Æ¤¤¤ë }\\ +& & \mbox{ --- OpenMath CD (content dictionary) ¤Î̾Á°. } \\ +\mbox{Lambda} &:& ({\tt CMO\_LAMBDA}, {\sl List}\, {\rm args}, + {\sl Tree} {\rm body}) \\ & & \mbox{ --- body ¤ò args ¤ò°ú¿ô¤È¤¹¤ë´Ø¿ô¤È¤¹¤ë. } \\ & & \mbox{ --- optional ¤Ê°ú¿ô¤¬É¬ÍפʤȤ­¤Ï, leaves ¤Î¸å¤Ø¤Ä¤Å¤±¤ë.} \\ \end{eqnarray*} +*/ +/*&eg +\noindent +Group CMObject/Tree requires CMObject/Basic1. \\ +Tree, Lambda $\in$ CMObject/Basic1. \\ +\begin{eqnarray*} +\mbox{Tree} &:& ({\tt CMO\_TREE}, {\sl Cstring}\, {\rm name}, + {\sl Cstring}\, {\rm cdname}, {\sl List}\, {\rm leaves}) \\ +& & \mbox{ --- A function or a constant of name. Functions are not evaluated. } \\ +& & \mbox{ --- cdname may be a null. If it is not null, it is the name of}\\ +& & \mbox{ --- the OpenMath CD (content dictionary). } \\ +\mbox{Lambda} &:& ({\tt CMO\_LAMBDA}, {\sl List}\, {\rm args}, + {\sl Tree} {\rm body}) \\ +& & \mbox{ --- a function with the arguments body. } \\ +& & \mbox{ --- optional arguments come after leaves.} \\ +\end{eqnarray*} +*/ + +/*&C + +*/ + +/*&jp ¿ô¼°¤ò½èÍý¤¹¤ë¥·¥¹¥Æ¥à¤Ç¤Ï, Tree ¹½Â¤¤¬°ìÈ̤ˤâ¤Á¤¤¤é¤ì¤ë. ¤¿¤È¤¨¤Ð, $\sin(x+e)$ ¤Ï, {\tt (sin, (plus, x, e))} @@ -1582,11 +2045,48 @@ Tree ¹½Â¤¤Ï Open Math É÷¤Îɽ¸½¤ò¤â¤Á¤¤¤¿ CMO ¤òƳÆþ¤¹¤ ¤Þ¤¿¤³¤Î¤Û¤¦¤¬, ¤ï¤ì¤ï¤ì¤ÎÁÛÄꤹ¤ë¥·¥¹¥Æ¥à xxx ¤Ë¤ª¤¤¤Æ, Open XM Âбþ¤¬ ¤Ï¤ë¤«¤ËÍưפǤ¢¤ë. ¤Ê¤ª, 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 ¤Ï´Ø¿ô¤òÄêµÁ¤¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. Lisp ¤Î Lambda ɽ¸½¤ÈƱ¤¸. +\noindent +Îã: $sin(x+e)$ ¤Îɽ¸½. +\begin{verbatim} +(CMO_TREE, (CMO_STRING, "sin"), (CMO_STRING, "basic"), + (CMO_LIST,[size=]1, + (CMO_TREE, (CMO_STRING, "plus"), (CMO_STRING, "basic"), + (CMO_LIST,[size=]2, (CMO_INDETERMINATE,"x"), + (CMO_TREE,(CMO_STRING, "e"), ¼«Á³Âпô¤ÎÄì + (CMO_STRING, "basic")) + )) + ) +) +\end{verbatim} +\noindent +Example: +\begin{verbatim} +sm1> [(plus) (Basic) [(123).. (345)..]] [(class) (tree)] dc :: +Class.tree [ $plus$ , $Basic$ , [ 123 , 345 ] ] +\end{verbatim} + + + \bigbreak ¼¡¤Ë, ʬ»¶É½¸½Â¿¹à¼°¤Ë´Ø·¸¤¹¤ë¥°¥ë¡¼¥×¤òÄêµÁ¤·¤è¤¦. @@ -1621,7 +2121,7 @@ $x^e = x_1^{e_1} \cdots x_n^{e_n}$ ¤Î³Æ»Ø¿ô $e_i$ & & \mbox{ --- ʬ»¶É½¸½Â¿¹à¼°´Ä¤ÎÄêµÁ. } \\ \mbox{Generic DMS ring} &:& ({\tt CMO\_DMS\_GENERIC})\ ¿·ÈǤϤ³¤Á¤é\\ -\mbox{RingByName}&:& ({\tt CMO\_RING\_BY\_NAME}, {\sl Cstring} s) \\ +\mbox{RingByName}&:& ({\tt CMO\_RING\_BY\_NAME}, {\sl Cstring}\ {\rm s}) \\ & & \mbox{ --- ̾Á° s ¤Ç, ³ÊǼ¤µ¤ì¤¿ ring ÄêµÁ.} \\ \mbox{DMS of N variables} &:& ({\tt CMO\_DMS\_OF\_N\_VARIABLES}, \\ @@ -1634,11 +2134,15 @@ $x^e = x_1^{e_1} \cdots x_n^{e_n}$ ¤Î³Æ»Ø¿ô $e_i$ & & \mbox{ --- n ¤ÏÊÑ¿ô¤Î¿ô, p ¤Ï ɸ¿ô} \\ & & \mbox{ --- s ¤Ï ring ¤Î̾Á°} \\ & & \mbox{ --- c ¤Ï·¸¿ô´Ä, QQ, ZZ ¤Î¾ì¹ç¤Ïʸ»úÎó¤Ç QQ, ZZ ¤È½ñ¤¯.} \\ -& & \mbox{ --- vlist ¤Ï Indeterminate ¤Î¥ê¥¹¥È(¿·ÈÇ)} \\ +& & \mbox{ --- vlist ¤Ï Indeterminate ¤Î¥ê¥¹¥È(¿·ÈÇ). ¿¹à¼°´Ä¤ÎÊÑ¿ô¥ê¥¹¥È} \\ & & \mbox{ --- wvec ¤Ï order ¤ò¤­¤á¤ë weight vector,} \\ & & \mbox{ --- outord ¤Ï½ÐÎϤ¹¤ë¤È¤­¤ÎÊÑ¿ô½ç½ø.} \\ \end{eqnarray*} +RingByName ¤ä DMS of N variables ¤Ï¤Ê¤¯¤Æ¤â, DMS ¤òÄêµÁ¤Ç¤­¤ë. +¤·¤¿¤¬¤Ã¤Æ, ¤³¤ì¤é¤ò¼ÂÁõ¤·¤Æ¤Ê¤¤¥·¥¹¥Æ¥à¤Ç DMS ¤ò°·¤¦¤â¤Î¤¬ +¤¢¤Ã¤Æ¤â¤«¤Þ¤ï¤Ê¤¤. + °Ê²¼, °Ê¾å¤Î CMObject ¤Ë¤¿¤¤¤¹¤ë, xxx = asir, kan ¤Î¿¶Éñ¤¤¤òµ­½Ò¤¹¤ë. @@ -1764,7 +2268,7 @@ $ 3 x^2 y$ ¤Ï 6 ÊÑ¿ô¤Î¿¹à¼°´Ä¤Î¸µ¤È¤·¤Æ¤ß¤Ê¤µ¤ì¤Æ¤¤¤ë -\section{ºÆµ¢É½¸½Â¿¹à¼°¤ÎÄêµÁ} %% From this/noro/rp.tex +\subsection{ºÆµ¢É½¸½Â¿¹à¼°¤ÎÄêµÁ} \begin{verbatim} #define CMO_RECURSIVE_POLYNOMIAL 27 @@ -1823,13 +2327,23 @@ $$ x^3 (1234 y^5 + 17 ) + x^1 (y^10 + 31 y^5) $$ Èó²Ä´¹Â¿¹à¼°¤â¤³¤Î·Á¼°¤Ç¤¢¤é¤ï¤·¤¿¤¤¤Î¤Ç, ÀѤνç½ø¤ò¾å¤Î¤è¤¦¤Ë ¤¹¤ë¤³¤È. ¤Ä¤Þ¤ê, ¼çÊÑ¿ô¤«¤±¤ë·¸¿ô¤Î½çÈÖ. +\noindent +\begin{verbatim} +sm1 +sm1>(x^2-h). [(class) (recursivePolynomial)] dc /ff set ; +sm1>ff :: +Class.recursivePolynomial h * ((-1)) + (x^2 * (1)) +\end{verbatim} + + + int32 ¤È Integer32 ¤Î°ã¤¤. ¼¡¤Ë¤¯¤ë¥Ç¡¼¥¿¤¬¤«¤Ê¤é¤º int32 ¤È¤ï¤«¤Ã¤Æ¤ª¤ì¤Ð, int32 ¤òÍѤ¤¤ë. ¼¡¤Î¥Ç¡¼¥¿·¿¤¬¤ï¤«¤é¤Ê¤¤¤È¤­ Integer32 ¤òÍѤ¤¤ë. -\section{CPU°Í¸¤Î double } +\subsection{CPU°Í¸¤Î double } \begin{verbatim} #define CMO_64BIT_MACHINE_DOUBLE 40 @@ -1970,9 +2484,10 @@ CMO ¤Î stream ¤Ø¤ÎžÁ÷, stream ¤è¤ê¤ÎžÁ÷¤Ï, \end{enumerate} +\subsection{Îò»Ë} kan -- asir ´Ö¤Ç¤â°Ê¾å¤Î¤è¤¦¤Ë³«È¯¤¬¤¹¤¹¤ó¤À. -Risa/Asir ¤Î³«È¯¤¬¾ÂÄŤÎÉٻΥե©¡¼¥é¥à¤Ç¤ª¤³¤Ê¤ï¤ì¤Æ¤¤¤¿ +Risa/Asir ¤Î³«pȯ¤¬¾ÂÄŤÎÉٻΥե©¡¼¥é¥à¤Ç¤ª¤³¤Ê¤ï¤ì¤Æ¤¤¤¿ ¤³¤í, »ä¤¬¾ÂÄŤò, 1996ǯ, 1·î19Æü¤ËˬÌ䤷, {\tt Asir\_executeString()} ¤Îµ¡Ç½¤òÌîϤ¤µ¤ó¤Ë½ñ¤¤¤Æ¤â¤é¤Ã¤Æ, kan ¤è¤ê asir ¤òʸ»úÎó¤Ç¸Æ¤Ó½Ð¤¹ @@ -2024,6 +2539,8 @@ open XM ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ò¼Â¸½¤·¤Æ¤¤¤ë. {\tt ox\_lauch} ¤Ê¤ë̾Á°¤Ç¤¢¤ë¤¬, µ¡Ç½¤ÏƱ¤¸¤Ç¤¢¤ë. {\tt ox} ¤Î¥½¡¼¥¹¤Ï {\tt oxmain.c} ¤Ç¤¢¤ë. +\subsubsection{OpenXM/src/ox\_toolkit ¤Ë¤¢¤ë¥µ¥ó¥×¥ë¼ÂÁõ} +¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î²òÀâʸ½ñ¤ò¸«¤è. \subsubsection{ ox\_null } @@ -2211,6 +2728,11 @@ CMObject ¤È kan/sm1 ¤Î object ¤Ï¼¡¤Îµ¬Â§¤Ë¤·¤¿¤¬¤¤ÊÑ´¹ {\tt OxVersion} ÊÑ¿ô¤Ç openXM ¤Î¥×¥í¥È¥³¥ë¤Î version ¤òɽ¤¹. +\subsubsection{ {\tt ox\_sm1} ¤òÍѤ¤¤¿¥¯¥é¥¤¥¢¥ó¥È¤Î¥Æ¥¹¥ÈÊýË¡ } +¤Þ¤À¤«¤¤¤Æ¤Ê¤¤. + +\subsubsection{ {\tt Asir} ¤òÍѤ¤¤¿¥µ¡¼¥Ð¤Î¥Æ¥¹¥ÈÊýË¡ } + \subsection{ ºÇ¾®¤Î TCP/IP ¥¯¥é¥¤¥¢¥ó¥È¤ÎÎã } Java ¤Þ¤¿¤Ï M2 ¤Ë¤è¤ë¥½¡¼¥¹¥³¡¼¥É¤ò·ÇºÜ¤ÎͽÄê. @@ -2279,7 +2801,8 @@ Open Asir ¥Þ¥Ë¥å¥¢¥ë, ¥µ¥ó¥×¥ë: ¾®¸¶, ¹â»³. ¥Ñ¥é¥á¡¼¥¿ÉÕÀÑʬ¤Î¥°¥é¥Õɽ¼¨¤Î¥½¥Õ¥È¤ò¤«¤¯¤³¤È¤Ç ¤µ¤é¤ËÌäÂêÅÀ¤ò¤µ¤°¤ë¤³¤È¤ò ·×²è¤·¤Æ¤¤¤ë. -¥°¥ì¥Ö¥Êdeformation ¤Ë¤è¤ë¿¹à¼°²ò¤ÎƳ½Ð(Àþ·Á¤ª¤è¤ÓÈóÀþ·ÁÊýÄø¼°) +¥°¥ì¥Ö¥Êdeformation ¤Ë¤è¤ë¿¹à¼°²ò, Í­Íý²ò¤ÎƳ½Ð(Àþ·Á¤ª¤è¤ÓÈóÀþ·ÁÊýÄø¼°, +ÈóÀþ·ÁÈùʬÊýÄø¼°¤«¤é½Ðȯ¤¹¤ë¤ÈÂå¿ôÊýÄø¼°¤ò²ò¤¯ÌäÂê¤Ë¤Ê¤ë) ¤Ï OpenXM Ū¤Ê¥×¥í¥°¥é¥à¤Î¤ª¤â¤·¤í¤¤Îý½¬ÌäÂê. Java ¤ÎÊÂÎó·×»»µ­½ÒǽÎϤò¤Ä¤«¤Ã¤Æ ox ¥µ¡¼¥Ð¤ò»È¤¦¤Î¤â¤ª¤â¤·¤í¤¤. @@ -2289,6 +2812,8 @@ Free Mathematical Software Initiative ¤òºî¤ë¤Ù¤­¤À¤í¤¦ \subsection{ Change log } \begin{enumerate} +\item 1997/11/20 : ¤³¤Î document ¤ÎºÇ½é¤Î version ¤¬À¸¤Þ¤ì¤¿. + kxx/openxxx.tex ¤Ê¤ë̾Á°¤Ç¤¢¤Ã¤¿. \item 1999/07 : {\tt CMO\_ZZ} ¤Î·Á¼°¤òÊѤ¨¤¿. \item 1999/09/7, 9/8 : ʬ»¶É½¸½Â¿¹à¼°, Mathcap, RecursivePolynomial, ¤Î·Á¼°¤òÊѤ¨¤¿. asir, sm1 ¤Ë¼ÂÁõ¤·¤¿. ¥¨¥é¡¼½èÍý¤Î¤¿¤á¤Ë, @@ -2531,16 +3056,142 @@ Example: (OX\_DATA, ({\tt CMO\_STRING}, 5, "Hello")) \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} \bibitem{openmath} {\tt http://www.openmath.org} -\bibitem{openxxx} {\tt http://www.math.kobe-u.ac.jp/openxxx/ ¤Þ¤À¤Ç¤¹.} -\bibitem{openasir-intro} ¾®¸¶, ¹â»³, ÌîϤ: Open Asir ÆþÌç, 1999, -¿ô¼°½èÍý, Vol 7, No 2, 2--17. (ISBN4-87243-086-7, SEG ½ÐÈÇ, Tokyo). \\ -{\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} Ohara, Takayama, Noro: Introduction to Open Asir , +1999, (in Japanese), +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} +*/ +/*&C \bigbreak \bigbreak \bigbreak @@ -2561,3 +3212,4 @@ Example: } \end{document} +*/ \ No newline at end of file