Annotation of OpenXM/doc/Papers/dag-noro-proc.tex, Revision 1.5
1.5 ! noro 1: % $OpenXM: OpenXM/doc/Papers/dag-noro-proc.tex,v 1.4 2001/11/26 08:42:28 noro Exp $
1.1 noro 2: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3: % This is a sample input file for your contribution to a multi-
4: % author book to be published by Springer Verlag.
5: %
6: % Please use it as a template for your own input, and please
7: % follow the instructions for the formal editing of your
8: % manuscript as described in the file "1readme".
9: %
10: % Please send the Tex and figure files of your manuscript
11: % together with any additional style files as well as the
12: % PS file to the editor of your book.
13: %
14: % He or she will collect all contributions for the planned
15: % book, possibly compile them all in one go and pass the
16: % complete set of manuscripts on to Springer.
17: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18:
19:
20:
21: %RECOMMENDED%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22:
23: \documentclass[runningheads]{cl2emult}
24:
25: \usepackage{makeidx} % allows index generation
26: \usepackage{graphicx} % standard LaTeX graphics tool
27: % for including eps-figure files
28: \usepackage{subeqnar} % subnumbers individual equations
29: % within an array
30: \usepackage{multicol} % used for the two-column index
31: \usepackage{cropmark} % cropmarks for pages without
32: % pagenumbers
33: \usepackage{math} % placeholder for figures
34: \makeindex % used for the subject index
35: % please use the style sprmidx.sty with
36: % your makeindex program
37:
38: %upright Greek letters (example below: upright "mu")
39: \newcommand{\euler}[1]{{\usefont{U}{eur}{m}{n}#1}}
40: \newcommand{\eulerbold}[1]{{\usefont{U}{eur}{b}{n}#1}}
41: \newcommand{\umu}{\mbox{\euler{\char22}}}
42: \newcommand{\umub}{\mbox{\eulerbold{\char22}}}
43:
44: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45:
46:
47: %OPTIONAL%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48: %
49: %\usepackage{amstex} % useful for coding complex math
50: %\mathindent\parindent % needed in case "Amstex" is used
51: %
52: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53:
54: %AUTHOR_STYLES_AND_DEFINITIONS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55: %
56: %Please reduce your own definitions and macros to an absolute
57: %minimum since otherwise the editor will find it rather
58: %strenuous to compile all individual contributions to a
59: %single book file
60: \usepackage{epsfig}
61: \def\cont{{\rm cont}}
62: \def\GCD{{\rm GCD}}
63: %
64: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
65:
66: \begin{document}
67: %
68: \title*{A Computer Algebra System Risa/Asir and OpenXM}
69: %
70: %
71: \toctitle{A Computer Algebra System Risa/Asir and OpenXM}
72: % allows explicit linebreak for the table of content
73: %
74: %
75: \titlerunning{Risa/Asir and OpenXM}
76: % allows abbreviation of title, if the full title is too long
77: % to fit in the running head
78: %
79: \author{Masayuki Noro\inst{1}}
80: %
81: %\authorrunning{Masayuki Noro}
82: % if there are more than two authors,
83: % please abbreviate author list for running head
84: %
85: %
86: \institute{Kobe University, Rokko, Kobe 657-8501, Japan}
87:
88: \maketitle % typesets the title of the contribution
89:
90: \begin{abstract}
91: OpenXM \cite{OPENXM} is an infrastructure for exchanging mathematical
92: data. It defines a client-server architecture for parallel and
93: distributed computation. Risa/Asir is software for polynomial
94: computation. It has been developed for testing new algorithms, and now
95: it acts as both a client and a server in the OpenXM package. In this
1.5 ! noro 96: article we present an overview of Risa/Asir and review several
! 97: techniques for improving performances of Groebner basis computation.
! 98: We also show Risa/Asir's OpenXM interfaces and their usages by
! 99: examples.
1.1 noro 100: \end{abstract}
101:
102: \section{A computer algebra system Risa/Asir}
103:
104: \subsection{What is Risa/Asir?}
105:
106: Risa/Asir \cite{RISA} is software mainly for polynomial
107: computation. Its major functions are polynomial factorization and
108: Groebner basis computation, whose core parts are implemented as
1.5 ! noro 109: built-in functions. Some higher algorithms such as primary ideal
1.1 noro 110: decomposition or Galois group computation are built on them by the
1.5 ! noro 111: user language called Asir language. Asir language can be regarded as C
! 112: language without type declaration of variables, with list processing,
! 113: and with automatic garbage collection. A built-in {\tt gdb}-like user
! 114: language debugger is available. It is open source and the source code
! 115: and binaries are available via {\tt ftp} or {\tt CVS}. Risa/Asir is
! 116: not only a standalone computer algebra system but also a main
! 117: component in OpenXM package \cite{OPENXM}, which is a collection of
! 118: various software compliant to OpenXM protocol specification. OpenXM
! 119: is an infrastructure for exchanging mathematical data and Risa/Asir
! 120: has three kind of OpenXM interfaces : client interfaces, an OpenXM
! 121: server, and a subroutine library. Our goals of developing Risa/Asir
! 122: are as follows:
1.1 noro 123:
124: \begin{enumerate}
1.5 ! noro 125: \item Providing a platform for testing new algorithms
1.1 noro 126:
127: Risa/Asir has been a platform for testing experimental algorithms in
128: polynomial factorization, computation related to Groebner basis,
129: cryptography and quantifier elimination. As to Groebner basis, we have
130: been mainly interested in problems over {\bf Q} and we tried applying
131: various modular techniques to overcome difficulties caused by huge
132: intermediate coefficients. We have had several results and they have
133: been implemented in Risa/Asir.
134:
1.5 ! noro 135: \item General purpose open system
1.1 noro 136:
137: We need a lot of functions to make Risa/Asir a general purpose
138: computer algebra system. In recent years we can obtain various high
139: performance applications or libraries as free software. We wrapped
140: such software as OpenXM servers and we started to release a collection
1.5 ! noro 141: of such servers and clients as the OpenXM package in 1997. Risa/Asir
! 142: is now a main client in the package.
1.1 noro 143:
144: \item Environment for parallel and distributed computation
145:
146: The origin of OpenXM is a protocol for doing parallel distributed
1.5 ! noro 147: computations by connecting multiple Risa/Asir's over TCP/IP. OpenXM is
! 148: also designed to provide an environment efficient parallel distributed
! 149: computation. Currently only client-server communication is available,
1.1 noro 150: but we are preparing a specification OpenXM-RFC 102 allowing
1.5 ! noro 151: client-client communication, which will enable us to execute wider
! 152: range of parallel algorithms efficiently.
1.1 noro 153: \end{enumerate}
154:
155: \subsection{Groebner basis and the related computation}
156:
157: Currently Risa/Asir can only deal with polynomial ring. Operations on
158: modules over polynomial rings have not yet supported. However, both
159: commutative polynomial rings and Weyl algebra are supported and one
160: can compute Groebner basis in both rings over the rationals, fields of
161: rational functions and finite fields. In the early stage of our
162: development, our effort was mainly devoted to improve the efficiency
163: of computation over the rationals. Our main tool is modular
164: computation. For Buchberger algorithm we adopted the trace lifting
165: algorithm by Traverso \cite{TRAV} and elaborated it by applying our
166: theory on a correspondence between Groebner basis and its modular
167: image \cite{NOYO}. We also combine the trace lifting with
168: homogenization to stabilize selection strategies, which enables us to
169: compute several examples efficiently which is hard to compute without
170: such a combination. Our modular method can be applied to the change
171: of ordering algorithm and rational univariate representation. We also
172: made a test implementation of $F_4$ algorithm \cite{F4}. Later we will
173: show timing data on Groebner basis computation.
174:
175: \subsection{Polynomial factorization}
176:
177: Here we briefly review functions on polynomial factorization. For
178: univariate factorization over {\bf Q}, the classical
179: Berlekamp-Zassenhaus algorithm is implemented. Efficient algorithms
180: recently proposed have not yet implemented. For Univariate factorizer
181: over algebraic number fields, Trager's algorithm \cite{TRAGER} is
182: implemented with some modifications. Its major applications are
183: splitting field and Galois group computation of polynomials over the
1.5 ! noro 184: rationals \cite{ANY}. For such purpose a tower of simple extensions
! 185: are suitable because factors represented over a simple extension often
! 186: have huge coefficients. For univariate factorization over finite
! 187: fields, equal degree factorization and Cantor-Zassenhaus algorithm are
1.1 noro 188: implemented. We can use various representation of finite fields:
1.5 ! noro 189: $GF(p)$ with a machine integer prime $p$, $GF(p)$ and $GF(p^n)$ with
! 190: any odd prime $p$, $GF(2^n)$ with a bit-array representation of
! 191: polynomials over $GF(2)$ and $GF(p^n)$ with small $p^n$ represented by
! 192: a primitive root. For multivariate factorization over the rationals,
! 193: the classical EZ(Extended Zassenhaus) type algorithm is implemented.
1.1 noro 194:
195: \subsection{Other functions}
196: By applying Groebner basis computation and polynomial factorization,
197: we have implemented several higher level algorithms. A typical
198: application is primary ideal decomposition of polynomial ideals over
199: {\bf Q}, which needs both functions. Shimoyama-Yokoyama algorithm
1.5 ! noro 200: \cite{SY} for primary decomposition is written in the user language.
! 201: Splitting field and Galois group computation \cite{ANY} are closely
! 202: related and are also important applications of polynomial
! 203: factorization.
1.1 noro 204:
205: \section{Techniques for efficient Groebner basis computation over {\bf Q}}
206: \label{gbtech}
207:
208: In this section we review several practical techniques to improve
209: Groebner basis computation over {\bf Q}, which are easily
210: implemented but may not be well known.
211: We use the following notations.
212: \begin{description}
1.5 ! noro 213: \item $Id(F)$ : a polynomial ideal generated by $F$
1.1 noro 214: \item $\phi_p$ : the canonical projection from ${\bf Z}$ onto $GF(p)$
1.5 ! noro 215: \item $HT(f)$ : the head term of a polynomial with respect to a term order
! 216: \item $HC(f)$ : the head coefficient of a polynomial with respect to a term order
1.1 noro 217: \end{description}
218:
219: \subsection{Combination of homogenization and trace lifting}
220:
221: Traverso's trace lifting algorithm can be
222: formulated in an abstract form as follows \cite{FPARA}.
223: \begin{tabbing}
224: Input : a finite subset $F \subset {\bf Z}[X]$\\
225: Output : a Groebner basis $G$ of $Id(F)$ with respect to a term order $<$\\
226: do \= \\
227: \> $p \leftarrow$ a new prime\\
228: \>Guess \= a Groebner basis candidate $G \subset Id(F)$
229: such that $\phi_p(G)$ \\
230: \>\> is a Groebner basis of $Id(\phi_p(F))$ in ${GF(p)}[X]$\\
231: \>Check that $G$ is a Groebner basis of $Id(G)$ and $F \subset Id(G)$\\
232: \>If $G$ passes the check return $G$\\
233: end do
234: \end{tabbing}
1.5 ! noro 235: We can apply various methods for {\it guess} part of the above
! 236: algorithm. In the original algorithm we guess the candidate by
! 237: replacing zero normal form checks over {\bf Q} with those over $GF(p)$
! 238: in the Buchberger algorithm, which we call {\it tl\_guess}. In Asir
! 239: one can specify another method {\it tl\_h\_guess\_dh}, which is a
! 240: combination of {\it tl\_guess} and homogenization.
1.1 noro 241: \begin{tabbing}
242: $tl\_h\_guess\_dh(F,p)$\\
243: Input : $F\subset {\bf Z}[X]$, a prime $p$\\
244: Output : a Groebner basis candidate\\
245: $F_h \leftarrow$ the homogenization of $F$\\
246: $G_h \leftarrow tl\_guess(F_h,p)$ under an appropriate term order\\
247: $G \leftarrow$ the dehomogenization of $G_h$\\
248: $G \leftarrow G \setminus \{g \in G| \exists h \in G \setminus \{g\}$
249: such that $HT(h)|HT(g)$ \}
250: \end{tabbing}
251: The input is homogenized to suppress intermediate coefficient swells
252: of intermediate basis elements. The number of zero normal forms may
253: increase by the homogenization, but they are detected over
1.5 ! noro 254: $GF(p)$. Finally, by dehomogenizing the candidate we can expect that
1.1 noro 255: lots of redundant elements can be removed. We will show later that this is
256: surely efficient for some input polynomial sets.
257:
258: \subsection{Minimal polynomial computation by modular method}
259: Let $I$ be a zero-dimensional ideal in $R={\bf Q}[x_1,\ldots,x_n]$.
260: Then the minimal polynomial $m(x_i)$ of a variable $x_i$ in $R/I$ can
261: be computed by a partial FGLM \cite{FGLM}, but it often takes long
262: time if one searches $m(x_i)$ incrementally over {\bf Q}. In this
263: case we can apply a simple modular method to compute the minimal
264: polynomial.
265: \begin{tabbing}
266: Input : a Groebner basis $G$ of $I$, a variable $x_i$\\
267: Output : the minimal polynomial of $x$ in $R/I$\\
268: do \= \\
269: \> $p \leftarrow$ a new prime such that $p \not{|} HC(g)$ for all $g \in G$\\
270: \> $m_p \leftarrow$ the minimal polynomial of $x_i$ in $GF(p)[x_1,\ldots,x_n]/Id(\phi_p(G))$\\
271: \> If there exists $m(x_i) \in I$ such that $\phi_p(m) = m_p$ and $\deg(m)=\deg(m_p)$\\
272: \> then return $m(x_i)$\\
273: end do
274: \end{tabbing}
275: In this algorithm, $m_p$ can be obtained by a partial FGLM over
276: $GF(p)$ because $\phi_p(G)$ is a Groebner basis. Once we know the
277: candidate of $\deg(m(x_i))$, $m(x_i)$ can be determined by solving a
278: system of linear equations via the method of indeterminate
279: coefficient. Arguments on \cite{NOYO} ensures that $m(x_i)$ is what we
280: want if it exists. Note that the full FGLM can also be computed by the
281: same method.
282:
283: \subsection{Integer contents reduction}
284:
1.5 ! noro 285: In some cases the cost to remove integer contents during normal form
1.1 noro 286: computations is dominant. We can remove the content of an integral
287: polynomial $f$ efficiently by the following method \cite{REPL}.
288: \begin{tabbing}
289: Input : an integral polynomial $f$\\
290: Output : a pair $(\cont(f),f/\cont(f))$\\
291: $g_0 \leftarrow$ an estimate of $\cont(f)$ such that $\cont(f)|g_0$\\
292: Write $f$ as $f = g_0q+r$ by division with remainder for each coefficient\\
293: If $r = 0$ then return $(g_0,q)$\\
294: else return $(g,g_0/g \cdot q + r/g)$, where $g = \GCD(g_0,\cont(r))$
295: \end{tabbing}
1.5 ! noro 296: By separating the set of coefficients of $f$ into two subsets and by
1.1 noro 297: computing GCD of sums in the elements in the subsets we can estimate
298: $g_0$ with high accuracy. Then other components are easily computed.
299:
300: %\subsection{Demand loading of reducers}
1.5 ! noro 301: %An execution of the Buchberger algorithm may produce vary large number
1.1 noro 302: %of intermediate basis elements. In Asir, we can specify that such
303: %basis elements should be put on disk to enlarge free memory space.
304: %This does not reduce the efficiency so much because all basis elements
305: %are not necessarily used in a single normal form computation, and the
306: %cost for reading basis elements from disk is often negligible because
307: %of the cost for coefficient computations.
308:
309: \section{Risa/Asir performance}
310:
1.5 ! noro 311: We show timing data on Risa/Asir for Groebner basis computation
! 312: and polynomial factorization. The measurements were made on
1.1 noro 313: a PC with PentiumIII 1GHz and 1Gbyte of main memory. Timings
314: are given in seconds. In the tables `---' means it was not
315: measured.
316:
317: \subsection{Groebner basis computation}
318:
1.5 ! noro 319: Table \ref{gbmod} and Table \ref{gbq} show timing data for Groebner
! 320: basis computation over $GF(32003)$ and over {\bf Q} respectively.
1.1 noro 321: $C_n$ is the cyclic $n$ system and $K_n$ is the Katsura $n$ system,
1.5 ! noro 322: both are famous bench mark problems \cite{BENCH}. We also measured
! 323: the timing for $McKay$ system over {\bf Q} \cite{REPL}. the term
! 324: order is graded reverse lexicographic order. In the both tables, the
! 325: first three rows are timings for the Buchberger algorithm, and the
! 326: last two rows are timings for $F_4$ algorithm. As to the Buchberger
! 327: algorithm over $GF(32003)$, Singular\cite{SINGULAR} shows the best
! 328: performance among the three systems. $F_4$ implementation in Risa/Asir
! 329: is faster than the Buchberger algorithm implementation in Singular,
! 330: but it is still several times slower than $F_4$ implementation in FGb
! 331: \cite{FGB}. In Table \ref{gbq}, $C_7$ and $McKay$ can be computed by
! 332: the Buchberger algorithm with the methods described in Section
! 333: \ref{gbtech}. It is obvious that $F_4$ implementation in Risa/Asir
! 334: over {\bf Q} is too immature. Nevertheless the timing of $McKay$ is
! 335: greatly reduced. Fig. \ref{f4vsbuch} explains why $F_4$ is efficient
! 336: in this case. The figure shows that the Buchberger algorithm produces
! 337: normal forms with huge coefficients for S-polynomials after the 250-th
! 338: one, which are the computations in degree 16. However, we know that
! 339: the reduced basis elements have much smaller coefficients after
! 340: removing contents. As $F_4$ algorithm automatically produces the
! 341: reduced ones, the degree 16 computation is quite easy in $F_4$.
1.1 noro 342:
343: \begin{table}[hbtp]
344: \begin{center}
345: \begin{tabular}{|c||c|c|c|c|c|c|c|} \hline
346: & $C_7$ & $C_8$ & $K_7$ & $K_8$ & $K_9$ & $K_{10}$ & $K_{11}$ \\ \hline
347: Asir $Buchberger$ & 31 & 1687 & 2.6 & 27 & 294 & 4309 & --- \\ \hline
348: Singular & 8.7 & 278 & 0.6 & 5.6 & 54 & 508 & 5510 \\ \hline
349: CoCoA 4 & 241 & $>$ 5h & 3.8 & 35 & 402 &7021 & --- \\ \hline\hline
350: Asir $F_4$ & 5.3 & 129 & 0.5 & 4.5 & 31 & 273 & 2641 \\ \hline
351: FGb(estimated) & 0.9 & 23 & 0.1 & 0.8 & 6 & 51 & 366 \\ \hline
352: \end{tabular}
353: \end{center}
354: \caption{Groebner basis computation over $GF(32003)$}
355: \label{gbmod}
356: \end{table}
357:
358: \begin{table}[hbtp]
359: \begin{center}
1.5 ! noro 360: \begin{tabular}{|c||c|c|c|c|c|c|} \hline
! 361: & $C_7$ & $Homog. C_7$ & $C_8$ & $K_7$ & $K_8$ & $McKay$ \\ \hline
! 362: Asir $Buchberger$ & 389 & 594 & 54000 & 29 & 299 & 34950 \\ \hline
! 363: Singular & --- & 15247 & --- & 7.6 & 79 & $>$ 20h \\ \hline
! 364: CoCoA 4 & --- & 13227 & --- & 57 & 709 & --- \\ \hline\hline
! 365: Asir $F_4$ & 989 & 456 & --- & 90 & 991 & 4939 \\ \hline
! 366: FGb(estimated) & 8 &11 & 288 & 0.6 & 5 & 10 \\ \hline
1.1 noro 367: \end{tabular}
368: \end{center}
369: \caption{Groebner basis computation over {\bf Q}}
370: \label{gbq}
371: \end{table}
372:
373: \begin{figure}[hbtp]
374: \begin{center}
375: \epsfxsize=12cm
1.4 noro 376: \epsffile{../compalg/ps/blenall.ps}
1.1 noro 377: \end{center}
378: \caption{Maximal coefficient bit length of intermediate bases}
379: \label{f4vsbuch}
380: \end{figure}
381:
1.5 ! noro 382: Table \ref{minipoly} shows timing data for the minimal polynomial
! 383: computation over {\bf Q}. Singular provides a function {\tt finduni}
! 384: for computing the minimal polynomial in each variable in ${\bf
! 385: Q}[x_1,\ldots,x_n]/I$ for zero dimensional ideal $I$. The modular
! 386: method used in Asir is efficient when the resulting minimal
! 387: polynomials have large coefficients and we can verify the fact from Table
! 388: \ref{minipoly}.
! 389: \begin{table}[hbtp]
! 390: \begin{center}
! 391: \begin{tabular}{|c||c|c|c|c|c|} \hline
! 392: & $C_6$ & $C_7$ & $K_6$ & $K_7$ & $K_8$ \\ \hline
! 393: Singular & 0.9 & 846 & 307 & 60880 & --- \\ \hline
! 394: Asir & 1.5 & 182 & 12 & 164 & 3420 \\ \hline
! 395: \end{tabular}
! 396: \end{center}
! 397: \caption{Minimal polynomial computation}
! 398: \label{minipoly}
! 399: \end{table}
! 400:
1.1 noro 401: \subsection{Polynomial factorization}
402:
1.3 noro 403: %Table \ref{unifac} shows timing data for univariate factorization over
404: %{\bf Q}. $N_{i,j}$ is an irreducible polynomial which are hard to
405: %factor by the classical algorithm. $N_{i,j}$ is a norm of a polynomial
406: %and $\deg(N_i) = i$ with $j$ modular factors. Risa/Asir is
407: %disadvantageous in factoring polynomials of this type because the
408: %algorithm used in Risa/Asir has exponential complexity. In contrast,
409: %CoCoA 4\cite{COCOA} and NTL-5.2\cite{NTL} show nice performances
410: %because they implement recently developed algorithms.
411: %
412: %\begin{table}[hbtp]
413: %\begin{center}
414: %\begin{tabular}{|c||c|c|c|c|} \hline
415: % & $N_{105,23}$ & $N_{120,20}$ & $N_{168,24}$ & $N_{210,54}$ \\ \hline
416: %Asir & 0.86 & 59 & 840 & hard \\ \hline
417: %Asir NormFactor & 1.6 & 2.2& 6.1& hard \\ \hline
418: %%Singular& hard? & hard?& hard? & hard? \\ \hline
419: %CoCoA 4 & 0.2 & 7.1 & 16 & 0.5 \\ \hline\hline
420: %NTL-5.2 & 0.16 & 0.9 & 1.4 & 0.4 \\ \hline
421: %\end{tabular}
422: %\end{center}
423: %\caption{Univariate factorization over {\bf Q}}
424: %\label{unifac}
425: %\end{table}
1.1 noro 426:
427: Table \ref{multifac} shows timing data for multivariate
428: factorization over {\bf Q}.
429: $W_{i,j,k}$ is a product of three multivariate polynomials
430: $Wang[i]$, $Wang[j]$, $Wang[k]$ given in a data file
431: {\tt fctrdata} in Asir library directory. It is also included
432: in Risa/Asir source tree and located in {\tt asir2000/lib}.
433: For these examples Risa/Asir shows reasonable performance
434: compared with other famous systems.
435: \begin{table}[hbtp]
436: \begin{center}
437: \begin{tabular}{|c||c|c|c|c|c|} \hline
438: & $W_{1,2,3}$ & $W_{4,5,6}$ & $W_{7,8,9}$ & $W_{10,11,12}$ & $W_{13,14,15}$ \\ \hline
439: variables & 3 & 5 & 5 & 5 & 4 \\ \hline
440: monomials & 905 & 41369 & 51940 & 30988 & 3344 \\ \hline\hline
441: Asir & 0.2 & 4.7 & 14 & 17 & 0.4 \\ \hline
442: %Singular& $>$15min & --- & ---& ---& ---\\ \hline
443: CoCoA 4 & 5.2 & $>$15min & $>$15min & $>$15min & 117 \\ \hline\hline
444: Mathematica 4& 0.2 & 16 & 23 & 36 & 1.1 \\ \hline
445: Maple 7& 0.5 & 18 & 967 & 48 & 1.3 \\ \hline
446: \end{tabular}
447: \end{center}
448: \caption{Multivariate factorization over {\bf Q}}
449: \label{multifac}
450: \end{table}
1.3 noro 451: As to univariate factorization over {\bf Q},
452: the univariate factorizer implements only classical
1.5 ! noro 453: algorithms and its behavior is what one expects,
1.3 noro 454: that is, it shows average performance in cases
1.5 ! noro 455: where there are little extraneous factors, but
1.3 noro 456: shows poor performance for hard to factor polynomials.
457:
1.1 noro 458: \section{OpenXM and Risa/Asir OpenXM interfaces}
459:
460: \subsection{OpenXM overview}
461:
462: OpenXM stands for Open message eXchange protocol for Mathematics.
1.5 ! noro 463: From the viewpoint of protocol design, it can be regarded as a child
! 464: of OpenMath \cite{OPENMATH}. However our approach is somewhat
! 465: different. Our main purpose is to provide an environment for
! 466: integrating {\it existing} mathematical software systems. OpenXM
! 467: RFC-100 \cite{RFC100} defines a client-server architecture. Under
! 468: this specification, a client invokes an OpenXM ({\it OX}) server. The
! 469: client can send OpenXM ({\it OX}) messages to the server. OX messages
! 470: consist of {\it data} and {\it command}. Data is encoded according to
! 471: the common mathematical object ({\it CMO}) format which defines
! 472: serialized representation of mathematical objects. An OX server is a
! 473: stackmachine. If data is sent as an OX message, the server pushes the
! 474: data onto its stack. There is a common set of stackmachine commands
! 475: and each OX server understands its subset. The command set includes
! 476: stack manipulating commands and requests for execution of a procedure.
! 477: In addition, a server may accept its own command sequences if the
! 478: server wraps some interactive software. That is the server may be a
! 479: hybrid server.
1.1 noro 480:
481: OpenXM RFC-100 also defines methods for session management. In particular
482: the method to reset a server is carefully designed and it provides
483: a robust way of using servers both for interactive and non-interactive
484: purposes.
485:
486: \subsection{OpenXM client interface of {\tt asir}}
487:
488: Risa/Asir is a main client in OpenXM package. The application {\tt
1.5 ! noro 489: asir} can access to OpenXM servers via several built-in interface
! 490: functions. and various interfaces to existing OpenXM servers are
! 491: prepared as user defined functions written in Asir language.
! 492: We show a typical OpenXM session.
1.1 noro 493:
494: \begin{verbatim}
495: [1] P = ox_launch(); /* invoke an OpenXM asir server */
496: 0
497: [2] ox_push_cmo(P,x^10-y^10);
498: /* push a polynomial onto the stack */
499: 0
500: [3] ox_execute_function(P,"fctr",1); /* call factorizer */
501: 0
502: [4] ox_pop_cmo(P); /* get the result from the stack */
503: [[1,1],[x^4+y*x^3+y^2*x^2+y^3*x+y^4,1],
504: [x^4-y*x^3+y^2*x^2-y^3*x+y^4,1],[x-y,1],[x+y,1]]
505: [5] ox_cmo_rpc(P,"fctr,",x^10000-2^10000*y^10000);
506: /* call factorizer; an utility function */
507: 0
508: [6] ox_reset(P); /* reset the computation in the server */
509: 1
510: [7] ox_shutdown(P); /* shutdown the server */
511: 0
512: \end{verbatim}
513:
514: \subsection{OpenXM server {\tt ox\_asir}}
515:
516: An application {\tt ox\_asir} is a wrapper of {\tt asir} and provides
517: all the functions of {\tt asir} to OpenXM clients. It completely
518: implements the OpenXM reset protocol and also provides remote
1.5 ! noro 519: debugging of user programs running on the server. As an example we
! 520: show a program for checking whether a polynomial set is a Groebner
! 521: basis or not. A client executes {\tt gbcheck()} and servers execute
! 522: {\tt sp\_nf\_for\_gbcheck()} which is a simple normal form computation
! 523: of a S-polynomial. First of all the client collects all critical pairs
1.1 noro 524: necessary for the check. Then the client requests normal form
525: computations to idling servers. If there are no idling servers the
526: clients waits for some servers to return results by {\tt
527: ox\_select()}, which is a wrapper of UNIX {\tt select()}. If we have
1.5 ! noro 528: large number of critical pairs to be processed, we can expect good
! 529: load balancing by {\tt ox\_select()}.
1.1 noro 530:
531: \begin{verbatim}
532: def gbcheck(B,V,O,Procs) {
533: map(ox_reset,Procs);
534: dp_ord(O); D = map(dp_ptod,B,V);
535: L = dp_gr_checklist(D); DP = L[0]; Plist = L[1];
536: /* register DP in servers */
537: map(ox_cmo_rpc,Procs,"register_data_for_gbcheck",vtol(DP));
538: /* discard return value in stack */
539: map(ox_pop_cmo,Procs);
540: Free = Procs; Busy = [];
541: while ( Plist != [] || Busy != [] )
542: if ( Free == [] || Plist == [] ) {
543: /* someone is working; wait for data */
544: Ready = ox_select(Busy);
545: /* update Busy list and Free list */
546: Busy = setminus(Busy,Ready); Free = append(Ready,Free);
547: for ( ; Ready != []; Ready = cdr(Ready) )
548: if ( ox_get(car(Ready)) != 0 ) {
549: /* a normal form is non zero */
550: map(ox_reset,Procs); return 0;
551: }
552: } else {
553: /* update Busy list and Free list */
554: Id = car(Free); Free = cdr(Free); Busy = cons(Id,Busy);
555: /* take a pair */
556: Pair = car(Plist); Plist = cdr(Plist);
557: /* request a normal form computation */
558: ox_cmo_rpc(Id,"sp_nf_for_gbcheck",Pair);
559: ox_push_cmd(Id,262); /* 262 = OX_popCMO */
560: }
561: map(ox_reset,Procs); return 1;
562: }
563: \end{verbatim}
564:
565: \subsection{Asir OpenXM library {\tt libasir.a}}
566:
567: Asir OpenXM library {\tt libasir.a} includes functions simulating the
568: stack machine commands supported in {\tt ox\_asir}. By linking {\tt
569: libasir.a} an application can use the same functions as in {\tt
1.3 noro 570: ox\_asir} without accessing to {\tt ox\_asir} via TCP/IP. There is
1.5 ! noro 571: also a stack, which can be manipulated by library functions. In
! 572: order to make full use of this interface, one has to prepare
! 573: conversion functions between CMO and the data structures proper to the
! 574: application. A function {\tt asir\_ox\_pop\_string()} is provided to
! 575: convert CMO to a human readable form, which may be sufficient for a
! 576: simple use of this interface.
1.1 noro 577:
578: \section{Concluding remarks}
579: We have shown the current status of Risa/Asir and its OpenXM
580: interfaces. As a result of our policy of development, it is true that
581: Risa/Asir does not have abundant functions. However it is a completely
1.5 ! noro 582: open system and its total performance is not bad. Especially on
! 583: Groebner basis computation over {\bf Q}, many techniques for improving
! 584: practical performances have been implemented. As the OpenXM interface
! 585: specification is completely documented, we can easily add another
! 586: function to Risa/Asir by wrapping an existing software system as an OX
! 587: server, and vice versa. User program debugger can be used both for
! 588: local and remote debugging. By combining the debugger and the function
! 589: to reset servers, one will be able to enjoy parallel and distributed
! 590: computation with OpenXM facilities.
1.1 noro 591: %
592: \begin{thebibliography}{7}
593: %
594: \addcontentsline{toc}{section}{References}
595:
596: \bibitem{ANY}
597: Anay, H., Noro, M., Yokoyama, K. (1996)
598: Computation of the Splitting fields and the Galois Groups of Polynomials.
599: Algorithms in Algebraic geometry and Applications,
600: Birkh\"auser (Proceedings of MEGA'94), 29--50.
601:
602: \bibitem{FPARA}
603: Jean-Charles Faug\`ere (1994)
604: Parallelization of Groebner basis.
605: Proceedings of PASCO'94, 124--132.
606:
607: \bibitem{F4}
608: Jean-Charles Faug\`ere (1999)
609: A new efficient algorithm for computing Groebner bases ($F_4$).
610: Journal of Pure and Applied Algebra (139) 1-3 , 61--88.
611:
612: \bibitem{FGLM}
613: Faug\`ere, J.-C. et al. (1993)
614: Efficient computation of zero-dimensional Groebner bases by change of ordering.
615: Journal of Symbolic Computation 16, 329--344.
616:
617: \bibitem{RFC100}
618: M. Maekawa, et al. (2001)
619: The Design and Implementation of OpenXM-RFC 100 and 101.
620: Proceedings of ASCM2001, World Scientific, 102--111.
621:
622: \bibitem{RISA}
623: Noro, M. et al. (1994-2001)
624: A computer algebra system Risa/Asir.
625: {\tt http://www.openxm.org}, {\tt http://www.math.kobe-u.ac.jp/Asir/asir.html}.
626:
627: \bibitem{REPL}
628: Noro, M., McKay, J. (1997)
629: Computation of replicable functions on Risa/Asir.
630: Proceedings of PASCO'97, ACM Press, 130--138.
631:
632: \bibitem{NOYO}
633: Noro, M., Yokoyama, K. (1999)
634: A Modular Method to Compute the Rational Univariate
635: Representation of Zero-Dimensional Ideals.
636: Journal of Symbolic Computation, 28, 1, 243--263.
637:
638: \bibitem{OPENXM}
639: OpenXM committers (2000-2001)
640: OpenXM package.
641: {\tt http://www.openxm.org}.
642:
643: \bibitem{SY}
644: Shimoyama, T., Yokoyama, K. (1996)
645: Localization and Primary Decomposition of Polynomial Ideals.
646: Journal of Symbolic Computation, 22, 3, 247--277.
647:
648: \bibitem{TRAGER}
649: Trager, B.M. (1976)
650: Algebraic Factoring and Rational Function Integration.
651: Proceedings of SYMSAC 76, 219--226.
652:
653: \bibitem{TRAV}
654: Traverso, C. (1988)
655: Groebner trace algorithms.
656: LNCS {\bf 358} (Proceedings of ISSAC'88), Springer-Verlag, 125--138.
657:
1.5 ! noro 658: \bibitem{BENCH}
! 659: {\tt http://www.math.uic.edu/\~\,jan/demo.html}.
! 660:
1.1 noro 661: \bibitem{COCOA}
662: {\tt http://cocoa.dima.unige.it/}.
663:
664: \bibitem{FGB}
665: {\tt http://www-calfor.lip6.fr/\~\,jcf/}.
666:
1.5 ! noro 667: %\bibitem{NTL}
! 668: %{\tt http://www.shoup.net/}.
1.1 noro 669:
670: \bibitem{OPENMATH}
671: {\tt http://www.openmath.org/}.
672:
673: \bibitem{SINGULAR}
674: {\tt http://www.singular.uni-kl.de/}.
675:
676: \end{thebibliography}
677:
678: %INDEX%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
679: \clearpage
680: \addcontentsline{toc}{section}{Index}
681: \flushbottom
682: \printindex
683: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
684:
685: \end{document}
686:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>