Annotation of OpenXM/src/asir-doc/exp/exp-ja.texi, Revision 1.26
1.26 ! takayama 1: %% $OpenXM: OpenXM/src/asir-doc/exp/exp-ja.texi,v 1.25 2008/01/26 00:59:47 takayama Exp $
1.1 takayama 2: \input texinfo
3: @iftex
4: @catcode`@#=6
5: @def@fref#1{@xrefX[#1,,@code{#1},,,]}
6: @def@b#1{{@bf@gt #1}}
7: @catcode`@#=@other
8: @end iftex
9: @overfullrule=0pt
10: @c -*-texinfo-*-
11: @comment %**start of header
12: @comment --- $B$*$^$8$J$$=*$j(B ---
13:
14: @comment --- GNU info $B%U%!%$%k$NL>A0(B ---
15: @setfilename xyzman
16:
17: @comment --- $B%?%$%H%k(B ---
18: @settitle $B<B83E*;EMM$N4X?t(B
19:
20: @comment %**end of header
21: @comment %@setchapternewpage odd
22:
23: @comment --- $B$*$^$8$J$$(B ---
24: @ifinfo
25: @macro fref{name}
26: @ref{\name\,,@code{\name\}}
27: @end macro
28: @end ifinfo
29:
30: @iftex
31: @comment @finalout
32: @end iftex
33:
34: @titlepage
35: @comment --- $B$*$^$8$J$$=*$j(B ---
36:
37: @comment --- $B%?%$%H%k(B, $B%P!<%8%g%s(B, $BCx<TL>(B, $BCx:n8"I=<((B ---
38: @title $B<B83E*;EMM$N4X?t(B
39: @subtitle Risa/Asir $B<B83E*;EMM4X?t@bL@=q(B
40: @subtitle 1.0 $BHG(B
1.25 takayama 41: @subtitle 2008 $BG/(B 1 $B7n(B
1.1 takayama 42:
1.16 ohara 43: @author by Risa/Asir committers
1.1 takayama 44: @page
45: @vskip 0pt plus 1filll
46: Copyright @copyright{} Risa/Asir committers
47: 2004. All rights reserved.
48: @end titlepage
49:
50: @comment --- $B$*$^$8$J$$(B ---
51: @synindex vr fn
52: @comment --- $B$*$^$8$J$$=*$j(B ---
53:
54: @comment --- @node $B$O(B GNU info, HTML $BMQ(B ---
55: @comment --- @node $B$N0z?t$O(B node-name, next, previous, up ---
56: @node Top,, (dir), (dir)
57:
58: @comment --- @menu $B$O(B GNU info, HTML $BMQ(B ---
59: @comment --- chapter $BL>$r@53N$KJB$Y$k(B ---
60: @comment --- $B$3$NJ8=q$G$O(B chapter XYZ, Chapter Index $B$,$"$k(B.
61: @comment --- Chapter XYZ $B$K$O(B section XYZ$B$K$D$$$F(B, section XYZ$B$K4X$9$k4X?t$,$"$k(B.
62: @menu
63: * Experimental Functions::
64: * Index::
65: @end menu
66:
67: @comment --- chapter $B$N3+;O(B ---
68: @comment --- $B?F(B chapter $BL>$r@53N$K(B. $B?F$,$J$$>l9g$O(B Top ---
69: @node $B<B83E*;EMM$N4X?t(B,,, Top
70: @chapter $B<B83E*;EMM$N4X?t(B
71:
72: @comment --- section $BL>$r@53N$KJB$Y$k(B. ---
73: @menu
74: * $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B::
75: * $B<B83E*;EMM$N4X?t(B::
76: @end menu
77:
78: @comment --- section ``XYZ$B$K$D$$$F(B'' $B$N3+;O(B --- section XYZ$B$K$D$$$F$N?F$O(B chapter XYZ
79: @node $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B,,, XYZ
80: @section $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B
81:
82: @comment --- $B=qBN;XDj$K$D$$$F(B ---
83: @comment --- @code{} $B$O%?%$%W%i%$%?BNI=<((B ---
84: @comment --- @var{} $B$O<P;zBNI=<((B ---
85: @comment --- @b{} $B$O%\!<%k%II=<((B ---
86: @comment --- @samp{} $B$O%U%!%$%kL>$J$I$NI=<((B ---
87:
88: $B$3$N@bL@=q$G$O(B
89: @b{Asir} $B$KF3F~$5$l$?<B83E*;EMM$N4X?t$K$D$$$F@bL@$9$k(B.
90: $B@5<0$J4X?t$H$7$FF3F~$5$l$?$b$N$N5-=R$O(B Risa/Asir $B%^%K%e%"%k(B
91: $B$K0\F0$5$l$k(B.
92: ChangeLog $B$N9`L\$O(B www.openxm.org $B$N(B cvsweb $B$G(B
93: $B%=!<%9%3!<%I$rFI$`;~$N=u$1$K$J$k>pJs$,=q$+$l$F$$$k(B.
94:
95: @comment --- section ``$B<B83E*4X?t(B'' $B$N3+;O(B ---
96: @node $B<B83E*;EMM$N4X?t(B,,, $B<B83E*;EMM$N4X?t(B
97: @section $B<B83E*;EMM$N4X?t(B
98:
99: @comment --- section ``$B<B83E*4X?t(B'' $B$N(B subsection xyz_abc
100: @comment --- subsection xyz_pqr xyz_stu $B$,$"$k(B.
101: @menu
1.2 takayama 102: * quotetotex::
103: * quotetotex_env::
104: * objtoquote::
1.3 takayama 105: * copyright::
1.2 takayama 106: * string_to_tb::
107: * tb_to_string::
108: * write_to_tb::
1.3 takayama 109: * dp_gr_main::
1.4 takayama 110: * asir-port.sh::
111: * asir-install.sh::
112: * get_struct_name::
113: * get_element_names::
114: * get_element_at::
115: * put_element_at::
1.6 takayama 116: * dp_initial_term::
117: * dp_order::
118: * dp_weyl_gr_main::
1.8 takayama 119: * list::
120: * mapat::
1.9 takayama 121: * set_print_function::
1.12 takayama 122: * small_jacobi::
1.13 takayama 123: * flatten_quote::
1.15 takayama 124: * sprintf::
125: * quote_to_funargs::
126: * funargs_to_quote::
1.19 takayama 127: * get_function_name::
1.15 takayama 128: * remove_paren::
1.17 takayama 129: * set_secure_mode::
130: * set_secure_flag::
1.22 takayama 131: * initialize_static_variable::
1.23 takayama 132: * eval_quote::
133: * nqt_match::
134: * nqt_match_rewrite::
135: * qt_normalize::
136: * qt_set_coef::
137: * qt_set_ord::
138: * qt_set_weight::
139: * nqt_comp::
140: * qt_is_var::
141: * qt_is_ceof::
142: * qt_rewrite::
1.24 takayama 143: * asirgui.hnd::
1.25 takayama 144: * noro_matrix.rr:
1.26 ! takayama 145: * f_res::
1.23 takayama 146:
1.1 takayama 147: @end menu
148:
1.3 takayama 149: @comment --- $B"~"~"~"~(B $B4X?t(B quotetotex, quotetotex_env $B$N@bL@(B $B"~"~"~"~(B
1.1 takayama 150: @comment --- $B8D!9$N4X?t$N@bL@$N3+;O(B ---
151: @comment --- section $BL>$r@53N$K(B ---
1.2 takayama 152: @node quotetotex quotetotex_env,,, $B<B83E*;EMM$N4X?t(B
153: @subsection @code{quotetotex}, @code{quotetotex_env}
1.1 takayama 154: @comment --- $B:w0zMQ%-!<%o!<%I(B
1.2 takayama 155: @findex quotetotex
156: @findex quotetotex_env
1.1 takayama 157:
158: @comment --- $B4X?t$N4JC1$J@bL@(B ---
159: @table @t
1.2 takayama 160: @item quotetotex(@var{q})
161: :: @var{q} $B$r(B latex $B7A<0$GI=8=$7$?J8;zNs$KJQ49$9$k(B.
162: @item quotetotex_env(@var{key},@var{value})
163: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$rJQ99$9$k(B.
164: @item quotetotex_env()
165: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$N8=:_CM$rLa$9(B.
166: @item quotetotex_env(0)
167: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$r%G%U%)!<%k%HCM$KLa$9(B.
1.1 takayama 168: @end table
169:
170: @comment --- $B0z?t$N4JC1$J@bL@(B ---
171: @table @var
172: @item return
1.2 takayama 173: $BJ8;zNs(B(quotetotex) $B$^$?$O(B $B%j%9%H$^$?$O%*%V%8%'%/%H(B(quotetotex_env)
174: @item q
175: quote
176: @item key
177: $BJ8;zNs(B
178: @item value
179: $B%*%V%8%'%/%H(B
1.1 takayama 180: @end table
181:
182: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
183: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
184: @comment --- @bullet $B$O9uE@IU$-(B ---
185: @itemize @bullet
186: @item
1.2 takayama 187: quotetotex $B$O(B @var{q} $B$r(B latex $B7A<0$GI=8=$7$?J8;zNs$KJQ49$9$k(B.
188: @item
189: $B0J2<(B quotetotex_env $B$N%Q%i%a!<%?$N0UL#$r@bL@$9$k(B.
190: @item
191: conv_rule: 3 $B%S%C%H$rMQ$$$FJQ49%k!<%k$r;XDj$9$k(B.
192: 0$B%S%C%HL\$O(B symbol_table $B$K$h$kJQ49$r9T$&$+(B,
193: 1$B%S%C%HL\$OE:;zJQ49$r9T$&$+(B,
1.3 takayama 194: 2$B%S%C%HL\$O(B d $B$+$i;O$^$kJQ?tL>$rHyJ,:nMQAG$H$_$J$7$F=hM}$9$k$+(B,
1.2 takayama 195: $B$r0UL#$9$k(B.
196: $B$?$H$($P(B conv_rule $B$H$7$F(B 3 $B$r;XDj$9$k$H(B,
197: 0$B%S%C%HL\(B, 1 $B%S%C%HL\$,(B 1 $B$H$J$k$N$G(B
198: symbol_table $B$K$h$kJQ49$r9T$$(B, $BE:;zJQ49$r$*$3$J$&(B.
199: $BE:;zJQ49$O?t;z$H1Q;z$N6-L\$*$h$S(B _ $B5-9f$r6h@Z$j$H$9$k(B.
200: symbol_table $B$K$h$kJQ49$,:G=i$KE,MQ$5$l$k(B.
201: alpha, beta, $BEy$O<+F0E*$r%.%j%7%cJ8;z$KJQ49$9$k%F!<%V%k$O(B
202: $BFbB"$:$_(B.
203: @item
1.5 takayama 204: dp_vars_prefix: $BJ,;6I=8=B?9`<0$O(B
205: @tex
206: $x_0, x_1, \cdots$
207: @end tex
208: $B$NB?9`<0$H$7$F(B latex $B7A<0$KJQ49$5$l$k$,$3$N(B
209: x $B$NItJ,$rJQ99$9$k(B.
210: @item
211: dp_vars_origin: $B%$%s%G%C%/%9$N;O$^$j$NCM$r;XDj$9$k(B.
212: $B%G%U%)!<%k%H$O(B 0.
1.1 takayama 213: @item
1.2 takayama 214: dp_vars_hweyl: $BJ,;6I=8=B?9`<0$r%o%$%kBe?t$N85$H$_$J$7$F(B
1.3 takayama 215: latex $B7A<0$KJQ49$9$k(B.
1.2 takayama 216: $B6v?t8DJQ?t$,$"$k$H$-$O(B $B:G=i$NH>J,$r(B
217: @tex
218: $x_0, x_1, \cdots$
219: @end tex
220: $B$K(B
221: $B8eH>$NH>J,$r(B
222: @tex
223: $\partial_0, \partial_1, \cdots$
224: @end tex
225: $B$KJQ49$9$k(B.
226: $B4q?t8D$N>l9g$O:G8e$NJQ?t$,F1;~2=JQ?t$H$7$F(B h $B$GI=<($5$l$k(B.
1.5 takayama 227: @item
228: dp_dvars_prefix: dp_vars_hweyl $B$,(B 1 $B$N;~$K8eH>ItJ,$N(B prefix $B$r;XDj$9$k(B.
229: $B%G%U%)!<%k%H$O(B @tex $\partial$ @end tex
230: @item
231: dp_dvars_origin: dp_vars_hweyl $B$,(B 1 $B$N;~$N%$%s%G%C%/%9$N;O$^$j$NCM(B.
1.2 takayama 232: @item
233: conv_func: $B%f!<%6Dj5A$NJQ494X?t$r$h$V(B.
234: @item
235:
1.1 takayama 236: @end itemize
237:
238: @comment --- @example$B!A(B@end example $B$O<B9TNc$NI=<((B ---
239: @example
1.2 takayama 240: [3] quotetotex(quote(1/(x+1)));
241: \frac@{ 1@} @{ ( @{x@}+ 1)@}
242: [4] quotetotex(objtoquote(diff(x^x,x)));
243: @{x@}^@{ @{x@}- 1@} @{x@}+ \log( @{x@}) @{x@}^@{ @{x@}@}
244: [5] quotetotex_env("conv_rule",3);
245: [6] quotetotex(objtoquote( (alpha2beta+x_i_j)^2));
246: @{\alpha@}_@{2,\beta@}^@{ 2@} + 2 @{x@}_@{i,j@} @{\alpha@}_@{2,\beta@}+ @{x@}_@{i,j@}^@{ 2@}
1.1 takayama 247: @end example
248:
249: @comment --- $B;2>H(B($B%j%s%/(B)$B$r=q$/(B ---
250: @table @t
251: @item $B;2>H(B
1.2 takayama 252: @ref{objtoquote}
1.3 takayama 253: print_tex_form(contrib)
1.1 takayama 254: @end table
255:
256: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
257: @noindent
258: ChangeLog
259: @itemize @bullet
1.5 takayama 260: @item
261: $B$3$N4X?t$O(B 2004$BG/(B2$B7nKv$+$i(B3$B7n$K$+$1$F(B asir $B$r(B
262: knoppix $BHG(B texmacs $B$KBP1~$5$;$k$?$a$K=q$+$l$?(B.
263: Asir-contrib $B$N(B print_tex_form $B$,$=$N867?$G$"$j(B, $B$=$l$r8zN(2=$7$^$?(B
264: $B=PNO7A<0$r2~A1$7$?(B.
265: OpenXM/src/kxx/ox_texmacs.c, OpenXM/src/texmacs $B$b;2>H(B.
266: @item
267: OpenXM/src/asir-contrib/packages/src/noro_print.rr 1.1--1.8,
268: noro_print_default.rr 1.1--1.3 $B$b;2>H(B.
269: @item
270: $BJQ99$r<u$1$?%U%!%$%k$O(B OpenXM_contrib2/asir2000 $B$N2<$N<!$N%U%!%$%k(B.
1.3 takayama 271: builtin/strobj.c 1.14--1.43,
272: include/ca.h 1.46, io/cexpr.c 1.18, io/pexpr.c 1.32, io.sexpr.c 1.29,
273: parse/arith.c 1.12, parse/parse.h 1.28--1.29,
274: parse/quote.c 1.7--1.8, 1.12.
275: @item
276: knoppix/math $B$O(B $BJ!2,Bg3X$N_@ED$5$s$,Cf?4$H$J$j3+H/$5$l$F$$$k(B.
1.5 takayama 277: @item
278: dp_dvars_prefix, *_origin $B$O(B builtin/strobj.c 1.46 $B$GF3F~$5$l$?(B.
279: @item
280: Todo: quotetoterminalform ($BJ,;6I=8=B?9`<0$N8+0W$$=PNO(B).
1.3 takayama 281: @end itemize
282:
283:
284:
285: @comment --- $B"~"~"~"~(B $B4X?t(B objtoquote $B$N@bL@(B $B"~"~"~"~(B
286: @node objtoquote,,, $B<B83E*;EMM$N4X?t(B
287: @subsection @code{objtoquote}
288: @findex objtoquote
289:
290: @comment --- $B4X?t$N4JC1$J@bL@(B ---
291: @table @t
292: @item objtoquote(@var{ob})
293: :: $B%*%V%8%'%/%H$H(B quote $B7?$N%G!<%?$KJQ49$9$k(B.
294: @end table
295:
296: @table @var
297: @item return
298: quote
299: @item ob
300: $B%*%V%8%'%/%H(B
301: @end table
302:
303: @itemize @bullet
304: @item
305: @code{objtoquote(ob)} $B$O(B, @var{ob} $B$r(B quote $B7?$N%G!<%?$KJQ49$9$k(B.
306: @end itemize
307:
308: @example
309: [1150] quotetolist(quote(1+2));
310: [b_op,+,[internal,1],[internal,2]]
311: [1151] quotetolist(objtoquote(1+x));
312: [b_op,+,[internal,x],[internal,1]]3
313: @end example
314:
315: @table @t
316: @item $B;2>H(B
317: @ref{quotetotex} @ref{quotetolist}
318: @end table
319:
320: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
321: @noindent
322: ChangeLog
323: @itemize @bullet
324: @item $B$3$N4X?t$O(B quotetotex $B$NA0=hM}$r$9$k$?$a$K=q$+$l$?(B.
325: @item asir-contrib $B$N4X?t(B quote_to_quote $B$b;2>H(B.
326: @item OpenXM_contrib2/asir2000/builtin/print.c 1.16.
327: @end itemize
328:
329:
330: @comment --- $B"~"~"~"~(B $B4X?t(B copyright $B$N@bL@(B $B"~"~"~"~(B
331: @node copyright,,, $B<B83E*;EMM$N4X?t(B
332: @subsection @code{copyright}
333: @findex copyright
334:
335: @comment --- $B4X?t$N4JC1$J@bL@(B ---
336: @table @t
337: @item copyright()
338: :: Risa/Asir $B$N(B copyright $BI=<($rJ8;zNs$H$7$FLa$9(B.
339: @end table
340:
341: @table @var
342: @item return
343: $BJ8;zNs(B
344: @end table
345:
346: @itemize @bullet
347: @item
348: Risa/Asir $B$N(B copyright $BI=<($rJ8;zNs$H$7$FLa$9(B.
349: @end itemize
350:
351: @example
352: [1150] copyright();
353: This is Risa/Asir, Version 20040312 (Kobe Distribution).
354: Copyright (C) 1994-2000, all rights reserved, FUJITSU LABORATORIES LIMITED.
355: Copyright 2000-2003, Risa/Asir committers, http://www.openxm.org/.
356: GC 6.2(alpha6) copyright 1988-2003, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.
357: PARI 2.0.17, copyright 1989-1999, C. Batut, K. Belabas, D. Bernardi,
358: H. Cohen and M. Olivier.
359: @end example
360:
361: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
362: @noindent
363: ChangeLog
364: @itemize @bullet
365: @item $B$3$N4X?t$O(B texmacs $BMQ$K=q$+$l$?(B (2004-03).
366: @item OpenXM_contrib2/asir2000 $B$N2<$N0J2<$N%U%!%$%k$r$_$h(B. builtin/miscf.c 1.21,
367: parse/glob.c 1.47.
368: @end itemize
369:
370:
371:
372: @comment --- $B"~"~"~"~(B $B4X?t(B string_to_tb, ... $B$N@bL@(B $B"~"~"~"~(B
373: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
374: @node string_to_tb tb_to_string write_to_tb,,, $B<B83E*;EMM$N4X?t(B
375: @subsection @code{string_to_tb}, @code{tb_to_string}, @code{write_to_tb}
376: @findex string_to_tb
377: @findex tb_to_string
378: @findex write_to_tb
379:
380: @comment --- $B4X?t$N4JC1$J@bL@(B ---
381: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
382: @table @t
383: @item string_to_tb(@var{s})
384: @itemx tb_to_string(@var{tb})
385: @itemx write_to_tb(@var{s},@var{tb})
386: :: $BJ8;zNs2DJQD9G[Ns7?(B(text buffer)$B$N%G!<%?$N=hM}(B
387: @end table
388:
389: @table @var
390: @item return
391: $BJ8;zNs2DJQD9G[Ns7?(B(string_to_tb), $BJ8;zNs7?(B(tb_to_string)
392: @item s
393: $BJ8;zNs(B
394: @item tb
395: $BJ8;zNs2DJQD9G[Ns7?(B
396: @end table
397:
398: @itemize @bullet
399: @item
400: @code{string_to_tb(@var{s})} $B$O(B, $BJ8;zNs(B @var{s} $B$r$O$8$a$NMWAG$H$9$k(B
401: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H$r@8@.$9$k(B.
402: @item
403: @code{tb_to_string_(@var{tb})} $B$O(B,
404: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H(B @var{tb} $B$+$iDL>o$NJ8;zNs%*%V%8%'%/%H$r@8@.$9$k(B.
405: @item
406: @code{write_to_tb(@var{s},@var{tb})} $B$O(B, $BJ8;zNs(B @var{s} $B$r(B
407: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H(B @var{tb} $B$X=q$-=P$9(B.
408: @item @var{SS} $B$rJ8;zNsJQ?t$H$9$k$H$-(B,
409: @var{SS} += "$BJ8;zNs(B" $B$G(B @var{SS} $B$XJ8;zNs$r=q$-B-$7$F$$$/$3$H$,$G$-$k$,(B,
410: $BL5BL$J%a%b%j$rBgNL$K>CHq$9$k(B.
411: $BBe$j$K4X?t(B @code{write_to_tb} $B$rMQ$$$k$Y$-$G$"$k(B.
412: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H$OJ8;zNs$N2DJQD9$NG[Ns$G$"$j%a%b%j4IM}$KM%$7$$(B
413: $B%G!<%?9=B$$G$"$k(B.
414: @end itemize
415:
416: @example
417: [219] T=string_to_tb("");
418:
419: [220] write_to_tb("Hello",T);
420: 0
421: [221] write_to_tb(" world!",T);
422: 0
423: [222] tb_to_string(T);
424: Hello world!
425: @end example
426:
427:
428: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
429: @noindent
430: ChangeLog
431: @itemize @bullet
1.5 takayama 432: @item
433: $B$3$N4X?t$O(B 2004-3 $B$K(B print_tex_form $B$r8zN(2=$9$k$?$a$K=q$+$l$?(B.
434: @item
435: OpenXM_contrib2/asir2000 $B$N2<$N0J2<$N%U%!%$%k$r8+$h(B.
1.3 takayama 436: io/ox_asir.c 1.52, builtin/strobj.c 1.12--1.13, 1.16,
437: engine/str.c 1.5, parse/quote.c 1.9.
1.5 takayama 438: @item
439: rtostr $B$,(B text buffer $B7?$N%G!<%?$K4X$7$F$*$=$+$C$?(B. $BB.EY$N2~A1$O(B
440: asir2000/io/pexpr_body.c 1.2, asir2000/parse/lex.c 1.32.
1.3 takayama 441: @end itemize
442:
443:
444:
445: @comment --- $B"~"~"~"~(B $B4X?t(B dp_gr_main $B$N@bL@(B $B"~"~"~"~(B
446: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
447: @node dp_gr_main,,, $B<B83E*;EMM$N4X?t(B
448: @subsection @code{dp_gr_main}
449: @findex dp_gr_main
450:
451: @comment --- $B4X?t$N4JC1$J@bL@(B ---
452: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
453: @table @t
454: @item dp_gr_main(@var{f} | v=@var{vv}, order=@var{oo}, homo=@var{n}, matrix=@var{m}, block=@var{b}, sugarweight=@var{sw})
455: :: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9(B.
456: @end table
457:
458: @table @var
459: @item return
460: $B%j%9%H(B ($B%0%l%V%J4pDl(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
461: @item f
462: $B%j%9%H(B ($BF~NOB?9`<07O(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
463: @item vv
464: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
465: @item oo
466: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
467: @item n
468: 0 $B$+(B1 (homogenization $B$r$9$k$+(B)
469: @item m
470: $B=g=x$r(B matrix $B$GI=8=$9$k>l9g(B (cf. dp_ord).
471: @item b
472: ???
473: @item sw
1.5 takayama 474: Sugar strategy $B$rE,MQ$9$k$H$-$N(B weight vector. $BA4$F$NMWAG$OHsIi(B.
1.3 takayama 475: @end table
476:
477: @itemize @bullet
478: @item
479: @code{dp_gr_main(@var{f})} $B$O(B, @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
480: $B%0%l%V%J4pDl$O=g=x$rJQ$($k$H$=$N7A$,JQ$o$k(B. asir $B$G$O$$$^$^$G=g=x$N;XDjJ}K!$,(B
481: $B7OE}$@$C$F$$$J$+$C$?(B.
482: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
483: @comment ~taka/this03/misc-2003/A2/dp
484: @item $B=g=x(B order $B$O<!$NJ8K!$GDj5A$9$k(B. @{, @} $B$O(B 0 $B2s0J>e$N7+$jJV$7$r0UL#$9$k(B.
1.11 ohara 485: @example
1.3 takayama 486: order : '[' orderElement { ',' orderElement } ']'
1.5 takayama 487: orderElement : weightVec | builtinOrder
1.3 takayama 488: weightVec : '[' weightElement { ',' weightElement } ']'
489: builtiniOrder : '[' orderName ',' setOfVariables ']'
490: weightElement : NUMBER | setOfVariables ',' NUMBER
491: setOfVariables: V | range(V,V)
1.11 ohara 492: orderName : @@grlex | @@glex | @@lex
493: @end example
1.3 takayama 494: $B$3$3$G(B @code{V} $B$O(B $BJQ?tL>(B, @code{NUMBER} $B$O@0?t$r$"$o$i$9(B.
495: $BNc(B1: @code{v=[x,y,z,u,v], order=[[x,10,y,5,z,1],[@@grlex,range(x,v)]]}
496: $B$O(B @code{x},@code{y},@code{z} $B$,$=$l$>$l(B weight 10, 5, 1 $B$r$b$D(B
497: $B=g=x$GHf3S$7$?$"$H(B, @code{[x,y,z,u,v]} $B$K$D$$$F$N(B
498: graded reverse lexicographic order $B$r(B tie-breaker $B$H$7$FMQ$$$k$3$H$r0UL#$9$k(B.
1.5 takayama 499: $B;29M=q(B: B.Sturmfels: Gr\"obner Bases and Convex Polytopes (1995).
500: M.Saito, B.Sturmfels, N.Takayama:
501: Gr\"obner Deformations of Hypergeometric Differential Equations (2000).
502: @item
503: $B=g=xMWAG(B (orderElement) $B$N;XDjJ}K!$O(B
504: (1) $BJQ?tL>$^$?$O(B range$B$G;XDj$5$l$?JQ?t$N=89g$H=E$_$NCM$N7+$jJV$7(B
505: (2) $B=E$_$NCM$rJQ?t%j%9%H$N=gHV$KJB$Y$kJ}K!(B
506: (3) $BJQ?tL>$^$?$O(B range$B$G;XDj$5$l$?JQ?t$N=89g$H=g=xL>$NAH(B
507: $B$N;0DL$j$N4pACE*J}K!$,$"$k(B.
508: $B;w$?;XDjJ}K!$,(B Macaulay, Singular, CoCoA, Kan/sm1 $BEy$N4DO@%7%9%F%`$G(B
509: $B;HMQ$5$l$F$$$?(B. Risa/Asir $B$N;XDjJ}K!$O$3$l$i$N%7%9%F%`$N;XDjJ}K!$r;29M$K(B
510: $B$5$i$K2~NI$r2C$($?$b$N$G=@Fp@-$,9b$$(B.
1.3 takayama 511: @item
512: order $B$N(B tie-breaker $B$O(B grlex $B$,%G%U%)!<%k%H(B.
513: @item
514: $BJ,;6I=8=B?9`<0$r0z?t$H$7$?$H$-$O7k2L$bJ,;6I=8=B?9`<0$H$7$FLa$k(B.
515: order $B;XDj$K$b$A$$$k%G%U%)!<%k%H$NJQ?tL>$O$3$N$H$-(B x0, x1, x2, ... $B$H$J$k(B.
1.5 takayama 516: @item
517: $B%*%W%7%g%s$NCM$O(B option_list $B%-!<%o!<%I$rMQ$$$F%j%9%H$GM?$($F$b$h$$(B.
518: $B2<$NNc$r;2>H(B.
1.3 takayama 519: @end itemize
520:
521: @example
522: [218] load("cyclic");
523: [219] V=vars(cyclic(4));
524: [c0,c1,c2,c3]
525: [220]dp_gr_main(cyclic(4) | v=V, order=[[c0,10,c1,1],[c2,5],[@@grlex,range(c0,c3)]]);
526: [ 10 1 0 0 ]
527: [ 0 0 5 0 ]
528: [ R R R R ]
529: [(-c3^6+c3^2)*c2^2+c3^4-1,c3^2*c2^3+c3^3*c2^2-c2-c3,
530: (c3^4-1)*c1+c3^5-c3,(c2-c3)*c1+c3^4*c2^2+c3*c2-2*c3^2,-c1^2-2*c3*c1-c3^2,
531: c0+c1+c2+c3]
532:
533: [1151] F=map(dp_ptod,katsura(4), vars(katsura(4)));
534: [(1)*<<1,0,0,0,0>>+(2)*<<0,1,0,0,0>>+ ... ]
535: [1152] dp_gr_main(F | order=[[range(x0,x3),1]]);
536: [ 1 1 1 1 0 ]
537: [ R R R R R ]
538: [(47774098944)*<<0,0,0,0,13>>+ ... ]
1.5 takayama 539:
540: [1153] Opt=[["v",[x,y]], ["order",[[x,5,y,1]]]];
541: [[v,[x,y]],[order,[[x,5,y,1]]]]
542: [1154] dp_gr_main([x^2+y^2-1,x*y-1] | option_list=Opt);
543: [ 5 1 ]
544: [ R R ]
545: [-y^4+y^2-1,x+y^3-y]
1.3 takayama 546: @end example
547:
548: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
549: @noindent
550: ChangeLog
551: @itemize @bullet
552: @item $B$3$N4X?t$O(B 2003-12 $B$+$i(B 2004-2 $B$N;O$a$KBg$-$J=$@5$,9T$o$l$?(B.
553: @item
554: @code{setOfVariables}$B$NI=8=$N$?$a$K(B range $B%*%V%8%'%/%H$,F3F~$5$l$?(B.
555: @item
556: $B%0%l%V%J4pDl$O=g=x$rJQ$($k$H$=$N7A$,JQ$o$k(B. asir $B$G$O$$$^$^$G=g=x$N;XDjJ}K!$,(B
557: $B7OE}$@$C$F$$$J$+$C$?(B.
558: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
559: @item
560: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
561: builtin/gr.c 1.56--1.57,
562: builtin/dp-supp.c 1.27--1.31 (create_composite_order_spec),
563: builtin/dp.c 1.46--1.48 (parse_gr_option),
564: engine/Fgfs.c 1.20,
565: engine/dist.c 1.27--1.28
566: engine/nd.c 1.89,
567: include/ca.h 1.42--1.43,
568: io/pexpr.c 1.28,
569: io/sexpr.c 1.26,
570: parse/arith.c 1.11,
571: parse/glob.c 1.44-1.45,
572: parse/lex.c 1.29,
573: parse/parse.h 1.23--1.26
1.5 takayama 574: @item
575: Todo: return $B%-!<%o!<%I$GLa$jCM$N%G!<%?$r(B quote $B$N%j%9%H$K$G$-$k$h$&$K(B.
576: attribute, ring $B9=B$BN(B.
1.1 takayama 577: @end itemize
578:
579: @comment --- $B"~"~"~"~(B $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B
580: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
1.3 takayama 581: @node asir-install.sh,,, $B<B83E*;EMM$N4X?t(B
582: @subsection @code{asir-port.sh}, @code{asir-install.sh}
583: @findex asir-port.sh
584: @findex asir-install.sh
1.1 takayama 585:
586: @comment --- $B4X?t$N4JC1$J@bL@(B ---
587: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
588: @table @t
1.3 takayama 589: @item asir-install.sh
590: @itemx asir-port.sh
591: :: $B$3$l$O(B asir $B$NFbIt%3%^%s%I$G$O$J$$(B. asir $B$r%M%C%H%o!<%/$+$i%@%&%s%m!<%I$+$D<B9T$9$k%7%'%k%9%/%j%W%H(B
592: @end table
593:
594:
595: @itemize @bullet
596: @item
597: asir-port.sh $B$O(B knoppix $B@lMQ$G$"$k(B.
1.10 ohara 598: $B$3$N%3%^%s%I$O(B asir $B$N%P%$%J%j$*$h$S(B FLL $B$GG[I[$G$-$J$$ItJ,$r(B
1.3 takayama 599: ftp.math.kobe-u.ac.jp $B$h$j%@%&%s%m!<%I$7$F(B
600: /home/knoppix/.asir-tmp $B$X%;!<%V$7$F(B, $B<B9T$9$k(B.
601: .asirrc $B$*$h$S(B .TeXmacs/plugins/ox/progs/init-ox.scm $B$b%@%&%s%m!<%I$9$k(B.
602: @item
603: asir-install.sh $B$O(B Debian GNU Linux / openxm-binary*.deb $B@lMQ$G$"$k(B.
604: asir-install.sh $B$O(B asir $B$r%@%&%s%m!<%I$7$F(B /usr/local/OpenXM/bin $B$*$h$S(B
605: /usr/local/OpenXM/lib/asir $B$X%$%s%9%H!<%k$9$k(B.
606: @end itemize
607:
608:
609: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
610: @noindent
611: ChangeLog
612: @itemize @bullet
613: @item
614: $B$3$l$i$N%7%'%k%9%/%j%W%H$O(B knoppix/math $B$N$?$a$K(B 2004/2, 3 $B7n$K=q$+$l$?(B.
615: @item
616: knoppix/math $B$OJ!2,Bg3X$N_@ED$5$s$,Cf?4$H$J$j3+H/$5$l$F$$$k(B.
617: @item
618: OpenXM/misc/packages/Linux/Debian $B$N2<$NA4$F$N%U%!%$%k(B (2004-2-22 $B$+$i(B
619: 2004-3 $B$NKv$^$G(B). ( ~taka/this03/misc-2003/A3/knoppix-03-05 ($B%W%i%$%Y!<%H%U%!%$%k(B) $B$b8+$h(B.)
620: OpenXM/src/asir-port $B$N2<$N<!$N3F%U%!%$%k(B.
621: Makefile 1.1--1.8, asir-install.sh 1.1--1.2, asir-port.sh 1.1--1.6.
622: @end itemize
623:
1.4 takayama 624:
625: @node get_struct_name,,, $B<B83E*;EMM$N4X?t(B
626: @subsection @code{get_struct_name}, @code{get_element_names}, @code{get_element_at}, @code{put_element_at}
627: @findex get_struct_name
628: @findex get_element_names
629: @findex get_element_at
630: @findex put_element_at
631:
632: @comment --- $B4X?t$N4JC1$J@bL@(B ---
633: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
634: @table @t
635: @item get_struct_name(@var{s})
636: @itemx get_element_names(@var{s})
637: @itemx get_element_at(@var{s},@var{key})
638: @itemx put_element_at(@var{s},@var{key},@var{obj})
639: :: $B9=B$BN(B @var{s} $B$KBP$9$kA`:n(B
640: @end table
641:
642: @table @var
643: @item return
644: $BJ8;zNs(B (get_struct_name),
645: $BJ8;zNs$N%j%9%H(B (get_element_names),
646: $B%*%V%8%'%/%H(B (get_element_at),
647: $B%*%V%8%'%/%H(B (put_element_at)
648: @item s
649: $B9=B$BN(B
650: @item key
651: $BJ8;zNs(B
652: @item obj
653: $B%*%V%8%'%/%H(B
654: @end table
655:
656: @itemize @bullet
657: @item
658: @code{get_struct_name(s)} $B$O(B, $B9=B$BN(B @var{s} $B$NL>A0$rLa$9(B.
659: @item
660: @code{get_element_names(s)} $B$O(B, $B9=B$BN$N%a%s%P!<$NL>A0$N%j%9%H$rLa$9(B.
661: @item
662: @code{get_element_at(s,key)} $B$O9=B$BN(B s $B$N%a%s%P!<(B key $B$NCM$rLa$9(B.
663: @item
664: @code{put_element_at(s,key,obj)} $B$O9=B$BN(B s $B$N%a%s%P!<(B key $B$NCM$r(B obj $B$K@_Dj$9$k(B.
665: @end itemize
666:
667: @example
668: [219] struct point { x, y, color};
669: [220] P = newstruct(point);
670: {0,0,0}
671: [221] P->x = 10$ P->y=5$ P->color="red"$
672: [222] get_element_names(P);
673: [x,y,color]
674: [223] put_element_at(P,"color","blue");
675: blue
676: [224] P->color;
677: bule
678: @end example
679:
680: @table @t
681: @item $B;2>H(B
682: @ref{newstruct}, @ref{struct}
683: @end table
684:
685: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
686: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
687: @noindent
688: ChangeLog
689: @itemize @bullet
690: @item $B9=B$BN$NDj5A$rCN$i$:$K9=B$BN$r07$&%f!<%64X?t$r=q$/$H$-$KJXMx(B.
691: asir-contrib $B$N(B noro_print.rr $B$r8+$h(B.
692: @item OpenXM_contrib2/asir2000/builtin/compobj.c 1.8.
693: @end itemize
694:
1.6 takayama 695: @comment --- $B"~"~"~"~(B $B4X?t(B dp_gr_main $B$N@bL@(B $B"~"~"~"~(B
696: @node dp_weyl_gr_main,,, $B<B83E*;EMM$N4X?t(B
697: @subsection @code{dp_weyl_gr_main}
698: @findex dp_weyl_gr_main
699:
700: @comment --- $B4X?t$N4JC1$J@bL@(B ---
701: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
702: @table @t
703: @item dp_weyl_gr_main(@var{f} | v=@var{vv}, order=@var{oo}, homo=@var{n}, matrix=@var{m}, block=@var{b}, sugarweight=@var{sw})
704: :: dp_weyl_gr_main $B$N?7$7$$%$%s%?%U%'!<%9(B. dp_gr_main $B$HF1$87A<0$G$"$k(B.
705: @end table
706:
707: @table @var
708: @item return
709: $B%j%9%H(B ($B%0%l%V%J4pDl(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
710: @item f
711: $B%j%9%H(B ($BF~NOB?9`<07O(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
712: @item vv
713: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
714: @item oo
715: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
716: @item n
717: 0 $B$+(B1 (homogenization $B$r$9$k$+(B). [$B%F%9%H$^$@(B]
718: @item m
719: $B=g=x$r(B matrix $B$GI=8=$9$k>l9g(B (cf. dp_ord). [$B%F%9%H$^$@(B]
720: @item b
721: ???
722: @item sw
723: Sugar strategy $B$rE,MQ$9$k$H$-$N(B weight vector. $BA4$F$NMWAG$OHsIi(B. [$B%F%9%H$^$@(B]
724: @end table
725:
726: @itemize @bullet
727: @item
728: @code{dp_weyl_gr_main(@var{f})} $B$O(B, @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
729: $B%0%l%V%J4pDl$O=g=x$rJQ$($k$H$=$N7A$,JQ$o$k(B. asir $B$G$O$$$^$^$G=g=x$N;XDjJ}K!$,(B
730: $B7OE}$@$C$F$$$J$+$C$?(B.
731: dp_weyl_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
732: $B;XDjJ}K!$K$D$$$F$O(B dp_gr_main $B$N%^%K%e%"%k$r;2>H(B.
733: @item
734: $BJ,;6I=8=B?9`<0$N3F%b%N%_%"%k$ND9$5$,6v?t$N$H$-$O%o%$%kBe?t(B
735: K[x_1, ..., x_n, d_1, ..., d_n]
736: $B$G7W;;$,$*$3$J$o$l$k(B. $B%o%$%kBe?t$G$O(B x_i $B$H(B d_i $B$OHs2D49$J3]$1;;5,B'(B
737: d_i x_i = x_i d_i +1 $B$r$_$?$7(B, x_i $B$H(B x_j $B$d(B d_i $B$H(B d_j $B$O2D49$G$"$k(B.
738: $B$^$?(B i $B$H(B j $B$,0[$J$k>l9g$O(B x_i $B$H(B d_j $B$b2D49$G$"$k(B.
739: @item
740: $BJ,;6I=8=B?9`<0$N3F%b%N%_%"%k$ND9$5$,4q?t$N$H$-$OF1<!2=%o%$%kBe?t(B
741: K[x_1, ..., x_n, d_1, ..., d_n, h]
742: $B$G7W;;$,$*$3$J$o$l$k(B. $BF1<!2=%o%$%kBe?t$G$O(B x_i $B$H(B d_i $B$OHs2D49$J3]$1;;5,B'(B
743: d_i x_i = x_i d_i + h^2
744: $B$r$_$?$7(B, h $B$OG$0U$N85$H2D49(B, $B$=$NB>$NJQ?t$b%o%$%kBe?t$HF1MM$J2D49@-$N5,B'$r$_$?$9(B.
745: $B>\$7$/$O(B dp_gr_main $B$G;2>H$7$?(B Saito, Sturmfels, Takayama $B$N652J=q$r$_$h(B.
746: @end itemize
747:
748: @example
749: [1220] F=sm1.gkz([ [[1,1,1,1],[0,1,3,4]], [0,0]]); /* Command in asir-contrib*/
750: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2,-dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],[x1,x2,x3,x4]]
751: [1221] V=[x1,x2,x3,x4,dx1,dx2,dx3,dx4]$
1.7 takayama 752: [1222] dp_weyl_gr_main(F[0] | v=V, order=[[dx1,1,dx2,1,dx3,1,dx4,1]]);
753: ...
1.6 takayama 754: [1238] FF=map(dp_ptod,F[0],V);
755: [(1)*<<1,0,0,0,1,0,0,0>>+(1)*<<0,1,0,0,0,1,0,0>>+(1)*<<0,0,1,0,0,0,1,0>>+(1)*<<0,0,0,1,0,0,0,1>>,(1)*<<0,1,0,0,0,1,0,0>>+(3)*<<0,0,1,0,0,0,1,0>>+(4)*<<0,0,0,1,0,0,0,1>>,0,0,0,0]
756:
757: [1244] FF=map(dp_ptod,F[0],V);
758: [(1)*<<1,0,0,0,1,0,0,0>>+(1)*<<0,1,0,0,0,1,0,0>>+(1)*<<0,0,1,0,0,0,1,0>>+(1)*<<0,0,0,1,0,0,0,1>>,(1)*<<0,1,0,0,0,1,0,0>>+(3)*<<0,0,1,0,0,0,1,0>>+(4)*<<0,0,0,1,0,0,0,1>>,(1)*<<0,0,0,0,0,1,1,0>>+(-1)*<<0,0,0,0,1,0,0,1>>,(1)*<<0,0,0,0,1,0,2,0>>+(-1)*<<0,0,0,0,0,2,0,1>>,(-1)*<<0,0,0,0,0,3,0,0>>+(1)*<<0,0,0,0,2,0,1,0>>,(1)*<<0,0,0,0,0,0,3,0>>+(-1)*<<0,0,0,0,0,1,0,2>>]
759:
760: dp_weyl_gr_main(FF | v=V, order=[[0,0,0,0,1,1,1,1]]);
761:
1.7 takayama 762: [1246] dp_weyl_gr_main(FF | v=V, order=[[dx1,1,dx2,1,dx3,1,dx4,1]]);
1.6 takayama 763: [ 0 0 0 0 1 1 1 1 ]
764: [ R R R R R R R R ]
1.7 takayama 765: ...
1.6 takayama 766:
767: @end example
768:
769: @table @t
770: @item $B;2>H(B
771: @ref{dp_gr_main}
772: @end table
773:
774: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
775: @noindent
776: ChangeLog
777: @itemize @bullet
778: @item dp_gr_main $B$N%$%s%?%U%'!<%9$,(B dp_weyl_gr_main $B$X$bF3F~$5$l$?(B.
779: @item
780: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
781: builtin/dp-supp.c 1.32--1.33
782: builtin/dp.c 1.49--1.50
783: @end itemize
784:
785: @comment --- $B"~"~"~"~(B $B4X?t(B dp_initial_term $B$N@bL@(B $B"~"~"~"~(B
786: @node dp_initial_term,,, $B<B83E*;EMM$N4X?t(B
787: @subsection @code{dp_initial_term}
788: @findex dp_initial_term
789:
790: @comment --- $B4X?t$N4JC1$J@bL@(B ---
791: @table @t
792: @item dp_initial_term(@var{f} | v=@var{vv}, order=@var{oo})
793: :: dp_initial_term $B$OM?$($i$l$?(B weight $B$KBP$9$k@hF,9`$NOB$rLa$9(B.
794: @end table
795:
796: @table @var
797: @item return
798: $BJ,;6I=8=B?9`<0$^$?$OJ,;6I=8=B?9`<0$N%j%9%H(B.
799: @item f
800: $BJ,;6I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B.
801: @item vv
802: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
803: @item oo
804: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
805: @end table
806:
807: @itemize @bullet
808: @item
809: dp_initial_term $B$OM?$($i$l$?(B weight w $B$KBP$9$k@hF,9`$NOB$rLa$9(B.
810: $B$3$l$OB?$/$N652J=q$G(B @tex ${\rm in}_w(f)$ @end tex
811: $B$H=q$+$l$F$$$k(B.
812: @item
813: $B=g=x$rI=$9%j%9%H$O(B dp_gr_main $B$GDj5A$7$?J8K!$K=>$&(B.
814: $B$3$N%j%9%H$N@hF,$,(B weight vector $B$GL5$$>l9g$O%(%i!<$H$J$k(B.
815: $B$?$H$($P(B order=[[@@lex,...]] $B$O%(%i!<$H$J$k(B.
816: @item
817: $B7k2L$OM?$($i$l$?=g=x$K4X$7$F%=!<%H$5$l$F$k$o$1$G$O$J$$(B.
818: @end itemize
819:
820: @example
821: [1220] F=<<2,0,0>>+<<1,1,0>>+<<0,0,1>>;
822: (1)*<<2,0,0>>+(1)*<<1,1,0>>+(1)*<<0,0,1>>
823: [1220] dp_initial_term(F | order=[[1,1,1]]);
824: [ 1 1 1 ]
825: [ R R R ]
826: (1)*<<2,0,0>>+(1)*<<1,1,0>>
827: [1221] dp_initial_term(F | v=[x,y,z], order=[[x,1]]);
828: [ 1 0 0 ]
829: [ R R R ]
830: (1)*<<2,0,0>>
831: @end example
832:
833: @table @t
834: @item $B;2>H(B
835: @ref{dp_gr_main}, @ref{dp_weyl_gr_main}, @ref{dp_order}, @ref{dp_hm}
836: @end table
837:
838: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
839: @noindent
840: ChangeLog
841: @itemize @bullet
842: @item
843: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
844: builtin/dp-supp.c 1.32
845: builtin/dp.c 1.49
846: @end itemize
847:
848: @comment --- $B"~"~"~"~(B $B4X?t(B dp_order $B$N@bL@(B $B"~"~"~"~(B
849: @node dp_order,,, $B<B83E*;EMM$N4X?t(B
850: @subsection @code{dp_order}
851: @findex dp_order
852:
853: @comment --- $B4X?t$N4JC1$J@bL@(B ---
854: @table @t
855: @item dp_order(@var{f} | v=@var{vv}, order=@var{oo})
856: :: dp_order $B$OM?$($i$l$?(B weight $B$KBP$9$k<!?t$N:GBgCM$rLa$9(B.
857: @end table
858:
859: @table @var
860: @item return
861: $B?t$+?t$N%j%9%H(B
862: @item f
863: $BJ,;6I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B.
864: @item vv
865: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
866: @item oo
867: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
868: @end table
869:
870: @itemize @bullet
871: @item
872: $B=g=x$rI=$9%j%9%H$O(B dp_gr_main $B$GDj5A$7$?J8K!$K=>$&(B.
873: $B$3$N%j%9%H$N@hF,$,(B weight vector $B$GL5$$>l9g$O%(%i!<$H$J$k(B.
874: $B$?$H$($P(B order=[[@@lex,...]] $B$O%(%i!<$H$J$k(B.
875: @item
876: dp_order $B$OM?$($i$l$?(B weight w $B$KBP$9$k<!?t$N:GBgCM$rLa$9(B.
877: $B$3$l$r(B @tex ${\rm ord}_w(f)$ @end tex
878: $B$H=q$/O@J8$d652J=q$b$"$k(B.
879: @item
880: $B0z?t$,%j%9%H$N>l9g3FMWAG$N<!?t$,7W;;$5$l$k(B.
881: @end itemize
882:
883: @example
884: [1220] F=<<2,0,0>>+<<1,1,0>>+<<0,0,1>>;
885: (1)*<<2,0,0>>+(1)*<<1,1,0>>+(1)*<<0,0,1>>
886: [1222] dp_order(F | order=[[1,1,1]]);
887: [ 1 1 1 ]
888: [ R R R ]
889: 2
890: [1223] dp_order(F | v=[x,y,z], order=[[x,1]]);
891: [ 1 0 0 ]
892: [ R R R ]
893: @end example
894:
895: @table @t
896: @item $B;2>H(B
897: @ref{dp_gr_main}, @ref{dp_weyl_gr_main}, @ref{dp_initial_term}, @ref{dp_hm}
898: @end table
899:
900: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
901: @noindent
902: ChangeLog
903: @itemize @bullet
904: @item
905: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
906: builtin/dp-supp.c 1.32
907: builtin/dp.c 1.49
908: @end itemize
909:
1.8 takayama 910:
911: @comment mapat
912: @node mapat,,, $B<B83E*;EMM$N4X?t(B
913: @subsection @code{mapat}
914: @findex mapat
915:
916: @table @t
917: @item mapat(@var{fname},@var{pos}[,@var{arg0}, @var{arg1}, ...])
918: :: @var{pos} $B$KBP$9$k(B map $B4X?t(B
919: @end table
920:
921: @table @var
922: @item return
923: $B%*%V%8%'%/%H(B
924: @item pos
925: $B@0?t(B
926: @item arg0, arg1, arg2, ...
927: $B%*%V%8%'%/%H(B
928: @end table
929:
930: @itemize @bullet
931: @item
932: @code{map} $B4X?t$O(B 0 $BHVL\$N0z?t$KBP$7$F$7$+F0:n$7$J$$$,(B, @code{mapat}
933: $B4X?t$O;XDj$7$?HV9f$N0z?t$KBP$7$F(B @code{map} $B4X?t$r<B9T$9$k(B.
934: @item
935: @code{mapat(fname,0,A0,A1,...)} $B$O(B
936: @code{map(fname,A0,A1,...)} $B$KEy2A$G$"$k(B.
937: @item
938: $B<!$NI{:nMQ$,$"$k(B. $B$^$@=q$$$F$J$$(B.
939: @end itemize
940:
941: @example
942: [219] mapat(deg,1,x^2+y^3+x+y,[x,y]);
943: [2,3]
1.10 ohara 944: [220] mapat(subst,1,x+y+z,[x,y,z],2);
945: [y+z+2,x+z+2,x+y+2]
1.8 takayama 946: @end example
947:
948: @table @t
949: @item $B;2>H(B
950: @ref{map}
951: @end table
952:
953: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
954: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
955: @noindent
956: ChangeLog
957: @itemize @bullet
958: @item $B$3$N4X?t$O(B 2004-6-22 $B$K%3%_%C%H$5$l$?(B.
959: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/pf.c, subst.c $B$G$"$k(B.
960: @end itemize
961:
962: @comment list
963: @node list,,, $B<B83E*;EMM$N4X?t(B
964: @subsection @code{list}
965: @findex list
966:
967: @table @t
968: @item list([@var{arg0}, @var{arg1}, ...])
969: :: list $B$r@8@.$9$k(B.
970: @end table
971:
972: @table @var
973: @item return
974: $B%j%9%H(B
975: @item arg0, arg1, arg2, ...
976: $B%*%V%8%'%/%H(B
977: @end table
978:
979: @itemize @bullet
980: @item
981: @var{arg0}, @var{arg1}, ... $B$rMWAG$H$9$k%j%9%H$r@8@.$9$k(B.
982: @end itemize
983:
984: @example
985: [219] list(1,2,3);
986: [1,2,3]
987: [220] list(1,2,[3,4]);
988: [1,2,[3,4]]
989: @end example
990:
991: @table @t
992: @item $B;2>H(B
993: @ref{cons}
994: @end table
995:
996: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
997: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
998: @noindent
999: ChangeLog
1000: @itemize @bullet
1001: @item $B$3$N4X?t$O(B 2004-6-22 $B$K%3%_%C%H$5$l$?(B.
1002: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/list.c $B$G$"$k(B.
1003: @end itemize
1004:
1.9 takayama 1005:
1006: @node set_print_function,,, $B<B83E*;EMM$N4X?t(B
1007: @subsection @code{set_print_function}
1008: @findex set_print_function
1009:
1010: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1011: @table @t
1012: @item set_print_function([@var{fname}])
1013: :: $B2hLLI=<(MQ$N4X?t$rEPO?(B
1014: @end table
1015:
1016: @table @var
1017: @item return
1018: $B@0?t(B
1019: @item fname
1020: $BJ8;zNs(B
1021: @end table
1022:
1023: @itemize @bullet
1024: @item
1025: @code{set_print_function} $B$O(B @code{fname(F)} $B$rDL>o$N2hLLI=<(4X?t$NBe$o$j$K$h$V(B.
1026: @code $B0z?t$,$J$$>l9g$O2hLLI=<(4X?t$r%G%U%)!<%k%H$XLa$9(B.
1027: @code Asir-contrib $B$O$3$N4X?t$rMQ$$$F=PNO4X?t$r(B Asir-contrib $BMQ$KJQ99$7$F$$$k(B.
1028: @end itemize
1029:
1030: @example
1031: [219] def my_output(F) {
1032: print("Out: ",0); print(rtostr(F));
1033: }
1034: [220] set_print_function("my_output");
1035: Out: 0
1036: [221] 1+2;
1037: Out: 3
1038: @end example
1039:
1040: @table @t
1041: @item $B;2>H(B
1042: @ref{rtostr}
1043: @end table
1044:
1045: @noindent
1046: ChangeLog
1047: @itemize @bullet
1048: @item $B$3$N4X?t$O(B 2001-9-4 $B$K(B asir-contrib $B$N$?$a$KF3F~$5$l$?(B.
1049: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/print.c 1.11 $B$G$"$k(B.
1050: @end itemize
1.8 takayama 1051:
1052:
1.12 takayama 1053: @node small_jacobi,,, $B<B83E*;EMM$N4X?t(B
1054: @subsection @code{small_jacobi}
1055: @findex small_jacobi
1056:
1057: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1058: @table @t
1059: @item small_jacobi(@var{a},@var{m})
1060: :: Jacobi $B5-9f$N7W;;(B
1061: @end table
1062:
1063: @table @var
1064: @item return
1065: $B@0?t(B
1066: @item arg1, arg2
1067: $B@0?t(B
1068: @end table
1069:
1070: @itemize @bullet
1071: @item
1072: @var{m} $B$,AG?t$N$H$-$O(B Legendre $B5-9f$H$h$P$l(B,
1073: x^2 = @var{a} mod @var{m} $B$K2r$,$"$k$H$-(B 1, $B2r$,$J$$$H$-(B -1 $B$r$b$I$9(B.
1074: @item
1075: Jacobi $B5-9f$O(B Legendre $B5-9f$N@Q$GDj5A$5$l$k(B ($B=iEy@0?tO@$NK\;2>H(B).
1076: @item
1077: $B$3$N4X?t$O(B machine int $B$NHO0O$G(B jacobi $B5-9f$r7W;;$9$k(B.
1078: @end itemize
1079:
1080: @example
1081: [1286] small_jacobi(2,3);
1082: -1
1083: [1287] small_jacobi(2,7);
1084: 1
1085: @end example
1086:
1087: @table @t
1088: @item $B;2>H(B
1089: http://members.jcom.home.ne.jp/yokolabo/asirlib/
1090: $B$b8+$F$M(B.
1091: @end table
1092:
1093: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1094: @noindent
1095: ChangeLog
1096: @itemize @bullet
1.13 takayama 1097: @item $B$3$N4X?t$NM3Mh$OITL@(B.
1098: @end itemize
1099:
1100:
1.20 takayama 1101: @node flatten_quote,,, $B<B83E*;EMM$N4X?t(B
1102: @subsection @code{flatten_quote}
1103: @findex flatten_quote
1.13 takayama 1104:
1105: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1106: @table @t
1.20 takayama 1107: @item flatten_quote(@var{q},@var{op})
1.13 takayama 1108: :: quote $B$N3g8L$r$H$j$5$k(B.
1109: @end table
1110:
1111: @table @var
1112: @item return
1113: Quote
1114: @item q
1115: Quote
1116: @item op
1117: $B1i;;;R$rI=$9J8;zNs(B.
1118: @end table
1119:
1120: @itemize @bullet
1121: @item
1122: Quote $B7?$N%G!<%?$OLZ9=B$$r$7$F$$$k(B
1123: ( quotetolist $B;2>H(B ).
1124: @code{quote_flatten()} $B$O(B, @var{q} $B$NCf$K$"$i$l$k1i;;;R(B @var{op}
1125: $B$N;R6!%N!<%I$rJ?Ey$K$9$k(B.
1126: $B$D$^$j1i;;;R(B @var{op} $B$K4X$9$k3g8L$E$1$,$"$C$?>l9g$=$l$r$9$Y$F$H$j$5$k(B.
1127: $B$?$H$($P(B (1+2)+(3+4) $B$H$$$&I=8=$r(B 1+2+3+4 $B$KJQ49$9$k(B.
1128: @item
1129: $B8=:_$N<BAu$G$O(B n-ary $B$N1i;;;R$ODj5A$5$l$F$$$J$$$N$G(B,
1.20 takayama 1130: 1+2+3 $B$O<B$O(B 1+(2+3) $B$HI=8=$5$l$F$$$k(B.
1131: $B$D$^$j(B + $B1i;;;R$O1&7k9gE*$G$"$k(B.
1132: @item R=0; for (I=0; I<N; I++) R = R+ P[I]; $B$J$kB-$7;;$r7+$jJV$9$H(B,
1133: + $B$O:87k9gE*$K$J$k(B. $B1&7k9gE*$KJQ49$9$k$K$O(B flatten_quote $B$r8F$V(B.
1134: @item $BL>A0$O(B quote_flatten $B$G$J$/(B flatten_quote $B$G$"$k(B.
1.13 takayama 1135: @end itemize
1136:
1137: @example
1138: [1288] flatten_quote(quote((1+2)+(3+4*(x+3))),"+");
1139: quote(1+2+3+4*(x+3))
1140: [1289] flatten_quote(quote( (x*y)*(p*3)-(x*y)*z),"*");
1141: quote(x*y*p*3-x*y*z)
1142: [1290] quotetolist(quote(1+2+3));
1143: [b_op,+,[b_op,+,[internal,1],[internal,2]],[internal,3]]
1144: @end example
1145:
1146: @table @t
1147: @item $B;2>H(B
1148: @ref{quotetolist}, @ref{print_tex_form}(contrib)
1149: @end table
1150:
1151: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1152: @noindent
1153: ChangeLog
1154: @itemize @bullet
1155: @item
1156: $B$3$N4X?t$O(B 2004-7-7 $B$+$i(B 2004-7-8 $B$K$+$1$F(B
1157: quote $B$K4X$9$kA`:n$r8&5f$9$k$?$a$K<B83E*$K=q$+$l$?(B.
1158: OpenXM/fb $B$GC_@Q$5$l$?8x<0$NITMW$J3g8L$r$H$j$O$:$7(B, tex $B7A<0$KJQ49$9$k$N$K(B
1159: $B1~MQ(B.
1160: @item
1161: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B
1162: builtin/strobj.c 1.47,
1.14 takayama 1163: parse/eval.c 1.35,
1164: parse/parse.h 1.31,
1165: parse/quote.c 1.14--1.16.
1166: @end itemize
1167:
1168: @node assoc,,, $B<B83E*;EMM$N4X?t(B
1169: @subsection @code{assoc}
1170: @findex assoc
1171:
1172: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1173: @table @t
1174: @item assoc(@var{a},@var{b})
1175: :: $BO"A[%j%9%H$r$D$/$k(B
1176: @end table
1177:
1178: @table @var
1179: @item return
1180: List
1181: @item a
1182: List
1183: @item b
1184: List
1185: @end table
1186:
1187: @itemize @bullet
1188: @item $B%j%9%H(B @var{a}, @var{b} $B$h$j(B
1189: [[@var{a}[0],@var{b}[0]], [@var{a}[1],@var{b}[1]], ...]
1190: $B$J$k?7$7$$%j%9%H$r@8@.$9$k(B.
1191: @end itemize
1192:
1193: $B2<$NNc$G$O(B @code{A} $B$KF0J*$NL>A0$,(B,
1194: @code{B} $B$KB-$NK\?t$,F~$C$F$$$k(B.
1195: @code{assoc(A,B)} $B$GF0J*$HB-$NK\?t$r%Z%"$K$7$?%j%9%H$r@8@.$9$k(B.
1196:
1197: @example
1198: [1192] A=["dog","cat","snake"];
1199: [dog,cat,snake]
1200: [1193] B=[4,4,0];
1201: [4,4,0]
1202: [1194] assoc(A,B);
1203: [[dog,4],[cat,4],[snake,0]]
1204: @end example
1205:
1206: @table @t
1207: @item $B;2>H(B
1208: @ref{cons}, @ref{append}
1209: @end table
1210:
1211: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1212: @noindent
1213: ChangeLog
1214: @itemize @bullet
1215: @item
1216: $B$3$N4X?t$O(B 2004-6-28 $B$K=q$+$l$?(B.
1217: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B
1218: builtin/list.c 1.9
1.13 takayama 1219: parse/eval.c 1.35,
1220: parse/parse.h 1.31,
1221: parse/quote.c 1.14--1.16.
1.12 takayama 1222: @end itemize
1.13 takayama 1223:
1.15 takayama 1224:
1225: @node sprintf,,, $B<B83E*;EMM$N4X?t(B
1226: @subsection @code{sprintf}
1227: @findex sprintf
1228:
1229: @table @t
1230: @item sprintf(@var{format}[,@var{args}])
1231: :: C $B$K;w$?%W%j%s%H4X?t(B
1232: @end table
1233:
1234: @table @var
1235: @item return
1236: $BJ8;zNs(B
1237: @item format
1238: $BJ8;zNs(B
1239: @item args
1240: $B%*%V%8%'%/%H(B
1241: @end table
1242:
1243: @itemize @bullet
1244: @item
1245: $B%U%)!<%^%C%HJ8;zNs(B @var{format } $B$K$7$?$,$$(B @var{args} $B$rJ8;zNs$KJQ49$9$k(B.
1246: @item
1247: $B%U%)!<%^%C%HJ8;zNs$NCf$K(B @code{%a} (any) $B$,MxMQ2DG=(B.
1248: @var{args} $B$N8D?t$O%U%)!<%^%C%HJ8;zNs$NCf$N(B @code{%a} $B$N8D?t$KEy$7$/$9$k$3$H(B.
1249: @end itemize
1250:
1251: @example
1252: [0] sprintf("%a: rat = %a",10,x^2-1);
1253: 10: rat = x^2-1
1254: @end example
1255:
1256: @table @t
1257: @item $B;2>H(B
1258: @ref{rtostr}
1259: @end table
1260:
1261: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1262: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1263: @noindent
1264: ChangeLog
1265: @itemize @bullet
1266: @item
1267: $B$3$N4X?t$O(B 2004-7-13 $B$K%3%_%C%H$5$l$?(B.
1268: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/strobj (1.50) $B$G$"$k(B.
1269: @item
1270: @code{%a} $B$O(B Maple $B$N(B sprintf $B$N??;w$+(B.
1271: @end itemize
1272:
1273:
1274: @node quote_to_funargs,,, $B<B83E*;EMM$N4X?t(B
1275: @subsection @code{quote_to_funargs}, @code{funargs_to_quote}, @code{remove_paren}
1276: @findex quote_to_funargs
1277: @findex funargs_to_quote
1278: @findex remove_paren
1279:
1280: @table @t
1281: @item quote_to_funargs(@var{q})
1282: :: quote $B$r(B funarg $B7A<0(B($B%j%9%H(B) $B$X(B.
1283: @item funargs_to_quote(@var{f})
1284: :: funarg $B7A<0$r(B quote $B$X(B.
1.19 takayama 1285: @item get_function_name(@var{f})
1286: :: funarg $B7A<0$N(B op $B$rJ8;zNs$X(B.
1.15 takayama 1287: @item remove_paren(@var{q})
1288: :: $B>e$N4X?t$rMQ$$$F=q$+$l$?M>J,$J3g8L$r<h$j5n$k(B simplifier (asir-contrib $B%^%K%e%"%k$X(B: todo)
1289: @end table
1290:
1291: @table @var
1292: @item return
1293: quote(funargs_to_quote, remove_paren) $B$+(B $B%j%9%H(B(quote_to_funargs)
1294: @item q
1295: quote
1296: @item f
1297: $B%j%9%H(B
1298: @end table
1299:
1300: @itemize @bullet
1301: @item
1302: @code{quote_to_funargs} $B$O(B quote $B7?$N%G!<%?(B ($BFbItE*$K$O(B FNODE) $B$r(B
1303: quote $B$X$NI|852DG=$J7A$G%j%9%H$XJQ49$9$k(B.
1304: @code{quotetolist} $B$O(B quote $B$r%j%9%H$XJQ49$9$k$,(B, $B0lIt$N>pJs$r<N$F$k$?$a(B
1305: $B$b$H$N(B quote $B$NI|85$O$G$-$J$$(B.
1306: @item
1.19 takayama 1307: @code{quote_to_funargs} $B$NLa$jCM$O(B [fid, op, arg1, arg2, ...]
1308: $B$J$k7A<0$r$7$F$$$k(B.
1309: $B$3$3$G(B op $B$O(B node $B$NL>A0$G$"$j(B,
1310: $B4X?t(B @code{get_function_name} $B$rMQ$$$F?M4V$,FI$a$k7A<0(B
1311: $B$G<h$j$@$;$k(B.
1312: $B$?$H$($P(B @code{get_function_name(quote_to_funargs(quote(1+2))[1])}
1313: $B$O(B "+" $B$rLa$9(B.
1314: @item
1315: $BL>A0(B@code{get_function_name} $B$O$=$N$&$AJQ99$5$l$k$@$m$&(B.
1.15 takayama 1316: @item
1317: $B2<$NNc$G(B
1318: quote_to_funargs(FA[2]);
1319: [34,[b_op,+,[internal,x],[internal,1]]]
1.19 takayama 1320: $B$H$J$k(B.
1321: 34 $B$O(B @code{I_PAREN} $B$r0UL#$9$k(B.
1322: $B?t$H0UL#$NBP1~I=$O(B @code{OpenXM/src/asir-contrib/packages/src/noro_simplify.rr}
1323: $B$^$?$O(B @code{OpenXM_contrib2/asir2000/parse/parse.h} $B$r8+$h(B.
1324: $B0J2<$N(B fid $B$,(B 0, 1, 2, ... $B$KBP1~$E$1$i$l$F$$$k(B.
1325: I_BOP, I_COP, I_AND, I_OR, I_NOT, I_CE,
1326: I_PRESELF, I_POSTSELF,
1327: I_FUNC, I_FUNC_OPT, I_IFUNC, I_MAP, I_RECMAP, I_PFDERIV,
1328: I_ANS, I_PVAR, I_ASSPVAR,
1329: I_FORMULA, I_LIST, I_STR, I_NEWCOMP, I_CAR, I_CDR, I_CAST,
1330: I_INDEX, I_EV, I_TIMER, I_GF2NGEN, I_GFPNGEN, I_GFSNGEN,
1331: I_LOP, I_OPT, I_GETOPT, I_POINT, I_PAREN, I_MINUS,
1332: I_NARYOP
1.15 takayama 1333: @end itemize
1334:
1335: $B<!$NNc$G$O(B (x+1)+(x+2) $B$N3g8L$r$O$:$7$F(B x+1+x+2 $B$KJQ49$7$F$$$k(B.
1336: @example
1337: [0] ctrl("print_quote",1) $
1338:
1339: [1] Q=quote((x+1)+(x+2));
1340: [b_op,+,[u_op,(),[b_op,+,[internal,x],[internal,1]]],
1341: [u_op,(),[b_op,+,[internal,x],[internal,2]]]]
1342:
1343: [2] FA=quote_to_funargs(Q);
1344: [0,<...quoted...>,
1345: [u_op,(),[b_op,+,[internal,x],[internal,1]]],
1346: [u_op,(),[b_op,+,[internal,x],[internal,2]]]]
1347:
1348: [3] FA2=quote_to_funargs(FA[2])[1];
1349: [b_op,+,[internal,x],[internal,1]]
1350:
1351: [4] FA3=quote_to_funargs(FA[3])[1];
1352: [b_op,+,[internal,x],[internal,2]]
1353:
1354: [5] funargs_to_quote([FA[0],FA[1],FA2,FA3]);
1355: [b_op,+,[b_op,+,[internal,x],[internal,1]],
1356: [b_op,+,[internal,x],[internal,2]]]
1357: @end example
1358:
1359: $B<!$NNc$O(B OpenXM/asir-contrib $BHG$N(B asir $B$G<B9T(B.
1360: @example
1361: [1287] load("noro_simplify.rr");
1362: 1
1363: [1293] noro_simplify.remove_paren(quote( f(1-(x))));
1364: quote(f(1-x))
1365: @end example
1366:
1.19 takayama 1367: funargs_to_quote $B$rMQ$$$F4{B8$N(B quote $B$N;R6!$rCV$-49$($F(B
1368: $B?7$7$$(B quote $B$r$D$/$j=P$;$k(B.
1369: @example
1370: [1184] R=quote_to_funargs(quote(a+(b+c)));
1371: [0,<...quoted...>,<...quoted...>,<...quoted...>]
1372: [1185] T=quote_to_funargs(quote(1+2));
1373: [0,<...quoted...>,<...quoted...>,<...quoted...>]
1374: [1186] funargs_to_quote([0,R[1],R[2],T[2]]);
1375: quote(a+1)
1376: @end example
1377:
1.15 takayama 1378: @table @t
1379: @item $B;2>H(B
1380: @ref{quotetolist}
1381: @end table
1382:
1.17 takayama 1383:
1.15 takayama 1384: @noindent
1385: ChangeLog
1386: @itemize @bullet
1387: @item
1388: $B$3$l$i$N4X?t$O(B 2004-7-8 $B$+$i3+H/$N$O$8$^$C$F$$$k(B quote $B$N(B simplification $B4XO"(B
1389: $B$N<B83E*4X?t$G$"$k(B.
1390: $BJQ99$r$&$1$?%=!<%9%3!<%I$OB?4t$K$o$?$k$N$G$^$@=q$+$J$$(B.
1391: @item
1392: $B3g8L$r<h$j5n$kLdBj$O(B OpenXM/fb $B$,C_$($F$$$k8x<0$r(B tex $B$Ge:No$KI=<($9$k$N$,F05!$N0l$D(B.
1393: @item
1394: 2004-6-26 $B$N7W;;Be?t%;%_%J!<$K$*$$$F(B, $BCf@n$5$s$,(B simplifier $B$K$D$$$F$$$m$$$mLdBjDs5/(B
1395: $B$r$7$?(B ($B7W;;Be?t%;%_%J!<%S%G%*;2>H(B).
1.19 takayama 1396: @item parse/quote.c $B$N(B {\tt strcut fid_spec fid_spec_tab[] }
1397: $B$NItJ,$K=q$$$F$"$k7A<0$K(B @code{funargs_to_quote} $B$OJQ49$9$k(B.
1.17 takayama 1398: @end itemize
1399:
1400: @node set_secure_flag,,, $B<B83E*;EMM$N4X?t(B
1401: @subsection @code{set_secure_flag}, @code{set_secure_mode}
1402: @findex set_secure_flag
1403: @findex set_secure_mode
1404:
1405: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1406: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1407: @table @t
1408: @item set_secure_flag(@var{fname},@var{m})
1409: @itemx set_secure_mode(@var{m})
1410: :: $B4X?t$N<B9T8"8B$r@_Dj$9$k(B. (web $B%5!<%S%9MQ(B)
1411: @end table
1412:
1413: @table @var
1414: @item return
1415: $B@0?t(B
1416: @item fname
1417: $BJ8;zNs(B
1418: @item m
1419: $B@0?t(B
1420: @end table
1421:
1422: @itemize @bullet
1.18 takayama 1423: @item @code{set_secure_flag}, @code{set_secure_mode} $B$O(B
1424: asir $B$r(B web $B%5!<%PEy$G8x3+$9$k$?$a$K2C$($i$l$?4X?t(B.
1425: @code{set_secure_flag} $B$G8x3+$9$k4X?t$r;XDj$9$k(B.
1.17 takayama 1426: @code{secure_mode} $B$,(B 1 $B$N>l9g$O(B @code{set_secure_flag} $B$G;XDj$5$l$?(B
1427: $B4X?t$7$+<B9T$G$-$J$$(B.
1.18 takayama 1428: $B4X?t$N<B9TESCf$G$O(B @code{secure_mode} $B$,(B 0 $B$H$J$C$F$$$k$N$G(B,
1.17 takayama 1429: $BG$0U$N4X?t$r<B9T$G$-$k(B.
1430: $B$^$?%(%i!<$N;~Ey$O(B, @code{secure_mode} $B$O(B 1 $B$K<+F0E*$KI|5"$9$k(B.
1431: $B$?$@$7(B @code{def} $B$O<B9T$G$-$J$$(B.
1432: $B8x3+$9$k4X?t$G$O(B, $B$=$N=hM}Cf$OG$0U$N4X?t$,<B9T$G$-$k$N$G(B,
1433: security $B$K==J,Cm0U$7$?<BAu$r$9$kI,MW$,$"$k(B.
1434: @item
1435: @code{set_secure_flag} $B$O(B, @var{fname} $B$N(B secure flag $B$r(B @var{m}
1436: $B$K$9$k(B.
1.18 takayama 1437: $B8x3+$9$kL?Na$O(B 1 $B$K@_Dj$9$k(B.
1.17 takayama 1438: @item
1439: @var{set_secure_mode(1)} $B$G(B @code{secure_mode} $B$,(B 1 $B$H$J$j(B,
1440: $B8x3+$5$l$?4X?t$7$+<B9T$G$-$J$/$J$k(B.
1441: quit $BEy$b<B9T$G$-$J$$$N$GCm0U(B.
1.18 takayama 1442: @item @code{ timer } $B$N0z?t$H$7$F(B secure_flag $B$r@_Dj$7$F$$$J$$4X?t$r(B
1443: $B;XDj$7$F<B9T$7$F$b%(%i!<$,I=<($5$l$J$$(B.
1444: $B$3$N$H$-$O(B, @code{ ctrl("error_in_timer",1) } $B$r<B9T$7$F$*$/(B.
1.17 takayama 1445: @end itemize
1446:
1447: @example
1448: [1194] set_secure_flag("print_input_form_",1);
1449: 1
1450: [1195] set_secure_flag("fctr",1);
1451: 1
1452: [220] set_secure_mode(1);
1453: 1
1454: [1197] fctr((x-1)^3);
1455: [[1,1],[x-1,3]]
1456: [1198] fctr(shell("ls"));
1457: evalf : shell not permitted
1458: return to toplevel
1459: @end example
1460:
1461: @table @t
1462: @item $B;2>H(B
1463: @ref{timer}
1464: @end table
1465:
1466: @noindent
1467: ChangeLog
1468: @itemize @bullet
1.18 takayama 1469: @item @code{set_secure_flag}, @code{set_secure_mode} $B$O(B asir $B$r(B
1470: web $B%5!<%PEy$G8x3+$9$k$?$a$K2C$($i$l$?4X?t(B.
1471: sm1 $B$NF1MM$J4X?t(B RestrictedMode $B$G:NMQ$5$l$?J}K!$rMQ$$$F$$$k(B.
1472: $B$D$^$j(B, @code{set_secure_flag} $B$G8x3+$9$k4X?t$r;XDj$9$k(B.
1473: @code{secure_mode} $B$,(B 1 $B$N>l9g$O(B @code{set_secure_flag} $B$G;XDj$5$l$?(B
1474: $B4X?t$7$+<B9T$G$-$J$$(B.
1475: v$B4X?t$N<B9TESCf$G$O(B @code{secure_mode} $B$,(B 0 $B$H$J$C$F$$$k$N$G(B,
1476: $BG$0U$N4X?t$r<B9T$G$-$k(B.
1.17 takayama 1477: @item $B$3$N4X?t$O(B 2004-10-27 $B$+$i(B 2004-11-22 $B$K$+$1$F3+H/$5$l$?(B.
1478: @item cgiasir.sm1, cgi-asir.sh $B$HAH$_9g$o$;$F(B cgi $B%5!<%S%9$rDs6!$9$k$?$a$K(B
1479: $BMxMQ$9$k(B.
1480: cgi-asir.sh $B$G$O(B
1481: @code{CGI_ASIR_ALLOW} $B4D6-JQ?t$G8x3+$9$k%3%^%s%I$r;XDj$9$k(B.
1482: @item
1483: 1.24--1.25 OpenXM_contrib2/asir2000/builtin/miscf.c
1484: @item
1485: 1.36--1.38 OpenXM_contrib2/asir2000/parse/eval.c
1486: @item
1487: 1.6--1.7 OpenXM_contrib2/asir2000/parse/function.c
1488: @item
1489: 1.33 OpenXM_contrib2/asir2000/parse/parse.h
1.15 takayama 1490: @end itemize
1.21 takayama 1491:
1.22 takayama 1492: @node initialize_static_variable,,, $B<B83E*;EMM$N4X?t(B
1493: @subsection @code{initialize_static_variable}
1494: @findex initialize_static_variable
1.21 takayama 1495:
1496:
1497: @comment --- $B@bL@(B ---
1498: @table @t
1.22 takayama 1499: @item static $BJQ?t$N=i4|2=$NLdBjE@(B. $B=i4|2=$N;~$K(B segmentation fault $B$,$*$-$k(B.
1.21 takayama 1500: @end table
1501:
1502:
1503: @itemize @bullet
1504: @item static $BJQ?t$N<h07(B.
1505: $B2<$NNc$r;2>H$N$3$H(B.
1506: @end itemize
1507:
1508:
1509: @example
1510: if (1) @{
1511: module abc;
1512: static A;
1513: A=1;
1514: endmodule;
1515: @} else @{ @};
1516:
1517: end$
1518: $B$r(B t.rr $B$H$9$k$H$-(B,
1519:
1520: [6] load("./t.rr");
1521: 1
1522: internal error (SEGV)
1523: $B$H$J$k(B.
1524:
1525: t.rr $B$r(B
1526: if (1) @{
1527: module abc;
1528: static A;
1529: localf initA;
1530: localf foo;
1531: def initA() @{
1532: A=1;
1533: @}
1534: initA();
1535: def foo() @{
1536: return A;
1537: @}
1538: endmodule;
1539: @} else @{ @};
1540:
1541: end$
1542: $B$H$9$k$H@5$7$/=i4|2=$5$l$k(B.
1543: @end example
1544:
1545: @comment --- ChangeLog
1546: @noindent
1547: ChangeLog
1548: @itemize @bullet
1549: @item oxasir-win.rr $B$N<h07$GLdBjE@$H$7$FIb>e(B. 2005.07.25.
1.22 takayama 1550: @item oxasir-win.rr $B$N<h07$G(B double quote $B$N<h$j07$$$KLdBj$,$"$C$?$,(B, $B$3$l$O(B asir2000/io/ox_asir.c, 1.58, $B$GLdBjE@2r7h(B.
1.21 takayama 1551: @item ox_asir $B$K7W;;$r0MMj$9$k;~$O(B if (1) @{ ... @}$B$G0O$`(B.
1552: @end itemize
1553:
1.23 takayama 1554: @node eval_quote,,, $B<B83E*;EMM$N4X?t(B
1555: @subsection @code{eval_quote}
1556: @findex eval_quote
1557:
1558: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1559: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1560: @table @t
1561: @item eval_quote(@var{Q});
1562: :: quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B.
1563: @end table
1564:
1565: @table @var
1566: @item return
1567: $B%*%V%8%'%/%H(B
1568: @item Q
1569: quote$B7?(B
1570: @end table
1571:
1572: @itemize @bullet
1573: @item quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B.
1574: @item $B5U4X?t$O(B @code{objtoquote}
1575: @end itemize
1576:
1577: @example
1578: ctrl("print_quote",2);
1579: A=quote((x-1)^2+(x-1)+3);
1580: $B=PNO(B: ((((x)-(1))^(2))+((x)-(1)))+(3)
1581: eval_quote(A);
1582: $B=PNO(B: x^2-x+3
1583: print_input_form(A); /* asir-contrib */
1584: $B=PNO(B: quote((x-1)^2+(x-1)+3)
1585: @end example
1586:
1587: @table @t
1588: @item $B;2>H(B
1589: @ref{objtoquote}, @ref{quotetolist}, @ref{eval_string},
1590: @ref{quote_to_funargs}, @ref{funargs_to_quote}
1591: @end table
1592:
1593: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1594: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1595: @noindent
1596: ChangeLog
1597: @itemize @bullet
1598: @item -----$B$^$@=q$$$F$J$$(B.
1599: @end itemize
1600:
1601:
1602: @node nqt_match,,, $B<B83E*;EMM$N4X?t(B
1603: @subsection @code{nqt_match}
1604: @findex nqt_match
1605:
1606: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1607: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1608: @table @t
1609: @item nqt_match(@var{Expr},@var{Pattern}[,@var{Mode}])
1610: :: @var{Expr} $B$,(B @var{Pattern} $B$K%^%C%A(B($BE,9g(B)$B$9$k$H(B 1 $B$rLa$9(B. $B$7$J$$$H(B 0 $B$rLa$9(B.
1611: @end table
1612:
1613: @table @var
1614: @item return
1615: $B@0?t(B
1616: @item Expr
1617: quote$B7?(B
1618: @item Pattern
1619: quote$B7?(B
1620: @item Mode
1621: $B@0?t(B
1622: @end table
1623:
1624: @itemize @bullet
1625: @item @var{Expr} $B$,(B @var{Pattern} $B$K%^%C%A(B($BE,9g(B)$B$9$k$H(B 1 $B$rLa$9(B. $B$7$J$$$H(B 0 $B$rLa$9(B.
1626: @item $BE,9g$7$?>l9g(B, $BI{:nMQ$H$7$F(B, @var{Pattern} $B$K4^$^$l$k%W%m%0%i%`JQ?t(B($BBgJ8;z$G$O$8$^$kJQ?t(B)$B$KE,9g$7$?CM$,BeF~$5$l$k(B.
1627: @item nqt $B$O(B normalized quote $B$NN,$G$"$j(B fnode$BI8=`7A$KJQ49$7$F$+$iE,9g8!::$r$9$k(B. fnode$BI8=`7A$K$D$$$F$O(B @ref{qt_normalize} $B$r8+$h(B.
1628: @item @var{Mode} $B$K$h$jE83+J}K!$r;XDj$7(B, $B$=$NE83+J}K!$K$h$jF@$i$l$?(B @var{Expr} $B$N(B
1629: fnode$BI8=`7A$H(B @var{Pattern} $B$rHf3S$9$k(B.
1630: @end itemize
1631:
1632: @example
1633: ctrl("print_quote",2);
1634: A=quote((x-y)*(x+y));
1635: nqt_match(A,quote(P*Q));
1636: [P,Q]
1637: $B=PNO(B: [x-y, x+y]
1638: nqt_match(A,quote(P*Q),1);
1639: $B%^%C%A$7$J$$(B.
1640: nqt_match(A,quote(P*Q),2);
1641: $B%^%C%A$7$J$$(B.
1642: qt_normalize(A,1);
1643: $B=PNO(B: ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x))
1644: qt_normalize(A,2);
1645: $B=PNO(B: ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y))
1646: @end example
1647:
1648: @table @t
1649: @item $B;2>H(B
1650: @ref{nqt_match_rewrite},
1651: @ref{qt_rewrite}
1652: @end table
1653:
1654: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1655: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1656: @noindent
1657: ChangeLog
1658: @itemize @bullet
1659: @item ----- $B$^$@=q$$$F$J$$(B.
1660: @end itemize
1661:
1662:
1663: @node nqt_match_rewrite,,, $B<B83E*;EMM$N4X?t(B
1664: @subsection @code{nqt_match_rewrite}
1665: @findex nqt_match_rewrite
1666:
1667: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1668: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1669: @table @t
1670: @item nqt_match_rewrite(@var{Expr},@var{Rule},@var{Mode})
1671: :: @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B.
1672: @end table
1673:
1674: @table @var
1675: @item return
1676: quote$B7?(B
1677: @item Expr
1678: quote$B7?(B
1679: @item Rule
1680: [@var{Pattern},@var{Action}] $B$+$^$?$O(B
1681: [@var{Pattern},@var{Condition},@var{Action}].
1682: $B$3$l$i$NMWAG$O$9$Y$F(B quote$B7?(B.
1683: @item Mode
1684: $B@0?t(B
1685: @end table
1686:
1687: @itemize @bullet
1688: @item @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B. @var{Pattern} $B$KE,9g$7$J$$>l9g$O(B
1689: @var{Exprt} $B<+BN$rLa$9(B.
1690: @item nqt $B$O(B normalized quote $B$NN,$G$"$j(B fnode$BI8=`7A$KJQ49$7$F$+$iE,9g8!::$r$9$k(B. fnode$BI8=`7A$K$D$$$F$O(B @ref{qt_normalize} $B$r8+$h(B.
1691: @end itemize
1692:
1693: @comment %%Doc: cfep/tests/2006-03-12-qt.rr
1694: @example
1695: ctrl("print_quote",2);
1696: nqt_match_rewrite(`x*y*z,[`X*Y,`X+Y],1);
1697: $B=PNO(B: (x)+((y)*(z))
1698: A=`x*x;
1699: nqt_match_rewrite(A,[`X*Y,`X+Y],1);
1700: $B=PNO(B: x^2 ($B%^%C%A$7$F$$$J$$(B)
1701: nqt_match_rewrite(A,[`X*Y,`X+Y],2);
1702: $B=PNO(B: 2*x
1703:
1704: $BE,9g$K$D$$$F$N%b!<%I$N0c$$$rM}2r$9$k$?$a$K<!$NNc$*$h$S(B fnode$BI8=`7A(B(qt_normalize) $B$r;2>H(B.
1705: quotetolist(qt_normalize(`x*x,0));
1706: $B=PNO(B: [b_op,^,[internal,x],[internal,2]]
1707: quotetolist(qt_normalize(`x*x,1));
1708: $B=PNO(B: [b_op,^,[internal,x],[internal,2]]
1709: quotetolist(qt_normalize(`x*x,2));
1710: $B=PNO(B: [n_op,*,[internal,x],[internal,x]]
1711: @end example
1712:
1713: @table @t
1714: @item $B;2>H(B
1715: @ref{nqt_match},
1716: @ref{qt_rewrite},
1717: @ref{qt_normalize}
1718: @end table
1719:
1720: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1721: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1722: @noindent
1723: ChangeLog
1724: @itemize @bullet
1725: @item -----$B$^$@=q$$$F$J$$(B.
1726: @end itemize
1727:
1728:
1729:
1730: @node qt_normalize,,, $B<B83E*;EMM$N4X?t(B
1731: @subsection @code{qt_normalize}
1732: @findex qt_normalize
1733:
1734: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1735: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1736: @table @t
1737: @item qt_normalize(@var{Expr}[,@var{Mode}])
1738: :: @var{Expr} $B$r(B fnode$BI8=`7A$KJQ49$9$k(B. @var{Mode}$B$K$h$jI8=`7A$X$NE83+%"%k%4%j%:%`$r;XDj$G$-$k(B.
1739: @end table
1740:
1741: @table @var
1742: @item return
1743: quote$B7?(B
1744: @item Expr
1745: quote$B7?(B
1746: @item Mode
1747: $B@0?t(B
1748: @end table
1749:
1750: fnode$B$O(B quote$B7?$N<BBN$G$"$k(B.
1751: fnode $B$OLZ$G$"$j(B, $B7?(B id $B$*$h$S;R6!$+$i$J$k(B.
1752: $B7?$*$h$S;R6!$r<h$j=P$94X?t$,(B funargs_to_quote $B$G$"$k(B.
1753: $B$^$?(B fnode $B$r%j%9%H$KJQ49$9$k4X?t$,(B quotetolist $B$G$"$k(B.
1754:
1755: fnode $B$NI8=`7A$O%Q%?!<%s%^%C%A%s%0(B, $B=q$-49$($rMF0W$K$*$3$J$&$?$a$KF3F~$5$l$?(B.
1756: fnode $B$NI8=`7A$r(B fn $B$H=q$/$H$-(B, $BI8=`7A$N(B BNF$BIwI=8=$G$NDj5A$O0J2<$N$H$*$j(B.
1757: @example
1758: fn = formula | functor(nf [,...]) | sum_of_monom
1759: fnode $B$NI8=`7A(B. functor $B$O4X?t$h$S$@$7$_$?$$$J$b$N(B.
1760: sum_of_monom = monom [+ ...]
1761: $B%b%N%_%"%k$NOB(B
1762: monom = [formula *] nfpow [* ...]
1763: $B%b%N%_%"%k(B
1764: nfpow = nf | nf^(nf)
1765: $BQQ>hItJ,$NI8=`7A(B
1766: formula = Risa object
1767: @end example
1768:
1769:
1770: @itemize @bullet
1771: @item @var{Expr} $B$r(B fnode$BI8=`7A$KJQ49$9$k(B. @var{Mode}$B$K$h$jI8=`7A$X$NE83+%"%k%4%j%:%`$r;XDj$G$-$k(B.
1772: @item $BE83+$O:F5"E*$G$"$k(B.
1773: @item $BF~NO$,(B fnode $B$KJQ49$5$l$?=i4|>uBV$G$O(B + $B$d(B * $B$O;R6!$,(B2$B?M$N(B binary operator
1774: (b_op) $B$G$"$k$,(B, qt_normalize $B$r:nMQ$5$;$k$3$H$K$h$j(B, + $B$d(B * $B$OG$0U?M?t$N(B
1775: $B;R6!$r;}$F$k(B n-ary operator $B$KJQ49$5$l$k(B.
1776: @item n-ary operator $B$r4pAC$H$7$?(B fnode$BI8=`7A$rMQ$$$k$3$H$K$h$j(B, $B%Q%?!<%s%^%C%AMQ$N%Q%?!<%s$N?t$r8:$i$;$k$3$H$,7P83E*$K$o$+$C$F$$$k(B.
1777: @item @var{Mode}=0. $BE83+$7$J$$(B. $B$3$l$,4{Dj$NF0:n(B.
1778: @item @var{Mode}=1. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49(B
1779: @item @var{Mode}=2. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49$7$J$$(B.
1780: @end itemize
1781:
1782: @var{Mode} $B$N0c$$$K$D$$$F$O0J2<$NNc$b;29M$K(B.
1783: @comment %%cfep/tests/2006-03-12-qt.rr
1784: @example
1785: ctrl("print_quote",2);
1786: A=quote((x-y)*(x+y));
1787: $B=PNO(B: ((x)-(y))*((x)+(y))
1788: B=qt_normalize(A,0);
1789: $B=PNO(B: ((x)+((-1)*(y)))*((x)+(y)) Mode=0. $BE83+$O$5$l$J$$(B. +, * $B$O(B n_op (nary-op) $B$X(B.
1790: quotetolist(B);
1791: $B=PNO(B: [n_op,*,[n_op,+,[internal,x],[n_op,*,[internal,-1],[internal,y]]],[n_op,+,[internal,x],[internal,y]]]
1792:
1793: B=qt_normalize(A,1);
1794: $B=PNO(B: ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x))
1795: Mode=1. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$r$^$H$a$k(B.
1796: quotetolist(B);
1797: $B=PNO(B: [n_op,+,[b_op,^,[internal,x],[internal,2]],[n_op,*,[internal,x],[internal,y]],[n_op,*,[internal,-1],[b_op,^,[internal,y],[internal,2]]],[n_op,*,[internal,-1],[internal,y],[internal,x]]]
1798:
1799: qt_normalize(A,2);
1800: $B=PNO(B: ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y))
1801: Mode=2. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$O;H$o$J$$(B.
1802: quotetolist(B);
1803: $B=PNO(B: [n_op,+,[b_op,^,[internal,x],[internal,2]],[n_op,*,[internal,x],[internal,y]],[n_op,*,[internal,-1],[b_op,^,[internal,y],[internal,2]]],[n_op,*,[internal,-1],[internal,y],[internal,x]]]
1804:
1805: qt_normalize(`x^2,2);
1806: $B=PNO(B: (x)*(x)
1807: Mode=2. $B6R$O;H$o$J$$(B. n-ary $B$N(B * $B$X(B.
1808: @end example
1809:
1810: @table @t
1811: @item $B;2>H(B
1812: @ref{nqt_match},
1813: @ref{nqt_match_rewrite},
1814: @ref{quotetolist},
1815: @ref{quote_to_funargs}
1816: @end table
1817:
1818: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1819: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1820: @noindent
1821: ChangeLog
1822: @itemize @bullet
1823: @item
1824: @end itemize
1825:
1826:
1827: @node qt_set_coef,,, $B<B83E*;EMM$N4X?t(B
1828: @subsection @code{qt_set_coef}
1829: @findex qt_set_coef
1830:
1831: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1832: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1833: @table @t
1834: @item qt_set_coef(@var{ParamList})
1835: :: $B0J2<(B @var{ParamList} $B$K8=$l$kB?9`<0JQ?t$rJQ?t$H$9$kM-M}4X?tBN$r78?t$H$9$k(B
1836: $BHs2D49B?9`<0$r07$&(B.
1837: @end table
1838:
1839: @table @var
1840: @item return
1841: $B%j%9%H(B
1842: @item ParamList
1843: $B%j%9%H(B
1844: @end table
1845:
1846: @itemize @bullet
1847: @item $B0J2<(B @var{ParamList} $B$K8=$l$kB?9`<0JQ?t$rJQ?t$H$9$kM-M}4X?tBN$r78?t$H$9$k(B
1848: $BHs2D49B?9`<0$r07$&(B.
1849: @item $B$3$N@k8@$r$7$J$$$H78?tBN$r?t$H$9$kHs2D49B?9`<0$H$7$F7W;;$9$k(B.
1850: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1851: @item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1852: @end itemize
1853:
1854: @example
1855: ctrl("print_quote",2);
1856: qt_set_coef([a]);
1857: B=qt_normalize(quote((a*x+a)^2),2);
1858: $B=PNO(B: ((a^2)*(x)*(x))+((2*a^2)*(x))+(a^2)
1859: qt_normalize(B+B,2);
1860: $B=PNO(B: ((2*a^2)*(x)*(x))+((4*a^2)*(x))+(2*a^2)
1861: @end example
1862:
1863: @table @t
1864: @item $B;2>H(B
1865: @ref{qt_normalize}
1866: @end table
1867:
1868: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1869: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1870: @noindent
1871: ChangeLog
1872: @itemize @bullet
1873: @item -----$B$^$@=q$$$F$J$$(B.
1874: @end itemize
1875:
1876:
1877: @node qt_set_ord,,, $B<B83E*;EMM$N4X?t(B
1878: @subsection @code{qt_set_ord}
1879: @findex qt_set_ord
1880:
1881: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1882: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1883: @table @t
1884: @item qt_set_ord(@var{VarList})
1885: :: @var{VarList} $B$rJQ?t=g=x$H$9$k(B.
1886: @end table
1887:
1888: @table @var
1889: @item return
1890: $B%j%9%H(B
1891: @item VarList
1892: $B%j%9%H(B
1893: @end table
1894:
1895: @itemize @bullet
1896: @item @var{VarList} $B$r<-=q<0$KMQ$$$?JQ?t=g=x$r0J2<;HMQ$9$k(B.
1897: @item $B$3$N@k8@$r$7$J$$$H$"$kITDj85$K$D$$$F$N4{Dj$N<-=q<0=g=x(B-----$B$^$@=q$$$F$J$$(B---$B$rMQ$$$F9`$rHf3S$9$k(B.
1898: @var{VarList} $B$K8=$l$J$$JQ?t$K$D$$$F$O$3$N=g=x$,E,MQ$5$l$k(B.
1899: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1900: @item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1901: @end itemize
1902:
1903: @example
1904: ctrl("print_quote",2);
1905: qt_normalize(quote(x+y),2);
1906: $B=PNO(B: (x)+(y)
1907: qt_set_ord([y,x]);
1908: $B=PNO(B: [y,x,z,u,v,w,p,q,r,s,t,a,b,c,d,e,f,g, $B0J2<>JN,(B ]
1909: qt_normalize(quote(x+y),2);
1910: $B=PNO(B: (y)+(x)
1911: @end example
1912:
1913: @table @t
1914: @item $B;2>H(B
1915: @ref{qt_normalize},
1916: @ref{nqt_comp}
1917: @end table
1918:
1919: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1920: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1921: @noindent
1922: ChangeLog
1923: @itemize @bullet
1924: @item -----$B$^$@=q$$$F$J$$(B.
1925: @end itemize
1926:
1927:
1928: @node qt_set_weight,,, $B<B83E*;EMM$N4X?t(B
1929: @subsection @code{qt_set_weight}
1930: @findex qt_set_weight
1931:
1932: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1933: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1934: @table @t
1935: @item qt_set_weight(@var{WeightVector})
1936: :: $BJQ?t$K$D$$$F(B weight $B%Y%/%H%k$r@_Dj$9$k(B.
1937: @end table
1938:
1939: @table @var
1940: @item return
1941: $B%j%9%H(B
1942: @item WeightVector
1943: $B%j%9%H(B
1944: @end table
1945:
1946: fnode f $B$N(B weight w(f) $B$O<!$N<0$G7W;;$9$k(B.
1947: @example
1948: f $B$,MU$N>l9g$O86B'(B 0. qt_weight_vector $B$G(B weight $B$,M?$($i$l$F$$$kITDj85$K(B
1949: $B$D$$$F$O$=$NCM(B.
1950:
1951: f $B$,(Bnode$B$N>l9g$O<!$N5,B'$G:F5"E*$K$-$a$k(B.
1952: w(f+g) = max(w(f),w(g))
1953: w(f g) = w(f) + w(g)
1954: w(f^n) = n w(f)
1955: $B4X?t$K$D$$$F$O(B? -----$B$^$@=q$$$F$J$$(B.
1956: @end example
1957:
1958: @itemize @bullet
1959: @item @var{WeightVector} $B$G$^$:=g=x$NHf3S$r$7$F(B, $B$=$l$+$i(B qt_set_order $B$K$h$k=g=x(B, $B:G8e$K4{Dj$N=g=x$GHf3S$9$k(B.
1960: @var{WeightVector} $B$K8=$l$J$$JQ?t$K$D$$$F$N(B weight $B$O(B 0 $B$H$J$k(B.
1961: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1962: qt_normalize $B$G$NE83+$G$O(B, $B$3$N=g=x$rMQ$$$F9`$,%=!<%H$5$l$k(B.
1963: @item qt_comp $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1964: @item weight $B%Y%/%H%k$K$h$k=g=xHf3S$K$D$$$F$O%0%l%V%J4pDl$N@a(B@ref{dp_gr_main}$B$b;2>H(B.
1965: @end itemize
1966:
1967: @example
1968: ctrl("print_quote",2);
1969: qt_set_weight([[x,-1],[y,-1]]);
1970: $B7k2L(B: [[x,-1],[y,-1]]
1971: qt_normalize(quote( 1+(x+y)+(x+y)^2),1);
1972: $B7k2L(B: (1)+(y)+(x)+((y)^(2))+((y)*(x))+((x)^(2))+((x)*(y))
1973: @end example
1974:
1975: @table @t
1976: @item $B;2>H(B
1977: @ref{qt_normalize},
1978: @ref{qt_set_ord},
1979: @ref{qt_set_weight},
1980: @ref{dp_gr_main}
1981: @end table
1982:
1983: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1984: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1985: @noindent
1986: ChangeLog
1987: @itemize @bullet
1988: @item
1989: @end itemize
1990:
1991:
1992: @node nqt_comp,,, $B<B83E*;EMM$N4X?t(B
1993: @subsection @code{nqt_comp}
1994: @findex nqt_comp
1995:
1996: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1997: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1998: @table @t
1999: @item nqt_cmp(@var{Expr1},@var{Exprt2})
2000: :: @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B.
2001: @end table
2002:
2003: @table @var
2004: @item return
2005: $B@0?t(B
2006: @item Expr1, Expr2
2007: quote$B7?(B
2008: @end table
2009:
2010: @itemize @bullet
2011: @item @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B.
2012: @item @var{Expr1} > @var{Exprt2} $B$J$i(B 1.
2013: @item @var{Expr1} < @var{Exprt2} $B$J$i(B -1.
2014: @item @var{Expr1} = @var{Exprt2} ($B$*$J$8=g=x(B) $B$J$i(B 0.
2015: @end itemize
2016:
2017: @example
2018: ctrl("print_quote",2);
2019: qt_set_ord([y,x]); qt_set_weight([[x,-1],[y,-1]]);
2020: [nqt_comp(`x,`y), nqt_comp(`y,`x), nqt_comp(`x,`x)];
2021: $B=PNO(B: [-1,1,0]
2022: @end example
2023:
2024: @table @t
2025: @item $B;2>H(B
2026: @ref{qt_normalize},
2027: @ref{qt_set_ord},
2028: @ref{qt_set_weight}
2029: @end table
2030:
2031: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2032: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2033: @noindent
2034: ChangeLog
2035: @itemize @bullet
2036: @item $B$^$@=q$$$F$J$$(B.
2037: @end itemize
2038: @comment ****************************************************************
2039:
2040: @node qt_is_var,,, $B<B83E*;EMM$N4X?t(B
2041: @subsection @code{qt_is_var}, @code{qt_is_coef}
2042: @findex qt_is_var
2043: @findex qt_is_coef
2044:
2045: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2046: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2047: @table @t
2048: @item qt_is_var(@var{Expr})
2049: :: @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B.
2050: @item qt_is_coef(@var{Expr})
2051: :: @var{Expr} $B$,78?t$NM-M}4X?tBN$KB0$9$k$H$-(B 1 $B$rLa$9(B.
2052: @end table
2053:
2054: @table @var
2055: @item return
2056: $B@0?t(B
2057: @item Expr
2058: quote$B7?(B
2059: @end table
2060:
2061: @itemize @bullet
2062: @item @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B.
2063: $B$=$&$G$J$$$H$-(B 0 $B$rLa$9(B.
2064: @end itemize
2065:
2066: @example
2067: [qt_is_var(quote(x)), qt_is_var(quote(3/2))];
2068: $B=PNO(B: [1,0]
2069: @end example
2070:
2071: @table @t
2072: @item $B;2>H(B
2073: @ref{qt_rewrite},
2074: @ref{nqt_match_rewrite}
2075: @end table
2076:
2077: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2078: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2079: @noindent
2080: ChangeLog
2081: @itemize @bullet
2082: @item -----$B$^$@=q$$$F$J$$(B.
2083: @end itemize
2084: @comment ****************************************************************
2085:
2086: @node qt_rewrite,,, $B<B83E*;EMM$N4X?t(B
2087: @subsection @code{qt_rewrite}
2088: @findex qt_rewrite
2089:
2090: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2091: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2092: @table @t
2093: @item qt_rewrite(@var{Expr},@var{Rules},@var{Mode})
2094: :: @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B.
2095: @end table
2096:
2097: @table @var
2098: @item return
2099: quote$B7?(B
2100: @item Expr
2101: quote$B7?(B
2102: @item Rules
2103: $B%j%9%H(B
2104: @item Mode
2105: $B@0?t(B
2106: @end table
2107:
2108: @itemize @bullet
2109: @item $B%f!<%68@8l$rMQ$$$FDj5A$5$l$?4X?t(B.
2110: @code{import("noro_rewrite.rr")} $B$7$F$*$/$3$H(B.
2111: (noro_rewrite.rr $B$,(B OpenXM/lib/asir-contrib $B$KB8:_$7$J$$>l9g(B
2112: $B%=!<%9$N(B OpenXM/src/asir-contrib/testing/noro/new_rewrite.rr $B$r%3%T!<(B)
2113: @item @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B.
2114: @item $B5,B'$NE,MQ$O(B fnode$BLZ$KBP$7$F:F5"E*$G$"$k(B.
2115: $B0lJ}(B @code{nqt_match_rewrite} $B$G$O%H%C%W%l%Y%k$N$_$K5,B'$,E,MQ$5$l$k(B.
2116: @item $B5,B'=89g(B @var{Rules} $B$N3FMWAG$N=q$-J}$O(B @code{nqt_match()} $B$N(B
2117: @var{Pattern} $B$HF1$8=q$-J}(B.
2118: $B$D$^$j(B [$B%Q%?!<%s(B, $B=q$-49$(7k2L(B] $B$^$?$O(B
2119: [$B%Q%?!<%s(B, $B>r7o(B, $B=q$-49$(7k2L(B].
2120: @item @var{Mode} $B$N0UL#$O(B @ref{qt_normalize} $B$N(B @var{Mode} $B$HF1MM(B.
2121: $B%Q%?!<%s%^%C%A(B, $B=q$-49$($O(B @var{Mode} $B$G(B @code{qt_normalize()}
2122: $B$5$l$F$+$i?k9T$5$l$k(B.
2123: @end itemize
2124:
2125: $BCm0U(B: $B?t3XE*$K$O(B X*Y=Y*X $B$,2D49@-$rM?$($k5,B'$@$,(B, $B$3$l$r$=$N$^$^5,B'$H$7$F(B
2126: $BM?$($k$H=q$-49$($,Dd;_$7$J$$(B. $B<!$NNc$G$O(B, $B>e$NNc$N$h$&$K=g=xHf3S$7(B, $B$?$H$($P(B,
2127: $B=g=x$,Bg$-$/$J$k>l9g$N$_$K=q$-49$($k$Y$-$G$"$k(B.
2128: @example
2129: import("noro_rewrite.rr");
2130: R=[[`X*Y,`nqt_comp(Y*X,X*Y)>0, `Y*X]];
2131: qt_rewrite(`(x-y)^2,R,2);
2132: $B=PNO(B: quote(x*x+-2*x*y+y*y)
2133: @end example
2134:
2135: $B30@QBe?t$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B).
2136: @example
2137: import("noro_rewrite.rr");
2138: Rext0=[quote(X*Y),quote(qt_is_var(X) && qt_is_var(Y) && nqt_comp(Y,X)>0),
2139: quote(-Y*X)];
2140: Rext1=[quote(X^N),quote(eval_quote(N)>=2),quote(0)];
2141: Rext2=[quote(X*X),quote(0)];
2142: Rext=[Rext0,Rext1,Rext2];
2143: qt_rewrite(quote( (x+2*y)*(x+4*y) ), Rext,1);
2144: $B=PNO(B: 2*x*y
2145:
2146: qt_set_coef([a,b,c,d]);
2147: qt_rewrite(quote((a*x+b*y)*(c*x+d*y)), Rext,1);
2148: $B=PNO(B: (d*a-c*b)*x*y
2149:
2150: @end example
2151:
2152: $BHyJ,$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B).
2153: @example
2154: import("noro_rewrite.rr");
2155: qt_set_coef([a,b]);
2156: Rd1=[`d(X+Y), `d(X)+d(Y)];
2157: Rd2=[`d(X*Y),`d(X)*Y+X*d(Y)];
2158: Rd3=[`d(N), `qt_is_coef(N), `0];
2159: Rd4=[`d(x),`1];
2160: Rd=[Rd1,Rd2,Rd3,Rd4];
2161: B=qt_rewrite( `d( (a*x+b)^3),Rd,2);
2162: $B=PNO(B: quote(3*a^3*x*x+6*b*a^2*x+3*b^2*a)
2163: fctr(eval_quote(B));
2164: $B=PNO(B: [[3,1],[a,1],[a*x+b,2]]
2165: @end example
2166:
2167: @table @t
2168: @item $B;2>H(B
2169: @ref{nqt_match},
2170: @ref{nqt_match_rewrite},
2171: @ref{qt_normalize}
2172: @end table
2173:
2174: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2175: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2176: @noindent
2177: ChangeLog
2178: @itemize @bullet
2179: @item qt $B7O$N4X?t$N867?$O(B OpenXM/src/asir-contrib/testing/tr.rr $B$G$"$k(B.
2180: $B$3$N%f!<%68@8l$K$h$k3+H/$,(B 2005$BG/$N=U$^$G9T$o$l(B, $B$=$N$"$HAH$_9~$_4X?t<gBN$N(B
2181: qt $B7O$N4X?t$,3+H/$5$l$?(B.
2182: @item qt $B7O$N4X?t$K$D$$$F$N$=$NB>$N;29MJ88%(B:
2183: OpenXM/doc/Papers/2005-rims-noro.tex $B$*$h$S(B
2184: OpenXM/doc/Papers/2005-rims-noro.tm (TeXmacs$B$N5-;v(B).
2185: @item Todo: qt $B7O$N4X?t$rMQ$$$?$*$b$7$m$$7W;;$r(B Risa/Asir $B%8%c!<%J%k$N5-;v$H$7$F=q$/(B.
2186: @end itemize
2187: @comment ****************************************************************
1.13 takayama 2188:
1.24 takayama 2189:
2190: @comment ****************************************************************
2191: @node asirgui.hnd,,, $B<B83E*;EMM$N4X?t(B
2192: @subsection @code{asirgui.hnd}
2193: @findex asirgui.hnd
2194:
2195: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2196: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2197: @table @t
2198: @item asirguid.hnd
2199: :: asirgui $B$N(B main window $B$N%O%s%I%kHV9f$rJ];}$9$k%U%!%$%k(B
2200: @end table
2201:
2202:
2203: @itemize @bullet
2204: @item asirgui (Windows $BHG(B) $B$r5/F0$9$k$H(B asirgui.exe $B$N$"$k%U%)%k%@$*$h$S(B $B4D6-JQ?t(B TEMP $B$,Dj5A$5$l$F$$$l$P$3$N%U%!%$%k$,:n@.$5$l$k(B.
2205: @item $BCf?H$O#1#0?J@0?t$G(B, asirgui $B$N(B main winodw $B$N%O%s%I%k$G$"$k(B. $B$3$N%O%s%I%k$"$F$K(B PostMessage $B$r$9$l$P(B, asuirgui $B$K%-!<%\!<%I$+$iF~NO$7$?$N$HF1MM$J8z2L$,F@$i$l$k(B.
2206: @item text editor $B$G:n@.(B, $BJ]B8$7$?%U%!%$%k$r(B text editor $BB&$+$i(B asirgui $B$KFI$_9~$^$;$?$j$9$k$?$a$KMxMQ2DG=(B.
2207: @end itemize
2208:
2209: @example
2210: // Visual C++ $BMQ$N%F%9%H%W%m%0%i%`(B. $BI8=`F~NO$r(B asirgui $B$XAw$j9~$`(B.
2211: // test.cpp : $B%3%s%=!<%k(B $B%"%W%j%1!<%7%g%sMQ$N%(%s%H%j(B $B%]%$%s%H$NDj5A(B
2212: //
2213:
2214: #include "stdafx.h"
2215: #include "test.h"
2216: #include <windows.h>
2217: #include <stdlib.h>
2218: #include <stdio.h>
2219: #include <fcntl.h>
2220: #include <process.h>
2221:
2222: #ifdef _DEBUG
2223: #define new DEBUG_NEW
2224: #undef THIS_FILE
2225: static char THIS_FILE[] = __FILE__;
2226: #endif
2227:
2228: /////////////////////////////////////////////////////////////////////////////
2229: // $BM#0l$N%"%W%j%1!<%7%g%s(B $B%*%V%8%'%/%H(B
2230:
2231: CWinApp theApp;
2232:
2233: using namespace std;
2234:
2235: int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
2236: {
2237: int nRetCode = 0;
2238:
2239: // MFC $B$N=i4|2=$*$h$S=i4|2=<:GT;~$N%(%i!<$N=PNO(B
2240: if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
2241: {
2242: // TODO: $BI,MW$K1~$8$F%(%i!<(B $B%3!<%I$rJQ99$7$F$/$@$5$$!#(B
2243: cerr << _T("Fatal Error: MFC initialization failed") << endl;
2244: nRetCode = 1;
2245: }
2246: else
2247: {
2248: // TODO: $B$3$N0LCV$K%"%W%j%1!<%7%g%s$NF0:n$r5-=R$7$F$/$@$5$$!#(B
2249: CString strHello;
2250: strHello.LoadString(IDS_HELLO);
2251: cout << (LPCTSTR)strHello << endl;
2252: }
2253: HWND hnd;
2254: FILE *fp = fopen("c:/Program Files/asir/bin/asirgui.hnd","r");
2255: fscanf(fp,"%d",&hnd);
2256: fclose(fp);
2257: while (1) {
2258: int c;
2259: c = getchar();
2260: if ( c == '#' ) break;
2261: PostMessage(hnd,WM_CHAR,c,1);
2262: }
2263: return nRetCode;
2264: }
2265: @end example
2266:
2267: @table @t
2268: @item $B;2>H(B
2269: @ref{xyz_abc}
2270: @end table
2271:
2272: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2273: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2274: @noindent
2275: ChangeLog
2276: @itemize @bullet
2277: @item $B$3$N5!G=$O(B 2006-12-5, 2007-02-13 $B$K2C$($i$l$?(B.
2278: @item @code{OpenXM_contrib2/windows/asir32gui/asir32gui.clw} 1.11
2279: @item @code{OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp} 1.15, 1.1.6
2280: @end itemize
2281: @comment ****************************************************************
2282:
1.25 takayama 2283: @node noro_matrix.rr,,, $B<B83E*;EMM$N4X?t(B
2284: @subsection @code{noro_matrix.rr}
2285: @findex noro_matrix.rr
2286:
2287: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2288: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2289: @table @t
2290: @item linalg.unit_mat(@var{arg1})
2291: @item linalg.random_rmat(@var{arg1}, @var{arg2}, @var{arg3})
2292: @item linalg.minipoly_mat(@var{arg1})
2293: @item linalg.compute_kernel(@var{arg1})
2294: @item linalg.compute_image(@var{arg1})
2295: @item linalg.jordan_canonical_form(@var{arg1})
2296: @end table
2297:
2298:
2299: @itemize @bullet
2300: @item $B4JC1$J2r@b$*$h$S<BNc$O(B http://www.math.kobe-u.ac.jp/HOME/taka/2007/knx/noro_matrix-ja.txt $B$r;2>H(B.
2301: @end itemize
2302:
2303: @example
2304: load("noro_matrix.rr");
2305: A=newmat(4,4,[[2,0,0,0],[3,5,1,0],[-9,-9,-1,0],[-5,0,0,1]]);
2306: B=linalg.jordan_canonical_form(A);
2307: @end example
2308:
2309: @table @t
2310: @item $B;2>H(B
2311: @ref{invmat}
2312: @end table
2313:
2314: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2315: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2316: @noindent
2317: ChangeLog
2318: @itemize @bullet
2319: @item $B$3$N4X?t$O(B 2004-04 $B:"$+$i@~7ABe?t(BIII $B$N9V5A$r$7$J$,$i=q$+$l$?(B.
2320: @item $B%=!<%9(B: OpenXM/src/asir-contrib/packages/src/noro_matrix.rr
2321: @end itemize
2322:
2323:
1.26 ! takayama 2324: @node f_res,,, $B<B83E*;EMM$N4X?t(B
! 2325: @subsection @code{f_res}
! 2326: @findex f_res
1.25 takayama 2327:
2328: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2329: @table @t
1.26 ! takayama 2330: @item f_res
1.25 takayama 2331: @end table
2332:
2333:
2334: @itemize @bullet
1.26 ! takayama 2335: @item f_res $B$O3F<o$N=*7k<0$r7W;;$9$k%b%8%e!<%k$G$"$k(B. ox_grep("f_res"); $B$G(B online manual $B$r1\Mw2DG=$G$"$k(B.
1.25 takayama 2336: @end itemize
2337:
2338: @table @t
2339: @item $B;2>H(B
2340: @ref{}
2341: @end table
2342:
2343: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2344: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2345: @noindent
2346: ChangeLog
2347: @itemize @bullet
2348: @item $B$3$N%b%8%e!<%k$O(B Fujiwara $B7/$N=$;NO@J8$,85$K$J$j(B, $B$=$l$r2~B$$7$?$b$N$G$"$k(B.
1.26 ! takayama 2349: @item OpenXM/src/ox_cdd, OpenXM/src/asir-contrib/packages/src/f_res.rr
1.25 takayama 2350: @end itemize
2351:
2352:
1.23 takayama 2353: @comment ----------- $B0J2<$O8+K\(B. $B>C$9$J(B.
1.19 takayama 2354: @comment ****************************************************************
1.8 takayama 2355: @comment --- $B"~"~"~"~(B $B0J2<B>$N4X?t$K$D$$$F??;w$7$F5-=R$9$k(B. $B"~"~"~"~(B
1.3 takayama 2356: @comment $B?7$7$$4X?t$N@bL@$r=q$/$?$a$N%F%s%W%l!<%H$G$"$k(B. $B>C$9$J(B.
1.4 takayama 2357: @comment --- $B"~"~"~"~(B $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B
2358: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
2359: @node xyz_pqr,,, $B<B83E*;EMM$N4X?t(B
2360: @subsection @code{xyz_pqr}, @code{syz_stu}
2361: @findex xyz_pqr
2362: @findex xyz_stu
2363:
1.3 takayama 2364: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2365: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2366: @table @t
1.1 takayama 2367: @item xyz_pqr(@var{arg1},@var{arg2}[,@var{flag}])
2368: @itemx xyz_stu(@var{arg1},@var{arg2})
2369: :: xyz $B$K4X$9$kA`:n(B.
2370: @end table
2371:
2372: @table @var
2373: @item return
2374: $B@0?t(B
2375: @item arg1, arg2
2376: $B@0?t(B
2377: @item flag
2378: 0 $B$^$?$O(B 1
2379: @end table
2380:
2381: @itemize @bullet
1.3 takayama 2382: @item $B$3$N9`L\$O?7$7$$4X?t$N@bL@$r=q$/$?$a$N%F%s%W%l!<%H$G$"$k(B. $B>C$9$J(B.
1.1 takayama 2383: @item
2384: @code{xyz_pqr()} $B$O(B, @var{arg1}, @var{arg2} $B$r(B pqr $B$9$k(B.
2385: @item
2386: @var{flag} $B$,(B 0 $B$G$J$$$H$-(B, $B%b%8%e%i7W;;$r9T$&(B.
2387: @item
2388: @code{xyz_stu()} $B$O(B stu $B%"%k%4%j%:%`$rMQ$$$k(B.
2389: @end itemize
2390:
2391: @example
2392: [219] xyz_pqr(1,2);
2393: 3
2394: [220] xyz_pqr(1,2,1);
2395: 3
2396: 0
2397: [221] xyz_stu(1,2);
2398: 3
2399: @end example
2400:
2401: @table @t
2402: @item $B;2>H(B
2403: @ref{xyz_abc}
2404: @end table
2405:
1.3 takayama 2406: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2407: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.1 takayama 2408: @noindent
2409: ChangeLog
2410: @itemize @bullet
2411: @item $B$3$N4X?t$O(B 2004-3-1 $B$+$i(B 2004-3-14 $B$K$+$1$F(B $B%"%k%4%j%:%`(B xyz ($BO@J8(B
2412: http://www.afo.org/xyz.pdf ) $B$rMQ$$$F=q$-D>$5$l$?(B.
2413: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B xxxyy.rr, ppp.c $B$G$"$k(B.
2414: @item $B$3$N4X?t$O(B 2000 $B:"$K$O$8$a$F$N%P!<%8%g%s$,=q$+$l$?(B. $B%=!<%9$O(B ppp.c $B$G$"$k(B.
2415: @end itemize
2416:
2417: @comment --- $B$*$^$8$J$$(B ---
2418: @node Index,,, Top
2419: @unnumbered Index
2420: @printindex fn
2421: @printindex cp
2422: @iftex
2423: @vfill @eject
2424: @end iftex
2425: @summarycontents
2426: @contents
2427: @bye
2428: @comment --- $B$*$^$8$J$$=*$j(B ---
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>