[BACK]Return to openxm-clients.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / calc2000

File: [local] / OpenXM / doc / calc2000 / openxm-clients.tex (download)

Revision 1.2, Wed Apr 26 08:18:31 2000 UTC (24 years ago) by noro
Branch: MAIN
CVS Tags: maekawa-ipv6, R_1_3_1-2, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, RELEASE_1_1_3, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9
Changes since 1.1: +11 -25 lines

Section 1 : Minor corrections.
Section 2 : Added motivations after shortening them.
            Added the 4-th goal.
Section 7 : Shortened the description.

% $OpenXM: OpenXM/doc/calc2000/openxm-clients.tex,v 1.2 2000/04/26 08:18:31 noro Exp $

\section{OpenXM Clients}    

\subsection{Risa/Asir}

Risa/Asir provides a launcher {\tt ox\_launch}
to invoke an OpenXM server and to set up the
communication between the server and itself.
Fundamental operations on OpenXM servers are 
exchange of OX data and sending of stack machine commands.
As a client, Asir provides the following functions
to execute these primitive operations:
{\tt ox\_push\_cmo()} for pushing data,
{\tt ox\_push\_cmd()} for sending a stack machine command
and {\tt ox\_get()} for receiving data from a stream.

Some operations including the reset operation are implemented by
combining these primitives.  Among them, frequently used ones are
provided as built-in functions. 
{\tt ox\_pop\_cmo()} receives the data on the stack of a server.
{\tt ox\_cmo\_rpc()} requests a server to execute a function.
{\tt ox\_reset()} completes
the operations stated in Section \ref{control}.
{\tt ox\_select()} is provided to detect if streams are ready for
reading to avoid blocking on read operations.

\subsection{Mathematica}

We provide an OpenXM client {\tt math2ox} written as an external module
for Mathematica.  
The module {\tt math2ox} communicates with Mathematica by MathLink and
with any OpenXM server by the OpenXM protocol.  
By using the module {\tt math2ox},
we can call OpenXM servers from Mathematica;
here is a demonstration of a computation of the de Rham cohomology groups
of ${\bf C}^2 \setminus V(x^3-y^2)$ from Mathematica.

{\footnotesize
\begin{verbatim}
In[1]:= Install["math2ox"]
In[2]:= OxStart["../lib/sm1/bin/ox_sm1_forAsir"]
In[3]:= OxExecute[" [(x^3-y^2) (x,y)] deRham "]
In[4]:= OxPopString[]
Out[4]=  [ 1 , 1 , 0 ]  (* The dimension of cohomology groups *)
\end{verbatim}
}

\noindent
The {\tt math2ox} adds the following functions to Mathematica.
\begin{quote}
{\tt OxStart[s\_String]},
{\tt OxStartInsecure[s\_String]} \\
{\tt OxExecuteString[s\_String]},
{\tt OxParse[s\_String]},
{\tt OxGet[]},
{\tt OxPopCMO[]},
{\tt OxPopString[]},
{\tt OxClose[]},
{\tt OxReset[]}
\end{quote}
Although the list of functions speaks itself,
we add some explanations.
The function {\tt OxPopCMO[]} executes the same operation
as {\tt ox\_pop\_cmo()} in Risa/Asir;
it pops data from the server stack.
The {\tt OxGet[]} receives an OX data message
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}.