[BACK]Return to math2ox.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_math / documents

Diff for /OpenXM/src/ox_math/documents/math2ox.texi between version 1.3 and 1.5

version 1.3, 2000/03/14 02:21:40 version 1.5, 2000/03/14 14:25:27
Line 1 
Line 1 
 %% $OpenXM: OpenXM/src/ox_math/documents/math2ox.texi,v 1.2 2000/03/11 09:17:42 ohara Exp $  %% $OpenXM: OpenXM/src/ox_math/documents/math2ox.texi,v 1.4 2000/03/14 05:46:09 ohara Exp $
   
 \input texinfo  \input texinfo
 @iftex  @iftex
Line 66  String
Line 66  String
   
 @itemize @bullet  @itemize @bullet
 @item  It starts the OX server @code{s}.  @item  It starts the OX server @code{s}.
 @item Servers are looked for in the directory $OenXM_HOME/bin, hoge hoge.  @item Servers are looked for in the directory $OpenXM_HOME/bin, hoge hoge.
 @end itemize  @end itemize
   
 @example  @example
Line 82  In this example, @code{ox_sm1} is started on the local
Line 82  In this example, @code{ox_sm1} is started on the local
 @node Starting OX servers on a remote machine,,, Top  @node Starting OX servers on a remote machine,,, Top
 @section Starting OX servers on a remote machine  @section Starting OX servers on a remote machine
   
 The OpenXM ptotocol says that, if we need to run an OX server on a  In order to connect to remote OX servers, it is convenient, secure and
 remote machine, then an OX client connect to the OX server on the remote  recommended to use @code{ssh} (Secure SHell).
 machine by insecure mode.  The function @code{OxStartRemoteSSH} starts remote OX servers
   by ssh.  Of course, you are supposed to be able to login the remote
   machine by @code{ssh} and @code{$Remote_OpenXM_HOME/rc/cshrc} or
   @code{$Remote_OpenXM_HOME/rc/bashrc} are executed from the login shell
   of your remote machine.
   The function @code{OxStartRemoteSSH[]} does not request your password,
   that is, you need to be using @code{ssh-agent} before calling
   @code{OxStartRemoteSSH[]}.
   Then there will be no check of password.
   
 We note that insecure mode has a risk.  
 For example, we are afraid our packets are listened in.  
 However we know a simple method to plug such a security hole.  
 That is, a connection by ssh (Secure SHell).  
 Of course OpenXM protocol does not request ssh formally, but our  
 mathematica client (math2ox) in current implementation  
 needs ssh to connect a remote server.  
   
 @c  Description of OxStartRemoteSSH  @c  Description of OxStartRemoteSSH
 @menu  @menu
 * OxStartRemoteSSH::  * OxStartRemoteSSH::
Line 103  needs ssh to connect a remote server.
Line 103  needs ssh to connect a remote server.
 @findex OxStartRemoteSSH  @findex OxStartRemoteSSH
 @table @t  @table @t
 @item OxStartRemoteSSH[@var{s}, @var{host}]  @item OxStartRemoteSSH[@var{s}, @var{host}]
 ::  start the OX server @code{s} on the remote machine @code{host} via ssh.  ::  start the OX server @code{s} on the remote machine @code{host} by ssh.
 @end table  @end table
   
 @table @var  @table @var
Line 115  String
Line 115  String
 String  String
 @end table  @end table
   
 We note that the inplementation of function is incomplete!  We note that the @code{OxStartRemoteSSH[]} is an experimental implementation.
   
 @itemize @bullet  @itemize @bullet
 @item  It starts the OX server @code{s}.  @item  It starts the OX server @code{s}.
 @item Servers are looked for in the directory $OenXM_HOME/bin, hoge hoge.  @item Servers are looked for in the directory $OpenXM_HOME/bin, hoge hoge.
 @end itemize  @end itemize
   
 @example  @example
Line 158  String
Line 158  String
   
 @itemize @bullet  @itemize @bullet
 @item  It starts the OX server @code{s}.  @item  It starts the OX server @code{s}.
 @item Servers are looked for in the directory $OenXM_HOME/bin, hoge hoge.  @item Servers are looked for in the directory $OpenXM_HOME/bin, hoge hoge.
 @end itemize  @end itemize
   
 @example  @example
Line 218  Manual
Line 218  Manual
 Integer  Integer
 @end table  @end table
   
 The @code{OxPopCMO[]} function pop an object on the top of the stack of  The @code{OxPopCMO[]} function pops an object on the top of the stack of
 the OX stack machine @code{pid} and returns the object.  the OX stack machine @code{pid} and returns the object.
   The return type of the function @code{OxPopCMO[]} is @code{Manual} in
   terms of MathLink, that is, an object of suitable type is returned.
   
 @example  @example
 In[5] := cmo = OxPopCMO[]  In[5] := cmo = OxPopCMO[pid]
 @end example  @end example
   
 @c  Description of OxPopString  @c  Description of OxPopString
Line 244  String
Line 246  String
 Integer  Integer
 @end table  @end table
   
 The @code{OxPopString[]} function pop an object on the top of the stack  The @code{OxPopString[]} function pops an object on the top of the stack
 of the OX stack machine @code{pid} and returns a string which is  of the OX stack machine @code{pid} and returns a string which is
 translate from the object by the OX stack machine.  translated from the object by the OX stack machine.
   
 @example  @example
 In[5] := string = OxPopString[]  In[5] := string = OxPopString[pid]
 @end example  @end example
   
 @c  Description of OxClose  @c  Description of OxClose
Line 271  none
Line 273  none
 Integer  Integer
 @end table  @end table
   
 The @code{OxClose[]} function close the connection to the OX server  The @code{OxClose[]} function closes the connection to the OX server
 @code{pid}.  @code{pid}.
   
 @example  @example
 In[5] := OxClose[]  In[5] := OxClose[pid]
 @end example  @end example
   
 @c  Description of OxExecuteString  @c  Description of OxExecuteString
Line 301  String
Line 303  String
   
 The @code{OxExecuteString[]} function executes @code{command} on the OX server  The @code{OxExecuteString[]} function executes @code{command} on the OX server
 @code{pid}.  @code{pid}.
 @code{command} is interpreted in local language of the OX server.  The string @code{command} is interpreted in local language of the OX server.
   
 @example  @example
 In[5] := OxExecuteString["print(1+2);"]  In[5] := OxExecuteString["print(1+2);"]
Line 326  Manual
Line 328  Manual
 Integer  Integer
 @end table  @end table
   
 The @code{OxGet[]} function get an object from the connection to the OX server  The @code{OxGet[]} function gets an object from the connection to the OX server
 @code{pid}.  @code{pid}.
   
 @example  @example
 In[5] := cmo = OxGet[]  In[5] := cmo = OxGet[pid]
 @end example  @end example
   
 @c  Put descriptions of a next function.  @c  Put descriptions of a next function.
Line 338  In[5] := cmo = OxGet[]
Line 340  In[5] := cmo = OxGet[]
 @node Sample Programs,,, Top  @node Sample Programs,,, Top
 @chapter Sample Programs  @chapter Sample Programs
   
 @tex  @enumerate
 \noindent  @item
 1.  @code{OpenXM/lib/math/primadec.m} is a Mathematica program
 {\tt OpenXM/lib/math/primadec.m} is a Mathematica program  
 to make primary ideal decompositions by calling  to make primary ideal decompositions by calling
 {\tt ox\_asir}.  @code{ox_asir}.
 As to usages, see comments in this file.  As to usages, see comments in this file.
   
 \noindent 2.  @item
 {\tt OpenXM/lib/math/beta.m} is a Mathematica program  @code{OpenXM/lib/math/beta.m} is a Mathematica program
 to get beta-nbc bases by calling {\tt ox\_asir}.  to get beta-nbc bases by calling @code{ox_asir}.
 @end tex  @end enumerate
   
   @node Example,,, Top
   @chapter Example
   
   The @code{math2ox} has the following commands:
   
   @code{OxStart[s_String],
   OxStartInsecure[s_String, p_Integer, q_Integer],
   OxStartRemoteSSH[s_String, t_String],
   OxExecuteString[s_String], OxSendMessage[s_String], OxGet[], OxPopCMO[],
   OxPopString[], OxClose[], OxReset[]}.
   
   First, let us load the math2ox.
   @example
   In[1]:= <<oxclient.m
   @end example
   
   Second, let us open a connection with an OX server.
   For example, if we want to call the @code{ox_sm1} (the kan/sm1 server), then
   @example
   In[2] := pid = OxStart[pid, "ox_sm1"]
   @end example
   where we have the connection of reverse mode.  The OxStart function
   automatically invoke @code{ox_sm1} on the local machine.  If you need to
   connect an OX server on a remote machine, then you can use reverse mode.
   @example
   In[2] := pid = OxStartInsecure["water.s.kanazawa-u.ac.jp", 1300, 1400]
   @end example
   The mode is not secured but you can crypt data stream by using ssh
   (Secure SHell).
   @example
   In[3] := Run["ssh -f water ox -insecure -ox ox_sm1 -host water"]
   @end example
   
   Third, let us send an OX message to the OX server.
   We can send an OX message written in OX/CMO expressions.
   @example
   In[4] := OxSendMessage[pid, "(CMO_LIST, (CMO_STRING, "hello world"), (CMO_ZERO))"]
   In[5] := OxSendMessage[pid, "(OX_COMMAND, (SM_popCMO))"]
   @end example
   If the expression conains syntax errors, then nothing is sent.
   
   Remarks: if @code{SM_popCMO} is sent by the @code{OxSendMessage[]} function, then the
   OX stack machine returns the top of the stack to the @code{math2ox}.
   Then, in order to receive the message, we need to call the @code{OxGet[]}
   function always after executing @code{OxSendMessage[]}
   @example
   In[6] := OxGet[pid]
   @end example
   
   If we do not use the @code{OxSendMessage} function and use the @code{OxPopCMO[]}
   function, then we do not need to call the @code{OxGet[]}.
   @example
   In[5] := OxPopCMO[pid]
   @end example
   
   Fourth, if we send a command expressed in the local language of the OX
   server, then we need to call the @code{OxExecuteString[]} function.
   
   Last, let us close the connection.
   @example
   In[7] := OxClose[pid]
   @end example
   
   @c @node Bibliography,,, Top
   @c @unnumbered Bibliography
   @node References,,, Top
   @unnumbered References
   
   @enumerate
   @item
   M. Noro, N. Takayama:
   Design and Implementation of OpenXM, 1996, 1997, 1998, 1999, 2000.
   
   @item
   @code{http://www.math.kobe-u.ac.jp/OpenXM/}
   
   @item
   M. Noro, K. Ohara, N. Takayama:
   {Introduction to Open Asir}, 1999, Suusiki Shori, Vol 7, No 2,
   2--17. (ISBN4-87243-086-7, SEG Publishing, Tokyo). (in Japanese)
   
   @item
   Stephen Wolfram:
   {The Mathematica Book}, Third edition,
   Wolfram Media/Cambridge University Press, 1996.
   
   @item
   T. Miyachi:
   {Mathematica Network Programming},
   Iwanami Shoten Publishers, 1998. (in Japanese)
   @end enumerate
   
 @node Index,,, Top  @node Index,,, Top
 @unnumbered Index  @unnumbered Index

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

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