[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.7

1.7     ! noro        1: @comment $OpenXM: OpenXM/src/asir-doc/parts/risa.texi,v 1.6 2000/01/20 03:00:34 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::
                      9: * $B%$%s%9%H%l!<%7%g%s(B::
                     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.1       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.1       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}
                     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: \BJP
1.1       noro      213: @node $B%$%s%9%H%l!<%7%g%s(B,,, Risa/Asir
                    214: @section $B%$%s%9%H%l!<%7%g%s(B
1.2       noro      215: \E
                    216: \BEG
                    217: @node Installation,,, Risa/Asir
                    218: @section Installation
                    219: \E
                    220:
                    221: \JP $B0J2<$N<jB3$-$GITL@$JE@(B, $BITET9g$JE@$,$"$C$?>l9g$NLd$$9g$o$;$O(B
                    222: \BEG
                    223: Any questions and any comments on this manual are well come by e-mails
                    224: to the following address.
                    225: \E
1.1       noro      226:
                    227: @example
1.2       noro      228: noryo@@flab.fujitsu.co.jp
1.1       noro      229: @end example
                    230:
                    231: @noindent
1.2       noro      232: \JP $B08$K(B e-mail $B$G$*4j$$$7$^$9(B.
1.1       noro      233:
                    234: @menu
1.2       noro      235: \BJP
1.1       noro      236: * UNIX $BHG(B::
                    237: * Windows $BHG(B::
1.2       noro      238: \E
                    239: \BEG
                    240: * UNIX version::
                    241: * Windows version::
                    242: \E
1.1       noro      243: @end menu
                    244:
1.2       noro      245: \BJP
1.1       noro      246: @node UNIX $BHG(B,,, $B%$%s%9%H%l!<%7%g%s(B
                    247: @subsection UNIX $BHG(B
1.2       noro      248: \E
                    249: \BEG
                    250: @node UNIX version,,, Installation
                    251: @subsection UNIX version
                    252: \E
1.1       noro      253:
                    254: @noindent
1.2       noro      255: \BJP
1.1       noro      256: $BI,MW$J%U%!%$%k$O(B @samp{asir.tgz} $B$G$"$k(B.
                    257: $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
                    258: $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
                    259: @samp{/usr/local/lib} $B$K(B @samp{asir} $B$H$$$&%G%#%l%/%H%j$H$7$F(B
                    260: $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
                    261: $B%G%#%l%/%H%j$H8F$V(B.
1.2       noro      262: \E
                    263: \BEG
                    264: A file @samp{asir.tgz} suitable for the taget machine/architecture
                    265: is required. After getting it,
                    266: you have to unpack it by @code{gzip}. First of all, determine
                    267: a derectory where binaries and library files are installed.
                    268: We call the directory the @b{library directory}.
                    269: The following installs the files in @samp{/usr/local/lib/asir}.
                    270: \E
1.1       noro      271:
                    272: @example
                    273: # gzip -dc asir.tgz | ( cd /usr/local/lib; tar xf - )
                    274: @end example
                    275:
1.2       noro      276: \JP $B8D?ME*$K;HMQ$9$k>l9g$K$O(B, @samp{$HOME}$B$J$I$KCV$$$F$b$h$$(B.
                    277: \BEG
                    278: In this case you don't have to set any environment variable.
1.1       noro      279:
1.2       noro      280: You can install them elsewhere.
                    281: \E
1.1       noro      282: @example
                    283: % gzip -dc asir.tgz | ( cd $HOME; tar xf - )
                    284: @end example
                    285:
                    286: @noindent
1.2       noro      287: \BJP
1.1       noro      288: $B$3$N>l9g(B, $B%i%$%V%i%j%G%#%l%/%H%j$NL>A0$r4D6-JQ?t(B
                    289: @code{ASIR_LIBDIR} $B$K@_Dj$9$kI,MW$,$"$k(B.
1.2       noro      290: \E
                    291: \BEG
                    292: In this case you have to set the name of the library directory
                    293: to the environment variable @code{ASIR_LIBDIR}.
                    294: \E
1.1       noro      295:
                    296: @example
                    297: % setenv ASIR_LIBDIR $HOME/asir
                    298: @end example
                    299:
                    300: @noindent
1.2       noro      301: \BJP
1.1       noro      302: Asir $BK\BN$O(B, $B%i%$%V%i%j%G%#%l%/%H%j$N(B @samp{asir} $B$G$"$k(B.
                    303: @samp{/usr/local/bin} $B$"$k$$$O%f!<%6$N<B9T%U%!%$%k%5!<%A%Q%9(B
                    304: $B$N$I$3$+$K%7%s%\%j%C%/%j%s%/$r:n$k$HJXMx$G$"$k(B.
1.2       noro      305: \E
                    306: \BEG
                    307: @b{Asir} itself is in the library directory. It will be convenient
                    308: to create a symbolic link to it from @samp{/usr/local/bin} or
                    309: the user's search path.
                    310: \E
1.1       noro      311:
                    312: @example
                    313: # ln -s /usr/local/lib/asir/asir /usr/local/bin/asir
                    314: @end example
                    315:
                    316: @noindent
1.2       noro      317: \JP $B$3$N>uBV$G(B @samp{asir} $B$r5/F0$7$F$_$k(B.
                    318: \BEG
                    319: Start @samp{asir}, and @b{Asir} will immediately terminate leaving you
                    320: a message as follows.
                    321: \E
1.1       noro      322:
                    323: @example
                    324: % /usr/local/bin/asir
                    325: asir_key not found.
1.6       noro      326:
                    327: You need a key for each machine on which you want to run Asir.
                    328: In order to get the key, send an e-mail consisting of the following
                    329: single line to risa@@sec.flab.fujitsu.co.jp.
                    330:
                    331: ASIR XXXXXXXX
                    332:
                    333: After a while, an e-mail will be returned containing only one line like
                    334:
                    335: YYYYYYYY YYYYYYYY YYYYYYYY
                    336:
1.7     ! noro      337: Create '.../asir_key'
1.6       noro      338: if necessary and append the returned string to the file.
1.1       noro      339: @end example
                    340:
                    341: @noindent
1.2       noro      342: \BJP
1.1       noro      343: $B$9$k$H(B, $B$3$N$h$&$J%a%C%;!<%8$,=P$F(B @samp{asir} $B$O=*N;$9$k(B. UNIX $BHG(B
                    344: $B$G$O(B, $B%^%7%s$4$H$K(B @code{key} $B$H8F$P$l$kJ8;zNs$,I,MW$G$"$k(B.
                    345: @code{key} $B$rF~<j$9$k$?$a$K$O(B,
                    346:
                    347: @example
1.4       noro      348: risa@@sec.flab.fujitsu.co.jp
1.1       noro      349: @end example
                    350:
                    351: $B08$K(B,
                    352:
                    353: @example
                    354: ASIR XXXXXXXX
                    355: @end example
                    356:
                    357: $B$H$$$&(B 1 $B9T$N$_$+$i$J$k(B e-mail $B$rAw$l$P$h$$(B. @code{XXXXXXXX} $B$OI=<($5$l$?(B
                    358: @code{ID} $B$G$"$k(B. $B@^$jJV$7(B
                    359:
                    360: @example
                    361: YYYYYYYY YYYYYYYY YYYYYYYY
                    362: @end example
                    363:
                    364: @noindent
                    365: $B$H$$$&7A$N(B 1 $B9T$N$_$+$i$J$k(B e-mail $B$,FO$/$N$G(B, $B$3$N(B 1 $B9T$r4^$`(B @samp{asir_key}
                    366: $B$J$k%U%!%$%k$r%+%l%s%H%G%#%l%/%H%j$K:n$C$F(B @samp{asir} $B$r5/F0$7$F$_$k(B.
1.2       noro      367: \E
                    368:
                    369: \BEG
                    370: For UNIX version of @b{Asir}, you need a @code{key}, a string,
                    371: for each machine you want to run @b{Asir}.
                    372: In order to get the @code{key}, you just need to send an e-mail
                    373: consisting of a single line like
                    374:
                    375: @example
                    376: ASIR XXXXXXXX
                    377: @end example
                    378:
                    379: to address
                    380:
                    381: @example
1.5       noro      382: risa@@sec.flab.fujitsu.co.jp
1.2       noro      383: @end example
                    384:
                    385: @noindent
                    386: Here, @code{XXXXXXXX} is the machine ID notified in the first message
                    387: from @b{Asir}.
                    388:
                    389: After a while, an e-mail will be returned containing only one line like
                    390:
                    391: @example
                    392: YYYYYYYY YYYYYYYY YYYYYYYY
                    393: @end example
                    394:
                    395: @noindent
                    396: Then, you shall create a new file in the current directory
                    397: named @samp{asir_key} containing the returned string in one line.
                    398:
                    399: All after this, call again @samp{asir}.
                    400: \E
1.1       noro      401:
                    402: @example
                    403: % /usr/local/bin/asir
1.6       noro      404: This is Risa/Asir, Version 991227.
1.1       noro      405: Copyright (C) FUJITSU LABORATORIES LIMITED.
1.6       noro      406: 1994-1999. All rights reserved.
1.1       noro      407: [0]
                    408: @end example
                    409:
                    410: @noindent
1.2       noro      411: \BJP
1.1       noro      412: $B$3$N$h$&$J%W%m%s%W%H$,=P$l$P(B, $BF~<j$7$?(B @code{key} $B$O$=$N%^%7%s$KBP$7$FM-8z(B
                    413: $B$G$"$k(B. @code{key} $B$r=q$$$F$*$/%U%!%$%k$K4X$7$F$O(B, $B4D6-JQ?t(B @code{ASIR_KEY}
                    414: $B$N@bL@$N9`$G>\$7$/=R$Y$k$,(B, $B%i%$%V%i%j%G%#%l%/%H%j$K$3$3$G:n@.$7$?(B
                    415: $B%U%!%$%k(B @samp{asir_key} $B$rCV$1$P(B, $B$=$N%^%7%s>e$GA4$F$N%f!<%6$,(B @samp{asir}
                    416: $B$r;HMQ$G$-$k$h$&$K$J$k(B. @samp{asir_key} $B$K$OJ#?t$N%^%7%s$KBP$9$k(B @code{key}
                    417: $B$r=q$1$k$N$G(B, $B%i%$%V%i%j%G%#%l%/%H%j$r6&M-$7$F$$$k>l9g$G$b(B @samp{asir_key}
                    418: $B$K9T$rDI2C$7$F$$$1$P$h$$(B.
1.2       noro      419: \E
                    420: \BEG
                    421: If you get such a prompt (@samp{[0]}) from @b{Asir},
                    422: the key you have is valid to the machine you are currently running
                    423: @code{asir}.
                    424:
                    425: When the file @samp{asir_key} is located on the library directory,
                    426: all the users of the machine can execute @samp{asir}.
                    427: The file @samp{asir_key} can contain several lines for
                    428: several @code{key}'s.
                    429: This enables users to run several machines sharing the same library
                    430: directory by simply adding lines for machines to be used.
                    431: We shall describe about the file for @code{key}'s in detail in
                    432: @ref{Environment variable}.
                    433: \E
1.1       noro      434:
                    435: @example
                    436: # cp asir_key /usr/local/lib/asir
                    437: @end example
                    438:
1.2       noro      439: \BJP
1.1       noro      440: @node Windows $BHG(B,,, $B%$%s%9%H%l!<%7%g%s(B
                    441: @subsection Windows $BHG(B
1.2       noro      442: \E
                    443: \BEG
                    444: @node Windows version,,, Installation
                    445: @subsection Windows version
                    446: \E
1.1       noro      447:
                    448: @noindent
1.2       noro      449: \BJP
1.1       noro      450: $BI,MW$J%U%!%$%k$O(B @samp{asirwin.tgz} $B$G$"$k(B. $BB>$K(B, @samp{gzip.exe},
                    451: @samp{tar.exe} $B$,I,MW$@$,(B, asirwin.tgz $B$HF1$8%G%#%l%/%H%j$KMQ0U$7$F(B
                    452: $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
                    453: $B$+$i(B
1.2       noro      454: \E
                    455: \BEG
                    456: The necessary file is @samp{asirwin.tgz}. To unpack it @samp{gzip.exe}
                    457: and @samp{tar.exe} are necessary. They are in the same
                    458: directory as @samp{asirwin.tgz} on the ftp server.
                    459: Putting them in the same directory, execute the following:
                    460: \E
1.1       noro      461:
                    462: @example
1.2       noro      463: \JP C:\...> tar xzf asirwin.tgz
                    464: \EG C:\...> tar xzf asirwin.tgz
1.1       noro      465: @end example
                    466:
                    467: @noindent
1.2       noro      468: \BJP
1.1       noro      469: $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)
                    470: $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
                    471: $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
                    472: $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
                    473: $B%j(B @samp{bin} $B$K(B @samp{asirgui.exe} (GUI), @samp{engine.exe} ($BK\BN(B) $B$,(B
                    474: $BCV$+$l$F$$$k(B. @samp{asirgui.exe} $B$N=i2s$NN)$A>e$2$O(B, $B%(%/%9%W%m!<%i$+$i9T(B
                    475: $B$&(B. $B$3$l$K$h$j(B
1.2       noro      476: \E
                    477:
                    478: \BEG
                    479: Then a directory @samp{Asir} (@b{Asir root directory}) is created,
                    480: which has subdirectories named @samp{bin} and @samp{lib}. To set up it,
                    481: invoke @samp{bin\asirgui.exe} from Explorer and
                    482: click @code{OK}.  Then the name of @b{Asir root directory} is set to the
                    483: following registries.
                    484: \E
1.1       noro      485:
                    486: @example
1.2       noro      487: \JP HKEY_LOCAL_MACHINE\SOFTWARE\FUJITSU\Asir\99.03.31\Directory
                    488: \EG HKEY_LOCAL_MACHINE\SOFTWARE\FUJITSU\Asir\99.03.31\Directory
1.1       noro      489: @end example
                    490:
                    491: @noindent
1.2       noro      492: \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      493:
1.2       noro      494: \BJP
1.1       noro      495: @node $B%3%^%s%I%i%$%s%*%W%7%g%s(B,,, Risa/Asir
                    496: @section $B%3%^%s%I%i%$%s%*%W%7%g%s(B
1.2       noro      497: \E
                    498: \BEG
                    499: @node Command line options,,, Risa/Asir
                    500: @section Command line options
                    501: \E
1.1       noro      502:
                    503: @noindent
1.2       noro      504: \JP $B%3%^%s%I%i%$%s%*%W%7%g%s$O<!$NDL$j(B.
                    505: \EG Command-line options for the command @samp{asir} are as follows.
1.1       noro      506:
                    507: @table @code
                    508:
                    509: @item -heap @var{number}
1.2       noro      510: \BJP
1.1       noro      511: @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.
                    512: $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
                    513: $B$rJQ99$9$k>l9g(B, @code{-heap} $B$rMQ$$$k(B. $BC10L$O%V%m%C%/$G$"$k(B.
                    514: 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      515: \E
                    516: \BEG
                    517: In @b{Risa/Asir}, 4KB is used as an unit, called block,
                    518: for memory allocation.
                    519: By default, 16 blocks (64KB) are allocated initially.
                    520: This value can be changed by giving an option @code{-heap}
                    521: a number parameter in unit block.
                    522: Size of the heap area is obtained by a Built-in function heap(),
                    523: the result of which is a number in Bytes.
                    524: \E
1.1       noro      525:
                    526: @item -adj @var{number}
1.2       noro      527: \BJP
1.1       noro      528: $B$3$NCM$,Bg$-$$$[$I(B, $B;HMQ%a%b%jNL$OBg$-$/$J$k$,(B, GC $B;~4V$,>/$J$/$J(B
                    529: $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
                    530: $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
                    531: $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
                    532: $BBg$-$/(B ($BNc$($P(B 8) $B@_Dj$9$k(B.
1.2       noro      533: \E
                    534: \BEG
                    535: Heap area will be stretched by the memory manager,
                    536: if the size of reclaimed memories is less than 1/@var{number}
                    537: of currently allocated heap area.
                    538: The default value for @var{number} is 3.
                    539: If you do not prefer to stretch heap area by some reason, perhaps by
                    540: restriction of available memories, but if prefer to resort to
                    541: reclaiming garbages as far as possible,
                    542: then a large value should be chosen for @var{number}, e.g., 8.
                    543: \E
1.1       noro      544:
                    545: @item -norc
1.2       noro      546: \JP $B=i4|2=%U%!%$%k(B @samp{$HOME/.asirrc} $B$rFI$^$J$$(B.
                    547: \BEG
                    548: When this option is specified, @b{Asir} does not read the
                    549: initial file @samp{$HOME/.asirrc}.
                    550: \E
1.1       noro      551:
                    552: @item -f @var{file}
1.2       noro      553: \BJP
1.1       noro      554: $BI8=`F~NO$NBe$o$j$K(B, @var{file} $B$+$iF~NO$rFI$_9~$s$G<B9T$9$k(B.
                    555: $B%(%i!<$N:]$K$O$?$@$A$K=*N;$9$k(B.
1.2       noro      556: \E
                    557: \BEG
                    558: Instead of the standard input, @var{file} is used as the input.
                    559: Upon an error, the execution immediately terminates.
                    560: \E
1.1       noro      561:
                    562: @item -paristack @var{number}
1.2       noro      563: \BJP
1.1       noro      564: @b{PARI} (@pxref{pari}) $B@lMQ$NNN0h$NBg$-$5$r;XDj$9$k(B. $BC10L$O%P%$%H(B. $B%G%U%)(B
                    565: $B%k%H$G$O(B 1 MB.
1.2       noro      566: \E
                    567: \BEG
                    568: This option specifies the private memory size for @code{PARI} (@pxref{pari}).
                    569: The unit is Bytes. By default, it is set to 1 MB.
                    570: \E
1.1       noro      571:
                    572: @item -maxheap @var{number}
1.2       noro      573: \BJP
1.1       noro      574: 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
                    575: $B>l9g(B, $B<B:]$K$O(B @code{limit} $B%3%^%s%I$GI=<($5$l$k(B @code{datasize} $B$NCM(B
                    576: $B$K@)8B$5$l$F$$$k$?$a(B, @code{-maxheap} $B$N;XDj$,$J$/$F$b0lDjNL0J>e$K(B
                    577: heap $B$r3MF@$G$-$J$$>l9g$,$"$k$N$GCm0U(B.)
1.2       noro      578: \E
                    579: \BEG
                    580: This option sets an upper limit of the heap size. The unit is Bytes.
                    581: Note that the size is already limited by the value of @code{datasize}
                    582: displayed by the command @code{limit} on UNIX.
                    583: \E
1.1       noro      584: @end table
                    585:
1.2       noro      586: \BJP
1.1       noro      587: @node $B4D6-JQ?t(B,,, Risa/Asir
                    588: @section $B4D6-JQ?t(B
1.2       noro      589: \E
                    590: \BEG
                    591: @node Environment variable,,, Risa/Asir
                    592: @section Environment variable
                    593: \E
1.1       noro      594:
                    595: @noindent
1.2       noro      596: \BJP
1.1       noro      597: @b{Asir} $B$N<B9T$K4X$9$k$$$/$D$+$N4D6-JQ?t$,B8:_$9$k(B. UNIX $B>e$G$O4D6-JQ?t(B
                    598: $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
                    599: $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
                    600: $B$G$O(B, @samp{c:\autoexec.bat} $B$K=q$$$F(B reboot $B$9$k(B.
1.2       noro      601: \E
                    602: \BEG
                    603: There exist several environment variables concerning with an execution
                    604: of @b{Asir}. On UNIX, an environment variable is set from shells, or
                    605: in rc files of shells. On Windows NT, it can be set from [Control Panel]
                    606: ->[Environment]. On Windows 95/98, it can be set in @samp{c:\autoexec.bat}.
                    607: Note that the setting takes effect after rebooting the machine on Windows
                    608: 95/98.
                    609: \E
1.1       noro      610: @itemize @bullet
                    611: @item
                    612: @code{ASIR_KEY}
                    613:
1.2       noro      614: \BJP
1.1       noro      615: UNIX $BHG$G$O(B, @b{Asir} $B$,5/F0$5$l$?%^%7%s$KBP$9$k(B @code{key} $B$,$J$1(B
                    616: $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
                    617: $B7e(B 3 $B%o!<%I$+$i$J$j(B,
1.2       noro      618: \E
                    619: \BEG
                    620: @b{Asir} shall not work unless a @code{key} for the machine
                    621: on which @b{Asir} is invoked is given.
                    622: The @code{key} consists of a string which denotes 3 word hexadecimal
                    623: number, each of which has 8 hexadecimal digits.
                    624: In order to run @b{Asir} for several machines,
                    625: several @code{key}'s can be written together on a same file as follows.
                    626: \E
1.1       noro      627: @example
                    628: % cat asir_key
                    629: cf6f236c 61a35091 dddc4529 geisha
                    630: 82281685 d1929945 a8bd24ca yorktown
                    631: 34b75d30 63f8df93 3e881113 nyanchu
                    632: @end example
                    633:
1.2       noro      634: \BJP
1.1       noro      635: $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
                    636: $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
                    637: $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      638: \E
                    639: \BEG
                    640: The text after each @code{key} is neglected to the end-of-line.
                    641: This is convenient to comment on the respective @code{key}.
                    642: Files containing @code{key}'s are searched by the following order.
                    643: \E
1.1       noro      644:
                    645: @enumerate
                    646: @item
1.2       noro      647: \JP $B4D6-JQ?t(B @code{ASIR_KEY} $B$K;XDj$5$l$?%U%!%$%k(B
                    648: \EG File set to environment @code{ASIR_KEY}
1.1       noro      649:
                    650: @item
1.2       noro      651: \JP $B%+%l%s%H%G%#%l%/%H%j$N(B @samp{asir_key}
                    652: \EG File @samp{asir_key} on the current directory.
1.1       noro      653:
                    654: @item
1.2       noro      655: \BJP
1.1       noro      656: $B4D6-JQ?t(B @code{ASIR_LIBDIR} $B$G;XDj$5$l$?%G%#%l%/%H%j(B ($B;XDj$,$J$1$l$P(B
                    657: @samp{/usr/local/lib/asir}) $B$N(B @samp{asir_key}
1.2       noro      658: \E
                    659: \BEG
                    660: Files on the directory specified by environment @code{ASIR_LIBDIR}.
                    661: (File @samp{asir_key} on @samp{/usr/local/lib/asir/},
                    662: if environment @code{ASIR_LIBDIR} is not set.)
                    663: \E
                    664:
1.1       noro      665: @end enumerate
                    666:
                    667: @item
                    668: @code{ASIR_LIBDIR}
                    669:
1.2       noro      670: \BJP
1.1       noro      671: @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
                    672: $B$J$I$,$*$+$l$k%G%#%l%/%H%j(B. $B;XDj$,$J$$>l9g(B UNIX $BHG$G$O(B
                    673: @samp{/usr/local/lib/asir}, Windows $BHG$G$O(B Asir $B%a%$%s%G%#%l%/%H%j$N2<$N(B
                    674: @samp{lib} $B%G%#%l%/%H%j$,MQ$$$i$l$k(B.
1.2       noro      675: \E
                    676: \BEG
                    677: The library directory of @b{Asir}, i.e., the directory where
                    678: , for example, files containing programs written in @b{Asir}.
                    679: If not specified, on UNIX, @samp{/usr/local/lib/asir} is used by default.
                    680: On Windows, @samp{lib} in @b{Asir root directory} is used by default.
                    681: This environment will be useful in a case where @b{Asir} binaries
                    682: are installed on a private directory of the user.
                    683: \E
1.1       noro      684:
                    685: @item
                    686: @code{ASIRLOADPATH}
                    687:
1.2       noro      688: \BJP
1.1       noro      689: $B%m!<%I$5$l$k%U%!%$%k$,$"$k%G%#%l%/%H%j$r(B UNIX $B$N>l9g(B ':',
                    690: Windows$B$N>l9g(B ';' $B$G6h@Z$C$FJB$Y$k(B. $B%G%#%l(B
                    691: $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
                    692: $B%U%!%$%k$,(B @code{ASIRLOADPATH} $B$K$J$+$C$?>l9g(B, $B%i%$%V%i%j%G%#%l%/%H%j(B
                    693: $B$b%5!<%A$5$l$k(B.
1.2       noro      694: \E
                    695: \BEG
                    696: This environment specifies directories which contains files to be
                    697: loaded by @b{Asir} command @code{load()}.
                    698: Directories are separated by a `:' on UNIX, a ';' on Windows respectively.
                    699: The search order is from the left to the right.
                    700: After searching out all directories in @code{ASIRLOADPATH},
                    701: or in case of no specification at all,
                    702: the library directory will be searched.
                    703: \E
1.1       noro      704: @item
                    705: @code{HOME}
                    706:
1.2       noro      707: \BJP
1.1       noro      708: @var{-norc} $B%*%W%7%g%s$D$-$G5/F0$7$J$$>l9g(B, @samp{$HOME/.asirrc}$B$,$"$l$P(B,
                    709: $BM=$a$3$N%U%!%$%k$r<B9T$9$k(B. @code{HOME} $B$,@_Dj$5$l$F$$$J$$>l9g(B, UNIX $BHG(B
                    710: $B$G$O$J$K$bFI$^$J$$$,(B, Windows $BHG$G$O(B Asir $B%a%$%s%G%#%l%/%H%j(B
                    711: (@code{get_rootdir()} $B$GJV$5$l$k%G%#%l%/%H%j(B) $B$N(B @samp{.asirrc} $B$rC5$7(B,
                    712: $B$"$l$P$=$l$r<B9T$9$k(B.
1.2       noro      713: \E
                    714: \BEG
                    715: If @b{Asir} is invoked without @var{-norc}, @samp{$HOME/.asirrc}, if exists,
                    716: is executed. If @code{HOME} is not set, nothing is done on UNIX. On Windows,
                    717: @samp{.asirrc} in @b{Asir root directory} is executed if it exists.
                    718: \E
1.1       noro      719: @end itemize
                    720:
1.2       noro      721: \BJP
1.1       noro      722: @node $B5/F0$+$i=*N;$^$G(B,,, Risa/Asir
                    723: @section $B5/F0$+$i=*N;$^$G(B
1.2       noro      724: \E
                    725: \BEG
                    726: @node Starting and Terminating an Asir session,,, Risa/Asir
                    727: @section Starting and Terminating an @b{Asir} session
                    728: \E
1.1       noro      729:
                    730: @noindent
1.2       noro      731: \JP @b{Asir} $B$r5/F0$9$k$H(B,
                    732: \BEG
                    733: Run @b{Asir}, then the copyright notice and the first prompt
                    734: will appear on your screen,
                    735: and a new @b{Asir} session will be started.
                    736: \E
                    737:
1.1       noro      738: @example
                    739: [0]
                    740: @end example
                    741:
                    742: @noindent
1.2       noro      743: \BJP
1.1       noro      744: $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}
                    745: (Windows $BHG$N>l9g(B, @code{HOME} $B@_Dj$5$l$F$$$J$$>l9g$K$O(B @code{get_rootdir()}
                    746: $B$GJV$5$l$k%G%#%l%/%H%j$K$"$k(B @samp{.asirrc})
                    747: $B$,B8:_$7$F$$$k>l9g(B, $B$3$N%U%!%$%k$r(B @b{Asir} $B%f!<%68@8l$G$+$+$l$?(B
                    748: $B%U%!%$%k$H8+$J$7(B, $B2r<a<B9T$9$k(B.
1.2       noro      749: \E
                    750: \BEG
                    751: When initialization file @samp{$HOME/.asirrc} exists,
                    752: @b{Asir} interpreter executes it at first taking it as a program
                    753: file written in @b{Asir}.
                    754: \E
1.1       noro      755:
                    756: @noindent
1.2       noro      757: \BJP
1.1       noro      758: $B%W%m%s%W%H$OF~NO$NHV9f$rI=$9(B. $B%;%C%7%g%s$O(B, @code{end;} $B$^$?$O(B
                    759: @code{quit;} $B$rF~NO$9$k$3$H$K$h$j=*N;$9$k(B. $BF~NO$O(B, @samp{;} $B$^$?$O(B
                    760: @samp{$} $B$^$G$r0l6h@Z$j$H$7$FI>2A$5$l$k(B. @samp{;} $B$N$H$-7k2L$OI=<($5$l(B,
                    761: @samp{$} $B$N$H$-I=<($5$l$J$$(B.
1.2       noro      762: \E
                    763: \BEG
                    764: The prompt indicates the sequential number of your input commands to
                    765: @b{Asir}.
                    766: The session will terminate when you input @code{end;} or @code{quit;}
                    767: to @b{Asir}.
                    768: Input commands are evaluated statement by statement.
                    769: A statement normally ends with its terminator
                    770: @samp{;} or @samp{$}.
                    771: (There are some exceptions. See, syntax of @b{Asir}.)
                    772: The result will be displayed when the command, i.e. statement,
                    773: is terminated by a @samp{;},
                    774: and will not when terminated by a @samp{$}.
                    775: \E
1.1       noro      776:
                    777: @example
                    778: % asir
                    779: [0] A;
                    780: 0
                    781: [1] A=(x+y)^5;
                    782: x^5+5*y*x^4+10*y^2*x^3+10*y^3*x^2+5*y^4*x+y^5
                    783: [2] A;
                    784: x^5+5*y*x^4+10*y^2*x^3+10*y^3*x^2+5*y^4*x+y^5
                    785: [3] a=(x+y)^5;
                    786: evalpv : invalid assignment
                    787: return to toplevel
                    788: [3] a;
                    789: a
                    790: [4] fctr(A);
                    791: [[1,1],[x+y,5]]
                    792: [5] quit;
                    793: %
                    794: @end example
                    795:
                    796: @noindent
1.2       noro      797: \BJP
1.1       noro      798: $B$3$NNc$G$O(B, @code{A}, @code{a}, @code{x}, @code{y} $B$J$kJ8;z$,;HMQ$5$l$F$$$k(B.
                    799: @code{A} $B$O%W%m%0%i%`$K$*$1$kJQ?t$G(B, @code{a}, @code{x}, @code{y} $B$O?t3XE*(B
                    800: $B$J0UL#$G$NITDj85$G$"$k(B. $B0lHL$K%W%m%0%i%`JQ?t$OBgJ8;z$G;O$^$j(B,
                    801: $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,
                    802: $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.
                    803: $B0lJ}(B, $BITDj85$O$=$l<+?H$GCM$r;}$D$3$H$O$G$-$:(B, $B=>$C$F(B, $BITDj85$KBP$9$k(B
                    804: $BBeF~$O5v$5$l$J$$(B. $B8e$K<($9$,(B, $BITDj85$KBP$9$kBeF~$O(B, $BAH$_9~$_H!?t(B @code{subst()}
                    805: $B$K$h$jL@<(E*$K9T$o$l$k(B.
1.2       noro      806: \E
                    807: \BEG
                    808: In the above example, names @code{A}, @code{a}, @code{x} and @code{y}
                    809: are used to identify mathematical and programming objects.
                    810: There, the name @code{A} denotes a program variable
                    811: (some times called simply as a program variable.)
                    812: while the other names, @code{a}, @code{x} and @code{y}, denote
                    813: mathematical objects, that is, indeterminates.
                    814: In general, program variables have names which begin with
                    815: capital letters, while names of indeterminates begin with
                    816: small letters.
                    817: As you can see in the example, program variables are used to hold and
                    818: keep objects, such as numbers and expressions, as their values,
                    819: just like variables in C programming language.
                    820: Whereas, indeterminates cannot have values so that assignment to
                    821: indeterminates are illegal.
                    822: If one wants to get a result by substituting a value for an indeterminate
                    823: in an expression, it is achieved by the function @code{subst} as the
                    824: value of the function.
                    825: \E
1.1       noro      826:
1.2       noro      827: \BJP
1.1       noro      828: @node $B3d$j9~$_(B,,, Risa/Asir
                    829: @section $B3d$j9~$_(B
1.2       noro      830: \E
                    831: \BEG
                    832: @node Interruption,,, Risa/Asir
                    833: @section Interruption
                    834: \E
1.1       noro      835:
                    836: @noindent
1.2       noro      837: \BJP
1.1       noro      838: $B7W;;$r<B9TCf$K3d$j9~$_$r$+$1$?$$>l9g(B, $B3d$j9~$_%-%c%i%/%?(B($BDL>o$O(B
                    839: @kbd{C-c}, DOS $BHG$G$O(B @kbd{C-x}, Mac $BHG$G$O(B
                    840: @code{command+}@samp{.} ) $B$rF~NO$9$k(B.
1.2       noro      841: \E
                    842: \BEG
                    843: To interrupt the @b{Asir} execution, input an interrupt character
                    844: from the keyboard.  A @kbd{C-c} is usually used for it.
                    845: (Notice: @kbd{C-x} for DOS version; @code{command+}@samp{.} for Macintosh
                    846: version.)
                    847: \E
1.1       noro      848:
                    849: @example
                    850: @@ (x+y)^1000;
                    851: @kbd{C-c}interrupt ?(q/t/c/d/u/w/?)
                    852: @end example
                    853:
                    854: @noindent
1.2       noro      855: \JP $B3FA*Br;h$N0UL#$O<!$NDL$j(B.
                    856: \EG Here, the meaning of options are as follows.
1.1       noro      857:
                    858: @table @code
1.2       noro      859: \BJP
1.1       noro      860: @item q
                    861: @b{Asir} $B$r=*N;$9$k(B. ($B3NG'$"$j(B)
                    862: @item t
                    863: $B%H%C%W%l%Y%k$KLa$k(B. ($B3NG'$"$j(B)
                    864: @item c
                    865: $B<B9T$r7QB3$9$k(B.
                    866: @item d
                    867: $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}.
                    868: @item u
1.3       noro      869: @code{register_handler()} (@pxref{ox_reset ox_intr register_handler}) $B$GEPO?$5$l$?(B
1.1       noro      870: $B4X?t$r<B9T8e%H%C%W%l%Y%k$KLa$k(B. ($B3NG'$"$j(B)
                    871: @item w
                    872: $BCfCGE@$^$G$NH!?t$N8F$S=P$7Ns$rI=<($9$k(B.
                    873: @item ?
                    874: $B3FA*Br;h$N0UL#$r@bL@$9$k(B.
1.2       noro      875: \E
                    876: \BEG
                    877: @item q
                    878: Terminates @b{Asir} session. (Confirmation requested.)
                    879: @item t
                    880: Returns to toplevel. (Confirmation requested.)
                    881: @item c
                    882: Resumes to continue the execution.
                    883: @item d
                    884: Enters debugging mode at the next statement of the @b{Asir} program,
                    885: if @b{Asir} has been executing a program loaded from a file.
                    886: Note that it will sometimes take a long time before entering
                    887: debugging mode when @b{Asir} is executing basic functions in the
                    888: algebraic engine, (e.g., arithmetic operation, factorization etc.)
                    889: Detailed description about the debugger will be given in @ref{Debugger}.
                    890: @item u
                    891: After executing a function registered by @code{register_handler()}
1.3       noro      892: (@pxref{ox_reset ox_intr register_handler}), returns to toplevel. A confirmation
1.2       noro      893: is prompted.
                    894: @item w
                    895: Displays the calling sequence up to the interruption.
                    896: @item ?
                    897: Show a brief description of options.
                    898: \E
1.1       noro      899: @end table
                    900:
1.2       noro      901: \BJP
1.1       noro      902: @node $B%(%i!<=hM}(B,,, Risa/Asir
                    903: @section $B%(%i!<=hM}(B
1.2       noro      904: \E
                    905: \BEG
                    906: @node Error handling,,, Risa/Asir
                    907: @section Error handling
                    908: \E
1.1       noro      909:
                    910: @noindent
1.2       noro      911: \BJP
1.1       noro      912: $BAH$_9~$_H!?t$KIT@5$J7?$N0z?t$rEO$7$?>l9g$J$I$K$O<B9T$,CfCG$5$l$k$,(B,
                    913: $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
                    914: $B%b!<%I$KF~$k(B. $B$3$N>uBV$G(B
                    915: $B%(%i!<$N>l=j(B, $BD>A0$N0z?t$NCM$J$I$rD4$Y$k$3$H$,$G$-$k(B.
                    916: $BI=<($5$l$k%(%i!<%a%C%;!<%8$O$5$^$6$^$G$"$j(B, $BFbIt$NH!?tL>$K0z$-B3$$$F(B
                    917: $B%a%C%;!<%8$,I=<($5$l$k(B. $B$3$l$O(B, $B8F$S=P$5$l$?AH$_9~$_H!?t(B
                    918: $B$HI,$:$7$bBP1~$O$7$J$$(B.
1.2       noro      919: \E
                    920: \BEG
                    921: When arguments with illegal types are given to a built-in function,
                    922: an error will be detected and the execution will be quit.
                    923: In many cases, when an error is detected in a built-in function,
                    924: @b{Asir} automatically enters debugging mode before coming back
                    925: to toplevel.
                    926: At that time, one can examine the state of the program,
                    927: for example, inspect argument values just before the error occurred.
                    928: Messages reported there are various depending on cases.  They are
                    929: reported after the internal function name.  The internal function name
                    930: sometimes differs from the built-in function name that is specified by
                    931: the user program.
                    932: \E
1.1       noro      933:
                    934: @noindent
1.2       noro      935: \BJP
1.1       noro      936: $B$=$NB>(B, $B$5$^$6$^$J860x$K$h$jFbIt1i;;H!?t$K$*$$$F%(%i!<$,@8$:$k$3$H$,(B
                    937: $B$"$k(B. UNIX $BHG$N>l9g(B, $B$3$l$O<!$N$$$:$l$+$N(B
                    938: @code{internal error} $B$H$7$FJs9p$5$l(B, $BDL>o$N%(%i!<$HF1MM$K07$C$F(B,
                    939: $B%G%P%C%0%b!<%I$KF~$k(B.
1.2       noro      940: \E
                    941: \BEG
                    942: In the execution of internal functions, errors may happen by various
                    943: reasons.  The UNIX version of @b{Asir} will report those errors as one of
                    944: the following @code{internal error}'s, and enters debugging mode just
                    945: like normal errors.
                    946: \E
1.1       noro      947:
                    948: @table @code
                    949: @item SEGV
                    950: @itemx BUS ERROR
                    951:
1.2       noro      952: \BJP
1.1       noro      953: $BAH$_9~$_H!?t$K$h$C$F$O(B, $B0z?t$N7?$r87L)$K%A%'%C%/$;$:$K1i;;%k!<%A%s$K0z(B
                    954: $B$-EO$7$F$7$^$&$b$N$bB8:_$7$F$$$k(B. $B$3$N$h$&$J>u67$K$*$$$F(B,
                    955: $BIT@5$J%]%$%s%?(B, $B$"$k$$$O(B NULL $B%]%$%s%?$K$h$k%"%/%;%90cH?$,$"$C$?>l9g(B, $B$3$l$i(B
                    956: $B$N%(%i!<$H$J$k(B.
1.2       noro      957: \E
                    958: \BEG
                    959: Some of the built-in functions transmit their arguments to internal
                    960: operation routines without strict type-checking.  In such cases,
                    961: one of these two errors will be reported
                    962: when an access violation caused by an illegal pointer or a NULL pointer
                    963: is detected.
                    964: \E
1.1       noro      965:
                    966: @item BROKEN PIPE
                    967:
1.2       noro      968: \BJP
1.1       noro      969: $B%W%m%;%94VDL?.$K$*$$$F(B, $BAj<j@h$N%W%m%;%9$H$N4V$N%9%H%j!<%`(B
                    970: $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)
                    971: $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      972: \E
                    973: \BEG
                    974: In the process communication, this error will be reported if a process
                    975: attempts to read from or to write onto the partner process when the
                    976: stream to the partner process does not already exist, (e.g., terminated
                    977: process.)
                    978: \E
1.1       noro      979: @end table
                    980:
                    981: @noindent
1.2       noro      982: \BJP
1.1       noro      983: $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
                    984: $B$9$k$3$H$K$h$jBgItJ,$OKI$2$k$,(B, $B<j4V$,B?$/$+$+$k$3$H$H(B, $B>l9g$K(B
                    985: $B$h$C$F$O8zN($rMn$9$3$H$K$b$J$k$?$a(B, $B$"$($F0z?t%A%'%C%/$O%f!<%6(B
                    986: $BG$$;$K$7$F$"$k(B.
1.2       noro      987: \E
                    988: \BEG
                    989: For UNIX version, even in such a case, the process itself does not
                    990: terminate because such an error can be caught by @code{signal()} and
                    991: recovered.
                    992: To remove this weak point, complete type
                    993: checking of all arguments are indispensable at the entry of a built-in
                    994: function, which requires an enormous amount of re-making efforts.
                    995: \E
1.1       noro      996:
1.2       noro      997: \BJP
1.1       noro      998: @node $B7W;;7k2L$*$h$SFC<l$J?t(B,,, Risa/Asir
                    999: @section $B7W;;7k2L(B, $BFC<l$J?t(B
1.2       noro     1000: \E
                   1001: \BEG
                   1002: @node Referencing results and special numbers,,, Risa/Asir
                   1003: @section Referencing results and special numbers
                   1004: \E
1.1       noro     1005:
                   1006: @noindent
1.2       noro     1007: \JP @code{@@} $B$O%(%9%1!<%WJ8;z$H$7$F;HMQ$5$l$k(B. $B8=:_<!$N$h$&$J5,Dj$,$"$k(B.
                   1008: \BEG
                   1009: An @code{@@} used for an escape character; rules currently in force
                   1010: are as follows.
                   1011: \E
1.1       noro     1012: @table @code
1.2       noro     1013: \BJP
1.1       noro     1014: @item @@@var{n}
                   1015: @var{n} $BHVL\$N7W;;7k2L(B.
                   1016: @item @@@@
                   1017: $BD>A0$N7W;;7k2L(B.
                   1018: @item @@i
                   1019: $B5u?tC10L(B.
                   1020: @item @@pi
                   1021: $B1_<~N((B.
                   1022: @item @@e
                   1023: $B<+A3BP?t$NDl(B.
                   1024: @item @@
                   1025: 2 $B85BN(B GF(2) $B>e$N0lJQ?tB?9`<0$NJQ?t(B ($BITDj85(B).
                   1026: @item @@>, @@<, @@>=, @@<=, @@==, @@&&, @@||
                   1027: quantifier elimination $B$K$*$1$k(B, $B0l3,=R8lO@M}1i;;;R(B
1.2       noro     1028: \E
                   1029: \BEG
                   1030: @item @@@var{n}
                   1031: The evaluated result of @var{n}-th input command
                   1032: @item @@@@
                   1033: The evaluated result of the last command
                   1034: @item @@i
                   1035: The unit of imaginary number, square root of -1.
                   1036: @item @@pi
                   1037: The number pi,
                   1038: the ratio of a circumference of the circle and its diameter.
                   1039: @item @@e
                   1040: Napier's number, the base of natural logarithm.
                   1041: @item @@
                   1042: A generator of GF(2^m), a finite field of characteristic 2, over GF(2).
                   1043: It is a root of an irreducible univariate polynomial over GF(2)
                   1044: which is set as the defining polynomial of GF(2^m).
                   1045: @item @@>, @@<, @@>=, @@<=, @@==, @@&&, @@||
                   1046: Fist order logical operators. They are used in quantifier elimination.
                   1047: \E
1.1       noro     1048: @end table
                   1049:
                   1050: @example
                   1051: [0] fctr(x^10-1);
                   1052: [[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]]
                   1053: [1] @@@@[3];
                   1054: [x^4+x^3+x^2+x+1,1]
                   1055: [2] eval(sin(@@pi/2));
                   1056: 1.000000000000000000000000000000000000000000000000000000000
                   1057: [3] eval(log(@@e),20);
                   1058: 0.99999999999999999999999999998
                   1059: [4] @@0[4][0];
                   1060: x^4-x^3+x^2-x+1
                   1061: [5] (1+@@i)^5;
                   1062: (-4-4*@@i)
                   1063: [6] eval(exp(@@pi*@@i));
                   1064: -1.0000000000000000000000000000
                   1065: [7] (@@+1)^9;
                   1066: (@@^9+@@^8+@@+1)
                   1067: @end example
                   1068:
                   1069: @noindent
1.2       noro     1070: \BJP
1.1       noro     1071: $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,
                   1072: $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,
                   1073: $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
                   1074: $BG=@-$,$"$k(B. $B$3$N$h$&$J>l9g(B, @code{delete_history()}
                   1075: (@pxref{delete_history,,@code{delete_history}}) $B$,M-8z$G$"$k(B.
1.2       noro     1076: \E
                   1077: \BEG
                   1078: As you can see in the above example,
                   1079: results of toplevel computation can be referred to
                   1080: by @code{@@} convention.
                   1081: This is convenient for users, while it sometimes imposes a heavy
                   1082: burden to the garbage collector.
                   1083: It may happen that GC time will rapidly increase after computing
                   1084: a very large expression at the toplevel.
                   1085: In such cases @code{delete_history()}
                   1086: (@pxref{delete_history,,@code{delete_history}}) takes effect.
                   1087: \E
1.1       noro     1088:
                   1089:

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