Annotation of OpenXM/src/ox_math/documents/math2ox.texi, Revision 1.3
1.3 ! ohara 1: %% $OpenXM: OpenXM/src/ox_math/documents/math2ox.texi,v 1.2 2000/03/11 09:17:42 ohara Exp $
1.1 ohara 2:
3: \input texinfo
4: @iftex
5: @catcode`@#=6
6: @def@b#1{{@bf@gt #1}}
7: @catcode`@#=@other
8: @end iftex
9: @overfullrule=0pt
10: @c -*-texinfo-*-
11: @comment %**start of header
12: @setfilename Math2ox
13: @settitle Math2ox
14: @comment %**end of header
15: @comment %@setchapternewpage odd
16:
17: @iftex
18: @comment @finalout
19: @end iftex
20:
21: @titlepage
22:
23: @title Math2ox
24: @subtitle Math2ox User's Manual (English Edition)
25: @subtitle Edition 1.1.2 for OpenXM/oxmath
26: @subtitle March 2000
27:
28: @author by Katsuyoshi Ohara
29: @end titlepage
30:
31: @synindex vr fn
32:
33: @comment node-name, next, previous, up
34: @node Top,, (dir), (dir)
35:
36: @menu
37: * Mathematica Client Functions::
38: * Sample Programs::
39: @end menu
40:
1.3 ! ohara 41: @node Starting OX servers,,, Top
! 42:
! 43: @chapter Starting OX servers
! 44:
! 45: @node Starting OX servers on the localhost,,, Starting OX servers
! 46: @section Starting OX servers on the localhost
! 47:
! 48: @c Description of OxStart
! 49: @menu
! 50: * OxStart::
! 51: @end menu
! 52: @node OxStart,,,
! 53: @subsection @code{OxStart}
! 54: @findex OxStart
! 55: @table @t
! 56: @item OxStart[@var{s}]
! 57: :: Start the OX server @code{s}.
! 58: @end table
! 59:
! 60: @table @var
! 61: @item return
! 62: Integer
! 63: @item s
! 64: String
! 65: @end table
! 66:
! 67: @itemize @bullet
! 68: @item It starts the OX server @code{s}.
! 69: @item Servers are looked for in the directory $OenXM_HOME/bin, hoge hoge.
! 70: @end itemize
! 71:
! 72: @example
! 73: In[1]:= Install["math2ox"]
! 74: In[2]:= pid = OxStart["ox_sm1"]
! 75: @end example
! 76:
! 77: In this example, @code{ox_sm1} is started on the local machine.
! 78:
! 79:
! 80:
! 81:
! 82: @node Starting OX servers on a remote machine,,, Top
! 83: @section Starting OX servers on a remote machine
! 84:
! 85: The OpenXM ptotocol says that, if we need to run an OX server on a
! 86: remote machine, then an OX client connect to the OX server on the remote
! 87: machine by insecure mode.
! 88:
! 89: We note that insecure mode has a risk.
! 90: For example, we are afraid our packets are listened in.
! 91: However we know a simple method to plug such a security hole.
! 92: That is, a connection by ssh (Secure SHell).
! 93: Of course OpenXM protocol does not request ssh formally, but our
! 94: mathematica client (math2ox) in current implementation
! 95: needs ssh to connect a remote server.
! 96:
! 97: @c Description of OxStartRemoteSSH
! 98: @menu
! 99: * OxStartRemoteSSH::
! 100: @end menu
! 101: @node OxStartRemoteSSH,,,
! 102: @subsection @code{OxStartRemoteSSH}
! 103: @findex OxStartRemoteSSH
! 104: @table @t
! 105: @item OxStartRemoteSSH[@var{s}, @var{host}]
! 106: :: start the OX server @code{s} on the remote machine @code{host} via ssh.
! 107: @end table
! 108:
! 109: @table @var
! 110: @item return
! 111: Integer
! 112: @item s
! 113: String
! 114: @item host
! 115: String
! 116: @end table
! 117:
! 118: We note that the inplementation of function is incomplete!
! 119:
! 120: @itemize @bullet
! 121: @item It starts the OX server @code{s}.
! 122: @item Servers are looked for in the directory $OenXM_HOME/bin, hoge hoge.
! 123: @end itemize
! 124:
! 125: @example
! 126: In[2]:= pid = OxStartRemoteSSH["ox_sm1", "remotehost"]
! 127: @end example
! 128:
! 129: In this example, @code{ox_sm1} is started on the remote machine @code{remotehost}.
! 130:
1.1 ohara 131: @node Mathematica Client Functions,,, Top
132:
133: @chapter Mathematica Client Functions
134:
135: The program @code{math2ox} is an external module for Mathematica
136: to call OpenXM servers.
137: The @code{math2ox} communicates with OpenXM servers by the OpenXM protocol
138: and communicates with Mathematica by MathLink.
139:
140: @c Description of OxStart
141: @menu
142: * OxStart::
143: @end menu
144: @node OxStart,,, Mathematica Client Functions
145: @section @code{OxStart}
146: @findex OxStart
147: @table @t
1.2 ohara 148: @item OxStart[@var{s}]
1.1 ohara 149: :: Start the OX server @code{s}.
150: @end table
151:
152: @table @var
153: @item return
154: Integer
155: @item s
156: String
157: @end table
158:
159: @itemize @bullet
160: @item It starts the OX server @code{s}.
1.3 ! ohara 161: @item Servers are looked for in the directory $OenXM_HOME/bin, hoge hoge.
1.1 ohara 162: @end itemize
163:
164: @example
165: In[1]:= Install["math2ox"]
1.2 ohara 166: In[2]:= pid = OxStart["ox_sm1"]
1.1 ohara 167: @end example
168:
169: In this example, @code{ox_sm1} is started on the local machine.
170:
1.2 ohara 171: @c Description of OxSendMessage
172: @menu
173: * OxSendMessage::
174: @end menu
175: @node OxSendMessage,,, Mathematica Client Functions
176: @section @code{OxSendMessage}
177: @findex OxSendMessage
178: @table @t
179: @item OxSendMessage[@var{pid}, @var{s}]
1.3 ! ohara 180: :: send a message @code{s} to the OX server @code{pid}.
1.2 ohara 181: @end table
182:
183: @table @var
184: @item return
185: Integer
1.3 ! ohara 186: @item pid
1.2 ohara 187: Integer
188: @item s
189: String
190: @end table
191:
192: @example
193: In[4] := OxSendMessage[pid, "(CMO_LIST, (CMO_STRING, "hello world"), (CMO_ZERO))"]
194: In[5] := OxSendMessage[pid, "(OX_COMMAND, (SM_popCMO))"]
195: @end example
196:
197: In this example, an OX data message
198: (OX_DATA, (CMO_LIST, (CMO_STRING, "hello world"), (CMO_ZERO))
199: and an OX command message (OX_COMMAND, (SM_popCMO)) are sent to
200: the OX server @code{pid}.
201:
1.3 ! ohara 202: @c Description of OxPopCMO
! 203: @menu
! 204: * OxPopCMO::
! 205: @end menu
! 206: @node OxPopCMO,,, Mathematica Client Functions
! 207: @section @code{OxPopCMO}
! 208: @findex OxPopCMO
! 209: @table @t
! 210: @item OxPopCMO[@var{pid}]
! 211: :: pop an object on the top of the stack.
! 212: @end table
! 213:
! 214: @table @var
! 215: @item return
! 216: Manual
! 217: @item pid
! 218: Integer
! 219: @end table
! 220:
! 221: The @code{OxPopCMO[]} function pop an object on the top of the stack of
! 222: the OX stack machine @code{pid} and returns the object.
! 223:
! 224: @example
! 225: In[5] := cmo = OxPopCMO[]
! 226: @end example
! 227:
! 228: @c Description of OxPopString
! 229: @menu
! 230: * OxPopString::
! 231: @end menu
! 232: @node OxPopString,,, Mathematica Client Functions
! 233: @section @code{OxPopString}
! 234: @findex OxPopString
! 235: @table @t
! 236: @item OxPopString[@var{pid}]
! 237: :: get a string from the OX server @code{pid}.
! 238: @end table
! 239:
! 240: @table @var
! 241: @item return
! 242: String
! 243: @item pid
! 244: Integer
! 245: @end table
! 246:
! 247: The @code{OxPopString[]} function pop an object on the top of the stack
! 248: of the OX stack machine @code{pid} and returns a string which is
! 249: translate from the object by the OX stack machine.
! 250:
! 251: @example
! 252: In[5] := string = OxPopString[]
! 253: @end example
! 254:
! 255: @c Description of OxClose
! 256: @menu
! 257: * OxClose::
! 258: @end menu
! 259: @node OxClose,,, Mathematica Client Functions
! 260: @section @code{OxClose}
! 261: @findex OxClose
! 262: @table @t
! 263: @item OxClose[@var{pid}]
! 264: :: close the connection to the OX server @code{pid}.
! 265: @end table
! 266:
! 267: @table @var
! 268: @item return
! 269: none
! 270: @item pid
! 271: Integer
! 272: @end table
! 273:
! 274: The @code{OxClose[]} function close the connection to the OX server
! 275: @code{pid}.
! 276:
! 277: @example
! 278: In[5] := OxClose[]
! 279: @end example
! 280:
! 281: @c Description of OxExecuteString
! 282: @menu
! 283: * OxExecuteString::
! 284: @end menu
! 285: @node OxExecuteString,,, Mathematica Client Functions
! 286: @section @code{OxExecuteString}
! 287: @findex OxExecuteString
! 288: @table @t
! 289: @item OxExecuteString[@var{pid}, @var{command}]
! 290: :: execute @code{command} on the OX server @code{pid}.
! 291: @end table
! 292:
! 293: @table @var
! 294: @item return
! 295: none
! 296: @item pid
! 297: Integer
! 298: @item command
! 299: String
! 300: @end table
! 301:
! 302: The @code{OxExecuteString[]} function executes @code{command} on the OX server
! 303: @code{pid}.
! 304: @code{command} is interpreted in local language of the OX server.
! 305:
! 306: @example
! 307: In[5] := OxExecuteString["print(1+2);"]
! 308: @end example
! 309:
! 310: @c Description of OxGet
! 311: @menu
! 312: * OxGet::
! 313: @end menu
! 314: @node OxGet,,, Mathematica Client Functions
! 315: @section @code{OxGet}
! 316: @findex OxGet
! 317: @table @t
! 318: @item OxGet[@var{pid}]
! 319: :: get an object from the connection to the OX server @code{pid}.
! 320: @end table
! 321:
! 322: @table @var
! 323: @item return
! 324: Manual
! 325: @item pid
! 326: Integer
! 327: @end table
! 328:
! 329: The @code{OxGet[]} function get an object from the connection to the OX server
! 330: @code{pid}.
1.1 ohara 331:
1.3 ! ohara 332: @example
! 333: In[5] := cmo = OxGet[]
! 334: @end example
1.2 ohara 335:
1.3 ! ohara 336: @c Put descriptions of a next function.
1.1 ohara 337:
338: @node Sample Programs,,, Top
339: @chapter Sample Programs
340:
341: @tex
342: \noindent
343: 1.
344: {\tt OpenXM/lib/math/primadec.m} is a Mathematica program
345: to make primary ideal decompositions by calling
346: {\tt ox\_asir}.
347: As to usages, see comments in this file.
348:
349: \noindent 2.
350: {\tt OpenXM/lib/math/beta.m} is a Mathematica program
351: to get beta-nbc bases by calling {\tt ox\_asir}.
352: @end tex
353:
354:
355:
356: @node Index,,, Top
357: @unnumbered Index
358: @printindex fn
359: @printindex cp
360: @iftex
361: @vfill @eject
362: @end iftex
363: @summarycontents
364: @contents
365: @bye
366:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>