[BACK]Return to dag-noro-proc.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / Papers

Annotation of OpenXM/doc/Papers/dag-noro-proc.tex, Revision 1.6

1.6     ! noro        1: % $OpenXM: OpenXM/doc/Papers/dag-noro-proc.tex,v 1.5 2001/11/28 08:46:54 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.6     ! noro      376: %\epsffile{../compalg/ps/blenall.ps}
        !           377: \epsffile{blen.ps}
1.1       noro      378: \end{center}
                    379: \caption{Maximal coefficient bit length of intermediate bases}
                    380: \label{f4vsbuch}
                    381: \end{figure}
                    382:
1.5       noro      383: Table \ref{minipoly} shows timing data for the minimal polynomial
                    384: computation over {\bf Q}. Singular provides a function {\tt finduni}
                    385: for computing the minimal polynomial in each variable in ${\bf
                    386: Q}[x_1,\ldots,x_n]/I$ for zero dimensional ideal $I$. The modular
                    387: method used in Asir is efficient when the resulting minimal
                    388: polynomials have large coefficients and we can verify the fact from Table
                    389: \ref{minipoly}.
                    390: \begin{table}[hbtp]
                    391: \begin{center}
                    392: \begin{tabular}{|c||c|c|c|c|c|} \hline
                    393:                & $C_6$ & $C_7$ & $K_6$ & $K_7$ & $K_8$ \\ \hline
                    394: Singular & 0.9 & 846 & 307 & 60880 & ---  \\ \hline
                    395: Asir & 1.5 & 182 & 12 & 164 & 3420  \\ \hline
                    396: \end{tabular}
                    397: \end{center}
                    398: \caption{Minimal polynomial computation}
                    399: \label{minipoly}
                    400: \end{table}
                    401:
1.1       noro      402: \subsection{Polynomial factorization}
                    403:
1.3       noro      404: %Table \ref{unifac} shows timing data for univariate factorization over
                    405: %{\bf Q}.  $N_{i,j}$ is an irreducible polynomial which are hard to
                    406: %factor by the classical algorithm. $N_{i,j}$ is a norm of a polynomial
                    407: %and $\deg(N_i) = i$ with $j$ modular factors. Risa/Asir is
                    408: %disadvantageous in factoring polynomials of this type because the
                    409: %algorithm used in Risa/Asir has exponential complexity. In contrast,
                    410: %CoCoA 4\cite{COCOA} and NTL-5.2\cite{NTL} show nice performances
                    411: %because they implement recently developed algorithms.
                    412: %
                    413: %\begin{table}[hbtp]
                    414: %\begin{center}
                    415: %\begin{tabular}{|c||c|c|c|c|} \hline
                    416: %              & $N_{105,23}$ & $N_{120,20}$ & $N_{168,24}$ & $N_{210,54}$ \\ \hline
                    417: %Asir  & 0.86  & 59 & 840 & hard \\ \hline
                    418: %Asir NormFactor & 1.6         & 2.2& 6.1& hard \\ \hline
                    419: %%Singular& hard?      & hard?& hard? & hard? \\ \hline
                    420: %CoCoA 4 & 0.2         & 7.1   & 16 & 0.5 \\ \hline\hline
                    421: %NTL-5.2       & 0.16  & 0.9   & 1.4 & 0.4 \\ \hline
                    422: %\end{tabular}
                    423: %\end{center}
                    424: %\caption{Univariate factorization over {\bf Q}}
                    425: %\label{unifac}
                    426: %\end{table}
1.1       noro      427:
                    428: Table \ref{multifac} shows timing data for multivariate
                    429: factorization over {\bf Q}.
                    430: $W_{i,j,k}$ is a product of three multivariate polynomials
                    431: $Wang[i]$, $Wang[j]$, $Wang[k]$ given in a data file
                    432: {\tt fctrdata} in Asir library directory. It is also included
                    433: in Risa/Asir source tree and located in {\tt asir2000/lib}.
                    434: For these examples Risa/Asir shows reasonable performance
                    435: compared with other famous systems.
                    436: \begin{table}[hbtp]
                    437: \begin{center}
                    438: \begin{tabular}{|c||c|c|c|c|c|} \hline
                    439:        & $W_{1,2,3}$ & $W_{4,5,6}$ & $W_{7,8,9}$ & $W_{10,11,12}$ & $W_{13,14,15}$ \\ \hline
                    440: variables & 3 & 5 & 5 & 5 & 4 \\ \hline
                    441: monomials & 905 & 41369 & 51940 & 30988 & 3344 \\ \hline\hline
                    442: Asir   & 0.2 & 4.7 & 14 & 17 & 0.4 \\ \hline
                    443: %Singular& $>$15min    & ---   & ---& ---& ---\\ \hline
                    444: CoCoA 4 & 5.2 & $>$15min       & $>$15min & $>$15min & 117 \\ \hline\hline
                    445: Mathematica 4& 0.2     & 16    & 23 & 36 & 1.1 \\ \hline
                    446: Maple 7& 0.5   & 18    & 967  & 48 & 1.3 \\ \hline
                    447: \end{tabular}
                    448: \end{center}
                    449: \caption{Multivariate factorization over {\bf Q}}
                    450: \label{multifac}
                    451: \end{table}
1.3       noro      452: As to univariate factorization over {\bf Q},
                    453: the univariate factorizer implements only classical
1.5       noro      454: algorithms and its behavior is what one expects,
1.3       noro      455: that is, it shows average performance in cases
1.5       noro      456: where there are little extraneous factors, but
1.3       noro      457: shows poor performance for hard to factor polynomials.
                    458:
1.1       noro      459: \section{OpenXM and Risa/Asir OpenXM interfaces}
                    460:
                    461: \subsection{OpenXM overview}
                    462:
                    463: OpenXM stands for Open message eXchange protocol for Mathematics.
1.5       noro      464: From the viewpoint of protocol design, it can be regarded as a child
                    465: of OpenMath \cite{OPENMATH}.  However our approach is somewhat
                    466: different. Our main purpose is to provide an environment for
                    467: integrating {\it existing} mathematical software systems. OpenXM
                    468: RFC-100 \cite{RFC100} defines a client-server architecture.  Under
                    469: this specification, a client invokes an OpenXM ({\it OX}) server.  The
                    470: client can send OpenXM ({\it OX}) messages to the server.  OX messages
                    471: consist of {\it data} and {\it command}. Data is encoded according to
                    472: the common mathematical object ({\it CMO}) format which defines
                    473: serialized representation of mathematical objects.  An OX server is a
                    474: stackmachine. If data is sent as an OX message, the server pushes the
                    475: data onto its stack. There is a common set of stackmachine commands
                    476: and each OX server understands its subset. The command set includes
                    477: stack manipulating commands and requests for execution of a procedure.
                    478: In addition, a server may accept its own command sequences if the
                    479: server wraps some interactive software. That is the server may be a
                    480: hybrid server.
1.1       noro      481:
                    482: OpenXM RFC-100 also defines methods for session management. In particular
                    483: the method to reset a server is carefully designed and it provides
                    484: a robust way of using servers both for interactive and non-interactive
                    485: purposes.
                    486:
                    487: \subsection{OpenXM client interface of {\tt asir}}
                    488:
                    489: Risa/Asir is a main client in OpenXM package.  The application {\tt
1.5       noro      490: asir} can access to OpenXM servers via several built-in interface
                    491: functions. and various interfaces to existing OpenXM servers are
                    492: prepared as user defined functions written in Asir language.
                    493: We show a typical OpenXM session.
1.1       noro      494:
                    495: \begin{verbatim}
                    496: [1] P = ox_launch();  /* invoke an OpenXM asir server */
                    497: 0
                    498: [2] ox_push_cmo(P,x^10-y^10);
                    499: /* push a polynomial onto the stack */
                    500: 0
                    501: [3] ox_execute_function(P,"fctr",1);  /* call factorizer */
                    502: 0
                    503: [4] ox_pop_cmo(P);  /* get the result from the stack */
                    504: [[1,1],[x^4+y*x^3+y^2*x^2+y^3*x+y^4,1],
                    505: [x^4-y*x^3+y^2*x^2-y^3*x+y^4,1],[x-y,1],[x+y,1]]
                    506: [5] ox_cmo_rpc(P,"fctr,",x^10000-2^10000*y^10000);
                    507: /* call factorizer; an utility function */
                    508: 0
                    509: [6] ox_reset(P); /* reset the computation in the server */
                    510: 1
                    511: [7] ox_shutdown(P); /* shutdown the server */
                    512: 0
                    513: \end{verbatim}
                    514:
                    515: \subsection{OpenXM server {\tt ox\_asir}}
                    516:
                    517: An application {\tt ox\_asir} is a wrapper of {\tt asir} and provides
                    518: all the functions of {\tt asir} to OpenXM clients. It completely
                    519: implements the OpenXM reset protocol and also provides remote
1.5       noro      520: debugging of user programs running on the server. As an example we
                    521: show a program for checking whether a polynomial set is a Groebner
                    522: basis or not. A client executes {\tt gbcheck()} and servers execute
                    523: {\tt sp\_nf\_for\_gbcheck()} which is a simple normal form computation
                    524: of a S-polynomial. First of all the client collects all critical pairs
1.1       noro      525: necessary for the check. Then the client requests normal form
                    526: computations to idling servers. If there are no idling servers the
                    527: clients waits for some servers to return results by {\tt
                    528: ox\_select()}, which is a wrapper of UNIX {\tt select()}. If we have
1.5       noro      529: large number of critical pairs to be processed, we can expect good
                    530: load balancing by {\tt ox\_select()}.
1.1       noro      531:
                    532: \begin{verbatim}
                    533: def gbcheck(B,V,O,Procs) {
                    534:   map(ox_reset,Procs);
                    535:   dp_ord(O); D = map(dp_ptod,B,V);
                    536:   L = dp_gr_checklist(D); DP = L[0]; Plist = L[1];
                    537:   /* register DP in servers */
                    538:   map(ox_cmo_rpc,Procs,"register_data_for_gbcheck",vtol(DP));
                    539:   /* discard return value in stack */
                    540:   map(ox_pop_cmo,Procs);
                    541:   Free = Procs; Busy = [];
                    542:   while ( Plist != [] || Busy != []  )
                    543:     if ( Free == [] || Plist == [] ) {
                    544:       /* someone is working; wait for data */
                    545:       Ready = ox_select(Busy);
                    546:          /* update Busy list and Free list */
                    547:       Busy = setminus(Busy,Ready); Free = append(Ready,Free);
                    548:       for ( ; Ready != []; Ready = cdr(Ready) )
                    549:         if ( ox_get(car(Ready)) != 0 ) {
                    550:                  /* a normal form is non zero */
                    551:           map(ox_reset,Procs); return 0;
                    552:         }
                    553:     } else {
                    554:          /* update Busy list and Free list */
                    555:       Id = car(Free); Free = cdr(Free); Busy = cons(Id,Busy);
                    556:          /* take a pair */
                    557:          Pair = car(Plist); Plist = cdr(Plist);
                    558:          /* request a normal form computation */
                    559:       ox_cmo_rpc(Id,"sp_nf_for_gbcheck",Pair);
                    560:       ox_push_cmd(Id,262); /* 262 = OX_popCMO */
                    561:     }
                    562:   map(ox_reset,Procs); return 1;
                    563: }
                    564: \end{verbatim}
                    565:
                    566: \subsection{Asir OpenXM library {\tt libasir.a}}
                    567:
                    568: Asir OpenXM library {\tt libasir.a} includes functions simulating the
                    569: stack machine commands supported in {\tt ox\_asir}.  By linking {\tt
                    570: libasir.a} an application can use the same functions as in {\tt
1.3       noro      571: ox\_asir} without accessing to {\tt ox\_asir} via TCP/IP. There is
1.5       noro      572: also a stack, which can be manipulated by library functions. In
                    573: order to make full use of this interface, one has to prepare
                    574: conversion functions between CMO and the data structures proper to the
                    575: application.  A function {\tt asir\_ox\_pop\_string()} is provided to
                    576: convert CMO to a human readable form, which may be sufficient for a
                    577: simple use of this interface.
1.1       noro      578:
                    579: \section{Concluding remarks}
                    580: We have shown the current status of Risa/Asir and its OpenXM
                    581: interfaces. As a result of our policy of development, it is true that
                    582: Risa/Asir does not have abundant functions. However it is a completely
1.5       noro      583: open system and its total performance is not bad. Especially on
                    584: Groebner basis computation over {\bf Q}, many techniques for improving
                    585: practical performances have been implemented. As the OpenXM interface
                    586: specification is completely documented, we can easily add another
                    587: function to Risa/Asir by wrapping an existing software system as an OX
                    588: server, and vice versa. User program debugger can be used both for
                    589: local and remote debugging. By combining the debugger and the function
                    590: to reset servers, one will be able to enjoy parallel and distributed
                    591: computation with OpenXM facilities.
1.1       noro      592: %
                    593: \begin{thebibliography}{7}
                    594: %
                    595: \addcontentsline{toc}{section}{References}
                    596:
                    597: \bibitem{ANY}
                    598: Anay, H., Noro, M., Yokoyama, K. (1996)
                    599: Computation of the Splitting fields and the Galois Groups of Polynomials.
                    600: Algorithms in Algebraic geometry and Applications,
                    601: Birkh\"auser (Proceedings of MEGA'94), 29--50.
                    602:
                    603: \bibitem{FPARA}
                    604: Jean-Charles Faug\`ere (1994)
                    605: Parallelization of Groebner basis.
                    606: Proceedings of PASCO'94, 124--132.
                    607:
                    608: \bibitem{F4}
                    609: Jean-Charles Faug\`ere (1999)
                    610: A new efficient algorithm for computing Groebner bases  ($F_4$).
                    611: Journal of Pure and Applied Algebra (139) 1-3 , 61--88.
                    612:
                    613: \bibitem{FGLM}
                    614: Faug\`ere, J.-C. et al. (1993)
                    615: Efficient computation of zero-dimensional Groebner bases by change of ordering.
                    616: Journal of Symbolic Computation 16, 329--344.
                    617:
                    618: \bibitem{RFC100}
                    619: M. Maekawa, et al. (2001)
                    620: The Design and Implementation of OpenXM-RFC 100 and 101.
                    621: Proceedings of ASCM2001, World Scientific, 102--111.
                    622:
                    623: \bibitem{RISA}
                    624: Noro, M. et al. (1994-2001)
                    625: A computer algebra system Risa/Asir.
                    626: {\tt http://www.openxm.org}, {\tt http://www.math.kobe-u.ac.jp/Asir/asir.html}.
                    627:
                    628: \bibitem{REPL}
                    629: Noro, M., McKay, J. (1997)
                    630: Computation of replicable functions on Risa/Asir.
                    631: Proceedings of PASCO'97, ACM Press, 130--138.
                    632:
                    633: \bibitem{NOYO}
                    634: Noro, M., Yokoyama, K. (1999)
                    635: A Modular Method to Compute the Rational Univariate
                    636: Representation of Zero-Dimensional Ideals.
                    637: Journal of Symbolic Computation, 28, 1, 243--263.
                    638:
                    639: \bibitem{OPENXM}
                    640: OpenXM committers (2000-2001)
                    641: OpenXM package.
                    642: {\tt http://www.openxm.org}.
                    643:
                    644: \bibitem{SY}
                    645: Shimoyama, T., Yokoyama, K. (1996)
                    646: Localization and Primary Decomposition of Polynomial Ideals.
                    647: Journal of Symbolic Computation, 22, 3, 247--277.
                    648:
                    649: \bibitem{TRAGER}
                    650: Trager, B.M. (1976)
                    651: Algebraic Factoring and Rational Function Integration.
                    652: Proceedings of SYMSAC 76, 219--226.
                    653:
                    654: \bibitem{TRAV}
                    655: Traverso, C. (1988)
                    656: Groebner trace algorithms.
                    657: LNCS {\bf 358} (Proceedings of ISSAC'88), Springer-Verlag, 125--138.
                    658:
1.5       noro      659: \bibitem{BENCH}
                    660: {\tt http://www.math.uic.edu/\~\,jan/demo.html}.
                    661:
1.1       noro      662: \bibitem{COCOA}
                    663: {\tt http://cocoa.dima.unige.it/}.
                    664:
                    665: \bibitem{FGB}
                    666: {\tt http://www-calfor.lip6.fr/\~\,jcf/}.
                    667:
1.5       noro      668: %\bibitem{NTL}
                    669: %{\tt http://www.shoup.net/}.
1.1       noro      670:
                    671: \bibitem{OPENMATH}
                    672: {\tt http://www.openmath.org/}.
                    673:
                    674: \bibitem{SINGULAR}
                    675: {\tt http://www.singular.uni-kl.de/}.
                    676:
                    677: \end{thebibliography}
                    678:
                    679: %INDEX%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    680: \clearpage
                    681: \addcontentsline{toc}{section}{Index}
                    682: \flushbottom
                    683: \printindex
                    684: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    685:
                    686: \end{document}
                    687:

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