version 1.1, 2000/01/20 07:47:30 |
version 1.3, 2000/01/21 09:55:21 |
|
|
%#!platex |
%#!platex |
%% $OpenXM$ |
%% $OpenXM: OpenXM/src/ox_math/documents/math2ox.tex,v 1.2 2000/01/20 15:09:24 ohara Exp $ |
|
|
\documentclass{article} |
\documentclass{article} |
\title{Mathematica Client for Open XM} |
\title{Mathematica Client for Open XM} |
Line 18 communication with Mathematica by MathLink. The math2 |
|
Line 18 communication with Mathematica by MathLink. The math2 |
|
commands and translate them to OX messages. |
commands and translate them to OX messages. |
|
|
The {\tt math2ox} has the following commands:\\ |
The {\tt math2ox} has the following commands:\\ |
{\tt OxStart[s\_String], OxStartInsecure[s\_String], |
{\tt OxStart[s\_String], |
|
OxStartInsecure[s\_String, p\_Integer, q\_Integer], |
|
OxStartRemoteSSH[s\_String, t\_String], |
OxExecuteString[s\_String], OxParse[s\_String], OxGet[], OxPopCMO[], |
OxExecuteString[s\_String], OxParse[s\_String], OxGet[], OxPopCMO[], |
OxPopString[], OxClose[], OxReset[]}. |
OxPopString[], OxClose[], OxReset[]}. |
|
|
Line 41 In[2] := OxStartInsecure["water.s.kanazawa-u.ac.jp", 1 |
|
Line 43 In[2] := OxStartInsecure["water.s.kanazawa-u.ac.jp", 1 |
|
The mode is not secured but you can crypt data stream by using ssh |
The mode is not secured but you can crypt data stream by using ssh |
(Secure SHell). |
(Secure SHell). |
\begin{verbatim} |
\begin{verbatim} |
In[2] := OxStartInsecureSSH["ox_sm1", "water.s.kanazawa-u.ac.jp"] |
In[3] := Run["ssh -f water ox -insecure -ox ox_sm1 -host water"] |
\end{verbatim} |
\end{verbatim} |
|
|
Third, let us send an OX message to the OX server. |
Third, let us send an OX message to the OX server. |
We can send an OX message written in OX/CMO expressions. |
We can send an OX message written in OX/CMO expressions. |
\begin{verbatim} |
\begin{verbatim} |
In[3] := OxParse["(CMO_LIST, (CMO_STRING, "hello world"), (CMO_ZERO))"] |
In[4] := OxParse["(CMO_LIST, (CMO_STRING, "hello world"), (CMO_ZERO))"] |
In[4] := OxParse["(OX_COMMAND, (SM_popCMO))"] |
In[5] := OxParse["(OX_COMMAND, (SM_popCMO))"] |
\end{verbatim} |
\end{verbatim} |
If the expression is illegal, then nothing is sent. |
If the expression is illegal, then nothing is sent. |
|
|
Line 57 OX stack machine returns the top of the stack to the { |
|
Line 59 OX stack machine returns the top of the stack to the { |
|
Then, in order to receive the message, we need to call the {\tt OxGet[]} |
Then, in order to receive the message, we need to call the {\tt OxGet[]} |
function. |
function. |
\begin{verbatim} |
\begin{verbatim} |
In[5] := OxGet[] |
In[6] := OxGet[] |
\end{verbatim} |
\end{verbatim} |
|
|
If we do not use the {\tt OxParse} function and use the {\tt OxPopCMO[]} |
If we do not use the {\tt OxParse} function and use the {\tt OxPopCMO[]} |
function, then we do not need to call the {\tt OxGet[]}. |
function, then we do not need to call the {\tt OxGet[]}. |
\begin{verbatim} |
\begin{verbatim} |
In[4] := OxPopCMO[] |
In[5] := OxPopCMO[] |
\end{verbatim} |
\end{verbatim} |
|
|
Fourth, if we send a command expressed in the local language of the OX |
Fourth, if we send a command expressed in the local language of the OX |
Line 73 Last, let us close the connection. |
|
Line 75 Last, let us close the connection. |
|
\begin{verbatim} |
\begin{verbatim} |
In[7] := OxClose[] |
In[7] := OxClose[] |
\end{verbatim} |
\end{verbatim} |
|
|
|
\section{Examples} |
|
|
|
\begin{enumerate} |
|
\item |
|
{\tt OpenXM/lib/math/primadec.m} is a Mathematica program |
|
to make primary ideal decompositions by calling |
|
{\tt ox\_asir}. |
|
As to usages, see comments in this file. |
|
\item |
|
{\tt OpenXM/lib/math/beta.m} is a Mathematica program |
|
to get beta-nbc bases by calling {\tt ox\_asir}. |
|
\end{enumerate} |
|
|
|
|
|
|
\appendix |
\appendix |
|
|