Annotation of OpenXM/src/ox_math/documents/math2ox.tex, Revision 1.3
1.1 ohara 1: %#!platex
1.3 ! takayama 2: %% $OpenXM: OpenXM/src/ox_math/documents/math2ox.tex,v 1.2 2000/01/20 15:09:24 ohara Exp $
1.1 ohara 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:\\
1.2 ohara 21: {\tt OxStart[s\_String],
22: OxStartInsecure[s\_String, p\_Integer, q\_Integer],
23: OxStartRemoteSSH[s\_String, t\_String],
1.1 ohara 24: OxExecuteString[s\_String], OxParse[s\_String], OxGet[], OxPopCMO[],
25: OxPopString[], OxClose[], OxReset[]}.
26:
27: First, let us load the math2ox.
28: \begin{verbatim}
29: In[1]:= Install["math2ox"]
30: \end{verbatim}
31:
32: Second, let us open a connection with an OX server.
33: For example, if we want to call the ox\_sm1 (the kan/sm1 server), then
34: \begin{verbatim}
35: In[2] := OxStart["ox_sm1"]
36: \end{verbatim}
37: where we have the connection of reverse mode. The OxStart function
38: automatically invoke ox\_sm1 on the local machine. If you need to
39: connect an OX server on a remote machine, then you can use reverse mode.
40: \begin{verbatim}
41: In[2] := OxStartInsecure["water.s.kanazawa-u.ac.jp", 1300, 1400]
42: \end{verbatim}
43: The mode is not secured but you can crypt data stream by using ssh
44: (Secure SHell).
45: \begin{verbatim}
1.2 ohara 46: In[3] := Run["ssh -f water ox -insecure -ox ox_sm1 -host water"]
1.1 ohara 47: \end{verbatim}
48:
49: Third, let us send an OX message to the OX server.
50: We can send an OX message written in OX/CMO expressions.
51: \begin{verbatim}
1.2 ohara 52: In[4] := OxParse["(CMO_LIST, (CMO_STRING, "hello world"), (CMO_ZERO))"]
53: In[5] := OxParse["(OX_COMMAND, (SM_popCMO))"]
1.1 ohara 54: \end{verbatim}
55: If the expression is illegal, then nothing is sent.
56:
57: Remarks: if SM\_popCMO is sent by the {\tt OxParse[]} function, then the
58: OX stack machine returns the top of the stack to the {\tt math2ox}.
59: Then, in order to receive the message, we need to call the {\tt OxGet[]}
60: function.
61: \begin{verbatim}
1.2 ohara 62: In[6] := OxGet[]
1.1 ohara 63: \end{verbatim}
64:
65: If we do not use the {\tt OxParse} function and use the {\tt OxPopCMO[]}
66: function, then we do not need to call the {\tt OxGet[]}.
67: \begin{verbatim}
1.2 ohara 68: In[5] := OxPopCMO[]
1.1 ohara 69: \end{verbatim}
70:
71: Fourth, if we send a command expressed in the local language of the OX
72: server, then we need to call the {\tt OxExecuteString[]} function.
73:
74: Last, let us close the connection.
75: \begin{verbatim}
76: In[7] := OxClose[]
77: \end{verbatim}
1.3 ! takayama 78:
! 79: \section{Examples}
! 80:
! 81: \begin{enumerate}
! 82: \item
! 83: {\tt OpenXM/lib/math/primadec.m} is a Mathematica program
! 84: to make primary ideal decompositions by calling
! 85: {\tt ox\_asir}.
! 86: As to usages, see comments in this file.
! 87: \item
! 88: {\tt OpenXM/lib/math/beta.m} is a Mathematica program
! 89: to get beta-nbc bases by calling {\tt ox\_asir}.
! 90: \end{enumerate}
! 91:
! 92:
1.1 ohara 93:
94: \appendix
95:
96: \begin{thebibliography}{99}
97: \bibitem{Openxxx-1998}
98: M. Noro, N. Takayama:
99: Design and Implementation of OpenXM, 1996, 1997, 1998, 1999, 2000.
100: \bibitem{openxm-web}
101: {\footnotesize {\tt http://www.math.kobe-u.ac.jp/OpenXM/}}
102: \bibitem{Ohara-Takayama-Noro-1999}
103: M. Noro, K. Ohara, N. Takayama:
104: {Introduction to Open Asir}, 1999, Suusiki Shori, Vol 7, No 2,
105: 2--17. (ISBN4-87243-086-7, SEG Publishing, Tokyo). (in Japanese)
106: \bibitem{Wolfram-1996}
107: Stephen Wolfram:
108: {The Mathematica Book}, Third edition,
109: Wolfram Media/Cambridge University Press, 1996.
110:
111: \bibitem{miyachi-1998}
112: T. Miyachi:
113: {Mathematica Network Programming},
114: Iwanami Book Co., 1998. (in Japanese)
115: \end{thebibliography}
116:
117: \end{document}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>