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

Annotation of OpenXM/doc/ascm2001p/openxm-clients.tex, Revision 1.1

1.1     ! noro        1: % $OpenXM$
        !             2:
        !             3: \section{OpenXM Clients}
        !             4:
        !             5: \subsection{Risa/Asir}
        !             6:
        !             7: Risa/Asir provides a launcher {\tt ox\_launch}
        !             8: to invoke an OpenXM server and to set up the
        !             9: communication between the server and itself.
        !            10: %Fundamental operations on OpenXM servers are
        !            11: %exchange of OX data and sending of stack machine commands.
        !            12: As a client, Asir provides the following functions
        !            13: to execute these primitive operations:
        !            14: {\tt ox\_push\_cmo()} for pushing data,
        !            15: {\tt ox\_push\_cmd()} for sending a stack machine command
        !            16: and {\tt ox\_get()} for receiving data from a stream.
        !            17: Some operations including the reset operation {\tt ox\_reset()}
        !            18: are implemented by combining these primitives.
        !            19: %
        !            20: %Among them, frequently used ones are
        !            21: %provided as built-in functions. We show some of them.
        !            22: %
        !            23: %\begin{itemize}
        !            24: %\item {\tt ox\_pop\_cmo()}
        !            25: %
        !            26: %It requests a server to send data on the stack to the stream, then
        !            27: %it receives the data from the stream.
        !            28: %
        !            29: %\item {\tt ox\_cmo\_rpc()}
        !            30: %
        !            31: %After pushing the name of a function, arguments and the number of the
        !            32: %arguments to the stack of a server, it requests the server to execute
        !            33: %the function. It does not wait the termination of the function call.
        !            34: %
        !            35: %\item {\tt ox\_reset()}
        !            36: %
        !            37: %After sending {\tt SM\_control\_reset\_connection} to a control server,
        !            38: %it completes the operations stated in Section \ref{control}.
        !            39: %\end{itemize}
        !            40: Furthermore {\tt ox\_select()} is provided to detect if streams are ready for
        !            41: reading. It is implemented by the {\tt select()} system call and is used
        !            42: to avoid blocking on read operations.
        !            43:
        !            44: \subsection{Mathematica}
        !            45:
        !            46: We provide an OpenXM client {\tt math2ox} written as an external module
        !            47: for Mathematica.
        !            48: The module {\tt math2ox} communicates with Mathematica by MathLink and
        !            49: with any OpenXM server by the OpenXM protocol.
        !            50: By using the module {\tt math2ox},
        !            51: we can call OpenXM servers from Mathematica;
        !            52: %here is a demonstration of a computation of the de Rham cohomology groups
        !            53: %of ${\bf C}^2 \setminus V(x^3-y^2)$ from Mathematica.
        !            54: %\begin{verbatim}
        !            55: %In[1]:= Install["math2ox"]
        !            56: %In[2]:= OxStart["../lib/sm1/bin/ox_sm1_forAsir"]
        !            57: %In[3]:= OxExecute[" [(x^3-y^2) (x,y)] deRham "]
        !            58: %In[4]:= OxPopString[]
        !            59: %Out[4]=  [ 1 , 1 , 0 ]  (* The dimension of cohomology groups *)
        !            60: %\end{verbatim}
        !            61: The {\tt math2ox} adds the following functions to Mathematica:\\
        !            62: {\tt OxStart[]},
        !            63: {\tt OxStartInsecure[]},
        !            64: {\tt OxExecuteString[]}
        !            65: {\tt OxParse[]},
        !            66: {\tt OxGet[]},
        !            67: {\tt OxPopCMO[]},
        !            68: {\tt OxPopString[]},
        !            69: {\tt OxClose[]},
        !            70: {\tt OxReset[]}
        !            71: %Although the list of functions speaks itself,
        !            72: %we add some explanations.
        !            73: %The function {\tt OxPopCMO[]} executes the same operation
        !            74: %as {\tt ox\_pop\_cmo()} in Risa/Asir;
        !            75: %it pops data from the server stack.
        !            76: %The {\tt OxGet[]} receives an OX data message
        !            77: %and returns its translation to an local object.
        !            78: %The function {\tt OxParse[]} helps debugging to connect Mathematica
        !            79: %and ox servers.
        !            80:
        !            81: %By using the function, one can send OX messages,
        !            82: %written by the OX expression, to a server.
        !            83: %OX expressions are Lisp-like expressions for OX messages and are defined
        !            84: %in~\cite{ox-rfc-100}.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>