| version 1.1, 2001/06/19 07:32:58 |
version 1.3, 2001/06/21 00:15:34 |
|
|
| % $OpenXM$ |
% $OpenXM: OpenXM/doc/ascm2001p/openxm-stackmachines.tex,v 1.2 2001/06/20 05:42:47 takayama Exp $ |
| |
|
| \section{OpenXM Stack machines}\label{sec:ox-stackmachines} |
\section{OpenXM Stack machines}\label{sec:ox-stackmachines} |
| |
|
| In OpenXM specification, all servers are stack machines. |
In the OpenXM specification, all servers are stack machines. |
| %These are called OpenXM stack machines. |
%These are called OpenXM stack machines. |
| When a server ox\_xyz gets an OX data message, |
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 |
|
|
| {\tt OX\_DATA} stands for {\tt OX\_DATA} header and |
{\tt OX\_DATA} stands for {\tt OX\_DATA} header and |
| {\tt (CMO\_ZZ,1)} is a body standing for $1$ expressed |
{\tt (CMO\_ZZ,1)} is a body standing for $1$ expressed |
| by the CMO. |
by the CMO. |
| The server translates {\tt (CMO\_ZZ, 1)} to its internal object of |
The server translates {\tt (CMO\_ZZ,1)} to its internal object for |
| the integer $1$ |
the integer $1$ |
| and pushes the object onto the stack. |
and pushes the object onto the stack. |
| |
|
| Line 64 is pushed as a string. |
|
| Line 64 is pushed as a string. |
|
| Finally, the stack machine command |
Finally, the stack machine command |
| {\tt SM\_executeFunction} evaluates the operator and |
{\tt SM\_executeFunction} evaluates the operator and |
| pushes the result onto the stack |
pushes the result onto the stack |
| after poping the operator name, the number of arguments |
after popping 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. |
| Line 87 instead of a result of the computation. |
|
| Line 87 instead of a result of the computation. |
|
| %error([8,fctr : invalid argument]) |
%error([8,fctr : invalid argument]) |
| %\end{verbatim} |
%\end{verbatim} |
| |
|
| OpenXM server won't send error messages to the client |
OpenXM server does not 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 stack machines work in the asynchronous mode which is similar |
OX stack machines work in the asynchronous mode which is similar |
| to X servers. |
to X servers. |