Annotation of OpenXM/src/kan96xx/Doc/ox.sm1, Revision 1.43
1.43 ! takayama 1: %%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.42 2004/09/10 13:20:22 takayama Exp $
1.18 takayama 2:
1.23 takayama 3: /ox.sm1.myname (ox-new.sm1) def
1.1 maekawa 4:
1.23 takayama 5: [(ostype)] extension 0 get (unix) eq {
6: /oxstart100
7: [[(getenv) (OpenXM_HOME)] extension (/bin/ox100start )] cat
8: def
9: } {
10: /oxstart100
11: [[(getenv) (OpenXM_HOME)] extension
12: (/bin/ox100start.exe )] cat
13: def
14: } ifelse
15: [(getenv) (OXSTART100)] extension tag 0 eq not {
16: /oxstart100 [(getenv) (OXSTART100)] extension def
17: } { } ifelse
1.34 takayama 18: oxstart100 message-quiet
1.1 maekawa 19:
1.23 takayama 20: /ox.sm1.loaded 1 def
21: /oxasir.sm1.loaded 1 def
22: /ox.k0.loaded 1 def
23: /Ox103_loaded 1 def
1.1 maekawa 24:
25: /ox.verbose 0 def
1.23 takayama 26: /ox.version (3.030000) def
1.1 maekawa 27: ox.version [(Version)] system_variable gt
28: { (This package requires the latest version of kan/sm1) message
29: (Please get it from http://www.math.kobe-u.ac.jp/KAN) message
30: error
31: } { } ifelse
1.23 takayama 32: (ox.sm1, ---OpenXM protocol module 07/20, 2003 (C) N.Takayama.) message-quiet
33: ( for ox_sm1, ox_asir, ox_k0 ) message-quiet
1.1 maekawa 34:
35: /ox.ccc load isArray
36: { }
37: { /ox.ccc [ ] def } ifelse
1.23 takayama 38: /oxsm1.ccc load isArray
39: { }
40: { /oxsm1.ccc [ ] def } ifelse
41: /ox.takelog 0 def
1.1 maekawa 42:
1.23 takayama 43: (@@@.Xm_noX) boundp {
44: }{
45: /@@@.Xm_noX 0 def
46: } ifelse
47: (Xm_noX) boundp {
48: /@@@.Xm_noX Xm_noX def
49: }{ } ifelse
50: /Xm_noX @@@.Xm_noX def
1.1 maekawa 51:
1.23 takayama 52: /oxNoX {
53: /Xm_noX 1 def
54: } def
1.1 maekawa 55:
56:
1.23 takayama 57: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58: %%% basic functions for OX-RFC 100
59: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1.1 maekawa 60: /SM_executeStringByLocalParser 268 def
61: /SM_execute 268 def
62: /SM_popString 263 def
63: /SM_mathcap 264 def
64:
65: /SM_popCMO 262 def
66: /SM_executeFunction 269 def
1.11 takayama 67: /SM_DUMMY_sendcmo 2147418112 1 add def %%% SM_PRIVATE+1
1.1 maekawa 68: /SM_sync_ball 281 def
69:
70: /SM_pops 265 def
71: /SM_setName 266 def
72: /SM_evalName 267 def
73:
74: /SM_setMathCap 273 def
75:
76: /SM_getsp 275 def
77: /SM_dupErrors 276 def
78:
1.36 takayama 79: /SM_pushCMOtag 277 def
1.39 takayama 80: /SM_executeFunctionWithOptionalArgument 282 def
1.36 takayama 81:
1.1 maekawa 82: /SM_control_kill 1024 def
83: /SM_control_reset_connection 1030 def
1.15 takayama 84: /SM_control_spawn_server 1027 def
1.1 maekawa 85:
86: /Etag_error 257 def
87:
88: [(ox)
89: [
90: (client aa oxpushcmo (oxsendcmo), client oxpopcmo dd, client popstring dd, client ss oxrpc)
1.23 takayama 91: (Example: oxsm1.ccc [1 2 3] oxpushcmo oxsm1.ccc oxpopcmo /ff set ff :: )
1.1 maekawa 92: ( )
93: (client ss oxexecutestring(oxsubmit) <<executeString>>, client ss oxexec <<executeFunction>>)
1.39 takayama 94: (client ss oxexecWithOpt )
1.1 maekawa 95:
1.23 takayama 96: (Example: oxsm1.ccc (0 1 10 { pop $Hello$ message } for) oxexecutestring )
97: (Example: oxsm1.ccc (2).. oxpushcmo oxsm1.ccc (10).. oxpushcmo )
98: ( oxsm1.ccc (power) oxexec oxsm1.ccc oxpopcmo :: )
1.1 maekawa 99: ( )
100: (client str oxevalname, client str oxsetname, client num oxpops, client oxget)
101: ( )
102: (client oxmathcap, client oxsetmathcap, oxgenportfile, oxremoveportfile)
1.36 takayama 103: (client oxpushcmotag)
1.1 maekawa 104: ( )
105: (client oxgetsp --- get stack pointer, client oxgeterrors --- get all errors)
106: (cleint oxisData, client oxreset, client oxshutdown)
1.27 takayama 107: (oxhelp for this message)
108: ([(oxWatch) client] extension to start a log.)
109: $ ex 1. (ox.sm1) run sm1connectr [(oxWatch) oxsm1.ccc] extension $
110: $ oxsm1.ccc ( [(cmoLispLike) 0] extension ) oxsubmit $
111: $ oxsm1.ccc ( [(cmoLispLike) 1] extension ) oxsubmit $
1.1 maekawa 112: ([(oxSerial)] extension serial-number-of-out-going-ox-packet.)
1.23 takayama 113: (oxpopcmo1, oxpopcmo2, sm1connectr ox_launch, ox_launch_nox)
1.1 maekawa 114: (oxNoX : set an environment to invoke oxlog without xterm and to call oxlog with >& /dev/null)
115: $ ex 1. (ox.sm1) run oxNoX sm1connectr $
1.23 takayama 116: $ ex 2. (ox.sm1) run oxNoX (x^2-1). fctr pmat ; $
1.27 takayama 117: $ $
118: $cf. extension-oxLog $
1.1 maekawa 119: ]
120: ] putUsages
1.27 takayama 121:
122: [(extension-oxLog)
123: [
124: $Take the log of communication in files.$
125: $[(oxLog) client logfile_for_incomming_data logfile_for_outgoing_data] extension $
126: $Example:$
127: $ [(parse) (ox.sm1) pushfile] extension$
128: $ sm1connectr$
129: $ (i.t) (w) file /ii set$
130: $ (o.t) (w) file /oo set$
131: $ [(oxLog) oxsm1.ccc ii oo] extension $
132: $ [(oxWatch) oxsm1.ccc ] extension$
133: $ oxsm1.ccc 1 oxpushcmo ;$
134: $ oxsm1.ccc oxpopcmo ;$
135: $ [(oxLogStop) oxsm1.ccc] extension$
136: ]] putUsages
1.1 maekawa 137:
1.23 takayama 138: /oxconnect {
139: /arg1 set
140: [(oxCreateClient) arg1 aload pop] extension
1.1 maekawa 141: } def
142:
143: ox.verbose { oxhelp } { } ifelse
144:
145: /oxpushcmo { oxsendcmo } def
146: /oxsendcmo {
147: /arg1 set
148: /arg2 set
149: ox.takelog { ox.log [(oxSerial)] extension ox.mod arg1 put
150: } { } ifelse
151: [(oxReq) arg2 SM_DUMMY_sendcmo arg1] extension pop
1.36 takayama 152: } def
153:
154: /oxpushcmotag {
155: /arg2 set
156: [(oxReq) arg2 SM_pushCMOtag ] extension pop
1.1 maekawa 157: } def
158:
159: /oxpopcmo {
160: /arg1 set
161: [(oxReq) arg1 SM_popCMO ] extension pop
162: [(oxGet) arg1] extension
163: } def
164:
165: /oxgetsp {
166: /arg1 set
167: [(oxReq) arg1 SM_getsp ] extension pop
168: [(oxReq) arg1 SM_popCMO ] extension pop
169: [(oxGet) arg1] extension
170: } def
171:
172: /oxgeterrors {
173: /arg1 set
174: [(oxReq) arg1 SM_dupErrors ] extension pop
175: [(oxReq) arg1 SM_popCMO ] extension pop
176: [(oxGet) arg1] extension
177: } def
178:
179: /oxmathcap0 {
180: /arg1 set
181: [(oxReq) arg1 SM_mathcap ] extension pop
182: } def
183: /oxmathcap {
184: /arg1 set
185: [/in-oxmathcap /mypeer /mmm] pushVariables
186: [ /mypeer arg1 def
187: mypeer oxmathcap0
188: mypeer oxpopcmo /mmm set
189: mypeer 10 mmm put %% set math cap.
190: ] pop
191: popVariables
192: } def
193: /oxsetmathcap {
194: /arg1 set
195: [/in-oxsetmathcap /mypeer /mymathcap] pushVariables
196: [
197: /mypeer arg1 def
198: /mymathcap [(cmoMathCap)] extension (array) dc def
199: [(oxReq)
200: mypeer SM_setMathCap
201: mymathcap
202: ] extension pop
203: ] pop
204: popVariables
205: } def
1.23 takayama 206:
1.1 maekawa 207: /oxpopcmo1 { %% ask of the transmission.
208: /arg1 set
209: [(oxReq) arg1 SM_popCMO ] extension pop
210: } def
211: /oxpopcmo2 { %% wait the data.
212: /arg1 set
213: [(oxGet) arg1] extension
214: } def
215:
216:
217: /oxpopstring {
218: /arg1 set
219: [(oxReq) arg1 SM_popString ] extension pop
220: [(oxGet) arg1] extension
221: } def
222:
223: /oxrpc {
224: /arg1 set
225: /arg2 set
226: [/ans /ff] pushVariables
227: [
228: /ff arg2 def
229: ox.takelog { ox.log [(oxSerial)] extension ox.mod arg1 put
230: ox.log [(oxSerial)] extension 1 add ox.mod (executeString) put
231: } { } ifelse
232: [(oxReq) ff SM_execute arg1] extension pop
233: [(oxReq) ff SM_popCMO] extension pop
234: [(oxGet) ff] extension /ans set
235: ans etag Etag_error eq {
236: (Got an error object.) message
237: /arg1 ans def
238: }
239: { /arg1 ans def
240: } ifelse
241: ] pop
242: popVariables
243: arg1
244: } def
245:
246: /oxexecutestring { oxsubmit } def
247: /oxsubmit {
248: /arg1 set
249: /arg2 set
250: ox.takelog { ox.log [(oxSerial)] extension ox.mod arg1 put
251: ox.log [(oxSerial)] extension 1 add ox.mod (executeString) put
252: } { } ifelse
253: [(oxReq) arg2 SM_execute arg1] extension pop
254: } def
255:
256: /oxexec {
257: /arg1 set
258: /arg2 set
259: ox.takelog { ox.log [(oxSerial)] extension ox.mod arg1 put
260: ox.log [(oxSerial)] extension 1 add ox.mod (executeFunction) put
261: } { } ifelse
262: [(oxReq) arg2 SM_executeFunction arg1] extension pop
263: } def
1.39 takayama 264: /oxexecWithOpt {
265: /arg1 set
266: /arg2 set
267: ox.takelog { ox.log [(oxSerial)] extension ox.mod arg1 put
268: ox.log [(oxSerial)] extension 1 add ox.mod
269: (executeFunctionWithOptionalArgument) put
270: } { } ifelse
271: [(oxReq) arg2 SM_executeFunctionWithOptionalArgument arg1] extension pop
272: } def
273: [(oxexecWithOpt)
274: [
275: $Example: $
276: $oxsm1.ccc (/foo { message message message } def) oxsubmit ;$
277: $oxsm1.ccc (hello) oxpushcmo oxsm1.ccc 1 oxpushcmo oxsm1.ccc [[(opt) 0]] oxpushcmo ;$
278: $oxsm1.ccc (foo) oxexecWithOpt $
279: ]
280: ] putUsages
1.1 maekawa 281: /oxsubmit2 {
282: oxexec
283: } def
284:
285: /oxpops {
286: /arg1 set
287: /arg2 set
288: [(oxReq) arg2 SM_pops arg1] extension pop
289: } def
290:
291: /oxsetname {
292: /arg1 set
293: /arg2 set
294: [(oxReq) arg2 SM_setName arg1] extension pop
295: } def
296:
297: /oxevalname {
298: /arg1 set
299: /arg2 set
300: [(oxReq) arg2 SM_evalName arg1] extension pop
301: } def
302:
303:
304: /oxreset {
305: /arg1 set
306: [(oxReq) arg1 SM_control_reset_connection] extension pop
1.13 takayama 307: %% [(oxGetFromControl) arg1 ] extension pop
1.1 maekawa 308: [(oxGet) arg1] extension message
309: } def
310:
311: /oxisData {
312: /arg1 set
313: [/pp /ff] pushVariables
314: [
315: /ff arg1 def
316: [(oxMultiSelect) [ff] 10] extension /pp set
317: pp message
318: pp 0 get 1 eq {
319: pp 1 get 0 get 1 eq { %% data is in the data stream.
320: /arg1 [(oxGet) ff] extension def
321: } {/arg1 (no data) def } ifelse
322: }
323: { /arg1 (no data) def }
324: ifelse
325: ] pop
326: popVariables
327: arg1
328: } def
329:
330: /oxget {
331: oxisData
332: } def
333:
334:
335: /oxshutdown {
336: /arg1 set
337: [(fp2fclose) arg1 1 get] extension
338: [(oxReq) arg1 SM_control_kill] extension
339: arg1 0 (closed) put
340: } def
341:
342: /oxgenportfile {
343: [(oxGenPortFile)] extension
344: }def
345: /oxremoveportfile {
346: [(oxRemovePortFile)] extension
347: }def
348:
349: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1.4 takayama 350: /ox_launch_nox {
351: /@@@.ox_launch_nox 1 def
352: ox_launch_aux
353: } def
354: /ox_launch {
355: /@@@.ox_launch_nox 0 def
356: ox_launch_aux
357: } def
358:
359: /ox_launch_aux {
360: /arg1 set
361: [/in-launch_nox /pass /peer /data /control /name /machine
362: /your-peer /comm /remoteOpenXMbin /remoteServer /myhost
1.10 takayama 363: /argNumber /aaa
1.4 takayama 364: ] pushVariables
365: [
1.10 takayama 366: /aaa arg1 def
367: /argNumber aaa length def
368: /machine aaa 0 get def
369: machine (localhost) eq argNumber 5 lt and {
370: aaa 1 get ox_launch_localhost /your-peer set
371: /LLL.end goto
372: } {
373: /remoteOpenXMbin aaa 1 get def
374: /remoteServer aaa 2 get def
375: /name aaa 3 get def
376: /myhost aaa 4 get def
377: } ifelse
1.4 takayama 378:
1.43 ! takayama 379: /pass ox_encrypt_104_genPass def
1.4 takayama 380: /peer [(oxGetPort) myhost] extension def
381: /data peer 1 get toString def
382: /control peer 3 get toString def
383: peer message
384: [(ssh -f ) machine ( -l ) name ( ")
385:
386: @@@.ox_launch_nox {
387: } {
388: remoteOpenXMbin(/oxlog )
389: ( /usr/X11R6/bin/xterm -icon -e )
390: } ifelse
391:
392: ( ) remoteOpenXMbin (/ox )
393: ( -reverse -ox ) remoteServer
394: ( -host ) myhost
1.43 ! takayama 395: ( -data ) data ( -control ) control pass [1 2] get
1.4 takayama 396: oxpath.null
397: ( ")
398: ] cat /comm set
399: (Executing the command : ) messagen comm message message
400: comm system
1.5 takayama 401: (sleep 5) system-csh
1.43 ! takayama 402: [(oxCreateClient2) peer 1 pass 0 get] extension /your-peer set
1.10 takayama 403: /LLL.end
1.4 takayama 404: /arg1 your-peer def
405: ] pop
406: popVariables
407: arg1
408: } def
409:
410: [(ox_launch)
411: [( [remote remote-OpenXM-bin remote-ox-server remote-login-name myhostname] )
412: ( ox_launch client )
1.10 takayama 413: $or $
414: $ [(localhost) ox-server-name] ox_launch client$
1.4 takayama 415: (Example 1: )
416: $ [(tau.math.kobe-u.ac.jp) (/home/taka/OpenXM/bin) $
417: $ (/home/taka/OpenXM/src/ox_math/ox_math) (taka) (dc4.math.kobe-u.ac.jp) $
418: $ ] ox_launch /@@@.oxmath set $
419: ]] putUsages
420:
421: [(ox_launch_nox)
422: [( [remote remote-OpenXM-bin remote-ox-server remote-login-name myhostname] )
423: ( ox_launch_nox client )
424: (Example 1: )
425: $ [(tau.math.kobe-u.ac.jp) (/home/taka/OpenXM/bin) $
426: $ (/home/taka/OpenXM/src/ox_math/ox_math) (taka) (dc4.math.kobe-u.ac.jp) $
427: $ ] ox_launch_nox /@@@.oxmath set $
428: ]] putUsages
429:
1.10 takayama 430: /ox_launch_localhost {
431: /arg1 set
432: [/in-ox_launch_localhost /pass /peer /data /control /oxserver
433: /my-peer] pushVariables
434: [
435: /oxserver arg1 def
1.43 ! takayama 436: /pass ox_encrypt_104_genPass def
1.10 takayama 437: /peer [(oxGetPort) (localhost)] extension def
438: /data peer 1 get toString def
439: /control peer 3 get toString def
440: peer message
441: [oxpath.oxlog.xterm oxpath.ox ( -reverse -ox ) oxserver
1.43 ! takayama 442: ( -data ) data ( -control ) control pass [1 2] get
1.10 takayama 443: oxpath.null
444: ( &)] cat system-csh
1.43 ! takayama 445: [(oxCreateClient2) peer 0 pass 0 get] extension /my-peer set
1.10 takayama 446: %% 0 means connect from only localhost.
447: /arg1 my-peer def
448: ] pop
449: popVariables
450: arg1
1.5 takayama 451: } def
1.1 maekawa 452:
1.23 takayama 453: /oxrpc2 {
454: /arg2 set
455: /arg1 set
456: [/in-oxrpc2 /pid /n /comm /i] pushVariables
1.12 takayama 457: [
1.23 takayama 458: /pid arg1 def
459: /comm arg2 def
460: /n comm length def
461: n 1 sub -1 1 {
462: /i set
463: pid comm i get oxsendcmo
464: } for
465: pid n 1 sub oxsendcmo
466: pid comm 0 get oxexec
467: ] pop
468: popVariables
469: } def
470:
471: [(oxrpc2)
472: [(Remote procedure call by using oxexec)
473: (client [function-name arg1 arg2 ...] oxrpc2 )
474: (cf. ox-cmo-rpc in Risa/Asir)
475: (Example: )
476: $ (oxasir.sm1) run (x^2-1). fctr $
477: (oxasir.ccc [(igcd) (6).. (10)..] oxrpc2)
478: (oxasir.ccc oxpopcmo :: )
479: ]
480: ] putUsages
481:
482: /oxIsServerReady {
483: /arg1 set
484: [/in-isServerReady /sdata /ans] pushVariables
485: [
486: /sdata arg1 def
487: /ans 0 def
488: sdata isArray {
489: sdata length 1 gt {
490: sdata 0 get (client) eq { /ans 1 def } { } ifelse
491: } { } ifelse
492: } { } ifelse
493: /arg1 ans def
494: ] pop
495: popVariables
496: arg1
497: } def
498:
499: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
500: %%% Functions to start server by OX-RFC-101
501: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
502: /sm1StartControl101 {
503: [/in-sm1connectr /pass /peer /data /control ] pushVariables
504: [
1.43 ! takayama 505: /pass ox_encrypt_104_genPass def
1.23 takayama 506: /peer [(oxGetPort1) (localhost)] extension def
507: /data peer 1 get toString def
508: peer message
509: [(/home/nobuki/OpenXM/src/oxc/oxc)
510: ( -c ) pass ( -h ) (localhost) ( -p ) data ( -x )
511: oxpath.null
512: ( &)] cat system-csh
513:
514: [(oxCreateControl_RFC_101) peer 0 pass] extension /oxsm1.ccc set
515: %% 0 means connect from only localhost.
516: /ox.ccc oxsm1.ccc def
1.34 takayama 517: (The server is binded to the variable oxsm1.ccc) message-quiet
1.23 takayama 518: oxsm1.ccc
1.12 takayama 519: ] pop
520: popVariables
1.14 takayama 521: } def
522:
523: /sm1StartEngine101 {
1.15 takayama 524: [/in-sm1StartEngine101 /peer /data /control /engineID] pushVariables
1.14 takayama 525: [
526: /peer [(oxGetPort1) (localhost)] extension def
527: /data peer 1 get def
1.15 takayama 528:
1.23 takayama 529: oxsm1.ccc data oxpushcmo
530: oxsm1.ccc (/home/nobuki/OpenXM/bin/ox_sm1) oxpushcmo
531: [(oxPushCMD) oxsm1.ccc SM_control_spawn_server] extension
532: oxsm1.ccc oxpopcmo /engineID set
1.15 takayama 533: [(oxCreateEngine_RFC_101) peer 0 (Empty) engineID] extension
534: /ox.ddd set
1.34 takayama 535: (The engine is binded to the variables ox.ddd) message-quiet
1.14 takayama 536: ] pop
537: popVariables
538: arg1
1.12 takayama 539: } def
1.16 takayama 540:
1.23 takayama 541: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
542: %%% Functions for OX-RFC 103
543: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1.24 takayama 544: [(chattr) 0 /ctrlC-hook] extension
1.23 takayama 545: /ctrlC-hook {
546: ox103_reset
547: } def
548: /ox103_disable {
1.24 takayama 549: [(chattr) 0 /ctrlC-hook] extension
1.23 takayama 550: /ctrlC-hook { } def
551: } def
552:
553: [(ox103_reset)
554: [(ox103_reset broadcasts the OX reset to all processes)
555: (cf. ctrlC-hook, register_hander)
556: ]] putUsages
557: /ox103_reset {
558: [/in-ox103_reset /L /n /i] pushVariables
559: [
560: /L [(oxGetClientList)] extension def
561: (In ox103_reset...) message
1.28 takayama 562: (killall in oxshell...) message [(killall)] oxshell pop
1.23 takayama 563: /n L length def
564: 0 1 n 1 sub {
565: /i set
566: L i get oxreset
567: } for
568: (Done) message
569: ] pop
570: popVariables
571: } def
572:
573: %%%%%%%
574: /ox103_asir_init {
575: /arg1 set
576: [/ttt] pushVariables
577: [
578: /ttt arg1 def
579: %% ttt oxsetmathcap ttt oxmathcap %% It is done in asir.init
580: %% Do nothing special for now.
581: ] pop
582: popVariables
583: } def
584: /ox103_sm1_init {
585: /arg1 set
586: [/ttt] pushVariables
587: [
588: /ttt arg1 def
589: ttt oxsetmathcap
590: ttt oxmathcap
591: ttt ([(parse) (oxrfc103.sm1) pushfile] extension ) oxsubmit
592: ] pop
593: popVariables
594: } def
595: %%%
596:
597: /Xm_rfc103_shared [ ] def
598:
599: [(ox103_set_shared_variable)
600: [(value name 2 ox103_set_shared_variable)
601: (It broadcasts the <<value>> of a shared variable <<name>>)
602: (to all processes.)
603: (cf. Xm_rfc103_shared, )
604: $Example: (2).. (hoge) 2 ox103_set_shared_variable$
605: ]] putUsages
606: /ox103_set_shared_variable {
607: /arg0 set %% Dummy to be called by rpc2. Number of args
608: /arg1 set %% Name
609: /arg2 set %% Value, [Name Value] not [Value Name]
610: [/in-ox103_set_shared_variable /Name /Value
611: /Found /N /i /L
612: ] pushVariables
613: [
614: /Name arg1 def
615: /Value arg2 def
616: Value message
617: /Found 0 def
618: /N Xm_rfc103_shared length def
619: 0 1 N 1 sub {
620: /i set
621: Xm_rfc103_shared i get 0 get
622: Name eq {
623: Xm_rfc103_shared i [Name Value] put
624: /Found 1 def
625: exit
626: } { } ifelse
627: } for
628: Found 1 eq { }
629: {
630: Xm_rfc103_shared [Name Value] append
631: /Xm_rfc103_shared set
632: } ifelse
633: /L [(oxGetClientList)] extension def
634: 0 1 L length 1 sub {
635: /i set
636: L i get [(ox103_set_shared_variable) Name Value] oxrpc2
637: } for
638:
639: (ox103_set_shared_variable: Xm_rfc103_shared=) message
640: Xm_rfc103_shared message
641: %% [(parse) [(/) Name ( ) Value toString ( def )] cat] extension
642: %% Add $ $ when Value is a string.
643:
644: /arg1 [Name Value] def
645: ] pop
646: popVariables
647: arg1
648: } def
649:
650: /ox103_test {
651: (x^2-1). fctr
652: oxasir.ccc ( sm1_start(); ) oxexecutestring
653: sm1connectr
654: } def
655:
656: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
657: %%%%%%%% Starting ox_sm1.
658: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
659: /sm1connectr {
660: [/in-sm1connectr /pass /peer /data /control ] pushVariables
661: [
1.25 takayama 662: [(getServerEnv) (bin/ox_sm1)] extension tag 0 eq {
663: (Server bin/ox_sm1 is not found.) error
664: }{ } ifelse
1.43 ! takayama 665: /pass ox_encrypt_104_genPass def
1.23 takayama 666: /peer [(oxGetPort) (localhost)] extension def
667: /data peer 1 get toString def
668: /control peer 3 get toString def
1.35 takayama 669: peer message-quiet
1.23 takayama 670: [
671: oxstart100
1.34 takayama 672: @@@.quiet { ( -quiet ) } { } ifelse
1.23 takayama 673: Xm_noX { ( -nox ) } { } ifelse
674: ( -oxserver bin/ox_sm1 -e ) ( -reverse )
1.43 ! takayama 675: ( -data ) data ( -control ) control pass [1 2] get
1.23 takayama 676: ( )] cat execve
1.43 ! takayama 677: [(oxCreateClient2) peer 0 pass 0 get] extension /oxsm1.ccc set
1.23 takayama 678: %% 0 means connect from only localhost.
1.34 takayama 679: (The server is binded to the variable oxsm1.ccc) message-quiet
1.23 takayama 680: /ox.ccc oxsm1.ccc def
681: oxsm1.ccc.init
682: oxsm1.ccc
683: ] pop
684: popVariables
685: } def
686:
687: /oxsm1.ccc.init {
688: oxsm1.ccc ( [(oxPrintMessage) 0] extension pop ) oxsubmit
689: Xm_noX { oxsm1.ccc ( /@@@.Xm_noX 1 def ) oxsubmit }
690: { oxsm1.ccc ( /@@@.Xm_noX 0 def ) oxsubmit } ifelse
691: (Ox103_loaded) boundp
692: { oxsm1.ccc ox103_sm1_init }
693: { } ifelse
694: } def
695:
696: /sm1connectr-ssh {
697: %% It has not yet implemented.
698: /arg1 set
699: [/in-sm1connectr /pass /peer /data /control /name /machine
700: /your-peer /comm
701: ] pushVariables
702: [
703: /machine arg1 0 get def
704: /name arg1 1 get def
705:
1.43 ! takayama 706: /pass ox_encrypt_104_genPass def
1.23 takayama 707: /peer [(oxGetPort) myhostname-ssh] extension def
708: /data peer 1 get toString def
709: /control peer 3 get toString def
1.35 takayama 710: peer message-quiet
1.23 takayama 711: [(ssh -f ) machine ( -l ) name ( ")
712: oxpath.oxlog.xterm-ssh oxpath.ox-ssh ( -reverse -ox ) oxpath.oxsm1-ssh
713: ( -host ) myhostname-ssh
1.43 ! takayama 714: ( -data ) data ( -control ) control pass [1 2] get
1.23 takayama 715: oxpath.null
716: ( ")
717: ] cat /comm set
718: (Executing the command : ) messagen comm message message
719: comm system
720: (sleep 5) system-csh
1.43 ! takayama 721: [(oxCreateClient2) peer 1 pass 0 get] extension /your-peer set
1.23 takayama 722: /arg1 your-peer def
723: ] pop
724: popVariables
725: arg1
726: } def
727: [(sm1connectr-ssh)
728: [([hostname login-name] sm1connectr-ssh client)
729: (Starting oxpath.oxsm1-ssh by the launcher oxpath.ox-ssh on the "hostname".)
730: (cf. oxNoX )
731: (Set the following varialbes to appropriate values:)
732: (oxpath.oxlog.xterm-ssh oxpath.oxsm1-ssh oxpath.ox-ssh myhostname-ssh )
733: $Example 1: $
734: $ *** Path names on the remote machine dc1.math.kobe-u.ac.jp $
735: $ /oxpath.oxlog.xterm-ssh (/home/taka/OpenXM/bin/oxlog /usr/X11R6/bin/xterm -icon -e ) def $
736: $ /oxpath.oxsm1-ssh (/home/taka/OpenXM/bin/ox_sm1) def $
737: $ /oxpath.ox-ssh (/home/taka/OpenXM/bin/ox) def $
738: $ *** The machine name on which you are running sm1. $
739: $ /myhostname-ssh (yama.math.kobe-u.ac.jp) def $
740: $ [(dc1.math.kobe-u.ac.jp) (taka)] sm1connectr-ssh /ox.ccc set $
741: $Example 2: $
742: $ *** Path names on the remote machine dc2.math.kobe-u.ac.jp $
743: $ *** We will not use X11 debug windows. $
744: $ oxNoX $
745: $ /oxpath.oxlog.xterm-ssh (/home/taka/OpenXM/bin/oxlog ) def $
746: $ /oxpath.oxsm1-ssh (/home/taka/OpenXM/bin/ox_sm1) def $
747: $ /oxpath.ox-ssh (/home/taka/OpenXM/bin/ox) def $
748: $ *** the machine name on which you are running sm1. $
749: $ /myhostname-ssh (dc1.math.kobe-u.ac.jp) def $
750: $ [(dc2.math.kobe-u.ac.jp) (taka)] sm1connectr-ssh /ox.ccc set $
751: ]] putUsages
1.26 takayama 752:
753: %%% ntl
754: /ntlconnectr {
755: [/in-ntlconnectr /pass /peer /data /control ] pushVariables
756: [
757: [(getServerEnv) (bin/ox_ntl)] extension tag 0 eq {
758: (Server bin/ox_ntl is not found.) error
759: }{ } ifelse
1.43 ! takayama 760: /pass ox_encrypt_104_genPass def
1.26 takayama 761: /peer [(oxGetPort) (localhost)] extension def
762: /data peer 1 get toString def
763: /control peer 3 get toString def
1.35 takayama 764: peer message-quiet
1.26 takayama 765: [
766: oxstart100
767: Xm_noX { ( -nox ) } { } ifelse
768: ( -oxserver bin/ox_ntl -e ) ( -reverse )
1.43 ! takayama 769: ( -data ) data ( -control ) control pass [1 2] get
1.26 takayama 770: ( )] cat execve
1.43 ! takayama 771: [(oxCreateClient2) peer 0 pass 0 get] extension /oxntl.ccc set
1.26 takayama 772: %% 0 means connect from only localhost.
1.34 takayama 773: (The server is binded to the variable oxntl.ccc) message-quiet
1.26 takayama 774: % oxntl.ccc.init
775: oxntl.ccc
776: ] pop
777: popVariables
778: } def
1.23 takayama 779:
780: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
781: %%% Aux functions for ox_asir
782: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
783: /ox_asirConnectMethod { asirconnectr /oxasir.ccc set } def
784: /oxasir.loadmethod 1 def %% "..." oxsendcmo (load) ox...
785: /oxasir.verbose 0 def
786: /oxasir.ccc load isArray
787: { }
788: { /oxasir.ccc [ ] def } ifelse
789: /loadAsirFile {
790: /arg1 set
791: [/in-loadAsirFile /peer /fname] pushVariables
792: [
793: /peer arg1 0 get def
794: /fname arg1 1 get def
795: oxasir.loadmethod {
796: peer fname oxsendcmo peer 1 oxsendcmo
797: peer (load) oxexec
1.16 takayama 798: }{
1.23 takayama 799: peer [$load("$ fname $");$] cat oxsubmit
1.16 takayama 800: }ifelse
1.23 takayama 801: ] pop
802: popVariables
803: } def
804: [(loadAsirFile)
805: [$[client fname] loadAsirFile (ox_asir function)$
806: $Load a file into the client$
807: ]] putUsages
808:
809: /set_oxasir.rr_path {
810: [(ostype)] extension 0 get (windows) eq {
811: [(getenv) (OSTYPE)] extension tag 0 eq {
812: /oxasir.rr.name (oxasir-win.rr) def
813: }{
814: [(getenv) (OSTYPE)] extension (cygwin) eq {
815: /oxasir.rr.name (oxasir.asir) def
816: }{
817: /oxasir.rr.name (oxasir-win.rr) def
818: } ifelse
819: } ifelse
820: }{
821: /oxasir.rr.name (oxasir.asir) def
822: } ifelse
823: } def
824: set_oxasir.rr_path
825: /oxasirpath.asirlib [[(getenv) (OpenXM_HOME)] extension
826: (/lib/sm1/) oxasir.rr.name] cat def
827: oxasir.verbose {
828: oxasirpath.asirlib message
829: } { } ifelse
830:
831: %% Note. oxasir.asir is under OpenXM/src/kan96xx/lib/
832: %% oxasir-win.asir is generated under OpenXM/misc/packages/Windows
833: %% They are installed under $OpenXM_HOME/lib/sm1
834: %% Todo: ox_asir has to understand /cygdrive/c/... on windows-native.
835: %% Since ox_asir is generated by cygwin, it will be OK.
836: /asir.init {
837: %% gr and primdec are loaded by .asirrc
838: /asir.init.peer set
839: [(ostype)] extension 0 get (windows) eq {
840: [(getenv) (OSTYPE)] extension tag 0 eq {
841: [asir.init.peer (oxasir-win.rr)] oxasirParseFile
842: }{
843: [(getenv) (OSTYPE)] extension (cygwin) eq {
844: [asir.init.peer oxasirpath.asirlib] loadAsirFile
845: }{
846: [asir.init.peer (oxasir-win.rr)] oxasirParseFile
847: } ifelse
848: } ifelse
849: }{
850: [asir.init.peer oxasirpath.asirlib] loadAsirFile
851: } ifelse
852: asir.init.peer oxmathcap
853: asir.init.peer oxsetmathcap
854: Xm_noX {
855: asir.init.peer (Xm_noX=1;) oxsubmit
856: }{
857: asir.init.peer (Xm_noX=0;) oxsubmit
858: } ifelse
859: (Ox103_loaded) boundp
860: {
861: asir.init.peer ox103_asir_init
862: }{ } ifelse
863: } def
864:
865: [(asir)
866: [(pid [asir-command, asir-arg1, asir-arg2, ...] asir result (ox_asir function))
867: (Call open asir server. You need to install ox_asir on your system)
868: (to use this function. cf. primadec, fctr, asirconnect2, asirconnectr.)
869: (If you interrupted the computation by typing ctrl-C, type in )
870: ( oxasir.ccc oxreset ; )
871: (to interrupt the ox_asir server.)
1.38 takayama 872: (NOTE: all asir-args must belong to the same ring. cf.oxasir.changeRing. )
1.23 takayama 873: (Example: oxasir.ccc [(fctr) (x^10-1).] asir )
874: ( )
875: (This function requires plugins cmo, socket and ox_asir server. cf. oxasir)
1.38 takayama 876: (See, http://www.math.kobe-u.ac.jp/Asir on asir)
1.23 takayama 877: ]
878: ] putUsages
879:
880: /asir {
881: /arg2 set
882: /arg1 set
883: [/pid /asir-comm /comm /n /i /rr] pushVariables
884: [(CurrentRingp)] pushEnv
885: [
886: /pid arg1 def
887: /asir-comm arg2 def
888: pid tag 6 eq { } { (Invalid pid. See asir.) error } ifelse
889: pid 0 get (client) eq { } { (Invalid pid. See asir.) error } ifelse
890: asir-comm tag 6 eq { } { (Invalid argument asir-comm. See asir) error } ifelse
891:
892: [ %% Change the current ring if necessary to send a correct OxVlist.
893: asir-comm oxasir.changeRing
894: ] pop
895: %%% Setting OxVlist to tell asir a way to change dist-poly <==> poly.
896: (OxVlist=) getVlist2 toString (;) 3 cat_n /comm set
897: %% comm message
898: pid comm oxsubmit
899: pid (print(OxVlist);) oxsubmit
900:
901:
902: /n asir-comm length def
903: n 1 sub -1 1 {
904: /i set
905: pid asir-comm i get oxsendcmo
906: pid 1 oxsendcmo pid (ox_dtop) oxexec
907: } for
908: pid n 1 sub oxsendcmo
909: pid asir-comm 0 get oxexec
910:
911: pid 1 oxsendcmo pid (ox_ptod) oxexec
912: pid oxpopcmo /arg1 set
913:
1.16 takayama 914:
1.23 takayama 915: ] pop
916: popEnv
917: popVariables
918: arg1
919: } def
920:
921: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
922: %%% Mathematical functions for asir
923: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
924: /oxasir.changeRing {
1.38 takayama 925: /oxasir.changeRing.rr.prev 0 def
926: oxasir.changeRing2
927: } def
928: /oxasir.changeRing2 {
1.23 takayama 929: /arg1 set
1.38 takayama 930: [/in-oxasir.changeRing2 /f /rr ] pushVariables
1.23 takayama 931: [
932: /f arg1 def
933: f isArray {
1.38 takayama 934: f {oxasir.changeRing2} map
1.23 takayama 935: }{
936: f isPolynomial {
937: f (0). eq { }
1.38 takayama 938: { f (ring) dc /rr set [(CurrentRingp) rr] system_variable
939: oxasir.changeRing.rr.prev tag 1 eq { }
940: {
941: oxasir.changeRing.rr.prev rr eq { }
942: { (asir : arguments must belong to the same ring.) error } ifelse
943: } ifelse
944: /oxasir.changeRing.rr.prev rr def
945: } ifelse
1.23 takayama 946: } { } ifelse
947: } ifelse
948: ] pop
949: popVariables
950: } def
951:
952: /fctr {
953: /arg1 set
954: [/f /comm /vv] pushVariables
955: [(CurrentRingp)] pushEnv
956: [
957: /f arg1 def
958: oxasir.ccc [ ] eq {
959: (Starting ox_asir server.) message
960: ox_asirConnectMethod
961: } { } ifelse
962:
963: f isPolynomial not {
964: /vv f 1 get def
965: vv isArray { /vv vv from_records def } { } ifelse
966: /f f 0 get def
967: [vv ring_of_polynomials 0] define_ring
968: f . /f set
1.16 takayama 969: }{ } ifelse
1.23 takayama 970: oxasir.ccc [(fctr) f] asir /arg1 set
1.16 takayama 971: ] pop
1.23 takayama 972: popEnv
1.16 takayama 973: popVariables
974: arg1
975: } def
976:
1.23 takayama 977: [(fctr)
978: [(You need to install ox_asir server to use this function. (ox_asir function))
979: (f fctr g)
980: (poly f; array g;)
981: ([f v] fctr g ; string f, string or array of string v)
982: (This function factors the polynomial f over Q.)
983: ( )
984: (Example 1: [(x^10-y^10) (x,y)] fctr ::)
985: (Example 2: (x^10-1). fctr ::)
986: ( )
987: (If you interrupted the computation by typing ctrl-C, type in )
988: ( oxasir.ccc oxreset ; )
989: (to interrupt the ox_asir server.)
990: ( )
991: (This function requires plugins cmo, socket and ox_asir server. cf.oxasir)
992: ]] putUsages
993:
994:
995: [(primadec)
996: [(You need to install ox_asir server to use this function. (ox_asir function))
997: ([ ii ] primadec [[q1 p1] [q2 p2] ... ] )
998: ( array of poly ii; array of poly q1, p1, q2, p2 ...;)
999: ( q1, q2, ... are primary components of the primary ideal decomposition)
1000: ( of the ideal generated by << ii >>.)
1001: ( )
1002: ([ ii v ] primadec [[q1 p1] [q2 p2] ... ] )
1003: ( array of poly or string ii; array of string v; array of poly q1, p1, q2, p2 ...;)
1004: (<< v >> is an array of independent variables.)
1005: ( )
1006: ([ ii v ] primadec [[q1 p1] [q2 p2] ... ] )
1007: ( array of poly or string ii; array of string v; array of poly q1, p1, q2, p2 ...;)
1008: ( v is a string of variables separated by , )
1009: ( )
1010: (Example: [(x,y) ring_of_polynomials 0] define_ring)
1011: ( [ [(x^2-1). (x y).] ] primadec pmat ;)
1012: ( )
1013: (Example: [ [(x^2-1) (x y)] [(x) (y)]] primadec pmat ;)
1014: ( )
1015: (If you interrupted the computation by typing ctrl-C, type in )
1016: ( oxasir.ccc oxreset ; )
1017: (to interrupt the ox_asir server.)
1018: ( )
1019: (This function requires plugins cmo, socket and ox_asir server. cf.oxasir)
1020: ]] putUsages
1021:
1022: /primadec {
1023: /arg1 set
1024: [/in-primadec /aa /f /comm /vvv /r /setarg] pushVariables
1025: [(CurrentRingp)] pushEnv
1026: [
1027: /aa arg1 def
1028: aa isArray { } { (<<array>> primadec) error } ifelse
1029: /setarg 0 def
1030: oxasir.ccc [ ] eq {
1031: (Starting ox_asir server.) message
1032: ox_asirConnectMethod
1033: } { } ifelse
1034: aa { tag } map /typev set
1035: typev [ ArrayP ] eq
1036: { /f aa 0 get def
1037: f 0 get (ring) dc /r set
1038: [(CurrentRingp) r] system_variable
1039: /vvv getVariableNames def
1040: /setarg 1 def
1041: } { } ifelse
1042: typev [ArrayP StringP] eq
1043: { /f aa 0 get def
1044: /vvv [ aa 1 get to_records pop ] def
1045: /setarg 1 def
1046: } { } ifelse
1047: typev [ArrayP ArrayP] eq
1048: { /f aa 0 get def
1049: /vvv aa 1 get {toString} map def
1050: /setarg 1 def
1051: } { } ifelse
1052: setarg { } { (primadec : Argument mismatch) error } ifelse
1053:
1054: f 0 get isPolynomial {
1055: /r f 0 get (ring) dc def
1.42 takayama 1056: /vvv vvv { r __ } map def
1.23 takayama 1057: }
1058: {
1059: [vvv from_records ring_of_polynomials 0] define_ring
1060: f { toString . } map /f set
1061: vvv { . } map /vvv set
1062: } ifelse
1063: oxasir.ccc [(primadec) f vvv] asir /arg1 set
1.16 takayama 1064: ] pop
1.23 takayama 1065: popEnv
1.16 takayama 1066: popVariables
1067: arg1
1068: } def
1.20 takayama 1069:
1.23 takayama 1070:
1071: /getVlist2 {
1072: [/n /i ] pushVariables
1.20 takayama 1073: [
1.23 takayama 1074: /n [(N)] system_variable def
1075: [
1076: 0 1 n 1 sub { /i set (x) i (dollar) dc 2 cat_n } for
1077: 0 1 n 1 sub { /i set (d) i (dollar) dc 2 cat_n } for
1078: ] /arg1 set
1.20 takayama 1079: ] pop
1080: popVariables
1081: arg1
1082: } def
1083:
1.23 takayama 1084: %%%%%%%%%%%%%%%%%%%
1085: /getVlist {
1086: [/n /i ] pushVariables
1087: [
1088: /n [(N)] system_variable def
1089: [
1090: 0 1 n 1 sub { /i set [(x) (var) i] system_variable } for
1091: 0 1 n 1 sub { /i set [(D) (var) i] system_variable } for
1092: ] /arg1 set
1093: ] pop
1094: popVariables
1095: arg1
1096: } def
1.40 takayama 1097:
1.41 takayama 1098: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1.40 takayama 1099: /polygcd {
1100: /arg1 set
1101: [/pp /f /g /comm /vv] pushVariables
1102: [(CurrentRingp)] pushEnv
1103: [
1104: /pp arg1 def
1105: oxasir.ccc [ ] eq {
1106: (Starting ox_asir server.) message
1107: ox_asirConnectMethod
1108: } { } ifelse
1109:
1110: pp isArray {
1111: /f pp 0 get def
1112: /g pp 1 get def
1113: pp length 3 eq {
1114: /vv pp 2 get def
1115: vv isArray { /vv vv from_records def } { } ifelse
1116: [vv ring_of_polynomials 0] define_ring
1117: f . /f set
1118: g . /g set
1119: } { } ifelse
1120: }{ (usage: [f g] polygcd) error } ifelse
1121: oxasir.ccc [(gcd) f g] asir /arg1 set
1122: ] pop
1123: popEnv
1124: popVariables
1125: arg1
1126: } def
1127: [(polygcd)
1128: [( [f g] polygcd r )
1129: ( [f g v] polygcd r)
1130: (Example: [(x^2-1) (x-1) [(x)]] polygcd )
1131: ]
1132: ] putUsages
1133: /polylcm {
1134: /arg1 set
1135: [/pp /f /g /comm /vv] pushVariables
1136: [(CurrentRingp)] pushEnv
1137: [
1138: /pp arg1 def
1139: oxasir.ccc [ ] eq {
1140: (Starting ox_asir server.) message
1141: ox_asirConnectMethod
1142: } { } ifelse
1143:
1144: pp isArray {
1145: /f pp 0 get def
1146: /g pp 1 get def
1147: pp length 3 eq {
1148: /vv pp 2 get def
1149: vv isArray { /vv vv from_records def } { } ifelse
1150: [vv ring_of_polynomials 0] define_ring
1151: f . /f set
1152: g . /g set
1153: } { } ifelse
1154: }{ (usage: [f g] polylcm) error } ifelse
1155: oxasir.ccc [(lcm) f g] asir /arg1 set
1156: ] pop
1157: popEnv
1158: popVariables
1159: arg1
1160: } def
1161: [(polylcm)
1162: [( [f g] polylcm r )
1163: ( [f g v] polylcm r)
1164: (Example: [(x^2-1) (x-1) [(x)]] polylcm )
1165: ]
1166: ] putUsages
1.41 takayama 1167:
1168: /asir_red {
1169: /arg1 set
1170: [/pp /f /g /rr /vv] pushVariables
1171: [(CurrentRingp)] pushEnv
1172: [
1173: /pp arg1 def
1174: oxasir.ccc [ ] eq {
1175: (Starting ox_asir server.) message
1176: ox_asirConnectMethod
1177: } { } ifelse
1178: {
1179: pp isRational {
1180: /f pp numerator def
1181: /g pp denominator def
1182: [[f g]] reduceByAsir /rr set
1183: }{ } ifelse
1184: exit
1185:
1186: pp isArray {
1187: /vv pp 2 get def
1188: /f pp 0 get 0 get def
1189: /g pp 0 get 1 get def
1190: [[f toString g toString] vv] reduceByAsir /rr set
1191: } { } ifelse
1192: exit
1193:
1194: (asir_red: not implemented) error exit
1195: } loop
1196:
1197: rr 1 get isPolynomial {
1198: rr 0 get rr 1 get div /rr set
1199: }{
1200: rr 1 get (1).. eq {
1201: rr 0 get /rr set
1202: }{
1203: rr 0 get rr 1 get div /rr set
1204: } ifelse
1205: } ifelse
1206:
1207: /arg1 rr def
1208: ] pop
1209: popEnv
1210: popVariables
1211: arg1
1212: } def
1213: [(asir_red)
1214: [(Calling the function red of asir. It simplifies a rational function.)
1215: (cf. cancel)
1216: (Example: (x^2). (x). div asir_red )
1217: ]] putUsages
1218:
1219: /asir_fctr { fctr } def
1220: [(asir_fctr)
1221: [(Calling the factorizer of asir.)
1222: ]] putUsages
1223:
1224: /asir_primadec { primadec } def
1225: [(asir_primadec)
1226: [(Calling the primadec of asir.)
1227: ]] putUsages
1.20 takayama 1228:
1.23 takayama 1229: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1230: [(chattr) 0 /findIntegralRoots] extension pop
1231: /findIntegralRoots {
1232: /arg1 set
1233: [/in-findIntegralRoots /pp ] pushVariables
1.20 takayama 1234: [
1.23 takayama 1235: /pp arg1 def
1236: oxasir.ccc [ ] eq {
1237: (Starting ox_asir server.) message
1238: ox_asirConnectMethod
1239: } { } ifelse
1240: oxasir.ccc oxIsServerReady
1241: { pp findIntegralRoots.oxasir /arg1 set}
1242: { pp findIntegralRoots.slow /arg1 set} ifelse
1.20 takayama 1243: ] pop
1244: popVariables
1245: arg1
1246: } def
1.23 takayama 1247:
1248: /findIntegralRoots.oxasir {
1.20 takayama 1249: /arg1 set
1.23 takayama 1250: [/in-findIntegralRoots /f /r /g /aa /rlist] pushVariables
1251: [(CurrentRingp) (KanGBmessage)] pushEnv
1.20 takayama 1252: [
1.23 takayama 1253: /f arg1 def
1254: [(s) ring_of_polynomials 0] define_ring
1255: f toString . /f set
1256: f fctr rest /g set
1257: g {
1258: 0 get /aa set
1259: aa (s). degree 1 eq {
1260: aa (s). coeff 1 get /aa set
1261: aa length 1 eq { 0 }
1262: { aa 0 get (1). eq {
1263: 0 << aa 1 get (integer) dc >> sub
1264: } { } ifelse
1265: } ifelse
1266: }{ } ifelse
1267: } map
1268: /rlist set
1269: %% rlist ::
1270: [-1000000] rlist join shell rest /arg1 set
1.20 takayama 1271: ] pop
1.23 takayama 1272: popEnv
1.20 takayama 1273: popVariables
1274: arg1
1.21 takayama 1275: } def
1276:
1.23 takayama 1277: %%%%%%%%%%%%% From gbhg3/Int/intw.sm1
1278: %% This function needs solv1.asir and ox_asir.
1279: %% See solv1.asir for the usage of this function.
1280: /rationalRoots2 {
1281: /arg1 set
1282: [/in-rationalRoots2 /aa /f /comm /vvv /r /setarg
1283: /w /ans
1284: ] pushVariables
1285: [(CurrentRingp) (KanGBmessage)] pushEnv
1.21 takayama 1286: [
1.23 takayama 1287: /aa arg1 def
1288: aa isArray { } { (<<array>> rationalRoots2) error } ifelse
1289: /setarg 0 def
1290: oxasir.ccc [ ] eq {
1291: (Starting ox_asir server.) message
1292: ox_asirConnectMethod
1293: } { } ifelse
1294: aa { tag } map /typev set
1295: typev [ArrayP StringP ArrayP] eq
1296: { /f aa 0 get def
1297: /vvv [ aa 1 get to_records pop ] def
1298: /w aa 2 get def
1299: /setarg 1 def
1300: } { } ifelse
1301: typev [ArrayP ArrayP ArrayP] eq
1302: { /f aa 0 get def
1303: /vvv aa 1 get {toString} map def
1304: /setarg 1 def
1305: /w aa 2 get def
1306: } { } ifelse
1307: setarg { } { (rationalRoots2 : Argument mismatch) error } ifelse
1308:
1309:
1310: [vvv from_records ring_of_polynomials 0] define_ring
1311: f { toString . } map /f set
1312: vvv { . } map /vvv set
1313: w { toString . } map /w set
1314:
1315: (rationalRoots2 -- f = ) messagen f messagen
1316: ( , vvv= ) messagen vvv messagen ( , w = ) messagen w message
1317:
1318: vvv length 1 eq w 0 get (1). eq and
1319: {
1320: [(KanGBmessage) 0] system_variable
1321: [f] groebner_sugar 0 get /f set
1322: vvv 0 get toString (s) eq {
1323: }{ [[vvv 0 get toString (s)] from_records ring_of_polynomials 0] define_ring}
1324: ifelse
1325: f 0 get toString . [[vvv 0 get toString . (s).]] replace
1326: findIntegralRoots /ans set
1327: }
1328: {
1329: oxasir.ccc [(sm1_rationalRoots2) f vvv w] asir
1330: {(integer) dc} map
1331: /ans set
1.21 takayama 1332: } ifelse
1.23 takayama 1333:
1.21 takayama 1334: /arg1 ans def
1335: ] pop
1.23 takayama 1336: popEnv
1337: popVariables
1338: arg1
1339: } def
1340: [(rationalRoots2)
1341: [(rationalRoots2 (ox_asir function) called from intw.sm1 to analyze integral)
1342: (roots.)
1343: ]] putUsages
1344:
1345: /ptozp_subst {
1346: /arg1 set
1347: [/in-ptozp_subst /aaa /fff /xxx /vvv /vlist] pushVariables
1348: [(CurrentRingp)] pushEnv
1349: [
1350: /aaa arg1 def
1351: /fff aaa 0 get def
1352: /xxx aaa 1 get toString def
1353: /vvv aaa 2 get {toString ..} map def
1354: aaa length 4 eq {
1355: /vlist aaa 3 get def
1356: } {
1357: /vlist 0 def
1358: } ifelse
1359: oxasir.ccc [ ] eq {
1360: (Starting ox_asir server.) message
1361: ox_asirConnectMethod
1362: } { } ifelse
1363: fff isPolynomial {
1364: fff (ring) dc ring_def
1365: fff toString /fff set
1366: }
1367: { vlist isInteger { (ptozp_subst: need variable names.) error } { } ifelse
1368: [vlist ring_of_differential_operators 0] define_ring
1369: } ifelse
1370: oxasir.ccc [(sm1_ptozp_subst) fff . xxx . vvv] asir
1371: /arg1 set
1372: ] pop
1373: popEnv
1374: popVariables
1375: arg1
1376: } def
1377:
1378: [(ptozp_subst)
1379: [$[f s [p q] v] ptozp_subst g (ox_asir function)$
1380: $It returns ptozp(subst(f,s,p/q))$
1381: $Example 1: [ (x Dx - s) (s) [2 3] (x,s)] ptozp_subst $
1382: $ ===> 3 x Dx - 2 $
1383: ]] putUsages
1384:
1385: /reduceByAsir {
1386: /arg1 set
1387: [/in-reduceByAsir /aaa /fff /fff0 /fff1 /vlist] pushVariables
1388: [(CurrentRingp)] pushEnv
1389: [
1390: /aaa arg1 def
1391: /fff aaa 0 get def
1392: aaa length 2 eq {
1393: /vlist aaa 1 get def
1394: } {
1395: /vlist 0 def
1396: } ifelse
1397: oxasir.ccc [ ] eq {
1398: (Starting ox_asir server.) message
1399: ox_asirConnectMethod
1400: } { } ifelse
1401: fff isArray {
1402: fff length 2 eq {
1403: /fff0 fff 0 get def
1404: /fff1 fff 1 get def
1405: } {
1406: ([ << [f g] >> vlist ] reduceByAsir ) error
1407: } ifelse
1408: } {
1409: ([ << [f g] >> vlist ] reduceByAsir ) error
1410: } ifelse
1411: fff0 isPolynomial fff1 isPolynomial and {
1412: fff0 (ring) dc ring_def
1413: fff0 toString . /fff0 set
1414: fff1 (ring) dc ring_def
1415: fff1 toString . /fff1 set
1416: }
1417: { vlist isInteger { (reduceByAsir: need variable names.) error } { } ifelse
1418: [vlist ring_of_differential_operators 0] define_ring
1419: fff0 toString . /fff0 set
1420: fff1 toString . /fff1 set
1421: } ifelse
1422: oxasir.ccc [(sm1_rat2plist2) [fff0 fff1]] asir
1423: /arg1 set
1424: ] pop
1425: popEnv
1426: popVariables
1427: arg1
1428: } def
1429:
1430: [(reduceByAsir)
1431: [$ [[f g] v] reduceByAsir [ff gg] (ox_asir function)$
1432: $ [[f g]] reduceByAsir [ff gg] $
1433: $Example 1: [[(2 x -2) (4 x - 8)] (x)] reduceByAsir $
1434: (Note that there may be a gcd that is more than 1 among the coefficients.)
1435: ]] putUsages
1436:
1437: %% File should be preprocessed by OpenXM/misc/packages/Windows/oxpp
1438: %% and ./oxapp --removeSharp
1439: [(oxasirParseFile)
1440: [$[peer filename] oxasirParseFile $
1441: $File should be preprocessed by OpenXM/misc/packages/Windows/oxpp$
1442: $and ./oxapp --removeSharp $
1443: ]] putUsages
1444:
1445: /oxasirParseFile {
1446: /arg1 set
1447: [/in-oxasirParseFile /fname /sss] pushVariables
1448: [
1449: /fname arg1 1 get def
1450: /peer arg1 0 get def
1451: fname pushfile /sss set
1452: peer
1453: [$if (1) { ; $ sss (}$)] cat
1454: oxsubmit
1455: ] pop
1456: popVariables
1457: } def
1458:
1459: [(bfct)
1460: [
1461: ( f bfct b )
1462: ( poly f; poly b)
1463: ([f v] bfct b)
1464: ( string f )
1465: ( b is the global b-function of the polynomial f.)
1466: (Example: [(x^3-y^2) (x,y)] bfct fctr :: )
1467: (Algorithm: M.Noro, Mathematical Software, icms 2002, pp.147--157.)
1468: ( )
1469: (If you interrupted the computation by typing ctrl-C, type in )
1470: ( oxasir.ccc oxreset ; )
1471: (to interrupt the ox_asir server.)
1472: ( )
1473: (This function requires plugins cmo, socket and ox_asir server. cf.oxasir)
1474: (You need to install ox_asir server to use this function. (ox_asir function))
1475: ]] putUsages
1476:
1477: /bfct {
1478: /arg1 set
1479: [/in-bfct /f /comm /vv] pushVariables
1480: [(CurrentRingp)] pushEnv
1481: [
1482: /f arg1 def
1483: oxasir.ccc [ ] eq {
1484: (Starting ox_asir server.) message
1485: ox_asirConnectMethod
1486: } { } ifelse
1487:
1488: f isPolynomial not {
1489: /vv f 1 get def
1490: vv isArray { /vv vv from_records def } { } ifelse
1491: /f f 0 get def
1492: [vv ring_of_polynomials 0] define_ring
1493: f . /f set
1494: }{ } ifelse
1495: oxasir.ccc [(oxasir_bfct) f] asir /f set
1496: [(s) ring_of_polynomials 0] define_ring
1497: f . /f set
1498: [f f fctr] /arg1 set
1499: ] pop
1500: popEnv
1.21 takayama 1501: popVariables
1502: arg1
1503: } def
1504:
1.23 takayama 1505: [(generic_bfct)
1506: [
1507: ( [ii weight] generic_bfct b )
1508: ( list of poly ii; list weight)
1509: ([ii weight variables] generic_bfct b)
1510: ( list of string ii; list weight; list variables)
1511: ( b is the general b-function of the ideal ii w.r.t the weight.)
1512: (Example: [[(Dx^2) (Dy^2)] [(x) -1 (Dx) 1] [(x) (y)]] generic_bfct :: )
1513: (Notion: Saito, Sturmfels, Takayama, Grobner deformations of hypergeometric differential equaitons)
1514: (Algorithm: M.Noro, Mathematical Software, icms 2002, pp.147--157.)
1515: ( )
1516: (If you interrupted the computation by typing ctrl-C, type in )
1517: ( oxasir.ccc oxreset ; )
1518: (to interrupt the ox_asir server.)
1519: ( )
1520: (This function requires plugins cmo, socket and ox_asir server. cf.oxasir)
1521: (You need to install ox_asir server to use this function. (ox_asir function))
1522: ]] putUsages
1523:
1524: /generic_bfct {
1525: /arg1 set
1526: [/in-generic_bfct /aa /f /comm /vvv0 /n /vvv /ddd /r /setarg
1527: /bf /wt ] pushVariables
1528: [(CurrentRingp)] pushEnv
1529: [
1530: /aa arg1 def
1531: aa isArray { } { (<<array>> generic_bfct) error } ifelse
1532: /setarg 0 def
1533: aa { tag } map /typev set
1534: typev [ ArrayP ArrayP] eq
1535: { /f aa 0 get def
1536: f 0 tag PolyP { } { (The first argument must be a list of differential operators. Give the third variable: a list of variables) error } ifelse
1537: f 0 get (ring) dc /r set
1538: [(CurrentRingp) r] system_variable
1539: /wt aa 1 get def
1540:
1541: /vvv0 getVariableNames def
1542: /n [(N)] system_variable def
1543: /vvv vvv0 n carN rest reverse rest reverse def
1544: /ddd vvv0 reverse n carN reverse
1545: rest reverse rest reverse def
1546:
1547: /wt wt generic_bfct.aux1 def
1548:
1549: /setarg 1 def
1550: } { } ifelse
1551: typev [ArrayP ArrayP StringP] eq
1552: { /f aa 0 get def
1553: /vvv [ aa 2 get to_records pop ] def
1554: /wt aa 1 get def
1555:
1556: /n vvv length def
1557: /ddd vvv { (D) 2 1 roll 2 cat_n } map def
1558:
1559: /setarg 1 def
1560: } { } ifelse
1561: typev [ArrayP ArrayP ArrayP] eq
1562: { /f aa 0 get def
1563: /vvv aa 2 get {toString} map def
1564: /wt aa 1 get def
1565:
1566: /n vvv length def
1567: /ddd vvv { (D) 2 1 roll 2 cat_n } map def
1568:
1569: /setarg 1 def
1570: } { } ifelse
1571: setarg { } { (generic_bfct : Argument mismatch) error } ifelse
1572:
1573: f 0 get isPolynomial {
1574:
1575: }
1576: {
1577: [vvv from_records ring_of_differential_operators 0] define_ring
1578: f { toString . } map /f set
1579: vvv { . } map /vvv set
1580: ddd { . } map /ddd set
1.33 takayama 1581: /wt [vvv ddd wt] generic_bfct.aux1 def
1.23 takayama 1582: } ifelse
1583: [f vvv ddd wt] message
1584:
1585: oxasir.ccc [ ] eq {
1586: (Starting ox_asir server.) message
1587: ox_asirConnectMethod
1588: } { } ifelse
1589:
1590: oxasir.ccc [(oxasir_generic_bfct) f vvv ddd wt] asir /bf set
1591: [(s) ring_of_polynomials 0] define_ring
1592: bf . /bf set
1593: [bf bf fctr] /arg1 set
1594: ] pop
1595: popEnv
1596: popVariables
1597: arg1
1.20 takayama 1598: } def
1.22 takayama 1599:
1.23 takayama 1600: /generic_bfct.aux1 {
1.22 takayama 1601: /arg1 set
1.33 takayama 1602: [/in-generic_bfct.aux1 /ii /jj /wt /wtx /wtd /vv /dd /n] pushVariables
1.23 takayama 1603: [
1.33 takayama 1604: arg1 2 get /wt set
1605: arg1 0 get /vv set
1606: arg1 1 get /dd set
1607: /wtx [ 0 1 vv length 1 sub { pop (0).. } for ] def
1608: /n wt length def
1609: 0 2 n 1 sub {
1610: /ii set
1611: 0 1 vv length 1 sub {
1612: /jj set
1613: wt ii get toString dd jj get toString eq {
1614: wtx jj << wt ii 1 add get >> put
1615: } { } ifelse
1616: } for
1617: } for
1618:
1619: wtx /wt set
1.23 takayama 1620: wt { dup tag IntegerP eq { (universalNumber) dc } { } ifelse } map /wt set
1621: wt /arg1 set
1622: ] pop
1623: popVariables
1624: arg1
1625: } def
1.30 takayama 1626: /verbose.wgr 1 def
1627: %[ ff vv ww ] asir.wgb [gb init]
1628: /asir.wgr {
1629: /arg1 set
1630: [/in-asir.gb /ff /vv /ww /vvx /vvd /avv /comm /wvec /i] pushVariables
1631: [
1632: /ff arg1 0 get def
1633: /vv arg1 1 get def
1634: /ww arg1 2 get def
1635:
1636: oxasir.ccc [ ] eq {
1637: (Starting ox_asir server.) message
1638: ox_asirConnectMethod
1639: } { } ifelse
1640:
1641: vv isArray {
1642: vv from_records /vv set
1643: } { } ifelse
1644: oxasir.ccc [(dp_gr_print) (2)..] asir
1645: [vv to_records pop] /vvx set
1646: vvx { toString (D) 2 1 roll 2 cat_n } map /vvd set
1647:
1648: [
1649: 0 1 vvx length 1 sub {
1650: /i set
1651: vvx i get
1652: 0 ww i get sub
1653: vvd i get
1654: ww i get
1655: } for
1656: ] /wvec set
1657:
1658: [vv ring_of_differential_operators
1659: [wvec] weight_vector
1660: 0] define_ring
1661:
1.38 takayama 1662: ff { toString . dehomogenize homogenize } map /ff set
1.30 takayama 1663: vvx { . } map /vvx set %%ex [x,y]
1664: vvd { . } map /vvd set %%ex [Dx,Dy]
1665: vvx vvd join [(h).] join /avv set
1666:
1667: verbose.wgr {
1668: (Asir (-w,w) gb in the Weyl algebra) message
1669: (wvec=) messagen wvec message
1670: (ff=) messagen ff message
1671: (avv=) messagen avv message
1672: } { } ifelse
1673:
1.32 takayama 1674: [$dp_weyl_set_weight(newvect($ ww length toString $,$
1.30 takayama 1675: ww toString $));$ ] cat /comm set
1676:
1677: verbose.wgr {
1678: comm message
1679: } { } ifelse
1680:
1681: oxasir.ccc comm oxsubmit ;
1682:
1683: oxasir.ccc [(dp_weyl_gr_main) ff avv (0).. (1).. (11)..] asir
1684: /arg1 set
1685: ] pop
1686: popVariables
1687: arg1
1688: } def
1689: [(asir.wgr)
1690: [([ ff vv ww ] asir.wgr g)
1.31 takayama 1691: $It computes the (-ww,ww) Grobner basis of ff in the homogenized Weyl algebra.$
1.30 takayama 1692: (Homogenization is automatically done.)
1693: $Example 1: $
1694: $ [ [(x*Dx+y*Dy-1) (Dx*Dy)] $
1695: $ (x,y) $
1696: $ [1 2 ] ] asir.wgr $
1697: ]] putUsages
1698:
1.23 takayama 1699: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1700: %%% functions to start ox_asir
1701: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1702: /asirconnectr {
1703: [/in-asirconnectr /pass /peer /data /control /oxasir] pushVariables
1704: [
1.25 takayama 1705: [(getServerEnv) (bin/ox_asir)] extension tag 0 eq {
1706: (Server bin/ox_sm1 is not found.) error
1707: }{ } ifelse
1708:
1.43 ! takayama 1709: /pass ox_encrypt_104_genPass def
1.23 takayama 1710: /peer [(oxGetPort) (localhost)] extension def
1711: /data peer 1 get toString def
1712: /control peer 3 get toString def
1.35 takayama 1713: peer message-quiet
1.22 takayama 1714: [
1.23 takayama 1715: oxstart100
1.34 takayama 1716: @@@.quiet { ( -quiet ) } { } ifelse
1.23 takayama 1717: Xm_noX { ( -nox ) } { } ifelse
1718: ( -oxserver bin/ox_asir -e ) ( -reverse )
1.43 ! takayama 1719: ( -data ) data ( -control ) control pass [1 2] get
1.23 takayama 1720: ( )] cat execve
1.43 ! takayama 1721: [(oxCreateClient2) peer 0 pass 0 get] extension /oxasir.ccc set
1.23 takayama 1722: %% 0 means connect from only localhost.
1723: oxasir.ccc asir.init
1724: /arg1 oxasir.ccc def
1.22 takayama 1725: ] pop
1726: popVariables
1.23 takayama 1727: arg1
1.22 takayama 1728: } def
1729:
1.23 takayama 1730: [(asirconnectr)
1731: [(asirconnectr server (ox_asir function))
1732: (array server;)
1733: (Example: asirconnectr /oxasir.ccc set)
1734: ]] putUsages
1735:
1736: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1737: %%% functions to start ox_k0
1738: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1739: /oxk0.ccc load isArray
1740: { }
1741: { /oxk0.ccc [ ] def } ifelse
1.22 takayama 1742:
1.23 takayama 1743: /ox.k0.init {
1744: % oxk0.ccc ( Print("Hello!"); ) oxsubmit
1745: Xm_noX { oxk0.ccc (Xm_noX=true;) oxsubmit }
1746: { oxk0.ccc (Xm_noX=false;) oxsubmit } ifelse
1747: } def
1.1 maekawa 1748:
1.23 takayama 1749: /k0connectr {
1750: [/in-k0connectr /pass /peer /data /control ] pushVariables
1751: [
1.25 takayama 1752: [(getServerEnv) (bin/ox_k0)] extension tag 0 eq {
1753: (Server bin/ox_sm1 is not found.) error
1754: }{ } ifelse
1755:
1.43 ! takayama 1756: /pass ox_encrypt_104_genPass def
1.23 takayama 1757: /peer [(oxGetPort) (localhost)] extension def
1758: /data peer 1 get toString def
1759: /control peer 3 get toString def
1.35 takayama 1760: peer message-quiet
1.23 takayama 1761: [
1762: oxstart100
1763: Xm_noX { ( -nox ) } { } ifelse
1764: ( -oxserver bin/ox_k0 -e ) ( -reverse )
1.43 ! takayama 1765: ( -data ) data ( -control ) control pass [1 2] get
1.23 takayama 1766: ( )] cat execve
1.43 ! takayama 1767: [(oxCreateClient2) peer 0 pass 0 get] extension /oxk0.ccc set
1.23 takayama 1768: %% 0 means connect from only localhost.
1.34 takayama 1769: (The server is binded to the variable oxk0.ccc) message-quiet
1.23 takayama 1770: ox.k0.init
1771: /arg1 oxk0.ccc def
1772: ] pop
1773: popVariables
1774: arg1
1775: } def
1.29 takayama 1776: /@@@polymake.k0.ccc [ ] def
1777:
1.37 takayama 1778: /ox_server_mode {
1779: /:: { } def % do nothing
1.43 ! takayama 1780: } def
! 1781:
! 1782: %% Encryption methods
! 1783: /ox_encrypt_104.NONE 0 def
! 1784: /ox_encrypt_104.FILE 1 def
! 1785: /ox_encrypt_104.RSA 2 def
! 1786: /@@@.ox_encrypt_104.method ox_encrypt_104.NONE def
! 1787: /ox_encrypt_104.1 {
! 1788: /arg1 set
! 1789: [/sss /rrr] pushVariables
! 1790: [
! 1791: /sss arg1 def
! 1792: sss toString /sss set
! 1793: {
! 1794: @@@.ox_encrypt_104.method ox_encrypt_104.NONE eq {
! 1795: /rrr [sss] def
! 1796: exit
! 1797: } { } ifelse
! 1798: (The encryption method has not yet been implemented.) error
! 1799: } loop
! 1800: /arg1 rrr def
! 1801: ] pop
! 1802: popVariables
! 1803: arg1
! 1804: } def
1.37 takayama 1805:
1.43 ! takayama 1806: %<
! 1807: % Usages: ox_encrypt_104_genPass
! 1808: % [[ c-pass d-pass ] [c-pass-encrypted d-pass-encrypted ox-command-str ] ...]
! 1809: %>
! 1810: /ox_encrypt_104_genPass {
! 1811: [/sss /p1 /p2 /e1 /e2 /rrr] pushVariables
! 1812: [
! 1813: /r1 [(oxGenPass)] extension def
! 1814: /r2 [(oxGenPass)] extension def
! 1815: r1 ox_encrypt_104.1 /e1 set
! 1816: r2 ox_encrypt_104.1 /e2 set
! 1817: {
! 1818: @@@.ox_encrypt_104.method ox_encrypt_104.NONE eq {
! 1819: [( -passControl ) e1 0 get ( -passData ) e2 0 get ( )] cat /sss set
! 1820: [[r1 r2] [e1 0 get , e2 0 get , sss]] /rrr set
! 1821: exit
! 1822: } { } ifelse
! 1823: (The encryption method has not been implemented.) error
! 1824: } loop
! 1825: rrr /arg1 set
! 1826: ] pop
! 1827: popVariables
! 1828: arg1
1.37 takayama 1829: } def
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>