| version 1.6, 2000/01/16 03:15:49 |
version 1.9, 2000/01/17 00:48:06 |
|
|
| % $OpenXM: OpenXM/doc/issac2000/openxm-clients.tex,v 1.5 2000/01/15 06:26:06 takayama Exp $ |
% $OpenXM: OpenXM/doc/issac2000/openxm-clients.tex,v 1.8 2000/01/16 10:58:19 takayama Exp $ |
| |
|
| \section{OpenXM Clients} |
\section{OpenXM Clients} |
| |
|
| Line 56 to avoid blocking on read operations. |
|
| Line 56 to avoid blocking on read operations. |
|
| \subsection{Mathematica} |
\subsection{Mathematica} |
| |
|
| We provide an OpenXM client {\tt math2ox} written as an external module |
We provide an OpenXM client {\tt math2ox} written as an external module |
| for Mathematica. Our client communicates with Mathematica by MathLink and |
for Mathematica. |
| with an OpenXM server by OpenXM protocols. |
The module {\tt math2ox} communicates with Mathematica by MathLink and |
| |
with any OpenXM server by the OpenXM protocol. |
| By using the module {\tt math2ox}, |
By using the module {\tt math2ox}, |
| we can call OpenXM servers from Mathematica; |
we can call OpenXM servers from Mathematica; |
| here is an example of a computation of the de Rham cohomology groups |
here is a demonstration of a computation of the de Rham cohomology groups |
| of ${\bf C}^2 \setminus V(x^3-y^2)$. |
of ${\bf C}^2 \setminus V(x^3-y^2)$ from Mathematica. |
| {\footnotesize |
{\footnotesize |
| \begin{verbatim} |
\begin{verbatim} |
| In[1]:= Install["math2ox"] |
In[1]:= Install["math2ox"] |
| In[2]:= OxStart["../lib/sm1/bin/ox_sm1_forAsir"] |
In[2]:= OxStart["../lib/sm1/bin/ox_sm1_forAsir"] |
| In[3]:= OxExecute[" [(x^3-y^2) (x,y)] deRham "] |
In[3]:= OxExecute[" [(x^3-y^2) (x,y)] deRham "] |
| In[4]:= OxPopString[] |
In[4]:= OxPopString[] |
| Out[4]= [ 1 , 1 , 0 ] |
Out[4]= [ 1 , 1 , 0 ] (* The dimension of |
| |
cohomology groups *) |
| \end{verbatim} |
\end{verbatim} |
| } |
} |
| |
|
| \subsubsection{Functions} |
The {\tt math2ox} adds the following functions to Mathematica. |
| |
|
| The {\tt math2ox} has the following functions. |
|
| \begin{quote} |
\begin{quote} |
| {\tt OxStart[s\_String]} \\ |
{\tt OxStart[s\_String]} \\ |
| {\tt OxStartInsecure[s\_String]} \\ |
{\tt OxStartInsecure[s\_String]} \\ |
| Line 86 The {\tt math2ox} has the following functions. |
|
| Line 86 The {\tt math2ox} has the following functions. |
|
| {\tt OxClose[]} \\ |
{\tt OxClose[]} \\ |
| {\tt OxReset[]} |
{\tt OxReset[]} |
| \end{quote} |
\end{quote} |
| For example, {\tt OxPopCMO[]} executes the same operation |
Although the list of functions speaks itself, |
| as {\tt ox\_pop\_cmo()} in Risa/Asir. |
we add some explanations. |
| By using the {\tt OxParse[]} function, one can send suitable OX messages, |
The function {\tt OxPopCMO[]} executes the same operation |
| written by the OX expression, to a server. OX expressions are |
as {\tt ox\_pop\_cmo()} in Risa/Asir; |
| Lisp-like expressions for OX messages and are defined |
it pops data from the server stack. |
| in~\cite{noro-takayama}. |
|
| The {\tt OxGet[]} receives an OX data message |
The {\tt OxGet[]} receives an OX data message |
| and returns its translation to an local object. |
and returns its translation to an local object. |
| |
The function {\tt OxParse[]} helps debugging to connect Mathematica |
| |
and ox servers. |
| |
By using the function, one can send OX messages, |
| |
written by the OX expression, to a server. |
| |
OX expressions are Lisp-like expressions for OX messages and are defined |
| |
in~\cite{noro-takayama}. |