Annotation of OpenXM/src/ox_math/documents/math2ox.tex, Revision 1.1
1.1 ! ohara 1: %#!platex
! 2: %% $OpenXM$
! 3:
! 4: \documentclass{article}
! 5: \title{Mathematica Client for Open XM}
! 6: \date{January 20, 2000}
! 7: \author{Katsuyoshi Ohara}
! 8:
! 9: \begin{document}
! 10: \maketitle
! 11:
! 12: \section{Mathematica Client}
! 13:
! 14: We provide an OX client named {\tt math2ox} by an external module for
! 15: Mathematica. That is, we can call an OX server on Mathematica. The
! 16: math2ox has communication with the OX server by OpenXM protocols and
! 17: communication with Mathematica by MathLink. The math2ox interpret our
! 18: commands and translate them to OX messages.
! 19:
! 20: The {\tt math2ox} has the following commands:\\
! 21: {\tt OxStart[s\_String], OxStartInsecure[s\_String],
! 22: OxExecuteString[s\_String], OxParse[s\_String], OxGet[], OxPopCMO[],
! 23: OxPopString[], OxClose[], OxReset[]}.
! 24:
! 25: First, let us load the math2ox.
! 26: \begin{verbatim}
! 27: In[1]:= Install["math2ox"]
! 28: \end{verbatim}
! 29:
! 30: Second, let us open a connection with an OX server.
! 31: For example, if we want to call the ox\_sm1 (the kan/sm1 server), then
! 32: \begin{verbatim}
! 33: In[2] := OxStart["ox_sm1"]
! 34: \end{verbatim}
! 35: where we have the connection of reverse mode. The OxStart function
! 36: automatically invoke ox\_sm1 on the local machine. If you need to
! 37: connect an OX server on a remote machine, then you can use reverse mode.
! 38: \begin{verbatim}
! 39: In[2] := OxStartInsecure["water.s.kanazawa-u.ac.jp", 1300, 1400]
! 40: \end{verbatim}
! 41: The mode is not secured but you can crypt data stream by using ssh
! 42: (Secure SHell).
! 43: \begin{verbatim}
! 44: In[2] := OxStartInsecureSSH["ox_sm1", "water.s.kanazawa-u.ac.jp"]
! 45: \end{verbatim}
! 46:
! 47: Third, let us send an OX message to the OX server.
! 48: We can send an OX message written in OX/CMO expressions.
! 49: \begin{verbatim}
! 50: In[3] := OxParse["(CMO_LIST, (CMO_STRING, "hello world"), (CMO_ZERO))"]
! 51: In[4] := OxParse["(OX_COMMAND, (SM_popCMO))"]
! 52: \end{verbatim}
! 53: If the expression is illegal, then nothing is sent.
! 54:
! 55: Remarks: if SM\_popCMO is sent by the {\tt OxParse[]} function, then the
! 56: OX stack machine returns the top of the stack to the {\tt math2ox}.
! 57: Then, in order to receive the message, we need to call the {\tt OxGet[]}
! 58: function.
! 59: \begin{verbatim}
! 60: In[5] := OxGet[]
! 61: \end{verbatim}
! 62:
! 63: If we do not use the {\tt OxParse} function and use the {\tt OxPopCMO[]}
! 64: function, then we do not need to call the {\tt OxGet[]}.
! 65: \begin{verbatim}
! 66: In[4] := OxPopCMO[]
! 67: \end{verbatim}
! 68:
! 69: Fourth, if we send a command expressed in the local language of the OX
! 70: server, then we need to call the {\tt OxExecuteString[]} function.
! 71:
! 72: Last, let us close the connection.
! 73: \begin{verbatim}
! 74: In[7] := OxClose[]
! 75: \end{verbatim}
! 76:
! 77: \appendix
! 78:
! 79: \begin{thebibliography}{99}
! 80: \bibitem{Openxxx-1998}
! 81: M. Noro, N. Takayama:
! 82: Design and Implementation of OpenXM, 1996, 1997, 1998, 1999, 2000.
! 83: \bibitem{openxm-web}
! 84: {\footnotesize {\tt http://www.math.kobe-u.ac.jp/OpenXM/}}
! 85: \bibitem{Ohara-Takayama-Noro-1999}
! 86: M. Noro, K. Ohara, N. Takayama:
! 87: {Introduction to Open Asir}, 1999, Suusiki Shori, Vol 7, No 2,
! 88: 2--17. (ISBN4-87243-086-7, SEG Publishing, Tokyo). (in Japanese)
! 89: \bibitem{Wolfram-1996}
! 90: Stephen Wolfram:
! 91: {The Mathematica Book}, Third edition,
! 92: Wolfram Media/Cambridge University Press, 1996.
! 93:
! 94: \bibitem{miyachi-1998}
! 95: T. Miyachi:
! 96: {Mathematica Network Programming},
! 97: Iwanami Book Co., 1998. (in Japanese)
! 98: \end{thebibliography}
! 99:
! 100: \end{document}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>