Annotation of OpenXM/doc/calc2000/design-outline.tex, Revision 1.5
1.5 ! noro 1: % $OpenXM: OpenXM/doc/calc2000/design-outline.tex,v 1.4 2000/04/24 07:17:13 noro Exp $
1.1 noro 2:
3: \section{Integration of Mathematical Software}
4:
5: As Schefstr\"om clarified in \cite{schefstrom},
6: integration of software tools has three dimensions:
7: data, control, and user interface.
8:
9: Data integration concerns with the exchange of data between different
1.5 ! noro 10: programs or the same program.
1.1 noro 11: OpenMath \cite{OpenMath} and MP (Multi Protocol) \cite{GKW} are,
12: for example, general purpose mathematical data protocols.
13: They provide standard ways to express mathematical objects.
14: For example,
15: \begin{verbatim}
16: <OMOBJ> <OMI> 123 </OMI> </OMOBJ>
17: \end{verbatim}
18: means the (OpenMath) integer $123$ in OpenMath/XML expression.
19:
20: Control integration concerns with the establishment and management of
21: inter-software communications.
22: Control involves, for example, a way to ask computations to other processes
23: and a method to interrupt computations on servers from a client.
24: RPC, HTTP, MPI, PVM are regarded as a general purpose control protocols or
25: infrastructures.
26: MCP (Mathematical Communication Protocol)
27: by Wang \cite{iamc} is such a protocol for mathematics.
28:
29: Although data and control are orthogonal to each other, real world
30: requires both. The best way to evaluate and to improve such
31: integration schemes is to implement and to use them on various
32: plaftforms. Dalmas et al. \cite{omimp} shows an implementation of
1.5 ! noro 33: OpenMath API, where as Maple, REDUCE and
! 34: AXIOM/Aldor are wrapped as servers. MP$+$MCP \cite{iamc} shows a design
1.1 noro 35: of server inferface suited for interactive use and its limited
36: implementation on MAXIMA is reported. Lakshman et al. \cite{pseware}
1.5 ! noro 37: proposes functionalities which a server should have and Maple is
1.1 noro 38: encapsulated as a server. These are all attempts to justify thier
39: designs of protocols or architectures, but little is shown about their
40: practical usefulness, especially for developing real applications of
41: distributed computation.
42:
43: In this paper we propose a unified server interface fitting for both
1.5 ! noro 44: interactive use and efficient batch processing.
! 45: It includes various supports for developing programs on distributed
! 46: environment. We will show its
1.1 noro 47: usability by implementing and using it on various platforms.
48:
49: %NetSolve \cite{netsolve}, OpenMath$+$MCP, MP$+$MCP \cite{iamc},
50: %and MathLink \cite{mathlink} provide both data and control integration.
51: %Each integration method has their own features determined by their
52: %own design goals.
53:
54: \section{Design Outline of OpenXM}
55:
56: %OpenXM (Open message eXchange protocol for Mathematics)
57: %is a project aiming to integrate data, control and user interfaces
58: %with design goals motivated by the followings.
59: %\begin{enumerate}
60: %\item Noro has been involved in the development of
61: %a computer algebra system Risa/Asir \cite{asir}.
62: %An interface for interactive distributed computations was introduced
63: %to Risa/Asir
64: %%% version 950831 released
65: %in 1995.
66: %The model of computation was RPC (remote procedure call).
67: %A robust interruption protocol was provided
68: %by two communication channels
69: %like the File Transfer Protocol (ftp).
70: %As an application of this protocol,
71: %a parallel speed-up was achieved for a Gr\"obner basis computation
72: %to determine all odd order replicable functions
73: %(Noro and McKay \cite{noro-mckay}).
74: %However, the protocol was local in Asir and we thought that we should
75: %design an open protocol.
76: %\item Takayama has developed
77: %a special purpose system Kan/sm1 \cite{kan},
78: %which is a Gr\"obner engine for the ring of differential operators $D$.
79: %In order to implement algorithms in $D$-modules due to Oaku
80: %(see, e.g., \cite{sst-book}),
81: %factorizations and primary ideal decompositions are necessary.
82: %Kan/sm1 does not have an implementation for these and called
83: %Risa/Asir as a UNIX external program.
84: %This approach was not satisfactory.
85: %Especially, we could not write a clean interface code between these
86: %two systems.
87: %We thought that it is necessary to provide a data and control protocol
88: %for Risa/Asir to work as a server of factorization and primary ideal
89: %decomposition.
90: %\item We have been profited from increasing number
91: %of mathematical software tools.
92: %These are usually ``expert'' systems in one area of mathematics
93: %such as ideals, groups, numbers, polytopes, and so on.
94: %They have their own interfaces and data formats,
95: %which are fine for intensive users of these systems.
96: %However, a unified system will be more convenient
97: %for users who want to explore a new area of mathematics with these
98: %software tools or users who need these systems only occasionally.
99: %
100: %\item We believe that an open integrated system is a future of mathematical
101: %software.
102: %However, it might be just a dream without realizability.
103: %We want to build a prototype of such an open system by using
104: %existing standards, technologies and several mathematical software tools.
105: %We want to see how far we can go with this approach.
106: %\end{enumerate}
107: %
108: %Motivated with these, we started the OpenXM project with the following
109: %fundamental architecture.
110: OpenXM (Open message eXchange protocol for Mathematics)
111: is a project aiming to integrate data, control and user interfaces
1.5 ! noro 112: with design goals motivated by the followng.
1.1 noro 113:
114: \begin{enumerate}
1.5 ! noro 115: \item
! 116: An interface for interactive distributed computations was introduced
! 117: to Risa/Asir in 1995.
! 118: As an application,
! 119: a parallel speed-up was achieved for a Gr\"obner basis computation
! 120: (Noro and McKay \cite{noro-mckay}).
! 121: However, the protocol was local in Asir and we thought that we should
! 122: design an open protocol.
! 123: \item
! 124: In order to implement algorithms in $D$-modules due to Oaku
! 125: (see, e.g., \cite{sst-book}),
! 126: Kan/sm1 called Risa/Asir as a UNIX external program to
! 127: compute factorizations and primary ideal decompositions,
! 128: but the interface code was not clean.
! 129: We thought that it is necessary to provide a data and control protocol
! 130: for Risa/Asir to work as a server.
! 131:
! 132: \item
! 133: There are increasing number of ``expert'' systems which are useful
! 134: but which have their own interfaces and data formats.
! 135: A unified system integrating such systems
! 136: will be more convenient
! 137: for users who want to explore a new area of mathematics with these
! 138: software tools or users who need these systems only occasionally.
! 139:
! 140: \item We believe that an open integrated system is a future of mathematical
! 141: software.
! 142: However, it might be just a dream without realizability.
! 143: We want to build a prototype of such an open system by using
! 144: existing standards, technologies and several mathematical software tools.
! 145: We want to see how far we can go with this approach.
! 146: \end{enumerate}
! 147:
! 148: Motivated with these, we started the OpenXM project with the following
! 149: fundamental architecture.
! 150: \begin{enumerate}
1.1 noro 151: \item Communication is an exchange of messages. The messages are classified into
152: three types:
153: DATA, COMMAND, and SPECIAL.
154: They are called OX (OpenXM) messages.
155: Among the three types,
156: {\it OX data messages} wrap mathematical data.
157: We use standards of mathematical data formats such as OpenMath and MP
158: as well as our own data format {\it CMO}
159: ({\it Common Mathematical Object format}).
160: \item Servers, which provide services to other processes, are stack machines.
161: The stack machine is called the
162: {\it OX stack machine}.
163: Existing mathematical software tools are wrapped with this stack machine.
164: Minimal requirements for a target wrapped with the OX stack machine
165: are as follows:
166: \begin{enumerate}
167: \item The target must have a serialized interface such as a character based
168: interface.
169: \item An output of the target must be understandable for computer programs;
170: it should follow a grammar that can be parsed with other software tools.
171: \end{enumerate}
172: \item Any server may have a hybrid interface;
173: it may accept and execute not only stack machine commands,
174: but also its original command sequences.
175: For example,
176: if we send the following string to the {\tt ox\_asir} server
177: (OpenXM server based on Risa/Asir \cite{asir}) \\
178: \verb+ " fctr(x^100-y^100); " + \\
179: and call the stack machine command \\
180: \verb+ SM_executeStringByLocalParser + \\
181: then the server executes the asir command \\
182: \verb+ fctr(x^100-y^100); +
183: (factorize $x^{100}-y^{100}$ over ${\bf Q}$)
184: and pushes the result onto the stack.
1.5 ! noro 185: \item Network transparent supports for controlling servers are provided.
! 186: For example OpenXM defines a robust reset procedure to restart computations
! 187: without any confusion in I/O buffers.
! 188: It is necessary for debugging programs running on distributed environment.
1.1 noro 189: \end{enumerate}
190: OpenXM package is implemented on above fundamental architecture.
191: Currently the following servers are available in the OpenXM package
192: \cite{openxm-web}.
193:
1.2 noro 194: \begin{description}
195: \item{\tt ox\_asir}
1.1 noro 196: A server for Risa/Asir, a general-purpose computer algebra
197: system. It provides almost
198: all functinalities of Risa/Asir such as polynomial factorization,
199: Gr\"obner basis computation and primary ideal decomposition.
1.2 noro 200: \item{\tt ox\_sm1}
1.3 takayama 201: A server for Kan/sm1 \cite{kan}, a system for computation in
202: the ring of differential operators including computation of Gr\"obner bases
203: and cohomology groups.
204: \item {\tt ox\_phc}
1.1 noro 205: A server for PHC pack \cite{phc}, a general-purpose solver for
1.3 takayama 206: polynomial systems by homotopy continuation.
207: \item {\tt ox\_tigers}
1.1 noro 208: A server for TiGERS \cite{tigers}, a system to enumerate
209: all Gr\"obner bases of affine toric ideals.
210: It can be used to determine the state polytope
211: of a given affine toric ideal.
1.3 takayama 212: \item {\tt ox\_gnuplot}
1.1 noro 213: A server for GNUPLOT, a famous plotting tool.
214: \item {\tt ox\_math}
215: A server for Mathematica.
216: \item {\tt OMproxy}
217: A server for translation between CMO and OpenMath/XML expressions.
218: It is written in Java.
1.3 takayama 219: This module provides Java classes OXmessage, CMO, and SM
220: for the OpenXM protocol, too.
1.2 noro 221: \end{description}
1.1 noro 222: In addition to these servers, Risa/Asir, Kan/sm1 and Mathematica
223: can act as clients.
224: For example, the following is a command sequence to ask $1+1$ from
225: the Asir client to the {\tt ox\_sm1} server:
226: \begin{verbatim}
227: P = sm1_start();
228: ox_push_cmo(P,1); ox_push_cmo(P,1);
229: ox_execute_string(P,"add"); ox_pop_cmo(P);
230: \end{verbatim}
231: The OpenXM package is implemented on the OpenXM for TCP/IP,
232: which uses the client-server model.
233: The OpenXM on MPI \cite{MPI} is currently running on Risa/Asir
234: as we will see in Section \ref{section:homog}.
235: In this paper, we discuss only on systems for TCP/IP
236: to concentrate on the core part of our design.
1.4 noro 237: Note that a C library interface is available for some servers.
1.1 noro 238:
239:
240:
241:
242:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>