=================================================================== RCS file: /home/cvs/OpenXM/doc/OpenXM-specs/stackmachine.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -r1.2 -r1.3 --- OpenXM/doc/OpenXM-specs/stackmachine.tex 2000/01/21 06:24:49 1.2 +++ OpenXM/doc/OpenXM-specs/stackmachine.tex 2000/01/21 08:44:55 1.3 @@ -79,6 +79,7 @@ CMObject ¤ËÂФ¹¤ëºÇÂç¸øÌó¿ôŪ¤Ê¥á¥Ã¥»¡¼¥¸¤Î»ÅÍͤòconte ¤Ç¥¹¥¿¥Ã¥¯¾å¤Ë¤¢¤ë¤È²ò¼á¤·¤Æ²¼¤µ¤¤.) ¤¹¤Ù¤Æ¤Î¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Ï°Ê²¼¤Î´Ø¿ô¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¤È¤¤¤±¤Ê¤¤. + */ /*&eg @@ -139,8 +140,7 @@ Stack after the request: \hline \end{tabular} -//&jp Result: ¤Ê¤·. -//&eg Result: none. +Result: none. Request: \begin{tabular}{|c|c|c|c|c|c|} \hline @@ -155,8 +155,7 @@ Stack after the request: \hline \end{tabular} -//&jp Result: ¤Ê¤·. -//&eg Result: none. +Result: none. //&jp CMO ¥Ç¡¼¥¿¤Î¼õ¤±¼è¤ê¤Ë¼ºÇÔ¤·¤¿»þ¤Î¤ß \\ //&eg If the server fails to receive a CMO data, @@ -195,7 +194,7 @@ mathCap ¤Î¹½Â¤ÂΤò¥·¥¹¥Æ¥àËè¤Ë¤­¤á¤ë¤â¤Î¤È¤·,¤³¤Î´Ø¿ô¤ ¥Ý¥¤¥ó¥¿¤òÌ᤹. (open sm1 ¤Ç¤Ï {\tt struct mathCap} ¤òÍѤ¤¤Æ¤¤¤ë. */ /*&eg -It request to push the mathcap of the server. +It requests a server to push the mathcap of the server. The mathcap is similar to the termcap. One can know the server type and the capability of the server from the mathcap. */ @@ -207,12 +206,14 @@ Request: \hline \end{tabular} -Result: +Stack after the request: \begin{tabular}{|c|c|} \hline {\tt int32 OX\_DATA} & {\sl Mathcap} mathCapOb \\ \hline \end{tabular} +Result: none. + \item \begin{verbatim} SM_setMathCap @@ -224,7 +225,7 @@ SM_setMathCap ¿ô¤È¤¹¤ë. (open sm1 ¤Ç¤Ï {\tt struct mathCap} ¤òÍѤ¤¤Æ¤¤¤ë. */ /*&eg -It requests to register the peer's mathcap {\tt m} in the server. +It requests a server to register the peer's mathcap {\tt m} in the server. The server can avoid to send OX messages unknown to its peer. */ @plugin/mathcap.h) @@ -236,8 +237,7 @@ Request: \hline \end{tabular} -//&jp Result: ¤Ê¤·. \\ -//&eg Result: none. \\ +Result: none. /*&jp \noindent Ãí°Õ: mathcap ¤Ï°ìÈ̤˥¯¥é¥¤¥¢¥ó¥È¼çÂΤÇÀßÄꤹ¤ë. @@ -262,29 +262,18 @@ registers it. SM_executeStringByLocalParser \end{verbatim} /*&jp -ʸ»úÎó $s$ ¤ò¥·¥¹¥Æ¥à xxx ¤Îʸˡ(¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎÁȤ߹þ¤ß¥í¡¼¥« -¥ë¸À¸ì)¤Ë¤·¤¿¤¬¤Ã¤¿¥³¥Þ¥ó¥É¤È¤·¤Æ¼Â¹Ô¤¹¤ë. ¤¿¤À¤·, ¥³¥Þ¥ó¥É¤Î¼Â¹Ô¤Î·ë +ʸ»úÎó {\tt s} ¤ò stack ¤«¤é pop ¤·, +¤½¤Îʸ»úÎó¤ò¥·¥¹¥Æ¥à¸ÇÍ­¤Îʸˡ(¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎÁȤ߹þ¤ß¥í¡¼¥« +¥ë¸À¸ì)¤Ë¤·¤¿¤¬¤Ã¤¿¥³¥Þ¥ó¥É¤È¤·¤Æ¼Â¹Ô¤¹¤ë. ¥³¥Þ¥ó¥É¤Î¼Â¹Ô¤Î·ë ²Ì¤ÎºÇ¸å¤ËÌá¤êÃͤ¬¤¢¤ë¤È¤­¤Ï, {\tt OperandStack} ¤ËÌá¤êÃͤò push ¤¹¤ë. -Àµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê¤é -1 ¤ò¤â¤É¤¹. debug ¥â¡¼¥É¤Ë¤Ï¤¤¤Ã¤¿¾ì -¹ç, -2 ¤òÌ᤹. ¥¨¥é¡¼¤Î»þ Error2 Object¤ò stack ¤Ø push ¤¹¤ë.\\ {\tt -kan/sm1} ¤Î¾ì¹ç, ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎÁȤ߹þ¤ß¥í¡¼¥«¥ë¸À¸ì¤Ï{\tt sm1} -¥Ý¥¹¥È¥¹¥¯¥ê¥×¥È¸À¸ì¤Ç¤¢¤ë. ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤È, {\tt sm1} ¥Ý¥¹¥È -¥¹¥¯¥ê¥×¥È¸À¸ì¤Ï¥¹¥¿¥Ã¥¯¤ò¶¦Í­¤¹¤ë¤è¤¦¤Ë¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë. ¼ÂºÝ¤Î·×»»¤Ï -{\tt executeStringByLocalParser} ¤Ë¤è¤ê¼Â¹Ô¤µ¤ì¤ë. open XM ¤Ç¤Ï, ¸½ºß -¤Î¤È¤³¤í´Ø¿ô̾¤Îɸ½à²½¤Ï¤ª¤³¤Ê¤Ã¤Æ¤¤¤Ê¤¤. ¤·¤¿¤¬¤Ã¤Æ, ¼ÂºÝ¤Î·×»»¥³¥Þ -¥ó¥É¤ÎÁ÷½Ð¤Ï mathcap ¤ò¤ß¤Æ¥¯¥é¥¤¥¢¥ó¥È¤¬Àµ¤·¤¤¥³¥Þ¥ó¥É¤òÁªÂò¤¹¤ëɬÍ× -¤¬¤¢¤ë. (¤·¤«¤·¤Ê¤¬¤é, ¶¦ÄÌ´Ø¿ô̾¤¬¤Ê¤¤¤¿¤á¤Ë, ¶¦ÄÌ»ÅÍͤΥµ¡¼¥Ð¥¹¥¿¥Ã -¥¯¥Þ¥·¥ó¤Î¼ÂÁõ¤Ï¤­¤ï¤á¤Æ´Êñ¤Ç¤¢¤ë. ´Ø¿ô̾¤Î¶¦Ä̲½¤Ï¾­Íè¤Î²ÝÂê.) \\³ä -¹þ¤ß¤Ë´Ø¤·¤Æ¤Ï, -1 ¤òÌ᤹¤è¤¦¤Ë ¥Ï¥ó¥É¥é¤ò½ñ¤¯. -executeStringByLocalParser() ¤òºÆµ¢Åª¤Ë¸Æ¤ó¤À¤È¤­¤â ³ä¤ê¹þ¤ß¤Î¥Ï¥ó¥É¥é -¤¬Àµ¤·¤¯Æ°ºî¤¹¤ë¤è¤¦¤Ë¤³¤Î´Ø¿ô¤Ï½ñ¤«¤ì¤ë¤Ù¤­¤Ç¤¢¤ë. ¤³¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð -¤·¤¿¤Î¤Á, signal, setjmp ¤ÎºÆÀßÄê¤ò¸Æ¤Ó½Ð¤·Â¦¤Ç¤ä¤é¤Ê¤¤¤È¤¤¤±¤Ê¤¤. \\ +OpenXM ¤Ç¤Ï, ¸½ºß¤Î¤È¤³¤í´Ø¿ô̾¤Îɸ½à²½¤Ï¤ª¤³¤Ê¤Ã¤Æ¤¤¤Ê¤¤. ¤³¤Î´Ø¿ô¤ª¤è¤Ó {\tt popString} ¤Îµ¡Ç½¤ò¼Â¸½¤¹¤ì¤Ð, ºÇÄã¸Â¤Î open XM ¤Î ¥µ¡¼¥Ð¤Ë¤Ê¤ì¤ë. ¼ÂÁõ¤Ç¤Ï, ¤Þ¤º¤³¤ÎÆó¤Ä¤Î´Ø¿ô¤Îµ¡Ç½¤ò¼Â¸½¤¹¤Ù¤­¤Ç¤¢¤ë. */ /*&eg -A character string $s$ is parsed by the local parser of the stack -machine and interpreted by the local interpreter. +It requests a server to pop a character string {\tt s}, to +parse it by the local parser of the stack machine, and +to interprete by the local interpreter. If the exececution produces a result, it is pushed onto {\tt OperandStack}. If an error has occured, Error2 Object is pushed onto the stack. @@ -306,8 +295,7 @@ Request: \hline \end{tabular} -//&jp Result: ¤Ê¤·. -//&eg Result: none. +Result: none. /*&jp \noindent »²¹Í: \ ¼Â¹ÔÁ°¤Î¥¹¥¿¥Ã¥¯¤Î¥Ç¡¼¥¿¤Ï, @@ -346,11 +334,11 @@ SM_popString /*&jp {\tt OperandStack} ¤è¤ê Object ¤ò pop ¤·, ¤½¤ì¤ò xxx ¤Î½ÐÎϵ¬Â§¤Ë¤·¤¿¤¬¤¤Ê¸ »úÎ󷿤ËÊÑ´¹¤·¤ÆÁ÷¿®¤¹¤ë. ¥¹¥¿¥Ã¥¯¤¬¶õ¤Î¤È¤­¤Ï, {\tt (char *)NULL} ¤òÌ᤹. -ʸ»úÎó¤Ï {\tt ox\_stream out}¤Ø CMO ¤Î¥Ç¡¼ +ʸ»úÎó¤Ï TCP/IP stream ¤Ø CMO ¤Î¥Ç¡¼ ¥¿¤È¤·¤ÆÁ÷¿®¤¹¤ë. ¥¨¥é¡¼¤Î¾ì¹ç¤Ï {\tt CMO\_ERROR2} ¤òÌ᤹¤Ù¤­¤Ç¤¢¤ë. */ /*&eg -It requests for a server to pop an object from {\tt OperandStack}, +It requests a server to pop an object from {\tt OperandStack}, to convert it into a character string according to the output format of the local system, and to send the character string via TCP/IP stream. {\tt (char *)NULL} is returned when the stack is empty. @@ -385,7 +373,7 @@ SM_getsp object ¤¬ push ¤µ¤ì¤¿¤Ð¤¢¤¤, 1 ¤Å¤ÄÁý¤¨¤ë¤â¤Î¤È¤¹¤ë. */ /*&eg -It request to push the current stack pointer onto the stack. +It requests a server to push the current stack pointer onto the stack. The stack pointer is represented by a non-negative integer. Its initial value is 0 and a push operation increments the stack pointer by 1. @@ -403,12 +391,14 @@ Request: \hline \end{tabular} -Result: +Stack after the request: \begin{tabular}{|c|c|c|} \hline {\tt int32 OX\_DATA} & {\tt int32 CMO\_INT32} & {\it stack pointer value} \\ \hline \end{tabular} +Result: none. + \item \begin{verbatim} SM_dupErrors @@ -418,7 +408,7 @@ SM_dupErrors ¤µ¤»¤Ê¤¤. */ /*&eg -It requests to push a list object containing all error objects on the stack. +It requests a server to push a list object containing all error objects on the stack. */ Stack before the request: @@ -433,11 +423,13 @@ Request: \hline \end{tabular} -Result: +Stack after the request: \begin{tabular}{|c|c|c|} \hline {\tt int32 OX\_DATA} & {\sl CMObject} \ a list of errors\\ \hline \end{tabular} + +Result: none. \end{enumerate} \medbreak @@ -494,7 +486,7 @@ list represents available CMO tags. %%Prog: (ox.sm1) run sm1connectr [(oxWatch) ox.ccc] extension %%Prog: ox.ccc (122345; ) oxsubmit ; //&jp {\tt message\_body} ¤Î¼ÂÎã¤ò¤¢¤²¤ë. ¥·¥ê¥¢¥ëÈÖ¹æÉô¤Ï½ü¤¤¤Æ¤¢¤ë. -//&eg {\tt message\_body} ¤Î¼ÂÎã¤ò¤¢¤²¤ë. ¥·¥ê¥¢¥ëÈÖ¹æÉô¤Ï½ü¤¤¤Æ¤¢¤ë. +//&eg We show examples of {\tt message\_body}. Serial numbers are omitted. \begin{enumerate} \item {\tt executeStringByLocalParser("12345 ;");} /*&jp @@ -502,8 +494,9 @@ list represents available CMO tags. {\tt xx(yy)} ¤Î¤Ê¤«¤Î {\tt (yy)} ¤ÏÂбþ¤¹¤ë¥¢¥¹¥­¡¼¥³¡¼¥É¤ò¤¢¤ï¤é¤¹. */ /*&eg -¤Ï¼¡¤Î¤è¤¦¤Ê¥Ñ¥±¥Ã¥È¤ËÊÑ´¹¤µ¤ì¤ë. ³Æ¿ô»ú¤Ï 16¿Ê1¥Ð¥¤¥È¤ò¤¢¤é¤ï¤¹. -{\tt xx(yy)} ¤Î¤Ê¤«¤Î {\tt (yy)} ¤ÏÂбþ¤¹¤ë¥¢¥¹¥­¡¼¥³¡¼¥É¤ò¤¢¤ï¤é¤¹. +is converted into the following packet. Each number denotes +one byte in hexadecimal representation. +{\tt (yy)} in {\tt xx(yy)} represents the corresponding ASCII code. */ \begin{verbatim} 0 0 2 2 0 0 0 4 0 0 0 7 @@ -511,28 +504,12 @@ list represents available CMO tags. 0 0 2 1 0 0 1 c \end{verbatim} /*&jp -¤³¤³¤Ç, -\verb+ 0 0 2 2 0 0 0 4 + ¤Ï, network byte order ¤Ç, -½çÈÖ¤Ë {\tt OX\_DATA} ¤½¤ì¤«¤é, -CMO ¤Î¥¿¥°¤Î, {\tt CMO\_STRING} ¤òɽ¤¹. -\verb+ 0 0 0 7 + ¤Ïʸ»ú¿ô, -ºÇ¸å¤Ë ʸ»úÎó {\tt 12345 ;} ¤¬Íè¤ë. -¤³¤³¤Ç, \verb+ 0 0 1 c + ¤Ï, network byte order ¤Ç, -{\tt OX\_executeString} ¤òɽ¤¹. +¤½¤ì¤¾¤ì¤Î¥Ç¡¼¥¿¤Î°ÕÌ£¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¢¤ë. */ /*&eg -¤³¤³¤Ç, -\verb+ 0 0 2 2 0 0 0 4 + ¤Ï, network byte order ¤Ç, -½çÈÖ¤Ë {\tt OX\_DATA} ¤½¤ì¤«¤é, -CMO ¤Î¥¿¥°¤Î, {\tt CMO\_STRING} ¤òɽ¤¹. -\verb+ 0 0 0 7 + ¤Ïʸ»ú¿ô, -ºÇ¸å¤Ë ʸ»úÎó {\tt 12345 ;} ¤¬Íè¤ë. -¤³¤³¤Ç, \verb+ 0 0 1 c + ¤Ï, network byte order ¤Ç, -{\tt OX\_executeString} ¤òɽ¤¹. +Each data has the following meaning. */ -//&jp ¤Þ¤È¤á¤ë¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. -//&eg ¤Þ¤È¤á¤ë¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. \begin{verbatim} 0 0 2 2 (OX_DATA) 0 0 0 4 (CMO_STRING) 0 0 0 7 (size) @@ -541,7 +518,7 @@ CMO ¤Î¥¿¥°¤Î, {\tt CMO\_STRING} ¤òɽ¤¹. 0 0 1 c (SM_executeStringByLocalParser) \end{verbatim} //&jp ¤³¤ì¤ò OXexpression ¤Çɽµ­¤¹¤ë¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. -//&eg ¤³¤ì¤ò OXexpression ¤Çɽµ­¤¹¤ë¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. +//&eg This is expressed by OXexpression as follows. \begin{center} (OX\_DATA, (CMO\_STRING, 7, "12345 ;")) \end{center} @@ -550,46 +527,47 @@ CMO ¤Î¥¿¥°¤Î, {\tt CMO\_STRING} ¤òɽ¤¹. \end{center} //&jp \item {\tt popString()} ¤òÍ×ÀÁ¤¹¤ë¥á¥Ã¥»¡¼¥¸: -//&eg \item {\tt popString()} ¤òÍ×ÀÁ¤¹¤ë¥á¥Ã¥»¡¼¥¸: +//&eg \item A message which requests {\tt SM\_popString}: \begin{verbatim} 0 0 2 1 (OX_COMMAND) 0 0 1 7 (SM_popString) \end{verbatim} -OXexpression ¤Ç¤Ï +//&jp OXexpression ¤Ç¤Ï +//&eg In OXexpression it is represented as (OX\_COMMAND, (SM\_popString)). \noindent //&jp ¤³¤ì¤Ë¤¿¤¤¤·¤Æ¼¡¤ÎÊÖÅú¥á¥Ã¥»¡¼¥¸¤¬¤¯¤ë. -//&eg ¤³¤ì¤Ë¤¿¤¤¤·¤Æ¼¡¤ÎÊÖÅú¥á¥Ã¥»¡¼¥¸¤¬¤¯¤ë. +//&eg The server returns the following reply message: \begin{verbatim} 0 0 2 2 (OX_DATA) 0 0 0 4 (CMO_STRING) 0 0 0 5 (size) 31(1) 32(2) 33(3) 34(4) 35(5) \end{verbatim} //&jp OXexpression ¤Ç¤«¤¯¤È, -//&eg OXexpression ¤Ç¤«¤¯¤È, +//&eg In OXexpression it is represented as (OX\_DATA, (CMO\_STRING, 7, "12345 ;")). \end{enumerate} //&jp \subsubsection{¥°¥ë¡¼¥× SMobject/Basic1 ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿} -//&eg \subsubsection{¥°¥ë¡¼¥× SMobject/Basic1 ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿} +//&eg \subsubsection{Operators in the group SMobject/Basic1} \begin{enumerate} \item \begin{verbatim} -void xxx_pops(int n) +SM_pops \end{verbatim} /*&jp operand stack ¤è¤ê, {\it n} ¸Ä¤Î¸µ ({\it obj1, obj2, $\ldots$, objn}) ¤ò pop ¤·¤Æ¼Î¤Æ¤ë. */ /*&eg -operand stack ¤è¤ê, {\it n} ¸Ä¤Î¸µ ({\it obj1, obj2, $\ldots$, objn}) -¤ò pop ¤·¤Æ¼Î¤Æ¤ë. +It requests a server to pop {\it n} and to discard elements {\it obj1, obj2, +$\ldots$, objn}) from the stack. */ //&jp Stack before the request: (±¦¤¬ stack ¤Î¥È¥Ã¥×¤Ç¤¢¤ë.) \\ -//&eg Stack before the request: (±¦¤¬ stack ¤Î¥È¥Ã¥×¤Ç¤¢¤ë.) \\ +//&eg Stack before the request: (The rightmost one is the top of the stack.) \\ \begin{tabular}{|c|c|c|c|c|} \hline {\it obj1} & {\it obj2} & $\cdots$ & {\it objn} &{\it INT32 n} \\ \hline @@ -601,13 +579,12 @@ Request: \hline \end{tabular} -//&jp Result: ¤Ê¤·. -//&eg Result: none. +Result: none. \item \begin{verbatim} -int xxx_setName(char *name) +int SM_setName \end{verbatim} /*&jp {\tt OperandStack} ¤è¤ê {\it name} ¤ò pop ¤·, ¤Ä¤®¤Ë{\tt OperandStack} @@ -616,13 +593,12 @@ bind ¤¹¤ë. Àµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê¤é -1 ¤ò¤â¤É¤ ¤ëÄÌ¿®¤Ç¤Ï, °Û¾ï½ªÎ»¤Î»þ¤Î¤ß, {\tt CMO\_ERROR2} ¤òstack ¤Ø push ¤¹¤ë. */ /*&eg -{\tt OperandStack} ¤è¤ê {\it name} ¤ò pop ¤·, ¤Ä¤®¤Ë{\tt OperandStack} -¤è¤ê {\it obj} ¤ò pop ¤·, ¤½¤ì¤ò¸½ºß¤Î̾Á°¶õ´Ö¤ÇÊÑ¿ô {\it name} ¤Ë -bind ¤¹¤ë. Àµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê¤é -1 ¤ò¤â¤É¤¹. TCP/IP ¤Ë¤è -¤ëÄÌ¿®¤Ç¤Ï, °Û¾ï½ªÎ»¤Î»þ¤Î¤ß, {\tt CMO\_ERROR2} ¤òstack ¤Ø push ¤¹¤ë. +It requests a server to pop {\it name}, to pop {\it obj}, and to +bind {\it obj} to a variable {\it name} in the current name space. +If an error has occured {\tt CMO\_ERROR2} is pushed to the stack. */ //&jp Stack before the request: (±¦¤¬ stack ¤Î top.) -//&eg Stack before the request: (±¦¤¬ stack ¤Î top.) +//&eg Stack before the request: (The rightmost one is the top of the stack.) \begin{tabular}{|c|c|} \hline {\it obj} & {\it String name} \\ \hline @@ -634,28 +610,29 @@ Request: \hline \end{tabular} -//&jp Result: ¤Ê¤·. -//&eg Result: none. +Result: none. \item \begin{verbatim} -int xxx_evalName(char *name) +SM_evalName \end{verbatim} + /*&jp ¸½ºß¤Î̾Á°¶õ´Ö¤ÇÊÑ¿ô {\it name} ¤òɾ²Á¤¹¤ë. ɾ²Á¤Î·ë²Ì {\it resultObj} ¤ò¥¹¥¿¥Ã¥¯¤ØÌ᤹. ´Ø¿ô¼«ÂΤÏÀµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê ¤é -1 ¤ò¤â¤É¤¹. TCP/IP ¤Î¾ì¹ç, °Û¾ï½ªÎ»¤Î¾ì¹ç¤Î¤ß {\tt CMO\_ERROR2} ¤ò stack ¤Ø push ¤¹¤ë. */ + /*&eg -¸½ºß¤Î̾Á°¶õ´Ö¤ÇÊÑ¿ô {\it name} ¤òɾ²Á¤¹¤ë. ɾ²Á¤Î·ë²Ì {\it -resultObj} ¤ò¥¹¥¿¥Ã¥¯¤ØÌ᤹. ´Ø¿ô¼«ÂΤÏÀµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê -¤é -1 ¤ò¤â¤É¤¹. TCP/IP ¤Î¾ì¹ç, °Û¾ï½ªÎ»¤Î¾ì¹ç¤Î¤ß {\tt CMO\_ERROR2} -¤ò stack ¤Ø push ¤¹¤ë. +It requests a server to pop {\it name} and to evaluate a variable +{\it name} in the current name space. The result of the evaluation +{\it resultObj} is pushed to the stack. +If an error has occured {\tt CMO\_ERROR2} is pushed to the stack. */ //&jp Stack before the request: (±¦¤¬ stack ¤Î top.) -//&eg Stack before the request: (±¦¤¬ stack ¤Î top.) +//&eg Stack before the request: (The rightmost one is the top of the stack.) \begin{tabular}{|c|} \hline {\it String name} \\ \hline @@ -668,18 +645,17 @@ Request: \end{tabular} //&jp Stack after the request: (±¦¤¬ stack ¤Î top.) -//&eg Stack after the request: (±¦¤¬ stack ¤Î top.) +//&eg Stack after the request: (The rightmost one is the top of the stack.) \begin{tabular}{|c|} \hline {\it resultObj} \\ \hline \end{tabular} -//&jp Result: ¤Ê¤·. -//&eg Result: none. +Result: none. \item \begin{verbatim} -int xxx_executeFunction(char *s, int n) +SM_executeFunction \end{verbatim} /*&jp ¥¹¥¿¥Ã¥¯¤è¤ê {\it n} ¸Ä¤Î¥Ç¡¼¥¿¤ò pop ¤·¤Æ, ¥µ¡¼¥Ð¤Î¥í¡¼¥«¥ë´Ø¿ô{\it @@ -687,9 +663,11 @@ s} ¤ò¼Â¹Ô¤¹¤ë. ¥¨¥é¡¼¤Î¤È¤­¤Î¤ß {\tt CMO\_ERROR2} ¤ò ¤ë. */ /*&eg -¥¹¥¿¥Ã¥¯¤è¤ê {\it n} ¸Ä¤Î¥Ç¡¼¥¿¤ò pop ¤·¤Æ, ¥µ¡¼¥Ð¤Î¥í¡¼¥«¥ë´Ø¿ô{\it -s} ¤ò¼Â¹Ô¤¹¤ë. ¥¨¥é¡¼¤Î¤È¤­¤Î¤ß {\tt CMO\_ERROR2} ¤ò stack ¤Ø push ¤¹ -¤ë. +It requests a server to pop {\it s} as a function name, +to pop {\it n} as the number of arguments and to execute +a local function {\it s} with {\it n} arguments popped from +the stack. +If an error has occured {\tt CMO\_ERROR2} is pushed to the stack. */ //&jp Stack before the request: (±¦¤¬ stack ¤Î top.) \\ @@ -706,71 +684,44 @@ Request: \end{tabular} //&jp Stack after the request: ´Ø¿ô¼Â¹Ô¤Î·ë²Ì. -//&eg Stack after the request: ´Ø¿ô¼Â¹Ô¤Î·ë²Ì. +//&eg Stack after the request: The result of the execution. -//&jp Result: ¤Ê¤·. -//&eg Result: none. +Result: none. \item \begin{verbatim} -bytes *xxx_popSerializedLocalObject(void) -void popSerializedLocalObject(ox_stream out) +SM_popSerializedLocalObject \end{verbatim} + /*&jp -ºÇ½é¤Î´Ø¿ô¤Ï¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¥ê¥ó¥¯¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. ¥¹¥¿¥Ã -¥¯¤è¤ê pop ¤·¤¿ object ¤ò local ·Á¼°¤Î serialization ¤·¤Æbyte Îó¤ÇÌ᤹. -2 ÈÖÌܤδؿô¤Ï Socket ¤ÇÄÌ¿®¤¹¤ë¤¿¤á¤ÎƱµ¡Ç½¤Î´Ø¿ô¤Ç¤¢¤ê, -serialization ¤µ¤ì¤¿ byte Îó¤ò{\tt ox\_stream out} ¤Ø½ÐÎϤ¹¤ë. ¤³¤Î¾ì -¹ç, header {\tt int32 OX\_DATA}, {\tt int32 CMO\_LOCAL\_OBJECT} ¤ò¤Ä¤± -¤Æ¤«¤é, byte Îó¤òÁ÷¤ë. ¤³¤Î´Ø¿ô¤Ï¤ª¤â¤Ë, homogeneous ¤Êʬ»¶¥·¥¹¥Æ¥à¤Ç -ÍѤ¤¤ë. ¼¡¤Ë, ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î´Ø¿ô¤¬¼Â¹Ô¤µ¤ì¤ë¤Þ¤Ç¤Ï,Ìá¤ê -object ¤ÎÆâÍƤÏÊݾڤµ¤ì¤Ê¤¤¤È¤¤¤±¤Ê¤¤. +¥¹¥¿¥Ã¥¯¤è¤ê pop ¤·¤¿ object ¤ò local ·Á¼°¤Ç serialization ¤·¤Æ +OX message ¤È¤·¤Æ stream ¤Ø½ÐÎϤ¹¤ë. OX message tag ¤È¤·¤Æ¤Ï, +local ·Á¼°¤ËÂбþ¤·¤¿¤â¤Î¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤³¤È¤¬É¬ÍפǤ¢¤ë. +¤³¤Î´Ø¿ô¤Ï¤ª¤â¤Ë, homogeneous ¤Êʬ»¶¥·¥¹¥Æ¥à¤ÇÍѤ¤¤ë. */ /*&eg -ºÇ½é¤Î´Ø¿ô¤Ï¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¥ê¥ó¥¯¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. ¥¹¥¿¥Ã -¥¯¤è¤ê pop ¤·¤¿ object ¤ò local ·Á¼°¤Î serialization ¤·¤Æbyte Îó¤ÇÌ᤹. -2 ÈÖÌܤδؿô¤Ï Socket ¤ÇÄÌ¿®¤¹¤ë¤¿¤á¤ÎƱµ¡Ç½¤Î´Ø¿ô¤Ç¤¢¤ê, -serialization ¤µ¤ì¤¿ byte Îó¤ò{\tt ox\_stream out} ¤Ø½ÐÎϤ¹¤ë. ¤³¤Î¾ì -¹ç, header {\tt int32 OX\_DATA}, {\tt int32 CMO\_LOCAL\_OBJECT} ¤ò¤Ä¤± -¤Æ¤«¤é, byte Îó¤òÁ÷¤ë. ¤³¤Î´Ø¿ô¤Ï¤ª¤â¤Ë, homogeneous ¤Êʬ»¶¥·¥¹¥Æ¥à¤Ç -ÍѤ¤¤ë. ¼¡¤Ë, ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î´Ø¿ô¤¬¼Â¹Ô¤µ¤ì¤ë¤Þ¤Ç¤Ï,Ìá¤ê -object ¤ÎÆâÍƤÏÊݾڤµ¤ì¤Ê¤¤¤È¤¤¤±¤Ê¤¤. +It requests a sever to pop an object, to convert it into a +serialized form according to a local serialization scheme, and +to send it to the stream as an OX message. +An OX message tag corresponding to +the local data format must be sent prior to the serialized data +itself. +This operation is used mainly on homogeneous distributed systems. */ -\item -/*&jp -local serialized object, ¤ª¤è¤Ó ¥µ¥Ý¡¼¥È¤¹¤ë CMO object ¤ò{\tt -OX\_DATA} ¤È¤·¤Æ¼õ¿®¤·¤¿¾ì¹ç, {\tt OperandStack} ¤Øpush ¤¹¤ë. ¼õ¿®¥¨ -¥é¡¼¤òµ¯¤³¤·¤¿¤È¤­¤Î¤ß, {\tt CMO\_ERROR2} ¤ò stack ¤Ø push ¤¹¤ë. -*/ -/*&eg -local serialized object, ¤ª¤è¤Ó ¥µ¥Ý¡¼¥È¤¹¤ë CMO object ¤ò{\tt -OX\_DATA} ¤È¤·¤Æ¼õ¿®¤·¤¿¾ì¹ç, {\tt OperandStack} ¤Øpush ¤¹¤ë. ¼õ¿®¥¨ -¥é¡¼¤òµ¯¤³¤·¤¿¤È¤­¤Î¤ß, {\tt CMO\_ERROR2} ¤ò stack ¤Ø push ¤¹¤ë. -*/ \item \begin{verbatim} -bytes *xxx_popCMO(void) -void xxx_popCMO(ox_stream out) +SM_popCMO \end{verbatim} /*&jp -ºÇ½é¤Î´Ø¿ô¤Ï¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¥ê¥ó¥¯¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. {\tt -OperandStack} ¤è¤ê object ¤ò pop ¤· CMO ·Á¼°¤Î serialized object ¤ò -byte Îó¤È¤·¤ÆÌ᤹. 2 ÈÖÌܤδؿô¤Ï Socket ¤ÇÄÌ¿®¤¹¤ë¤¿¤á¤ÎƱµ¡Ç½¤Î´Ø¿ô -¤Ç¤¢¤ê, {\tt ox\_stream out } ¤Ø, ¤½¤Î¥Ç¡¼¥¿¤ò header {\tt OX\_DATA} -¤ò¤Ä¤±¤Æ¤Ê¤¬¤¹. ¤³¤Î´Ø¿ô¤Ï¤ª¤â¤Ë, heterotic ¤Êʬ»¶¥·¥¹¥Æ¥à¤ÇÍѤ¤¤ë. -¼¡¤Ë, ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î´Ø¿ô¤¬¼Â¹Ô¤µ¤ì¤ë¤Þ¤Ç¤Ï,Ìá¤ê object ¤ÎÆâÍÆ -¤ÏÊݾڤµ¤ì¤Ê¤¤¤È¤¤¤±¤Ê¤¤. +{\tt OperandStack} ¤è¤ê object ¤ò pop ¤· CMO ·Á¼°¤Î serialized object ¤ò +stream ¤Ø header {\tt OX\_DATA} ¤ò¤Ä¤±¤Æ¤Ê¤¬¤¹. */ /*&eg -ºÇ½é¤Î´Ø¿ô¤Ï¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¥ê¥ó¥¯¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. {\tt -OperandStack} ¤è¤ê object ¤ò pop ¤· CMO ·Á¼°¤Î serialized object ¤ò -byte Îó¤È¤·¤ÆÌ᤹. 2 ÈÖÌܤδؿô¤Ï Socket ¤ÇÄÌ¿®¤¹¤ë¤¿¤á¤ÎƱµ¡Ç½¤Î´Ø¿ô -¤Ç¤¢¤ê, {\tt ox\_stream out } ¤Ø, ¤½¤Î¥Ç¡¼¥¿¤ò header {\tt OX\_DATA} -¤ò¤Ä¤±¤Æ¤Ê¤¬¤¹. ¤³¤Î´Ø¿ô¤Ï¤ª¤â¤Ë, heterotic ¤Êʬ»¶¥·¥¹¥Æ¥à¤ÇÍѤ¤¤ë. -¼¡¤Ë, ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î´Ø¿ô¤¬¼Â¹Ô¤µ¤ì¤ë¤Þ¤Ç¤Ï,Ìá¤ê object ¤ÎÆâÍÆ -¤ÏÊݾڤµ¤ì¤Ê¤¤¤È¤¤¤±¤Ê¤¤. +It requests a server to pop an object from the stack, to convert +it into a serialized form according to the standard CMO encoding scheme, +and to send it to the stream with the {\tt OX\_DATA} header. */ Request: @@ -784,16 +735,6 @@ Result: {\tt int32 OX\_DATA} & {\it Serialized CMO} \\ \hline \end{tabular} - -//&jp °Ê²¼¤Ç, {\tt ox\_stream} ¤Ï¥µ¥ó¥×¥ë¥µ¡¼¥Ð¤Î¾ì¹ç, -//&eg °Ê²¼¤Ç, {\tt ox\_stream} ¤Ï¥µ¥ó¥×¥ë¥µ¡¼¥Ð¤Î¾ì¹ç, -\begin{verbatim} -typedef FILE2 * ox_stream; -\end{verbatim} -//&jp ¤Ç¤¢¤ë (cf. {\tt file2.h}). ¤³¤ì¤Ï½èÍý·Ï¤Ë¤è¤ê¤Á¤¬¤Ã¤Æ¤è¤¤. -//&jp {\tt ox\_asir} ¤Ç¤Ï, {\tt FILE *} ¤òÍѤ¤¤Æ¤¤¤ë. -//&eg ¤Ç¤¢¤ë (cf. {\tt file2.h}). ¤³¤ì¤Ï½èÍý·Ï¤Ë¤è¤ê¤Á¤¬¤Ã¤Æ¤è¤¤. -//&eg {\tt ox\_asir} ¤Ç¤Ï, {\tt FILE *} ¤òÍѤ¤¤Æ¤¤¤ë. \end{enumerate}