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

Diff for /OpenXM/doc/OpenXM-specs/stackmachine.tex between version 1.3 and 1.4

version 1.3, 2000/01/21 08:44:55 version 1.4, 2000/01/24 02:48:24
Line 1 
Line 1 
 //&jp \section{ OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó }  //&jp \section{ OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó }
 //&eg \section{ OX stackmachine }  (This section has not yet been translated.)  //&eg \section{ OX stack machine }
   \label{sec:stackmachine}
 /*&jp  /*&jp
 ¤³¤ÎÀá¤Ç¤Ï, OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó operator ¤ÎÀâÌÀ  ¤³¤ÎÀá¤Ç¤Ï, OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó operator ¤ÎÀâÌÀ
 (TCP/IP ¥½¥±¥Ã¥È¾å¤Ç¤Îɸ½à encoding Ë¡ ¤òÍѤ¤¤ë),  (TCP/IP ¥½¥±¥Ã¥È¾å¤Ç¤Îɸ½à encoding Ë¡ ¤òÍѤ¤¤ë),
Line 39  that for event-driven programming.
Line 39  that for event-driven programming.
 {\tt oxserver00.c} is implemented as a sample server.  {\tt oxserver00.c} is implemented as a sample server.
 If you want to implement you own server,  If you want to implement you own server,
 write the following functions and use them instead of  write the following functions and use them instead of
 those in {\tt nullstackmachine.c }.  those in {\tt nullstackmachine.c}.
 */  */
   
 //&jp \subsubsection{¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î¥°¥ë¡¼¥× SMobject/Basic0 ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿}  //&jp \subsubsection{¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î¥°¥ë¡¼¥× SMobject/Primitive ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿}
 //&eg \subsubsection{Operators in the group SMobject/Basic0}  //&eg \subsubsection{Operators in the group SMobject/Primitive}
   
 /*&jp  /*&jp
 \noindent  \noindent
Line 78  CMObject ¤ËÂФ¹¤ëºÇÂç¸øÌó¿ôŪ¤Ê¥á¥Ã¥»¡¼¥¸¤Î»ÅÍͤòconte
Line 78  CMObject ¤ËÂФ¹¤ëºÇÂç¸øÌó¿ôŪ¤Ê¥á¥Ã¥»¡¼¥¸¤Î»ÅÍͤòconte
 °Õ.  CMO ·Á¼°¤Ç½ñ¤¤¤Æ¤¢¤Ã¤Æ¤â, ¤½¤ì¤Ï¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Îlocal ·Á¼°  °Õ.  CMO ·Á¼°¤Ç½ñ¤¤¤Æ¤¢¤Ã¤Æ¤â, ¤½¤ì¤Ï¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Îlocal ·Á¼°
 ¤Ç¥¹¥¿¥Ã¥¯¾å¤Ë¤¢¤ë¤È²ò¼á¤·¤Æ²¼¤µ¤¤.)  ¤Ç¥¹¥¿¥Ã¥¯¾å¤Ë¤¢¤ë¤È²ò¼á¤·¤Æ²¼¤µ¤¤.)
   
 ¤¹¤Ù¤Æ¤Î¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Ï°Ê²¼¤Î´Ø¿ô¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¤È¤¤¤±¤Ê¤¤.  ¤¹¤Ù¤Æ¤Î¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Ï°Ê²¼¤ÎÁàºî¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¤È¤¤¤±¤Ê¤¤.
   ³ÆÁàºî¤ËÂФ·, ¤½¤ÎÁ°¸å¤Ë¤ª¤±¤ë¥¹¥¿¥Ã¥¯¤Î¾õÂÖ¤ò¼¨¤¹. ¿Þ¤Ë¤ª¤¤¤Æ,
   ±¦Ã¼¤Î¥ª¥Ö¥¸¥§¥¯¥È¤¬¥¹¥¿¥Ã¥¯¤Î¥È¥Ã¥×¤ËÂбþ¤¹¤ë.
 */  */
   
 /*&eg  /*&eg
Line 90  Object xxx_OperandStack[SIZE];
Line 91  Object xxx_OperandStack[SIZE];
 \end{verbatim}  \end{verbatim}
 Here {\tt Object} may be local to the system {\tt xxx} wrapped by the stack  Here {\tt Object} may be local to the system {\tt xxx} wrapped by the stack
 machine.  machine.
 That is, the server may translate CMObjects into local its  That is, the server may translate CMObjects into its local
 objects and push them onto the stack.  However, it is preferable that  objects and push them onto the stack.  It is preferable that
 the composition of such a translation and its inverse is equal to the  the composition of such a translation and its inverse is equal to the
 identity map. The translation scheme is called the phrase book of the  identity map. The translation scheme is called the {\it phrase book} of the
 server and it should be documented for each stack machine.  In OpenXM,  server and it should be documented for each stack machine.  In OpenXM,
 any message is private.  In future we will provide a content  any message is private to a connection.  In future we will provide a content
 dictionary (CD; see OpenMath \cite{openmath}) for basic specifications  dictionary (CD; see OpenMath \cite{openmath}) for basic specifications
 of CMObjects.  of CMObjects.
   
 In the following, \verb+ xxx_ + may be omitted if no confusion occurs.  In the following, \verb+ xxx_ + may be omitted if no confusion occurs.
 As the names of functions and tags are long, one may use abbreviated  As the names of functions and tags are long, one may use abbreviated
 names.  Message packets are represented as follows.  Each field is  names.  Message packets are represented as follows.
 shown as \fbox{data type \quad data}.  For example {\tt int32  
 OX\_DATA} denotes a number {\tt OX\_DATA} which is represented by a 32  
 bit network byte order.  If a field is displayed by italic characters,  
 it should be defined elsewhere or its meaning should be clear.  For  
 example {\it String commandName} denotes a local object {\it  
 commandName} whose data type is String.  Note that an object on the  
 stack may have a local data type even if it is represented as CMO.  
   
   Each field is shown as \fbox{data type \quad data}.  For example {\tt
   int32 OX\_DATA} denotes a number {\tt OX\_DATA} which is represented
   by a 32 bit integer with the network byte order.  If a field is
   displayed by italic characters, it should be defined elsewhere or its
   meaning should be clear.  For example {\it String commandName} denotes
   a local object {\it commandName} whose data type is String.  Note that
   an object on the stack may have a local data type even if it is
   represented as CMO.
   
 Any server stack machine has to implement the following operations.  Any server stack machine has to implement the following operations.
   For each operation we show the states of the stack before and after
   the operation. In the figures the rightmost object corresponds to the
   top of the stack. Only the modified part of the stack are shown.
 */  */
   
 \begin{enumerate}  \begin{enumerate}
 \item  \item
 /*&jp  /*&jp
 CMObject/Basic0 ¤Î CMO ¥Ç¡¼¥¿¤Î¤¦¤Áɬ¿Ü¤Î¤â¤Î, {\tt CMO\_ERROR2}, {\tt  CMObject/Primitive ¤Î CMO ¥Ç¡¼¥¿¤Î¤¦¤Áɬ¿Ü¤Î¤â¤Î, {\tt CMO\_ERROR2}, {\tt
 CMO\_NULL}, {\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_LIST}¤¬¤ª¤¯  CMO\_NULL}, {\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_LIST}¤¬¤ª¤¯
 ¤é¤ì¤ÆÍ褿¾ì¹ç¤½¤ì¤ò¥¹¥¿¥Ã¥¯¤Ë push ¤¹¤ë.  ¤¿¤È¤¨¤Ð, {\tt CMO\_NULL}  ¤é¤ì¤ÆÍ褿¾ì¹ç¤½¤ì¤ò¥¹¥¿¥Ã¥¯¤Ë push ¤¹¤ë.  ¤¿¤È¤¨¤Ð, {\tt CMO\_NULL}
 ¤¢¤ë¤¤¤Ï {\tt CMO\_String} ¤Î¾ì¹ç¼¡¤Î¤è¤¦¤Ë¤Ê¤ë.  ¤¢¤ë¤¤¤Ï {\tt CMO\_String} ¤Î¾ì¹ç¼¡¤Î¤è¤¦¤Ë¤Ê¤ë.
 */  */
 /*&eg  /*&eg
 Any server should accept CMObjects in the group CMObject/Basic0.  Any server should accept CMObjects in the group CMObject/Primitive.
 The server pushes such data onto the stack.  The server pushes such data onto the stack.
 The following examples show the states of the stack after receiving  The following examples show the states of the stack after receiving
 {\tt CMO\_NULL} or {\tt CMO\_String} respectively.  {\tt CMO\_NULL} or {\tt CMO\_String} respectively.
Line 140  Stack after the request:
Line 146  Stack after the request:
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result:  none.  Output:  none.
   
 Request:  Request:\\
 \begin{tabular}{|c|c|c|c|c|c|}  \hline  \begin{tabular}{|c|c|c|c|c|c|}  \hline
 {\tt int32 OX\_DATA} & {\tt int32 CMO\_String} &{\tt int32} {\rm size}  {\tt int32 OX\_DATA} & {\tt int32 CMO\_String} &{\tt int32} {\rm size}
 &{\tt byte} {\rm s1} & $\cdots$ &{\tt byte} {\rm ssize}\\  &{\tt byte} {\rm s1} & $\cdots$ &{\tt byte} {\rm ssize}\\
Line 155  Stack after the request:
Line 161  Stack after the request:
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result:  none.  Output:  none.
   
 //&jp CMO ¥Ç¡¼¥¿¤Î¼õ¤±¼è¤ê¤Ë¼ºÇÔ¤·¤¿»þ¤Î¤ß  \\  //&jp CMO ¥Ç¡¼¥¿¤Î¼õ¤±¼è¤ê¤Ë¼ºÇÔ¤·¤¿»þ¤Î¤ß  \\
 //&eg If the server fails to receive a CMO data,  //&eg If the server fails to receive a CMO data,\\
 \begin{tabular}{|c|c|c|}  \hline  \begin{tabular}{|c|c|c|}  \hline
 {\tt int32 OX\_DATA} & {\tt int32 CMO\_ERROR2} & {\it CMObject} ob\\  {\tt int32 OX\_DATA} & {\tt int32 CMO\_ERROR2} & {\it CMObject} ob\\
 \hline  \hline
Line 190  SM_mathcap
Line 196  SM_mathcap
 /*&jp  /*&jp
 ¤³¤Î¥µ¡¼¥Ð¤Î mathcap ¤ò¤â¤É¤¹ (termcap ¤Î¤Þ¤Í).  ¥µ¡¼¥Ð¤Î¥¿¥¤¥×, ¥µ¡¼  ¤³¤Î¥µ¡¼¥Ð¤Î mathcap ¤ò¤â¤É¤¹ (termcap ¤Î¤Þ¤Í).  ¥µ¡¼¥Ð¤Î¥¿¥¤¥×, ¥µ¡¼
 ¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎǽÎϤòÃΤ뤳¤È¤¬¤Ç¤­¤ë.  C ¸À¸ì¤Ç¼ÂÁõ¤¹¤ë¾ì¹ç¤Ï,  ¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎǽÎϤòÃΤ뤳¤È¤¬¤Ç¤­¤ë.  C ¸À¸ì¤Ç¼ÂÁõ¤¹¤ë¾ì¹ç¤Ï,
 mathCap ¤Î¹½Â¤ÂΤò¥·¥¹¥Æ¥àËè¤Ë¤­¤á¤ë¤â¤Î¤È¤·,¤³¤Î´Ø¿ô¤Ï¤½¤Î¹½Â¤ÂΤؤΠ mathcap ¤Î¹½Â¤ÂΤò¥·¥¹¥Æ¥àËè¤Ë¤­¤á¤ë¤â¤Î¤È¤·,¤³¤Î´Ø¿ô¤Ï¤½¤Î¹½Â¤ÂΤؤÎ
 ¥Ý¥¤¥ó¥¿¤òÌ᤹.  (open sm1 ¤Ç¤Ï {\tt struct mathCap} ¤òÍѤ¤¤Æ¤¤¤ë.  ¥Ý¥¤¥ó¥¿¤òÌ᤹.  (open sm1 ¤Ç¤Ï {\tt struct mathcap} ¤òÍѤ¤¤Æ¤¤¤ë.
 */  */
 /*&eg  /*&eg
 It requests a server to push the mathcap of the server.  It requests a server to push the mathcap of the server.
Line 212  Stack after the request: 
Line 218  Stack after the request: 
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result: none.  Output: none.
   
 \item  \item
 \begin{verbatim}  \begin{verbatim}
 SM_setMathCap  SM_setMathcap
 \end{verbatim}  \end{verbatim}
 /*&jp  /*&jp
 ¼õ¤±¼è¤Ã¤¿ Mathcap {\tt m} ¤ò¼«Ê¬¤Î¥·¥¹¥Æ¥à¤ËÀßÄꤷ¤Æ, Áê¼ê¦¤¬Íý²òÉÔ  ¼õ¤±¼è¤Ã¤¿ Mathcap {\tt m} ¤ò¼«Ê¬¤Î¥·¥¹¥Æ¥à¤ËÀßÄꤷ¤Æ, Áê¼ê¦¤¬Íý²òÉÔ
 Ç½¤Ê CMO ¤ò¤ª¤¯¤é¤Ê¤¤¤è¤¦¤Ë¤¹¤ë.  C ¸À¸ì¤Ç¼ÂÁõ¤¹¤ë¾ì¹ç¤Ï, mathCap ¤Î¹½  Ç½¤Ê CMO ¤ò¤ª¤¯¤é¤Ê¤¤¤è¤¦¤Ë¤¹¤ë.  C ¸À¸ì¤Ç¼ÂÁõ¤¹¤ë¾ì¹ç¤Ï, mathcap ¤Î¹½
 Â¤ÂΤò¥·¥¹¥Æ¥àËè¤Ë¤­¤á¤ë¤â¤Î¤È¤·,¤³¤Î´Ø¿ô¤Ï¤½¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤ò°ú  Â¤ÂΤò¥·¥¹¥Æ¥àËè¤Ë¤­¤á¤ë¤â¤Î¤È¤·,¤³¤Î´Ø¿ô¤Ï¤½¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤ò°ú
 ¿ô¤È¤¹¤ë.  (open sm1 ¤Ç¤Ï {\tt struct mathCap} ¤òÍѤ¤¤Æ¤¤¤ë.  ¿ô¤È¤¹¤ë.  (open sm1 ¤Ç¤Ï {\tt struct mathcap} ¤òÍѤ¤¤Æ¤¤¤ë.
 */  */
 /*&eg  /*&eg
 It requests a server 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.
Line 233  The server can avoid to send OX messages unknown to it
Line 239  The server can avoid to send OX messages unknown to it
 Request:  Request:
 \begin{tabular}{|c|c|}  \hline  \begin{tabular}{|c|c|}  \hline
 {\tt int32 OX\_DATA} & {\sl Mathcap} m  \\ \hline  {\tt int32 OX\_DATA} & {\sl Mathcap} m  \\ \hline
 {\tt int32 OX\_COMMAND} & {\tt int32 SM\_setMathCap}  \\  {\tt int32 OX\_COMMAND} & {\tt int32 SM\_setMathcap}  \\
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result:  none.  Output:  none.
 /*&jp  /*&jp
 \noindent  \noindent
 Ãí°Õ: mathcap ¤Ï°ìÈ̤˥¯¥é¥¤¥¢¥ó¥È¼çÂΤÇÀßÄꤹ¤ë.  Ãí°Õ: mathcap ¤Ï°ìÈ̤˥¯¥é¥¤¥¢¥ó¥È¼çÂΤÇÀßÄꤹ¤ë.
Line 246  Result:  none.
Line 252  Result:  none.
 ¤½¤ì¤ò, ¥¯¥é¥¤¥¢¥ó¥È¤Ï¤½¤Î¥µ¡¼¥Ð¤ËÉտ路¤¿ mathcap ¤È¤·¤Æ  ¤½¤ì¤ò, ¥¯¥é¥¤¥¢¥ó¥È¤Ï¤½¤Î¥µ¡¼¥Ð¤ËÉտ路¤¿ mathcap ¤È¤·¤Æ
 ÀßÄꤹ¤ë.  ÀßÄꤹ¤ë.
 ¼¡¤Ë, ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥µ¡¼¥Ð¤Ë¼«Ê¬¤Î mathcap ¤ò  ¼¡¤Ë, ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥µ¡¼¥Ð¤Ë¼«Ê¬¤Î mathcap ¤ò
 {\tt SM\_setMathCap} ¤Ç¤ª¤¯¤ê, ¼«Ê¬¤Î mathcap ¤òÀßÄꤵ¤»¤ë.  {\tt SM\_setMathcap} ¤Ç¤ª¤¯¤ê, ¼«Ê¬¤Î mathcap ¤òÀßÄꤵ¤»¤ë.
 */  */
 /*&eg  /*&eg
 \noindent  \noindent
 Remark: In general the exchange of mathcaps is triggered by a client.  Remark: In general the exchange of mathcaps is triggered by a client.
 A client sends {\tt SM\_mathcap} to a server and obtains the server's  A client sends {\tt SM\_mathcap} to a server and obtains the server's
 mathcap. Then the client registers the mathcap. Finally the client  mathcap. Then the client registers the mathcap. Finally the client
 sends its own mathcap by {\tt SM\_setMathCap} and the server  sends its own mathcap by {\tt SM\_setMathcap} and the server
 registers it.  registers it.
 */  */
   
Line 273  OpenXM ¤Ç¤Ï, ¸½ºß¤Î¤È¤³¤í´Ø¿ô̾¤Îɸ½à²½¤Ï¤ª¤³¤Ê¤Ã¤Æ¤¤¤
Line 279  OpenXM ¤Ç¤Ï, ¸½ºß¤Î¤È¤³¤í´Ø¿ô̾¤Îɸ½à²½¤Ï¤ª¤³¤Ê¤Ã¤Æ¤¤¤
 /*&eg  /*&eg
 It requests a server to pop a character string {\tt s}, to  It requests a server to pop a character string {\tt s}, to
 parse it by the local parser of the stack machine,  and  parse it by the local parser of the stack machine,  and
 to interprete by the local interpreter.  to interpret by the local interpreter.
 If the exececution produces a result, it is pushed onto  If the execution produces a Output, it is pushed onto
 {\tt OperandStack}.  {\tt OperandStack}.
 If an error has occured,  Error2 Object is pushed onto the stack.  If an error has occurred,  Error2 Object is pushed onto the stack.
 OpenXM does not provide standard function names.  OpenXM does not provide standard function names.
 If this operation and {\tt SM\_popString} is implemented, the stack machine  If this operation and {\tt SM\_popString} is implemented, the stack machine
 can be used as an OX server.  is ready to be used as an OX server.
 */  */
   
 Stack before the request:  Stack before the request:
Line 295  Request: 
Line 301  Request: 
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result:  none.  Output:  none.
 /*&jp  /*&jp
 \noindent  \noindent
 »²¹Í: \  ¼Â¹ÔÁ°¤Î¥¹¥¿¥Ã¥¯¤Î¥Ç¡¼¥¿¤Ï,  »²¹Í: \  ¼Â¹ÔÁ°¤Î¥¹¥¿¥Ã¥¯¤Î¥Ç¡¼¥¿¤Ï,
 {\it String commandString} ¤Ê¤ë local stackmachine ¤Î object ¤È¤·¤Æ¥¹  {\it String commandString} ¤Ê¤ë local stack machine ¤Î object ¤È¤·¤Æ¥¹
 ¥¿¥Ã¥¯¾å¤Ë¤¢¤ë¤¬, TCP/IP ¤ÎÄÌ¿®Ï©¤Ç¤Ï, ¼¡¤Î¤è¤¦¤Ê¥Ç¡¼¥¿¤¬¤Þ¤º¤Ê¤¬¤ì¤Æ  ¥¿¥Ã¥¯¾å¤Ë¤¢¤ë¤¬, TCP/IP ¤ÎÄÌ¿®Ï©¤Ç¤Ï, ¼¡¤Î¤è¤¦¤Ê¥Ç¡¼¥¿¤¬¤Þ¤º¤Ê¤¬¤ì¤Æ
 {\it commandName} ¤¬¥¹¥¿¥Ã¥¯¤Ë push ¤µ¤ì¤ë:  {\it commandName} ¤¬¥¹¥¿¥Ã¥¯¤Ë push ¤µ¤ì¤ë:
 */  */
Line 325  SM_executeStringByLocalParserInBatchMode
Line 331  SM_executeStringByLocalParserInBatchMode
 /*&eg  /*&eg
 This is the same request as {\tt SM\_executeStringByLocalParser}  This is the same request as {\tt SM\_executeStringByLocalParser}
 except that it does not modify the stack. It pushes an Error2 Object  except that it does not modify the stack. It pushes an Error2 Object
 if an error has occured.  if an error has occurred.
 */  */
 \item  \item
 \begin{verbatim}  \begin{verbatim}
Line 343  to convert it into a character string according to the
Line 349  to convert it into a character string according to the
 of the local system, and to send the character string via TCP/IP stream.  of the local system, and to send the character string via TCP/IP stream.
 {\tt (char *)NULL} is returned when the stack is empty.  {\tt (char *)NULL} is returned when the stack is empty.
 The returned strings is sent as a CMO string data.  The returned strings is sent as a CMO string data.
 {\tt CMO\_ERROR2} should be returned if an error has occured.  {\tt CMO\_ERROR2} should be returned if an error has occurred.
 */  */
   
 Stack before the request:  Stack before the request:
Line 358  Request:
Line 364  Request:
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result:  Output:
 \begin{tabular}{|c|c|c|}  \hline  \begin{tabular}{|c|c|c|}  \hline
 {\tt int32 OX\_DATA} & {\tt int32 CMO\_STRING} & {\it size and the string s} \\  {\tt int32 OX\_DATA} & {\tt int32 CMO\_STRING} & {\it size and the string s} \\
 \hline  \hline
Line 397  Stack after the request:
Line 403  Stack after the request:
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result:  none.  Output:  none.
   
 \item  \item
 \begin{verbatim}  \begin{verbatim}
Line 411  SM_dupErrors
Line 417  SM_dupErrors
 It requests a server 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:  
 \begin{tabular}{|c|}  \hline  
 {\it Object} \\  
 \hline  
 \end{tabular}  
   
 Request:  Request:
 \begin{tabular}{|c|c|}  \hline  \begin{tabular}{|c|c|}  \hline
 {\tt int32 OX\_COMMAND} & {\tt int32 SM\_dupErrors} \\  {\tt int32 OX\_COMMAND} & {\tt int32 SM\_dupErrors} \\
Line 429  Stack after the request:
Line 429  Stack after the request:
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result: none.  Output: none.
 \end{enumerate}  \end{enumerate}
   
 \medbreak  \medbreak
Line 442  mathcap ¤ÎÌ䤤¹ç¤ï¤»¤ËÂФ·¤Æ, {\tt ox\_sm1} ¤Ï¼¡¤Î¤è¤¦
Line 442  mathcap ¤ÎÌ䤤¹ç¤ï¤»¤ËÂФ·¤Æ, {\tt ox\_sm1} ¤Ï¼¡¤Î¤è¤¦
 {\bf Example}: \  {\bf Example}: \
 {\tt ox\_sm1} returns the following data as its mathcap.  {\tt ox\_sm1} returns the following data as its mathcap.
 */  */
 %%Prog: [(cmoMathCap)] extension ::  %%Prog: [(cmoMathcap)] extension ::
 \begin{verbatim}  \begin{verbatim}
 Class.mathcap  Class.mathcap
  [ [199909080 , $Ox_system=ox_sm1.plain$ , $Version=2.990911$ ,   [ [199909080 , $Ox_system=ox_sm1.plain$ , $Version=2.990911$ ,
Line 454  Class.mathcap 
Line 454  Class.mathcap 
   
 /*&jp  /*&jp
 mathcap ¤Ï 3¤Ä¤ÎÍ×ÁǤò¤â¤Ä¥ê¥¹¥È¤Ç¤¢¤ë.  ¤Þ¤Å, ºÇ½é¤ÎÍ×ÁǤò¸«¤è¤¦.  mathcap ¤Ï 3¤Ä¤ÎÍ×ÁǤò¤â¤Ä¥ê¥¹¥È¤Ç¤¢¤ë.  ¤Þ¤Å, ºÇ½é¤ÎÍ×ÁǤò¸«¤è¤¦.
 Ox\_system ¤Ï open xxx ¥·¥¹¥Æ¥à̾¤Ç¤¢¤ë.  Æɤ߹þ¤à¥é¥¤¥Ö¥é¥ê¤¬¤Á¤¬¤Ã¤Æ  Ox\_system ¤Ï openXM ¥·¥¹¥Æ¥à̾¤Ç¤¢¤ë.  Æɤ߹þ¤à¥é¥¤¥Ö¥é¥ê¤¬¤Á¤¬¤Ã¤Æ
 ¤¤¤Æ, ´Ø¿ô̾(¤Þ¤¿¤Ï ¥·¥ó¥Ü¥ë)¤Î°ÕÌ£¤¬¤Á¤¬¤¦¤È¤­¤Ï¤³¤Î̾Á°¤â¤«¤¨¤ë. ¤¿  ¤¤¤Æ, ´Ø¿ô̾(¤Þ¤¿¤Ï ¥·¥ó¥Ü¥ë)¤Î°ÕÌ£¤¬¤Á¤¬¤¦¤È¤­¤Ï¤³¤Î̾Á°¤â¤«¤¨¤ë. ¤¿
 ¤È¤¨¤Ð, open math ¤Î basic content dictionary Âбþ¤Î´Ø¿ôÄêµÁ¥Þ¥¯¥í¤òÆÉ  ¤È¤¨¤Ð, open math ¤Î basic content dictionary Âбþ¤Î´Ø¿ôÄêµÁ¥Þ¥¯¥í¤òÆÉ
 ¤ß¤³¤ó¤À sm1 ¤Ï, ox\_sm1\_basicCD ¤Ê¤ë̾Á°¤Ë¤¹¤ë.  HOSTTYPEÃͤÏ, CPU  ¤ß¤³¤ó¤À sm1 ¤Ï, ox\_sm1\_basicCD ¤Ê¤ë̾Á°¤Ë¤¹¤ë.  HOSTTYPE ÃͤÏ, CPU
 ¤Î¼ïÎà¤ò¤¢¤é¤ï¤·unix ¤Ç¤Ï´Ä¶­ÊÑ¿ô\verb+$HOSTTYPE+ ¤ÎÃͤǤ¢¤ë.  2 ÈÖÌÜ  ¤Î¼ïÎà¤ò¤¢¤é¤ï¤·unix ¤Ç¤Ï´Ä¶­ÊÑ¿ô\verb+$HOSTTYPE+ ¤ÎÃͤǤ¢¤ë.  2 ÈÖÌÜ
 ¤ÎÍ×ÁÇ¤Ï ÍøÍѲÄǽ¤Ê SM ¥³¥Þ¥ó¥É¤ò¤¢¤Ä¤á¤¿¥ê¥¹¥È¤Ç¤¢¤ë.  3 ÈÖÌܤΥꥹ¥È  ¤ÎÍ×ÁÇ¤Ï ÍøÍѲÄǽ¤Ê SM ¥³¥Þ¥ó¥É¤ò¤¢¤Ä¤á¤¿¥ê¥¹¥È¤Ç¤¢¤ë.  3 ÈÖÌܤΥꥹ¥È
 ¤Ï, ½èÍý²Äǽ¤Ê¿ô³Ø¥Ç¡¼¥¿¤Î·Á¼°, ¤ª¤è¤ÓCMO¤Î¾ì¹ç¤Ê¤é½èÍý²Äǽ¤ÊCMO¤Î¥¿¥°  ¤Ï, ½èÍý²Äǽ¤Ê¿ô³Ø¥Ç¡¼¥¿¤Î·Á¼°, ¤ª¤è¤ÓCMO¤Î¾ì¹ç¤Ê¤é½èÍý²Äǽ¤ÊCMO¤Î¥¿¥°
Line 467  Ox\_system ¤Ï open xxx ¥·¥¹¥Æ¥à̾¤Ç¤¢¤ë.  Æɤ߹þ¤à¥é¥¤
Line 467  Ox\_system ¤Ï open xxx ¥·¥¹¥Æ¥à̾¤Ç¤¢¤ë.  Æɤ߹þ¤à¥é¥¤
 /*&eg  /*&eg
 A mathcap has three components. The first one contains informations  A mathcap has three components. The first one contains informations
 to identify the system and hosts on which the application runs.  to identify the system and hosts on which the application runs.
 In the above example, Ox\_system denotes the system name.  In the above example, {\tt Ox\_system} denotes the system name.
 HOSTTYPE represents the OS type and taken from \verb+$HOSTTYPE+  {\tt HOSTTYPE} represents the OS type and taken from \verb+$HOSTTYPE+
 enviroment variable.  enviroment variable.
 The second component consists of avaiable SM commands.  The second component consists of avaiable SM commands.
 The third component is a list of pairs. Each pair consists  The third component is a list of pairs. Each pair consists
Line 549  Each data has the following meaning.
Line 549  Each data has the following meaning.
 (OX\_DATA, (CMO\_STRING, 7, "12345 ;")).  (OX\_DATA, (CMO\_STRING, 7, "12345 ;")).
 \end{enumerate}  \end{enumerate}
   
 //&jp \subsubsection{¥°¥ë¡¼¥× SMobject/Basic1 ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿}  //&jp \subsubsection{¥°¥ë¡¼¥× SMobject/Basic ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿}
 //&eg \subsubsection{Operators in the group SMobject/Basic1}  //&eg \subsubsection{Operators in the group SMobject/Basic}
   
 \begin{enumerate}  \begin{enumerate}
 \item  \item
Line 558  Each data has the following meaning.
Line 558  Each data has the following meaning.
 SM_pops  SM_pops
 \end{verbatim}  \end{verbatim}
 /*&jp  /*&jp
 operand stack ¤è¤ê, {\it n} ¸Ä¤Î¸µ ({\it obj1, obj2, $\ldots$, objn})  operand stack ¤è¤ê, {\it n} ¸Ä¤Î¸µ ({\it obj1, obj2, $\ldots$, objn}
 ¤ò pop ¤·¤Æ¼Î¤Æ¤ë.  ¤ò pop ¤·¤Æ¼Î¤Æ¤ë.
 */  */
 /*&eg  /*&eg
Line 566  It requests a server to pop {\it n} and to discard ele
Line 566  It requests a server to pop {\it n} and to discard ele
 $\ldots$, objn}) from the stack.  $\ldots$, objn}) from the stack.
 */  */
   
 //&jp Stack before the request: (±¦¤¬ stack ¤Î¥È¥Ã¥×¤Ç¤¢¤ë.) \\  //&jp Stack before the request: \\
 //&eg Stack before the request: (The rightmost one is the top of the stack.) \\  //&eg Stack before the request: \\
 \begin{tabular}{|c|c|c|c|c|}  \hline  \begin{tabular}{|c|c|c|c|c|}  \hline
 {\it obj1} & {\it  obj2}  & $\cdots$ & {\it objn}  &{\it INT32 n} \\  {\it obj1} & {\it  obj2}  & $\cdots$ & {\it objn}  &{\it Integer32 n} \\
 \hline  \hline
 \end{tabular}  \end{tabular}
   
Line 579  Request:
Line 579  Request:
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result:  none.  Output:  none.
   
   
 \item  \item
Line 594  bind ¤¹¤ë.  Àµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê¤é -1 ¤ò¤â¤É¤
Line 594  bind ¤¹¤ë.  Àµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê¤é -1 ¤ò¤â¤É¤
 */  */
 /*&eg  /*&eg
 It requests a server to pop {\it name}, to pop {\it obj}, and to  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.  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.  of the server.
   If an error has occurred {\tt CMO\_ERROR2} is pushed onto the stack.
 */  */
 //&jp Stack before the request: (±¦¤¬ stack ¤Î top.)  //&jp Stack before the request:
 //&eg Stack before the request: (The rightmost one is the top of the stack.)  //&eg Stack before the request:
 \begin{tabular}{|c|c|}  \hline  \begin{tabular}{|c|c|}  \hline
 {\it obj} & {\it String name}  \\  {\it obj} & {\it String name}  \\
 \hline  \hline
Line 610  Request:
Line 611  Request:
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result: none.  Output: none.
   
 \item  \item
 \begin{verbatim}  \begin{verbatim}
Line 619  SM_evalName
Line 620  SM_evalName
   
 /*&jp  /*&jp
 ¸½ºß¤Î̾Á°¶õ´Ö¤ÇÊÑ¿ô {\it name} ¤òɾ²Á¤¹¤ë.  É¾²Á¤Î·ë²Ì {\it  ¸½ºß¤Î̾Á°¶õ´Ö¤ÇÊÑ¿ô {\it name} ¤òɾ²Á¤¹¤ë.  É¾²Á¤Î·ë²Ì {\it
 resultObj} ¤ò¥¹¥¿¥Ã¥¯¤ØÌ᤹.  ´Ø¿ô¼«ÂΤÏÀµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê  OutputObj} ¤ò¥¹¥¿¥Ã¥¯¤ØÌ᤹.  ´Ø¿ô¼«ÂΤÏÀµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê
 ¤é -1 ¤ò¤â¤É¤¹.  TCP/IP ¤Î¾ì¹ç, °Û¾ï½ªÎ»¤Î¾ì¹ç¤Î¤ß {\tt CMO\_ERROR2}  ¤é -1 ¤ò¤â¤É¤¹.  TCP/IP ¤Î¾ì¹ç, °Û¾ï½ªÎ»¤Î¾ì¹ç¤Î¤ß {\tt CMO\_ERROR2}
 ¤ò stack ¤Ø push ¤¹¤ë.  ¤ò stack ¤Ø push ¤¹¤ë.
 */  */
   
 /*&eg  /*&eg
 It requests a server to pop {\it name} and to evaluate a variable  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 name} in the current name space. The Output of the evaluation
 {\it resultObj} is pushed to the stack.  {\it OutputObj} is pushed to the stack.
 If an error has occured {\tt CMO\_ERROR2} is pushed to the stack.  If an error has occurred {\tt CMO\_ERROR2} is pushed to the stack.
 */  */
   
 //&jp Stack before the request: (±¦¤¬ stack ¤Î top.)  //&jp Stack before the request:
 //&eg Stack before the request: (The rightmost one is the top of the stack.)  //&eg Stack before the request:
 \begin{tabular}{|c|}  \hline  \begin{tabular}{|c|}  \hline
 {\it String name}  \\  {\it String name}  \\
 \hline  \hline
Line 644  Request:
Line 645  Request:
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 //&jp Stack after the request: (±¦¤¬ stack ¤Î top.)  //&jp Stack after the request:
 //&eg Stack after the request: (The rightmost one is the top of the stack.)  //&eg Stack after the request:
 \begin{tabular}{|c|}  \hline  \begin{tabular}{|c|}  \hline
 {\it resultObj} \\  {\it OutputObj} \\
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result:  none.  Output:  none.
   
 \item  \item
 \begin{verbatim}  \begin{verbatim}
Line 667  It requests a server to pop {\it s} as a function name
Line 668  It requests a server to pop {\it s} as a function name
 to pop {\it n} as the number of arguments and to execute  to pop {\it n} as the number of arguments and to execute
 a local function {\it s} with {\it n} arguments popped from  a local function {\it s} with {\it n} arguments popped from
 the stack.  the stack.
 If an error has occured {\tt CMO\_ERROR2} is pushed to the stack.  If an error has occurred {\tt CMO\_ERROR2} is pushed to the stack.
 */  */
   
 //&jp Stack before the request: (±¦¤¬ stack ¤Î top.) \\  //&jp Stack before the request: \\
 //&eg Stack before the request: (±¦¤¬ stack ¤Î top.) \\  //&eg Stack before the request: \\
 \begin{tabular}{|c|c|c|c|c|}  \hline  \begin{tabular}{|c|c|c|c|c|}  \hline
 {\it objn} & $\cdots$ & {\it obj1} & {\it INT32 n} & {\it String s} \\  {\it objn} & $\cdots$ & {\it obj1} & {\it INT32 n} & {\it String s} \\
 \hline  \hline
Line 684  Request:
Line 685  Request:
 \end{tabular}  \end{tabular}
   
 //&jp Stack after the request: ´Ø¿ô¼Â¹Ô¤Î·ë²Ì.  //&jp Stack after the request: ´Ø¿ô¼Â¹Ô¤Î·ë²Ì.
 //&eg Stack after the request: The result of the execution.  //&eg Stack after the request: The Output of the execution.
   
 Result: none.  Output: none.
   
 \item  \item
 \begin{verbatim}  \begin{verbatim}
Line 730  Request:
Line 731  Request:
 \hline  \hline
 \end{tabular}  \end{tabular}
   
 Result:  Output:
 \begin{tabular}{|c|c|}  \hline  \begin{tabular}{|c|c|}  \hline
 {\tt int32 OX\_DATA} &   {\it Serialized CMO} \\  {\tt int32 OX\_DATA} &   {\it Serialized CMO} \\
 \hline  \hline

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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