=================================================================== RCS file: /home/cvs/OpenXM/doc/issac2000/openxm-stackmachines.tex,v retrieving revision 1.2 retrieving revision 1.8 diff -u -p -r1.2 -r1.8 --- OpenXM/doc/issac2000/openxm-stackmachines.tex 2000/01/02 07:32:12 1.2 +++ OpenXM/doc/issac2000/openxm-stackmachines.tex 2000/01/15 03:46:27 1.8 @@ -1,18 +1,18 @@ -% $OpenXM: OpenXM/doc/issac2000/openxm-stackmachines.tex,v 1.1 1999/12/23 10:25:09 takayama Exp $ +% $OpenXM: OpenXM/doc/issac2000/openxm-stackmachines.tex,v 1.7 2000/01/14 10:45:10 tam Exp $ -\section{OpenXM Stackmachines} (Tamura) +\section{OpenXM Stack machines}\label{sec:ox-stackmachines} (Tamura) -In OpenXM specification, all servers are stackmachines. -These are called OpenXM stachmachines. -When a server ox\_xyz gets a OX data message, -it translates the data into its own object and push the object -on the stack. -The translation scheme together with mathematical operation definitions -of the system ox\_xyz is called the {\it phrase dictionary} of -ox\_xyz following the idea of OpenMath. +In OpenXM specification, all servers are stack machines. +%These are called OpenXM stack machines. +When a server ox\_xyz gets an OX data message, +it translates the data into an object of its local mathematical system +and push the object on the stack. +Following the OpenMath specification, +the translation scheme together with definitions of mathematical operations +of the system ox\_xyz is called the {\it PhraseBook} of ox\_xyz. -OX command message starts with the int32 tag OX\_COMMAND. -The body is OpenXM stackmachine operation code expressed by int32. +Any OX command message starts with the int32 tag OX\_COMMAND. +The body is an OpenXM stack machine operation code expressed by int32. The codes are listed below. \begin{verbatim} #define SM_popSerializedLocalObject 258 @@ -40,18 +40,20 @@ The codes are listed below. \end{verbatim} OpenXM does not have a standard for mathematical operation sets -while it is one of the main future projects of \cite{gap}. -Each OpenXM server has its own mathematical operation set. -Mathematical operator name, such as fctr (asir factorization command), +while it is a work in progress in \cite{gap}. +Each OpenXM server has its own set of mathematical operations, +which are performed as follows. +Mathematical operator name, such as {\tt fctr} (asir factorization command), is pushed as a string, -SM\_executeFunction pops the operator name, the number of arguments -and arguments, -evaluates the operator, and pushes the result on the stack. +the stack machine command +{\tt SM\_executeFunction} (269) pops the operator name, the number of arguments +and arguments, and +the OX stack machine evaluates the operator, and pushes the result onto the stack. For example, the following code factorizes $x^{100}-1$ by calling -ox\_asir. +ox\_asir from asir. \begin{verbatim} P = ox_launch(); -ox_push_cmo(P,x^100-1); ox_push_cmo(P,ox_int32(1)); +ox_push_cmo(P,x^100-1); ox_push_cmo(P,ntoint32(1)); ox_push_cmd(P,269); Ans = ox_pop_cmo(P); \end{verbatim} @@ -66,12 +68,13 @@ which caused the error, and an error message. error([8,fctr : invalid argument]) \end{verbatim} -Errors are not sent to the client except a SM\_pop* command is received. -Open XM stackmachines works in the asynchoronous mode which is similar +OpenXM server won't send error messages to the client +except when it receives a SM\_pop* command. +OX stackmachines works in the asynchronous mode which is similar to X servers. -For servers of graphic applications, it is an advantageous feature. +For servers for graphic applications, it is an advantageous feature. It is also easy to emulate RPC and a web server for MCP \cite{iamc} -on our OpenXM stackmachines. +on our asynchronous OX stackmachines.