version 1.3, 2000/01/03 04:27:52 |
version 1.4, 2000/01/07 09:56:08 |
|
|
% $OpenXM: OpenXM/doc/issac2000/openxm-stackmachines.tex,v 1.2 2000/01/02 07:32:12 takayama Exp $ |
% $OpenXM: OpenXM/doc/issac2000/openxm-stackmachines.tex,v 1.3 2000/01/03 04:27:52 takayama Exp $ |
|
|
\section{OpenXM Stackmachines} (Tamura) |
\section{OpenXM Stack machines} (Tamura) |
|
|
In OpenXM specification, all servers are stackmachines. |
In OpenXM specification, all servers are stack machines. |
These are called OX stachmachines. |
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 its own object and push the object |
it translates the data into its own object and push the object |
on the stack. |
on the stack. |
Line 13 of the system ox\_xyz is called the {\it phrase dictio |
|
Line 13 of the system ox\_xyz is called the {\it phrase dictio |
|
ox\_xyz following the OpenMath specification. |
ox\_xyz following the OpenMath specification. |
|
|
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 OX stackmachine operation code expressed by int32. |
The body is OX 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 46 Each OpenXM server has its own mathematical operation |
|
Line 46 Each OpenXM server has its own mathematical operation |
|
Mathematical operations are performed as follows. |
Mathematical operations are performed as follows. |
Mathematical operator name, such as fctr (asir factorization command), |
Mathematical operator name, such as fctr (asir factorization command), |
is pushed as a string, |
is pushed as a string, |
the stackmachine command |
the stack machine command |
SM\_executeFunction (269) pops the operator name, the number of arguments |
SM\_executeFunction (269) pops the operator name, the number of arguments |
and arguments, and |
and arguments, and |
the OX stackmachine evaluates the operator, and pushes the result on the stack. |
the OX stack machine evaluates the operator, and pushes the result on the stack. |
For example, the following code factorizes $x^{100}-1$ by calling |
For example, the following code factorizes $x^{100}-1$ by calling |
ox\_asir from asir. |
ox\_asir from asir. |
\begin{verbatim} |
\begin{verbatim} |