[BACK]Return to openxm-stackmachines.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / issac2000

Diff for /OpenXM/doc/issac2000/openxm-stackmachines.tex between version 1.9 and 1.10

version 1.9, 2000/01/15 12:18:42 version 1.10, 2000/01/16 06:02:41
Line 1 
Line 1 
 % $OpenXM: OpenXM/doc/issac2000/openxm-stackmachines.tex,v 1.8 2000/01/15 03:46:27 noro Exp $  % $OpenXM: OpenXM/doc/issac2000/openxm-stackmachines.tex,v 1.9 2000/01/15 12:18:42 takayama Exp $
   
 \section{OpenXM Stack machines}\label{sec:ox-stackmachines}  \section{OpenXM Stack machines}\label{sec:ox-stackmachines}
   
Line 8  When a server ox\_xyz gets an OX data message,
Line 8  When a server ox\_xyz gets an OX data message,
 it translates the data into a local object of ox\_xyz  it translates the data into a local object of ox\_xyz
 and pushes the object onto the stack.  and pushes the object onto the stack.
 According to the OpenMath specification,  According to the OpenMath specification,
 the translation scheme together with definitions of mathematical operations  the translation scheme
 of the system ox\_xyz is called the {\it PhraseBook} of ox\_xyz.  %% together with definitions of mathematical operations
   %% of the system ox\_xyz
   is called the {\it PhraseBook} of ox\_xyz.
   For example, the Asir command {\tt ox\_push\_cmo(P,1)}
   (push integer $1$ onto the server $P$)
   sends an OX data message
   {\tt (OX\_DATA,(CMO\_ZZ,1))} to the server $P$.
   Here,
   {\tt OX\_DATA} stands for {\tt OX\_DATA} header and
   {\tt (CMO\_ZZ,1)} is a body standing for $1$ expressed
   by the CMO.
   The server tranlates {\tt (CMO\_ZZ, 1)} to its internal object of
   the integer  $1$
   and pushes the object onto the stack.
   
   If the server gets an {\it OX command} message, then the server
   executes the command.
 Any OX command message starts with the int32 tag OX\_COMMAND.  Any OX command message starts with the int32 tag OX\_COMMAND.
 The body is an OpenXM stack machine operation code expressed by int32.  The body is a stack machine operation code expressed by int32.
 The codes are listed below.  The codes are listed below.
 \begin{verbatim}  \begin{verbatim}
 #define SM_popSerializedLocalObject               258  #define SM_popSerializedLocalObject               258
Line 45  First, arguments for a mathematical operation
Line 60  First, arguments for a mathematical operation
 and the number of the arguments are pushed.  and the number of the arguments are pushed.
 Second,  Second,
 the mathematical operator name,  the mathematical operator name,
 such as {\tt fctr} (asir factorization command),  such as {\tt fctr} (the factorization command of Asir),
 is pushed as a string.  is pushed as a string.
 Finally, the stack machine command  Finally, the stack machine command
 {\tt SM\_executeFunction} (269) evaluates the operator and  {\tt SM\_executeFunction} (269) evaluates the operator and
Line 53  pushes the result onto the stack
Line 68  pushes the result onto the stack
 after poping the operator name, the number of arguments  after poping the operator name, the number of arguments
 and arguments.  and arguments.
 For example, the following code factorizes $x^{100}-1$ by calling  For example, the following code factorizes $x^{100}-1$ by calling
 {\tt ox\_asir} from asir.  {\tt ox\_asir} from Asir.
 \begin{verbatim}  \begin{verbatim}
 P = ox_launch();  P = ox_launch();
 ox_push_cmo(P,x^100-1); ox_push_cmo(P,ntoint32(1));  ox_push_cmo(P,x^100-1); ox_push_cmo(P,ntoint32(1));
Line 62  Ans = ox_pop_cmo(P);
Line 77  Ans = ox_pop_cmo(P);
 \end{verbatim}  \end{verbatim}
   
 When an error has occurred on an OpenXM server,  When an error has occurred on an OpenXM server,
 an error object is pushed to the stack instead of a result of the computation.  an error object is pushed onto the stack
   instead of a result of the computation.
 The error object consists of the serial number of the OX message  The error object consists of the serial number of the OX message
 which caused the error, and an error message.  which caused the error, and an error message.
 \begin{verbatim}  \begin{verbatim}
Line 75  OpenXM server won't send error messages to the client
Line 91  OpenXM server won't send error messages to the client
 except when it receives a {\tt SM\_pop*} command.  except when it receives a {\tt SM\_pop*} command.
 OX stackmachines work in the asynchronous mode which is similar  OX stackmachines work in the asynchronous mode which is similar
 to X servers.  to X servers.
 For servers for graphic and sound applications, it is an advantageous feature.  For servers of graphic and sound applications,
 It is also easy to emulate RPC and a web server for MCP \cite{iamc}  it may be an advantageous feature.
   It is also possible to emulate RPC and a web server for MCP \cite{iamc}
 on our asynchronous OX stackmachines.  on our asynchronous OX stackmachines.
   
   

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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