[BACK]Return to risa.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-doc / parts

Annotation of OpenXM/src/asir-doc/parts/risa.texi, Revision 1.9

1.9     ! noro        1: @comment $OpenXM: OpenXM/src/asir-doc/parts/risa.texi,v 1.8 2000/01/26 01:37:32 noro Exp $
1.1       noro        2: @node Risa/Asir,,, Top
                      3: @chapter Risa/Asir
                      4:
                      5: @menu
1.2       noro        6: \BJP
1.1       noro        7: * Risa $B$*$h$S(B Asir::
                      8: * Asir $B$NFCD'(B::
1.9     ! noro        9: * Installation::
1.1       noro       10: * $B%3%^%s%I%i%$%s%*%W%7%g%s(B::
                     11: * $B4D6-JQ?t(B::
                     12: * $B5/F0$+$i=*N;$^$G(B::
                     13: * $B3d$j9~$_(B::
                     14: * $B%(%i!<=hM}(B::
                     15: * $B7W;;7k2L$*$h$SFC<l$J?t(B::
1.2       noro       16: \E
                     17: \BEG
                     18: * Risa and Asir::
                     19: * Features of Asir::
                     20: * Installation::
                     21: * Command line options::
                     22: * Environment variable::
                     23: * Starting and Terminating an Asir session::
                     24: * Interruption::
                     25: * Error handling::
                     26: * Referencing results and special numbers::
                     27: \E
1.1       noro       28: @end menu
                     29:
1.2       noro       30: \BJP
1.1       noro       31: @node Risa $B$*$h$S(B Asir,,, Risa/Asir
                     32: @section Risa $B$*$h$S(B Asir
1.2       noro       33: \E
                     34: \BEG
                     35: @node Risa and Asir,,, Risa/Asir
                     36: @section @b{Risa} and @b{Asir}
                     37: \E
1.1       noro       38:
                     39: @noindent
1.2       noro       40: \BJP
1.1       noro       41: @b{Risa} $B$O(B, $BIY;NDL8&$G3+H/Cf$N?t<0=hM}%7%9%F%`(B/$B%i%$%V%i%j$NAm>N$G$"$k(B.
                     42: @b{Risa} $B$N9=@.$O<!$NDL$j$G$"$k(B.
1.2       noro       43: \E
                     44: \BEG
                     45: @b{Risa} is the name of whole libraries of a computer algebra system
                     46: which is under development at FUJITSU LABORATORIES LIMITED.
                     47: The structure of @b{Risa} is as follows.
                     48: \E
1.1       noro       49:
                     50: @itemize @bullet
                     51: @item
1.2       noro       52: \JP @code{$B4pK\1i;;It(B}
                     53: \EG @b{The basic algebraic engine}
1.8       noro       54: @*
1.2       noro       55: \BJP
1.1       noro       56: $B$3$l$O(B, @b{Risa} $B$NFbIt7A<0$KJQ49$5$l$?%*%V%8%'%/%H(B ($B?t(B, $BB?9`<0$J$I(B)
                     57: $B$N4V$N1i;;$r<B9T$9$kItJ,$G$"$j(B, UNIX $B$N(B @samp{libc.a} $B$J$I$HF1MM$N(B, $B%i%$%V%i(B
                     58: $B%j$H$7$FB8:_$9$k(B. $B%(%s%8%s$O(B, C $B$*$h$S(B $B%"%;%s%V%i$G5-=R$5$l(B, $B8e=R$9$k(B
1.2       noro       59: $B8@8l%$%s%?%U%'!<%9(B @b{Asir} $B$N4pK\1i;;It$H$7$FMQ$$$i$l$F$$$k(B.
                     60: @comment $B0lJ}(B, $B?t<07W;;$rI,MW$H$9$k$5$^$6$^$J%W%m%0%i%`Cf$K%j%s%/$7$FMQ$$$k$3$H$,$G$-$k(B.
                     61: \E
                     62: \BEG
                     63: This is the part which performs basic algebraic operations,
                     64: such as arithmetic operations, to algebraic objects, e.g., numbers and
                     65: polynomials, which are already converted into internal forms.
                     66: It exists, like @samp{libc.a} of UNIX, as a library of ordinary UNIX system.
                     67: The algebraic engine is written mainly in C language and
                     68: partly in assembler.
                     69: It serves as the basic operation part of @b{Asir}, a standard
                     70: language interface of @b{Risa}.
                     71: @comment It can also be linked to various programs that need some symbolic
                     72: @comment and algebraic computation.
                     73: \E
                     74:
1.1       noro       75: @item
1.2       noro       76: \JP @code{$B%a%b%j4IM}It(B}
                     77: \EG @b{Memory Manager}
1.8       noro       78: @*
1.2       noro       79: \BJP
1.1       noro       80: @b{Risa} $B$G$O(B, $B%a%b%j4IM}It$H$7$F(B, @code{[Boehm,Weiser]} $B$K$h$k%U%j!<(B
                     81: $B%=%U%H%&%'%"(B (@code{gc-5.0alpha2}) $B$rMQ$$$F$$$k(B. $B$3$l$O%,!<%Y%8%3%l%/%7%g%s(B
                     82: ($B0J2<(B GC $B$H8F$V(B) $B$r<+F0E*$K9T$&%a%b%j3d$jEv$F5!9=$r;}$A(B, @b{Risa} $B$N3F(B
                     83: $BItJ,$O$9$Y$F$3$l$K$h$jI,MW$J%a%b%j$rF@$F$$$k(B.
1.2       noro       84: \E
                     85: \BEG
                     86: @b{Risa} employs, as its memory management component (the memory
                     87: manager), a free software distributed by Boehm (@code{gc-5.0alpha2}).
                     88: It is proposed by @code{[Boehm,Weiser]}, and developed by Boehm and
                     89: his colleagues.
                     90: The memory manager has a memory allocator which automatically
                     91: reclaims garbages, i.e., allocated but unused memories,
                     92: and refreshes them for further use.
                     93: The algebraic engine gets all its necessary memories through the memory
                     94: manager.
                     95: \E
1.1       noro       96:
                     97: @item
                     98: @b{Asir}
1.8       noro       99: @*
1.2       noro      100: \BJP
1.1       noro      101: @b{Asir} $B$O(B, @b{Risa} $B$N7W;;%(%s%8%s$N8@8l%$%s%?%U%'!<%9$G(B
                    102: $B$"$k(B. @b{Risa} $B$G$O(B, $BHf3SE*MF0W$K%f!<%6MQ$N8@8l%$%s%?%U%'!<%9$r:n$k(B
                    103: $B$3$H$,$G$-$k(B. @b{Asir} $B$O$=$N0l$D$NNc$H$7$F:n$C$?$b$N$G(B, C $B8@8l$K6a(B
                    104: $B$$J8K!$r$b$D(B. $B$^$?(B, C $B$N%G%P%C%,$H$7$F9-$/MQ$$$i$l$F$$$k(B @code{dbx} $BIw(B
                    105: $B$N%G%P%C%,$bHw$($F$$$k(B.
1.2       noro      106: \E
                    107: \BEG
                    108: @b{Asir} is a standard language interface of @b{Risa}'s algebraic
                    109: engine. It is one of the possible language interfaces, because
                    110: one can develop one's own language interface easily on @b{Risa}
                    111: system.
                    112: @b{Asir} is an example of such language interfaces.
                    113: @b{Asir} has very similar syntax and semantics as C language.
                    114: Furthermore, it has a debugger that provide a subset of commands of
                    115: @code{dbx}, a widely used debugger of C language.
                    116: \E
1.1       noro      117: @end itemize
                    118:
1.2       noro      119: \BJP
1.1       noro      120: @node Asir $B$NFCD'(B,,, Risa/Asir
                    121: @section Asir $B$NFCD'(B
1.2       noro      122: \E
                    123: \BEG
                    124: @node Features of Asir,,, Risa/Asir
                    125: @section Features of @b{Asir}
                    126: \E
1.1       noro      127:
                    128: @noindent
1.2       noro      129: \BJP
1.1       noro      130: @b{Asir} $B$O(B, $BA0=R$NDL$j(B, $B7W;;%(%s%8%s$N8@8l%$%s%?%U%'!<%9$G$"(B
                    131: $B$k(B. $BDL>o(B @b{Asir} $B$H$$$&L>A0$N<B9T2DG=%U%!%$%k$H$7$FDs6!$5$l$k(B.
                    132: $B8=:_%5%]!<%H$5$l$F$$$k5!G=$O35$M<!$NDL$j$G$"$k(B.
1.2       noro      133: \E
                    134: \BEG
                    135: As mentioned in the previous section, @b{Asir} is a standard language
                    136: interface for@b{Risa}'s algebraic engine.
                    137: Usually, it is provided as an executable file named @code{asir}.
                    138: Main features supported for the current version of Asir is as follows.
                    139: \E
1.1       noro      140:
                    141: @itemize @bullet
1.2       noro      142: \BJP
1.1       noro      143: @item
                    144: C $B8@8lIw$N%f!<%68@8l(B
                    145:
                    146: @item
                    147: $B?t(B, $BB?9`<0(B, $BM-M}<0$N2C8:>h(B($B=|(B)
                    148:
                    149: @item
                    150: $B%Y%/%H%k(B, $B9TNs$N1i;;(B
                    151:
                    152: @item
                    153: $B:G>.8B$N%j%9%H=hM}(B
                    154:
                    155: @item
                    156: $BAH$_9~$_H!?t(B ($B0x?tJ,2r(B, GCD, $B%0%l%V%J4pDl$J$I(B)
                    157:
                    158: @item
                    159: $B%f!<%6Dj5AH!?t$K$h$k%D!<%k(B ($BBe?tBN>e$N0x?tJ,2r$J$I(B)
                    160:
                    161: @item
                    162: @code{dbx} $BIw$N%G%P%C%,(B
                    163:
                    164: @item
                    165: $B1"H!?t$NIA2h(B
                    166:
                    167: @item
                    168: @b{PARI} (@pxref{pari}) $B$K$h$k=iEyD61[H!?t$r4^$`<0$NI>2A(B
                    169:
                    170: @item
                    171: UNIX $B>e$G$NJ,;67W;;5!G=(B (Open XM)
                    172: @comment @item
                    173: @comment $B%R%9%H%jCV495!G=$r$b$D(B X11 $B%$%s%?%U%'!<%9(B
1.2       noro      174: \E
                    175: \BEG
                    176: @item
                    177: A C-like programming language
                    178:
                    179: @item
                    180: Arithmetic operations (addition, subtraction, multiplication
                    181: and division) on numbers, polynomials and rational expressions
                    182:
                    183: @item
                    184: Operations on vectors and matrices
                    185:
                    186: @item
                    187: List processing operations at the minimum
                    188:
                    189: @item
                    190: Several Built-in functions (factorization, GCD computation, Groebner basis
                    191: computation etc.)
                    192:
                    193: @item
                    194: Useful user defined functions(e.g., factorization over algebraic number fields)
                    195:
                    196: @item
                    197: A @code{dbx}-like debugger
                    198:
                    199: @item
                    200: Plotting of implicit functions
                    201:
                    202: @item
                    203: Numerical evaluation of mathematical expressions including elementary
                    204: transcendental functions at arbitrary precision. This feature is
                    205: in force only if @b{PARI} system (@pxref{pari}).
                    206:
                    207: @item
                    208: Distributed computation over UNIX
                    209: \E
1.1       noro      210: @end itemize
                    211:
1.2       noro      212: @node Installation,,, Risa/Asir
                    213: @section Installation
                    214:
                    215: \JP $B0J2<$N<jB3$-$GITL@$JE@(B, $BITET9g$JE@$,$"$C$?>l9g$NLd$$9g$o$;$O(B
                    216: \BEG
1.9     ! noro      217: Any questions and any comments on this manual are welcome by e-mails
1.2       noro      218: to the following address.
                    219: \E
1.1       noro      220:
                    221: @example
1.9     ! noro      222: risa-admin@@sec.flab.fujitsu.co.jp
1.1       noro      223: @end example
                    224:
                    225: @noindent
1.2       noro      226: \JP $B08$K(B e-mail $B$G$*4j$$$7$^$9(B.
1.1       noro      227:
                    228: @menu
1.9     ! noro      229: * UNIX binary version::
        !           230: * UNIX source code version::
1.2       noro      231: * Windows version::
1.1       noro      232: @end menu
                    233:
1.9     ! noro      234: @node UNIX binary version,,, Installation
        !           235: @subsection UNIX binary version
1.1       noro      236:
                    237: @noindent
1.2       noro      238: \BJP
1.9     ! noro      239: $B%?!<%2%C%H(B CPU/OS $B$KBP1~$9$k(B @samp{asir.tgz} $B$,I,MW$G$"$k(B.
1.1       noro      240: $B$3$l$i$OA4$F(B @code{gzip} $B$G05=L$7$F$"$k$N$G(B, $BF~<j8e(B @code{gzip} $B$G(B
                    241: $BE83+$9$k(B. $B$^$:(B, $B%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r7h$a$k(B. $B%G%U%)%k%H$G$O(B
                    242: @samp{/usr/local/lib} $B$K(B @samp{asir} $B$H$$$&%G%#%l%/%H%j$H$7$F(B
                    243: $B%$%s%9%H!<%k$5$l$k$3$H$r2>Dj$7$F$$$k(B. $B0J2<$3$N%G%#%l%/%H%j$r%i%$%V%i%j(B
                    244: $B%G%#%l%/%H%j$H8F$V(B.
1.2       noro      245: \E
                    246: \BEG
1.9     ! noro      247: A file @samp{asir.tgz} suitable for the target machine/architecture
1.2       noro      248: is required. After getting it,
                    249: you have to unpack it by @code{gzip}. First of all, determine
                    250: a derectory where binaries and library files are installed.
                    251: We call the directory the @b{library directory}.
                    252: The following installs the files in @samp{/usr/local/lib/asir}.
                    253: \E
1.1       noro      254:
                    255: @example
                    256: # gzip -dc asir.tgz | ( cd /usr/local/lib; tar xf - )
                    257: @end example
                    258:
1.2       noro      259: \JP $B8D?ME*$K;HMQ$9$k>l9g$K$O(B, @samp{$HOME}$B$J$I$KCV$$$F$b$h$$(B.
                    260: \BEG
                    261: In this case you don't have to set any environment variable.
1.1       noro      262:
1.2       noro      263: You can install them elsewhere.
                    264: \E
1.1       noro      265: @example
                    266: % gzip -dc asir.tgz | ( cd $HOME; tar xf - )
                    267: @end example
                    268:
                    269: @noindent
1.2       noro      270: \BJP
1.1       noro      271: $B$3$N>l9g(B, $B%i%$%V%i%j%G%#%l%/%H%j$NL>A0$r4D6-JQ?t(B
                    272: @code{ASIR_LIBDIR} $B$K@_Dj$9$kI,MW$,$"$k(B.
1.2       noro      273: \E
                    274: \BEG
                    275: In this case you have to set the name of the library directory
                    276: to the environment variable @code{ASIR_LIBDIR}.
                    277: \E
1.1       noro      278:
                    279: @example
                    280: % setenv ASIR_LIBDIR $HOME/asir
                    281: @end example
                    282:
                    283: @noindent
1.2       noro      284: \BJP
1.1       noro      285: Asir $BK\BN$O(B, $B%i%$%V%i%j%G%#%l%/%H%j$N(B @samp{asir} $B$G$"$k(B.
                    286: @samp{/usr/local/bin} $B$"$k$$$O%f!<%6$N<B9T%U%!%$%k%5!<%A%Q%9(B
                    287: $B$N$I$3$+$K%7%s%\%j%C%/%j%s%/$r:n$k$HJXMx$G$"$k(B.
1.2       noro      288: \E
                    289: \BEG
                    290: @b{Asir} itself is in the library directory. It will be convenient
                    291: to create a symbolic link to it from @samp{/usr/local/bin} or
                    292: the user's search path.
                    293: \E
1.1       noro      294:
                    295: @example
                    296: # ln -s /usr/local/lib/asir/asir /usr/local/bin/asir
                    297: @end example
                    298:
                    299: @noindent
1.9     ! noro      300: \JP $B$3$l$G(B @samp{asir} $B$,5/F0$G$-$k(B.
1.2       noro      301: \BEG
1.9     ! noro      302: Then you can start @samp{asir}.
1.2       noro      303: \E
1.1       noro      304:
                    305: @example
                    306: % /usr/local/bin/asir
1.9     ! noro      307: This is Risa/Asir, Version 20000821.
        !           308: Copyright (C) FUJITSU LABORATORIES LIMITED.
        !           309: 1994-2000. All rights reserved.
        !           310: [0]
1.1       noro      311: @end example
                    312:
1.9     ! noro      313: @node UNIX source code version,,, Installation
        !           314: @subsection UNIX source code version
1.1       noro      315:
1.9     ! noro      316: \BEG
        !           317: First of all you have to install PARI library. The following is
        !           318: a sample of installation of PARI on FreeBSD.
1.2       noro      319: \E
1.9     ! noro      320: \BJP
        !           321: $B$^$:(B PARI $B%i%$%V%i%j$r(B install $B$9$kI,MW$,$"$k(B. $B0J2<$O(B FreeBSD $B>e$G$N(B
        !           322: PARI $B$N(B installation $B$NNc$G$"$k(B.
1.2       noro      323: \E
1.1       noro      324:
                    325: @example
1.9     ! noro      326: % su
        !           327: # gzip -dc pari-2.0.17.beta.tgz | tar xf -
        !           328: # cd pari-2.0.17.beta
        !           329: # ./Configure
        !           330: # make install
        !           331: # make install-lib-sta
1.1       noro      332: @end example
                    333:
1.2       noro      334: \BJP
1.9     ! noro      335: @samp{asir2000-src.tgz} $B$rF~<j8e(B, $BE,Ev$J%G%#%l%/%H%j(B
        !           336: $B$K$*$$$F(B, @code{gzip} $B$GE83+$7(B, $B0J2<$N<j=g$G(B install $B$9$k(B.
        !           337: \E
        !           338: \BEG
        !           339: After getting @samp{asir2000-src.tgz}, unpack it by @code{gzip}
        !           340: and install necessary files as follows.
1.2       noro      341: \E
1.1       noro      342:
                    343: @example
1.9     ! noro      344: % gzip -dc asir.tgz | tar xf -
        !           345: % cd asir2000
        !           346: % ./configure -oxhome /usr/local -pari -plot
        !           347: % xmkmf -a
        !           348: % make
        !           349: % su
        !           350: # make install
        !           351: # make install-lib
        !           352: # make install-doc
1.1       noro      353: @end example
                    354:
1.2       noro      355: \BJP
1.9     ! noro      356: $B>e$NNc$G(B, @samp{/usr/local} $B$O%U%!%$%k$,(B install $B$5$l$k%G%#%l%/%H%j$r(B
        !           357: $BI=$9(B. $BB($A(B, $B%P%$%J%j%U%!%$%k(B @samp{asir} $B$O(B @samp{/usr/local/bin}
        !           358: $B$K(B install $B$5$l(B, $B%i%$%V%i%j$*$h$SJ8=q%U%!%$%k$O(B @samp{/usr/local/lib}
        !           359: $B$K(B install $B$5$l$k(B. @code{-oxhome} $B$N0z?t$H$7$F;XDj$5$l$k%G%#%l%/%H%j(B
        !           360: $B$O(B, PARI $B$N(B install $B@h$b$=$3$G$"$k$3$H$r0UL#$9$k(B. $B$b$7(B @b{Asir} $B$,(B
        !           361: install $B$5$l$k%G%#%l%/%H%j$rJQ99$9$k>l9g(B, @samp{include/Risa.tmpl}
        !           362: $B$N(B, $BJQ?t(B @code{PARIINC} $B$*$h$S(B @code{PARILIB} $B$NCM$rE,59JQ99$9$k(B
        !           363: $BI,MW$,$"$k(B.
1.2       noro      364: \E
                    365: \BEG
1.9     ! noro      366: In the above example, @samp{/usr/local} indicates the destination of the
        !           367: installation. That is, the binary file @samp{asir} is installed in
        !           368: @samp{/usr/local/bin} and the library and documentation files are
        !           369: installed in @samp{/usr/local/lib}. The directory name specified as an
        !           370: argument of @code{-oxhome} also indicates that PARI files are installed
        !           371: in that directory.  If you change the destination directory, you have to
        !           372: modify the values of @code{PARIINC} and @code{PARILIB} in
        !           373: @samp{include/Risa.tmpl} appropriately.
        !           374: \E
        !           375:
1.2       noro      376: @node Windows version,,, Installation
                    377: @subsection Windows version
1.1       noro      378:
                    379: @noindent
1.2       noro      380: \BJP
1.1       noro      381: $BI,MW$J%U%!%$%k$O(B @samp{asirwin.tgz} $B$G$"$k(B. $BB>$K(B, @samp{gzip.exe},
                    382: @samp{tar.exe} $B$,I,MW$@$,(B, asirwin.tgz $B$HF1$8%G%#%l%/%H%j$KMQ0U$7$F(B
                    383: $B$"$k(B. $B$3$l$i(B 3 $B$D$N%U%!%$%k$rF10l%G%#%l%/%H%j$K$*$-(B, DOS $B%W%m%s%W%H(B
                    384: $B$+$i(B
1.2       noro      385: \E
                    386: \BEG
                    387: The necessary file is @samp{asirwin.tgz}. To unpack it @samp{gzip.exe}
                    388: and @samp{tar.exe} are necessary. They are in the same
                    389: directory as @samp{asirwin.tgz} on the ftp server.
                    390: Putting them in the same directory, execute the following:
                    391: \E
1.1       noro      392:
                    393: @example
1.2       noro      394: \JP C:\...> tar xzf asirwin.tgz
                    395: \EG C:\...> tar xzf asirwin.tgz
1.1       noro      396: @end example
                    397:
                    398: @noindent
1.2       noro      399: \BJP
1.1       noro      400: $B$r<B9T$9$l$P(B, @samp{Asir} $B$H$$$&%G%#%l%/%H%j(B (Asir $B%k!<%H%G%#%l%/%H%j(B)
                    401: $B$,$G$-$k(B. 990831 $BHG$G$O(B, GUI $B$HK\BN$,J,N%$5$l(B, $B$^$?%G%P%C%0%&%#%s%I%&$b(B
                    402: $BJL%W%m%;%9$H$7$F(B GUI $B$,8F$S=P$5$l$k$?$a(B, Asir $B%k!<%H%G%#%l%/%H%j$,@5$7$/(B
                    403: $BEPO?$5$l$F$$$k$3$H$,I,MW$G$"$k(B.  Asir $B%k!<%H%G%#%l%/%H%j$N%5%V%G%#%l%/%H(B
                    404: $B%j(B @samp{bin} $B$K(B @samp{asirgui.exe} (GUI), @samp{engine.exe} ($BK\BN(B) $B$,(B
                    405: $BCV$+$l$F$$$k(B. @samp{asirgui.exe} $B$N=i2s$NN)$A>e$2$O(B, $B%(%/%9%W%m!<%i$+$i9T(B
                    406: $B$&(B. $B$3$l$K$h$j(B
1.2       noro      407: \E
                    408:
                    409: \BEG
                    410: Then a directory @samp{Asir} (@b{Asir root directory}) is created,
                    411: which has subdirectories named @samp{bin} and @samp{lib}. To set up it,
                    412: invoke @samp{bin\asirgui.exe} from Explorer and
                    413: click @code{OK}.  Then the name of @b{Asir root directory} is set to the
                    414: following registries.
                    415: \E
1.1       noro      416:
                    417: @example
1.2       noro      418: \JP HKEY_LOCAL_MACHINE\SOFTWARE\FUJITSU\Asir\99.03.31\Directory
                    419: \EG HKEY_LOCAL_MACHINE\SOFTWARE\FUJITSU\Asir\99.03.31\Directory
1.1       noro      420: @end example
                    421:
                    422: @noindent
1.2       noro      423: \JP $B$H$$$&%l%8%9%H%j$K(B Asir $B%k!<%H%G%#%l%/%H%j$,@5$7$/EPO?$5$l$k(B.
1.1       noro      424:
1.2       noro      425: \BJP
1.1       noro      426: @node $B%3%^%s%I%i%$%s%*%W%7%g%s(B,,, Risa/Asir
                    427: @section $B%3%^%s%I%i%$%s%*%W%7%g%s(B
1.2       noro      428: \E
                    429: \BEG
                    430: @node Command line options,,, Risa/Asir
                    431: @section Command line options
                    432: \E
1.1       noro      433:
                    434: @noindent
1.2       noro      435: \JP $B%3%^%s%I%i%$%s%*%W%7%g%s$O<!$NDL$j(B.
                    436: \EG Command-line options for the command @samp{asir} are as follows.
1.1       noro      437:
                    438: @table @code
                    439:
                    440: @item -heap @var{number}
1.2       noro      441: \BJP
1.1       noro      442: @code{Risa/Asir} $B$G$O(B, 4KB $B$N%V%m%C%/$r%a%b%j3d$jEv$F$NC10L$H$7$FMQ$$$F$$$k(B.
                    443: $B%G%U%)%k%H$G$O(B, $B=i4|(B heap $B$H$7$F(B, 16 $B%V%m%C%/(B (64KB) $B3d$jEv$F$k$,(B, $B$=$l(B
                    444: $B$rJQ99$9$k>l9g(B, @code{-heap} $B$rMQ$$$k(B. $BC10L$O%V%m%C%/$G$"$k(B.
                    445: heap $B$NBg$-$5$O(B, @code{heap()} $BH!?t$GD4$Y$k$3$H$,$G$-$k(B ($BC10L$O%P%$%H(B).
1.2       noro      446: \E
                    447: \BEG
                    448: In @b{Risa/Asir}, 4KB is used as an unit, called block,
                    449: for memory allocation.
                    450: By default, 16 blocks (64KB) are allocated initially.
                    451: This value can be changed by giving an option @code{-heap}
                    452: a number parameter in unit block.
                    453: Size of the heap area is obtained by a Built-in function heap(),
                    454: the result of which is a number in Bytes.
                    455: \E
1.1       noro      456:
                    457: @item -adj @var{number}
1.2       noro      458: \BJP
1.1       noro      459: $B$3$NCM$,Bg$-$$$[$I(B, $B;HMQ%a%b%jNL$OBg$-$/$J$k$,(B, GC $B;~4V$,>/$J$/$J(B
                    460: $B$k(B. @var{number} $B$H$7$F(B 1 $B0J>e$N@0?t$,;XDj$G$-$k(B. $B%G%U%)%k%H$G$O(B 3 $B$G$"(B
                    461: $B$k(B. $B$3$NCM$,(B 1 $B0J2<$K$J$k$H(B GC $B$r$7$J$$@_Dj$K$J$k$N$GMWCm0U$G$"$k(B. heap
                    462: $B$r$J$k$Y$/?-$P$5$:$K(B, GC $B$r<gBN$K$7$F%a%b%j4IM}$7$?$$>l9g$K$O(B, $B$3$NCM$r(B
                    463: $BBg$-$/(B ($BNc$($P(B 8) $B@_Dj$9$k(B.
1.2       noro      464: \E
                    465: \BEG
                    466: Heap area will be stretched by the memory manager,
                    467: if the size of reclaimed memories is less than 1/@var{number}
                    468: of currently allocated heap area.
                    469: The default value for @var{number} is 3.
                    470: If you do not prefer to stretch heap area by some reason, perhaps by
                    471: restriction of available memories, but if prefer to resort to
                    472: reclaiming garbages as far as possible,
                    473: then a large value should be chosen for @var{number}, e.g., 8.
                    474: \E
1.1       noro      475:
                    476: @item -norc
1.2       noro      477: \JP $B=i4|2=%U%!%$%k(B @samp{$HOME/.asirrc} $B$rFI$^$J$$(B.
                    478: \BEG
                    479: When this option is specified, @b{Asir} does not read the
                    480: initial file @samp{$HOME/.asirrc}.
                    481: \E
1.1       noro      482:
                    483: @item -f @var{file}
1.2       noro      484: \BJP
1.1       noro      485: $BI8=`F~NO$NBe$o$j$K(B, @var{file} $B$+$iF~NO$rFI$_9~$s$G<B9T$9$k(B.
                    486: $B%(%i!<$N:]$K$O$?$@$A$K=*N;$9$k(B.
1.2       noro      487: \E
                    488: \BEG
                    489: Instead of the standard input, @var{file} is used as the input.
                    490: Upon an error, the execution immediately terminates.
                    491: \E
1.1       noro      492:
                    493: @item -paristack @var{number}
1.2       noro      494: \BJP
1.1       noro      495: @b{PARI} (@pxref{pari}) $B@lMQ$NNN0h$NBg$-$5$r;XDj$9$k(B. $BC10L$O%P%$%H(B. $B%G%U%)(B
                    496: $B%k%H$G$O(B 1 MB.
1.2       noro      497: \E
                    498: \BEG
                    499: This option specifies the private memory size for @code{PARI} (@pxref{pari}).
                    500: The unit is Bytes. By default, it is set to 1 MB.
                    501: \E
1.1       noro      502:
                    503: @item -maxheap @var{number}
1.2       noro      504: \BJP
1.1       noro      505: heap $BNN0h$N>e8B$r;XDj$9$k(B. $BC10L$O%P%$%H(B. $B%G%U%)%k%H$G$OL5@)8B(B. UNIX $B$N(B
                    506: $B>l9g(B, $B<B:]$K$O(B @code{limit} $B%3%^%s%I$GI=<($5$l$k(B @code{datasize} $B$NCM(B
                    507: $B$K@)8B$5$l$F$$$k$?$a(B, @code{-maxheap} $B$N;XDj$,$J$/$F$b0lDjNL0J>e$K(B
                    508: heap $B$r3MF@$G$-$J$$>l9g$,$"$k$N$GCm0U(B.)
1.2       noro      509: \E
                    510: \BEG
                    511: This option sets an upper limit of the heap size. The unit is Bytes.
                    512: Note that the size is already limited by the value of @code{datasize}
                    513: displayed by the command @code{limit} on UNIX.
                    514: \E
1.1       noro      515: @end table
                    516:
1.2       noro      517: \BJP
1.1       noro      518: @node $B4D6-JQ?t(B,,, Risa/Asir
                    519: @section $B4D6-JQ?t(B
1.2       noro      520: \E
                    521: \BEG
                    522: @node Environment variable,,, Risa/Asir
                    523: @section Environment variable
                    524: \E
1.1       noro      525:
                    526: @noindent
1.2       noro      527: \BJP
1.1       noro      528: @b{Asir} $B$N<B9T$K4X$9$k$$$/$D$+$N4D6-JQ?t$,B8:_$9$k(B. UNIX $B>e$G$O4D6-JQ?t(B
                    529: $B$O(B shell $B$N%3%^%s%I%i%$%s$+$iD>@\@_Dj$9$k$+(B, shell $B$N(B rc $B%U%!%$%k$G@_Dj(B
                    530: $B$9$k(B. Windows NT $B$G$O(B, [$B@_Dj(B]->[$B%7%9%F%`(B]->[$B4D6-(B] $B$G@_Dj$9$k(B. Windows 95/98
                    531: $B$G$O(B, @samp{c:\autoexec.bat} $B$K=q$$$F(B reboot $B$9$k(B.
1.2       noro      532: \E
                    533: \BEG
                    534: There exist several environment variables concerning with an execution
                    535: of @b{Asir}. On UNIX, an environment variable is set from shells, or
                    536: in rc files of shells. On Windows NT, it can be set from [Control Panel]
                    537: ->[Environment]. On Windows 95/98, it can be set in @samp{c:\autoexec.bat}.
                    538: Note that the setting takes effect after rebooting the machine on Windows
                    539: 95/98.
                    540: \E
1.1       noro      541: @itemize @bullet
                    542: @item
                    543: @code{ASIR_KEY}
1.8       noro      544: @*
1.2       noro      545: \BJP
1.1       noro      546: UNIX $BHG$G$O(B, @b{Asir} $B$,5/F0$5$l$?%^%7%s$KBP$9$k(B @code{key} $B$,$J$1(B
                    547: $B$l$P$=$N%^%7%s>e$G(B @b{Asir} $B$OF0:n$7$J$$(B. @code{key} $B$O(B 16 $B?J(B 8
                    548: $B7e(B 3 $B%o!<%I$+$i$J$j(B,
1.2       noro      549: \E
                    550: \BEG
                    551: @b{Asir} shall not work unless a @code{key} for the machine
                    552: on which @b{Asir} is invoked is given.
                    553: The @code{key} consists of a string which denotes 3 word hexadecimal
                    554: number, each of which has 8 hexadecimal digits.
                    555: In order to run @b{Asir} for several machines,
                    556: several @code{key}'s can be written together on a same file as follows.
                    557: \E
1.1       noro      558: @example
                    559: % cat asir_key
                    560: cf6f236c 61a35091 dddc4529 geisha
                    561: 82281685 d1929945 a8bd24ca yorktown
                    562: 34b75d30 63f8df93 3e881113 nyanchu
                    563: @end example
                    564:
1.2       noro      565: \BJP
1.1       noro      566: $B$H$$$&7A$GJ#?tBf$N%^%7%s$KBP$9$k(B @code{key} $B$r0l$D$N%U%!%$%k$K$^$H$a$F(B
                    567: $B=q$/$3$H$,$G$-$k(B. @code{key} $B$N8e$m$OL5;k$5$l$k$N$G(B, $B%3%a%s%H$r=q$/(B
                    568: $B$3$H$,$G$-$k(B. @code{key} $B$r4^$`%U%!%$%k$O(B, $B0J2<$N=g$G%5!<%A$5$l$k(B.
1.2       noro      569: \E
                    570: \BEG
                    571: The text after each @code{key} is neglected to the end-of-line.
                    572: This is convenient to comment on the respective @code{key}.
                    573: Files containing @code{key}'s are searched by the following order.
                    574: \E
1.1       noro      575:
                    576: @enumerate
                    577: @item
1.2       noro      578: \JP $B4D6-JQ?t(B @code{ASIR_KEY} $B$K;XDj$5$l$?%U%!%$%k(B
                    579: \EG File set to environment @code{ASIR_KEY}
1.1       noro      580:
                    581: @item
1.2       noro      582: \JP $B%+%l%s%H%G%#%l%/%H%j$N(B @samp{asir_key}
                    583: \EG File @samp{asir_key} on the current directory.
1.1       noro      584:
                    585: @item
1.2       noro      586: \BJP
1.1       noro      587: $B4D6-JQ?t(B @code{ASIR_LIBDIR} $B$G;XDj$5$l$?%G%#%l%/%H%j(B ($B;XDj$,$J$1$l$P(B
                    588: @samp{/usr/local/lib/asir}) $B$N(B @samp{asir_key}
1.2       noro      589: \E
                    590: \BEG
                    591: Files on the directory specified by environment @code{ASIR_LIBDIR}.
                    592: (File @samp{asir_key} on @samp{/usr/local/lib/asir/},
                    593: if environment @code{ASIR_LIBDIR} is not set.)
                    594: \E
                    595:
1.1       noro      596: @end enumerate
                    597:
                    598: @item
                    599: @code{ASIR_LIBDIR}
1.8       noro      600: @*
1.2       noro      601: \BJP
1.1       noro      602: @b{Asir} $B$N%i%$%V%i%j%G%#%l%/%H%j(B, $B$9$J$o$A%f!<%68@8l$G=q$+$l$?%U%!%$%k(B
                    603: $B$J$I$,$*$+$l$k%G%#%l%/%H%j(B. $B;XDj$,$J$$>l9g(B UNIX $BHG$G$O(B
                    604: @samp{/usr/local/lib/asir}, Windows $BHG$G$O(B Asir $B%a%$%s%G%#%l%/%H%j$N2<$N(B
                    605: @samp{lib} $B%G%#%l%/%H%j$,MQ$$$i$l$k(B.
1.2       noro      606: \E
                    607: \BEG
                    608: The library directory of @b{Asir}, i.e., the directory where
                    609: , for example, files containing programs written in @b{Asir}.
                    610: If not specified, on UNIX, @samp{/usr/local/lib/asir} is used by default.
                    611: On Windows, @samp{lib} in @b{Asir root directory} is used by default.
                    612: This environment will be useful in a case where @b{Asir} binaries
                    613: are installed on a private directory of the user.
                    614: \E
1.1       noro      615:
                    616: @item
                    617: @code{ASIRLOADPATH}
1.8       noro      618: @*
1.2       noro      619: \BJP
1.1       noro      620: $B%m!<%I$5$l$k%U%!%$%k$,$"$k%G%#%l%/%H%j$r(B UNIX $B$N>l9g(B ':',
                    621: Windows$B$N>l9g(B ';' $B$G6h@Z$C$FJB$Y$k(B. $B%G%#%l(B
                    622: $B%/%H%j$O:8$+$i=g$K%5!<%A$5$l$k(B. $B$3$N;XDj$,$J$$>l9g(B, $B$*$h$S;XDj$5$l$?(B
                    623: $B%U%!%$%k$,(B @code{ASIRLOADPATH} $B$K$J$+$C$?>l9g(B, $B%i%$%V%i%j%G%#%l%/%H%j(B
                    624: $B$b%5!<%A$5$l$k(B.
1.2       noro      625: \E
                    626: \BEG
                    627: This environment specifies directories which contains files to be
                    628: loaded by @b{Asir} command @code{load()}.
                    629: Directories are separated by a `:' on UNIX, a ';' on Windows respectively.
                    630: The search order is from the left to the right.
                    631: After searching out all directories in @code{ASIRLOADPATH},
                    632: or in case of no specification at all,
                    633: the library directory will be searched.
                    634: \E
1.1       noro      635: @item
                    636: @code{HOME}
1.8       noro      637: @*
1.2       noro      638: \BJP
1.1       noro      639: @var{-norc} $B%*%W%7%g%s$D$-$G5/F0$7$J$$>l9g(B, @samp{$HOME/.asirrc}$B$,$"$l$P(B,
                    640: $BM=$a$3$N%U%!%$%k$r<B9T$9$k(B. @code{HOME} $B$,@_Dj$5$l$F$$$J$$>l9g(B, UNIX $BHG(B
                    641: $B$G$O$J$K$bFI$^$J$$$,(B, Windows $BHG$G$O(B Asir $B%a%$%s%G%#%l%/%H%j(B
                    642: (@code{get_rootdir()} $B$GJV$5$l$k%G%#%l%/%H%j(B) $B$N(B @samp{.asirrc} $B$rC5$7(B,
                    643: $B$"$l$P$=$l$r<B9T$9$k(B.
1.2       noro      644: \E
                    645: \BEG
                    646: If @b{Asir} is invoked without @var{-norc}, @samp{$HOME/.asirrc}, if exists,
                    647: is executed. If @code{HOME} is not set, nothing is done on UNIX. On Windows,
                    648: @samp{.asirrc} in @b{Asir root directory} is executed if it exists.
                    649: \E
1.1       noro      650: @end itemize
                    651:
1.2       noro      652: \BJP
1.1       noro      653: @node $B5/F0$+$i=*N;$^$G(B,,, Risa/Asir
                    654: @section $B5/F0$+$i=*N;$^$G(B
1.2       noro      655: \E
                    656: \BEG
                    657: @node Starting and Terminating an Asir session,,, Risa/Asir
                    658: @section Starting and Terminating an @b{Asir} session
                    659: \E
1.1       noro      660:
                    661: @noindent
1.2       noro      662: \JP @b{Asir} $B$r5/F0$9$k$H(B,
                    663: \BEG
                    664: Run @b{Asir}, then the copyright notice and the first prompt
                    665: will appear on your screen,
                    666: and a new @b{Asir} session will be started.
                    667: \E
                    668:
1.1       noro      669: @example
                    670: [0]
                    671: @end example
                    672:
                    673: @noindent
1.2       noro      674: \BJP
1.1       noro      675: $B$J$k%W%m%s%W%H$,I=<($5$l(B, $B%;%C%7%g%s$,3+;O$9$k(B. @samp{$HOME/.asirrc}
                    676: (Windows $BHG$N>l9g(B, @code{HOME} $B@_Dj$5$l$F$$$J$$>l9g$K$O(B @code{get_rootdir()}
                    677: $B$GJV$5$l$k%G%#%l%/%H%j$K$"$k(B @samp{.asirrc})
                    678: $B$,B8:_$7$F$$$k>l9g(B, $B$3$N%U%!%$%k$r(B @b{Asir} $B%f!<%68@8l$G$+$+$l$?(B
                    679: $B%U%!%$%k$H8+$J$7(B, $B2r<a<B9T$9$k(B.
1.2       noro      680: \E
                    681: \BEG
                    682: When initialization file @samp{$HOME/.asirrc} exists,
                    683: @b{Asir} interpreter executes it at first taking it as a program
                    684: file written in @b{Asir}.
                    685: \E
1.1       noro      686:
                    687: @noindent
1.2       noro      688: \BJP
1.1       noro      689: $B%W%m%s%W%H$OF~NO$NHV9f$rI=$9(B. $B%;%C%7%g%s$O(B, @code{end;} $B$^$?$O(B
                    690: @code{quit;} $B$rF~NO$9$k$3$H$K$h$j=*N;$9$k(B. $BF~NO$O(B, @samp{;} $B$^$?$O(B
                    691: @samp{$} $B$^$G$r0l6h@Z$j$H$7$FI>2A$5$l$k(B. @samp{;} $B$N$H$-7k2L$OI=<($5$l(B,
                    692: @samp{$} $B$N$H$-I=<($5$l$J$$(B.
1.2       noro      693: \E
                    694: \BEG
                    695: The prompt indicates the sequential number of your input commands to
                    696: @b{Asir}.
                    697: The session will terminate when you input @code{end;} or @code{quit;}
                    698: to @b{Asir}.
                    699: Input commands are evaluated statement by statement.
                    700: A statement normally ends with its terminator
                    701: @samp{;} or @samp{$}.
                    702: (There are some exceptions. See, syntax of @b{Asir}.)
                    703: The result will be displayed when the command, i.e. statement,
                    704: is terminated by a @samp{;},
                    705: and will not when terminated by a @samp{$}.
                    706: \E
1.1       noro      707:
                    708: @example
                    709: % asir
                    710: [0] A;
                    711: 0
                    712: [1] A=(x+y)^5;
                    713: x^5+5*y*x^4+10*y^2*x^3+10*y^3*x^2+5*y^4*x+y^5
                    714: [2] A;
                    715: x^5+5*y*x^4+10*y^2*x^3+10*y^3*x^2+5*y^4*x+y^5
                    716: [3] a=(x+y)^5;
                    717: evalpv : invalid assignment
                    718: return to toplevel
                    719: [3] a;
                    720: a
                    721: [4] fctr(A);
                    722: [[1,1],[x+y,5]]
                    723: [5] quit;
                    724: %
                    725: @end example
                    726:
                    727: @noindent
1.2       noro      728: \BJP
1.1       noro      729: $B$3$NNc$G$O(B, @code{A}, @code{a}, @code{x}, @code{y} $B$J$kJ8;z$,;HMQ$5$l$F$$$k(B.
                    730: @code{A} $B$O%W%m%0%i%`$K$*$1$kJQ?t$G(B, @code{a}, @code{x}, @code{y} $B$O?t3XE*(B
                    731: $B$J0UL#$G$NITDj85$G$"$k(B. $B0lHL$K%W%m%0%i%`JQ?t$OBgJ8;z$G;O$^$j(B,
                    732: $BITDj85$O>.J8;z$G;O$^$k(B. $B$3$NNc$G$o$+$k$h$&$K(B, $B%W%m%0%i%`JQ?t$O(B,
                    733: $B?t(B, $B<0$J$I$r3JG<$7$F$*$/$?$a$N$b$N$G$"$j(B, C $B8@8l$J$I$K$*$1$kJQ?t$KBP1~$9$k(B.
                    734: $B0lJ}(B, $BITDj85$O$=$l<+?H$GCM$r;}$D$3$H$O$G$-$:(B, $B=>$C$F(B, $BITDj85$KBP$9$k(B
                    735: $BBeF~$O5v$5$l$J$$(B. $B8e$K<($9$,(B, $BITDj85$KBP$9$kBeF~$O(B, $BAH$_9~$_H!?t(B @code{subst()}
                    736: $B$K$h$jL@<(E*$K9T$o$l$k(B.
1.2       noro      737: \E
                    738: \BEG
                    739: In the above example, names @code{A}, @code{a}, @code{x} and @code{y}
                    740: are used to identify mathematical and programming objects.
                    741: There, the name @code{A} denotes a program variable
                    742: (some times called simply as a program variable.)
                    743: while the other names, @code{a}, @code{x} and @code{y}, denote
                    744: mathematical objects, that is, indeterminates.
                    745: In general, program variables have names which begin with
                    746: capital letters, while names of indeterminates begin with
                    747: small letters.
                    748: As you can see in the example, program variables are used to hold and
                    749: keep objects, such as numbers and expressions, as their values,
                    750: just like variables in C programming language.
                    751: Whereas, indeterminates cannot have values so that assignment to
                    752: indeterminates are illegal.
                    753: If one wants to get a result by substituting a value for an indeterminate
                    754: in an expression, it is achieved by the function @code{subst} as the
                    755: value of the function.
                    756: \E
1.1       noro      757:
1.2       noro      758: \BJP
1.1       noro      759: @node $B3d$j9~$_(B,,, Risa/Asir
                    760: @section $B3d$j9~$_(B
1.2       noro      761: \E
                    762: \BEG
                    763: @node Interruption,,, Risa/Asir
                    764: @section Interruption
                    765: \E
1.1       noro      766:
                    767: @noindent
1.2       noro      768: \BJP
1.1       noro      769: $B7W;;$r<B9TCf$K3d$j9~$_$r$+$1$?$$>l9g(B, $B3d$j9~$_%-%c%i%/%?(B($BDL>o$O(B
                    770: @kbd{C-c}, DOS $BHG$G$O(B @kbd{C-x}, Mac $BHG$G$O(B
                    771: @code{command+}@samp{.} ) $B$rF~NO$9$k(B.
1.2       noro      772: \E
                    773: \BEG
                    774: To interrupt the @b{Asir} execution, input an interrupt character
                    775: from the keyboard.  A @kbd{C-c} is usually used for it.
                    776: (Notice: @kbd{C-x} for DOS version; @code{command+}@samp{.} for Macintosh
                    777: version.)
                    778: \E
1.1       noro      779:
                    780: @example
                    781: @@ (x+y)^1000;
                    782: @kbd{C-c}interrupt ?(q/t/c/d/u/w/?)
                    783: @end example
                    784:
                    785: @noindent
1.2       noro      786: \JP $B3FA*Br;h$N0UL#$O<!$NDL$j(B.
                    787: \EG Here, the meaning of options are as follows.
1.1       noro      788:
                    789: @table @code
1.2       noro      790: \BJP
1.1       noro      791: @item q
                    792: @b{Asir} $B$r=*N;$9$k(B. ($B3NG'$"$j(B)
                    793: @item t
                    794: $B%H%C%W%l%Y%k$KLa$k(B. ($B3NG'$"$j(B)
                    795: @item c
                    796: $B<B9T$r7QB3$9$k(B.
                    797: @item d
                    798: $B%G%P%C%0%b!<%I$KF~$k(B. $B%G%P%C%,$K4X$7$F$O(B @xref{$B%G%P%C%,(B}.
                    799: @item u
1.3       noro      800: @code{register_handler()} (@pxref{ox_reset ox_intr register_handler}) $B$GEPO?$5$l$?(B
1.1       noro      801: $B4X?t$r<B9T8e%H%C%W%l%Y%k$KLa$k(B. ($B3NG'$"$j(B)
                    802: @item w
                    803: $BCfCGE@$^$G$NH!?t$N8F$S=P$7Ns$rI=<($9$k(B.
                    804: @item ?
                    805: $B3FA*Br;h$N0UL#$r@bL@$9$k(B.
1.2       noro      806: \E
                    807: \BEG
                    808: @item q
                    809: Terminates @b{Asir} session. (Confirmation requested.)
                    810: @item t
                    811: Returns to toplevel. (Confirmation requested.)
                    812: @item c
                    813: Resumes to continue the execution.
                    814: @item d
                    815: Enters debugging mode at the next statement of the @b{Asir} program,
                    816: if @b{Asir} has been executing a program loaded from a file.
                    817: Note that it will sometimes take a long time before entering
                    818: debugging mode when @b{Asir} is executing basic functions in the
                    819: algebraic engine, (e.g., arithmetic operation, factorization etc.)
                    820: Detailed description about the debugger will be given in @ref{Debugger}.
                    821: @item u
                    822: After executing a function registered by @code{register_handler()}
1.3       noro      823: (@pxref{ox_reset ox_intr register_handler}), returns to toplevel. A confirmation
1.2       noro      824: is prompted.
                    825: @item w
                    826: Displays the calling sequence up to the interruption.
                    827: @item ?
                    828: Show a brief description of options.
                    829: \E
1.1       noro      830: @end table
                    831:
1.2       noro      832: \BJP
1.1       noro      833: @node $B%(%i!<=hM}(B,,, Risa/Asir
                    834: @section $B%(%i!<=hM}(B
1.2       noro      835: \E
                    836: \BEG
                    837: @node Error handling,,, Risa/Asir
                    838: @section Error handling
                    839: \E
1.1       noro      840:
                    841: @noindent
1.2       noro      842: \BJP
1.1       noro      843: $BAH$_9~$_H!?t$KIT@5$J7?$N0z?t$rEO$7$?>l9g$J$I$K$O<B9T$,CfCG$5$l$k$,(B,
                    844: $B%f!<%6H!?t$NCf$G%(%i!<$,5/$-$?>l9g$K$O%H%C%W%l%Y%k$KLa$kA0$K<+F0E*$K%G%P%C%0(B
                    845: $B%b!<%I$KF~$k(B. $B$3$N>uBV$G(B
                    846: $B%(%i!<$N>l=j(B, $BD>A0$N0z?t$NCM$J$I$rD4$Y$k$3$H$,$G$-$k(B.
                    847: $BI=<($5$l$k%(%i!<%a%C%;!<%8$O$5$^$6$^$G$"$j(B, $BFbIt$NH!?tL>$K0z$-B3$$$F(B
                    848: $B%a%C%;!<%8$,I=<($5$l$k(B. $B$3$l$O(B, $B8F$S=P$5$l$?AH$_9~$_H!?t(B
                    849: $B$HI,$:$7$bBP1~$O$7$J$$(B.
1.2       noro      850: \E
                    851: \BEG
                    852: When arguments with illegal types are given to a built-in function,
                    853: an error will be detected and the execution will be quit.
                    854: In many cases, when an error is detected in a built-in function,
                    855: @b{Asir} automatically enters debugging mode before coming back
                    856: to toplevel.
                    857: At that time, one can examine the state of the program,
                    858: for example, inspect argument values just before the error occurred.
                    859: Messages reported there are various depending on cases.  They are
                    860: reported after the internal function name.  The internal function name
                    861: sometimes differs from the built-in function name that is specified by
                    862: the user program.
                    863: \E
1.1       noro      864:
                    865: @noindent
1.2       noro      866: \BJP
1.1       noro      867: $B$=$NB>(B, $B$5$^$6$^$J860x$K$h$jFbIt1i;;H!?t$K$*$$$F%(%i!<$,@8$:$k$3$H$,(B
                    868: $B$"$k(B. UNIX $BHG$N>l9g(B, $B$3$l$O<!$N$$$:$l$+$N(B
                    869: @code{internal error} $B$H$7$FJs9p$5$l(B, $BDL>o$N%(%i!<$HF1MM$K07$C$F(B,
                    870: $B%G%P%C%0%b!<%I$KF~$k(B.
1.2       noro      871: \E
                    872: \BEG
                    873: In the execution of internal functions, errors may happen by various
                    874: reasons.  The UNIX version of @b{Asir} will report those errors as one of
                    875: the following @code{internal error}'s, and enters debugging mode just
                    876: like normal errors.
                    877: \E
1.1       noro      878:
                    879: @table @code
                    880: @item SEGV
                    881: @itemx BUS ERROR
1.8       noro      882: @*
1.2       noro      883: \BJP
1.1       noro      884: $BAH$_9~$_H!?t$K$h$C$F$O(B, $B0z?t$N7?$r87L)$K%A%'%C%/$;$:$K1i;;%k!<%A%s$K0z(B
                    885: $B$-EO$7$F$7$^$&$b$N$bB8:_$7$F$$$k(B. $B$3$N$h$&$J>u67$K$*$$$F(B,
                    886: $BIT@5$J%]%$%s%?(B, $B$"$k$$$O(B NULL $B%]%$%s%?$K$h$k%"%/%;%90cH?$,$"$C$?>l9g(B, $B$3$l$i(B
                    887: $B$N%(%i!<$H$J$k(B.
1.2       noro      888: \E
                    889: \BEG
                    890: Some of the built-in functions transmit their arguments to internal
                    891: operation routines without strict type-checking.  In such cases,
                    892: one of these two errors will be reported
                    893: when an access violation caused by an illegal pointer or a NULL pointer
                    894: is detected.
                    895: \E
1.1       noro      896:
                    897: @item BROKEN PIPE
1.8       noro      898: @*
1.2       noro      899: \BJP
1.1       noro      900: $B%W%m%;%94VDL?.$K$*$$$F(B, $BAj<j@h$N%W%m%;%9$H$N4V$N%9%H%j!<%`(B
                    901: $B$,4{$KB8:_$7$F$$$J$$>l9g(B ($BNc$($P4{$KAj<j@h$N%W%m%;%9$,=*N;$7$F$$$k>l9g$J$I(B)
                    902: $B$K(B, $B$=$N%9%H%j!<%`$KF~=PNO$7$h$&$H$7$?>l9g$K$3$N%(%i!<$H$J$k(B.
1.2       noro      903: \E
                    904: \BEG
                    905: In the process communication, this error will be reported if a process
                    906: attempts to read from or to write onto the partner process when the
                    907: stream to the partner process does not already exist, (e.g., terminated
                    908: process.)
                    909: \E
1.1       noro      910: @end table
                    911:
                    912: @noindent
1.2       noro      913: \BJP
1.1       noro      914: $B$3$l$i$O<B:]$K$O(B, $BAH$_9~$_H!?t$NF~8}$K$*$$$F(B, $B0z?t$r40A4$K%A%'%C%/(B
                    915: $B$9$k$3$H$K$h$jBgItJ,$OKI$2$k$,(B, $B<j4V$,B?$/$+$+$k$3$H$H(B, $B>l9g$K(B
                    916: $B$h$C$F$O8zN($rMn$9$3$H$K$b$J$k$?$a(B, $B$"$($F0z?t%A%'%C%/$O%f!<%6(B
                    917: $BG$$;$K$7$F$"$k(B.
1.2       noro      918: \E
                    919: \BEG
                    920: For UNIX version, even in such a case, the process itself does not
                    921: terminate because such an error can be caught by @code{signal()} and
                    922: recovered.
                    923: To remove this weak point, complete type
                    924: checking of all arguments are indispensable at the entry of a built-in
                    925: function, which requires an enormous amount of re-making efforts.
                    926: \E
1.1       noro      927:
1.2       noro      928: \BJP
1.1       noro      929: @node $B7W;;7k2L$*$h$SFC<l$J?t(B,,, Risa/Asir
                    930: @section $B7W;;7k2L(B, $BFC<l$J?t(B
1.2       noro      931: \E
                    932: \BEG
                    933: @node Referencing results and special numbers,,, Risa/Asir
                    934: @section Referencing results and special numbers
                    935: \E
1.1       noro      936:
                    937: @noindent
1.2       noro      938: \JP @code{@@} $B$O%(%9%1!<%WJ8;z$H$7$F;HMQ$5$l$k(B. $B8=:_<!$N$h$&$J5,Dj$,$"$k(B.
                    939: \BEG
                    940: An @code{@@} used for an escape character; rules currently in force
                    941: are as follows.
                    942: \E
1.1       noro      943: @table @code
1.2       noro      944: \BJP
1.1       noro      945: @item @@@var{n}
                    946: @var{n} $BHVL\$N7W;;7k2L(B.
                    947: @item @@@@
                    948: $BD>A0$N7W;;7k2L(B.
                    949: @item @@i
                    950: $B5u?tC10L(B.
                    951: @item @@pi
                    952: $B1_<~N((B.
                    953: @item @@e
                    954: $B<+A3BP?t$NDl(B.
                    955: @item @@
                    956: 2 $B85BN(B GF(2) $B>e$N0lJQ?tB?9`<0$NJQ?t(B ($BITDj85(B).
                    957: @item @@>, @@<, @@>=, @@<=, @@==, @@&&, @@||
                    958: quantifier elimination $B$K$*$1$k(B, $B0l3,=R8lO@M}1i;;;R(B
1.2       noro      959: \E
                    960: \BEG
                    961: @item @@@var{n}
                    962: The evaluated result of @var{n}-th input command
                    963: @item @@@@
                    964: The evaluated result of the last command
                    965: @item @@i
                    966: The unit of imaginary number, square root of -1.
                    967: @item @@pi
                    968: The number pi,
                    969: the ratio of a circumference of the circle and its diameter.
                    970: @item @@e
                    971: Napier's number, the base of natural logarithm.
                    972: @item @@
                    973: A generator of GF(2^m), a finite field of characteristic 2, over GF(2).
                    974: It is a root of an irreducible univariate polynomial over GF(2)
                    975: which is set as the defining polynomial of GF(2^m).
                    976: @item @@>, @@<, @@>=, @@<=, @@==, @@&&, @@||
                    977: Fist order logical operators. They are used in quantifier elimination.
                    978: \E
1.1       noro      979: @end table
                    980:
                    981: @example
                    982: [0] fctr(x^10-1);
                    983: [[1,1],[x-1,1],[x+1,1],[x^4+x^3+x^2+x+1,1],[x^4-x^3+x^2-x+1,1]]
                    984: [1] @@@@[3];
                    985: [x^4+x^3+x^2+x+1,1]
                    986: [2] eval(sin(@@pi/2));
                    987: 1.000000000000000000000000000000000000000000000000000000000
                    988: [3] eval(log(@@e),20);
                    989: 0.99999999999999999999999999998
                    990: [4] @@0[4][0];
                    991: x^4-x^3+x^2-x+1
                    992: [5] (1+@@i)^5;
                    993: (-4-4*@@i)
                    994: [6] eval(exp(@@pi*@@i));
                    995: -1.0000000000000000000000000000
                    996: [7] (@@+1)^9;
                    997: (@@^9+@@^8+@@+1)
                    998: @end example
                    999:
                   1000: @noindent
1.2       noro     1001: \BJP
1.1       noro     1002: $B%H%C%W%l%Y%k$G7W;;$5$l$?CM$O$3$N$h$&$K%R%9%H%j$H$7$F<h$j=P$72DG=$G$"$k$,(B,
                   1003: $B$3$N$3$H$O(B, $B%,%Y!<%8%3%l%/%?$K$H$C$F$OIiC4$r$b$?$i$92DG=@-$,$"$k(B. $BFC$K(B,
                   1004: $BBg$-$J<0$r%H%C%W%l%Y%k$G7W;;$7$?>l9g(B, $B$=$N8e$N(B GC $B;~4V$,5^B.$KA}Bg$9$k2D(B
                   1005: $BG=@-$,$"$k(B. $B$3$N$h$&$J>l9g(B, @code{delete_history()}
                   1006: (@pxref{delete_history,,@code{delete_history}}) $B$,M-8z$G$"$k(B.
1.2       noro     1007: \E
                   1008: \BEG
                   1009: As you can see in the above example,
                   1010: results of toplevel computation can be referred to
                   1011: by @code{@@} convention.
                   1012: This is convenient for users, while it sometimes imposes a heavy
                   1013: burden to the garbage collector.
                   1014: It may happen that GC time will rapidly increase after computing
                   1015: a very large expression at the toplevel.
                   1016: In such cases @code{delete_history()}
                   1017: (@pxref{delete_history,,@code{delete_history}}) takes effect.
                   1018: \E
1.1       noro     1019:
                   1020:

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