version 1.1, 1999/10/08 02:12:02 |
version 1.12, 2003/01/01 02:03:42 |
|
|
|
% $OpenXM: OpenXM/src/kan96xx/Doc/oxasir.sm1,v 1.11 2002/11/09 01:24:08 takayama Exp $ |
%% kxx/oxasir.sm1 1998, 2/12 (this version is at Old/oxasir.sm1.19980212 |
%% kxx/oxasir.sm1 1998, 2/12 (this version is at Old/oxasir.sm1.19980212 |
%% 3/1, 1995, 11/5, 11/21 |
%% 3/1, 1995, 11/5, 11/21 |
%% This file is error clean. |
%% This file is error clean. |
%%%%%%% How to install. |
%%%%%%% How to install. |
%%% Set ASIR_LIBDIR if necessary. Ex. /u/nobuki/lib/asir |
%%% Set ASIR_LIBDIR if necessary. Ex. /u/nobuki/lib/asir |
%%% write ~/.asirrc : load("gr")$ load("primdec")$ end$ |
%%% write ~/.asirrc : load("gr")$ load("primdec")$ load("bfct")$ end$ |
|
%%% or it is written in OpenXM/rc/asirrc in OpenXM env, it's fine. |
%%% oxasir.asir must be in |
%%% oxasir.asir must be in |
%%% LOAD_SM1_PATH or oxasirpath.asirlib |
%%% LOAD_SM1_PATH or oxasirpath.asirlib |
%%% Edit below |
%%% Edit below |
|
|
/asirinit { |
/asirinit { |
%% gr and primdec are loaded by .asirrc |
%% gr and primdec are loaded by .asirrc |
/asirinit.peer set |
/asirinit.peer set |
[asirinit.peer oxasirpath.asirlib] loadAsirFile |
[(ostype)] extension 0 get (windows) eq { |
|
[(getenv) (OSTYPE)] extension tag 0 eq { |
|
[asirinit.peer (oxasir-win.rr)] oxasirParseFile |
|
}{ |
|
[(getenv) (OSTYPE)] extension (cygwin) eq { |
|
[asirinit.peer oxasirpath.asirlib] loadAsirFile |
|
}{ |
|
[asirinit.peer (oxasir-win.rr)] oxasirParseFile |
|
} ifelse |
|
} ifelse |
|
}{ |
|
[asirinit.peer oxasirpath.asirlib] loadAsirFile |
|
} ifelse |
|
asirinit.peer oxmathcap |
|
asirinit.peer oxsetmathcap |
|
(Ox103_loaded) boundp |
|
{ |
|
asirinit.peer ox103_asir_init |
|
}{ } ifelse |
} def |
} def |
/asirconnect { |
/asirconnect { |
[(localhost) 1300 1200] oxconnect /oxasir.ccc set |
[(localhost) 1300 1200] oxconnect /oxasir.ccc set |
|
Line 103 oxasir.verbose { |
|
/asirconnect2 { |
/asirconnect2 { |
[oxpath.oxlog.xterm oxpath.ox ( -ox ) oxasirpath.oxasir |
[oxpath.oxlog.xterm oxpath.ox ( -ox ) oxasirpath.oxasir |
oxpath.null |
oxpath.null |
( & )] cat system |
( & )] cat system-csh |
% (xterm -e /home/nobuki/kxx/ox -ox /home/nobuki/kxx/ox_asir &) system |
% (xterm -e /home/nobuki/kxx/ox -ox /home/nobuki/kxx/ox_asir &) system-csh |
% (kterm -iconic -e /home/nobuki/kxx/ox -ox /home/nobuki/kxx/ox_asir &) system |
% (kterm -iconic -e /home/nobuki/kxx/ox -ox /home/nobuki/kxx/ox_asir &) system-csh |
% For MSRI |
% For MSRI |
% Eterm is also nice (including kanji). rxvt is also nice. |
% Eterm is also nice (including kanji). rxvt is also nice. |
%(xterm -icon -e /u/nobuki/tmp/kxx/ox -ox /u/nobuki/tmp/Ox/ox_asir2 &) system |
%(xterm -icon -e /u/nobuki/tmp/kxx/ox -ox /u/nobuki/tmp/Ox/ox_asir2 &) system-csh |
%(kterm2 -e /u/nobuki/tmp/kxx/ox -ox /u/nobuki/tmp/Ox/ox_asir2 &) system |
%(kterm2 -e /u/nobuki/tmp/kxx/ox -ox /u/nobuki/tmp/Ox/ox_asir2 &) system-csh |
% (If you start the server automatically, you may have a trouble to) message |
% (If you start the server automatically, you may have a trouble to) message |
% (oxreset. In order to avoid this trouble, start the server by hand.) message |
% (oxreset. In order to avoid this trouble, start the server by hand.) message |
(sleep 5) system |
(sleep 5) system-csh |
[(localhost) 1300 1200] oxconnect /oxasir.ccc set |
[(localhost) 1300 1200] oxconnect /oxasir.ccc set |
/ccc oxasir.ccc def %% for compatibility. |
/ccc oxasir.ccc def %% for compatibility. |
oxasir.ccc asirinit |
oxasir.ccc asirinit |
Line 108 oxasir.verbose { |
|
Line 128 oxasir.verbose { |
|
/asirconnect3 { |
/asirconnect3 { |
[oxpath.oxlog.xterm oxpath.ox ( -ox ) oxasirpath.oxasir |
[oxpath.oxlog.xterm oxpath.ox ( -ox ) oxasirpath.oxasir |
( -data 2300 -control 2200) oxpath.null |
( -data 2300 -control 2200) oxpath.null |
( & )] cat system |
( & )] cat system-csh |
% (If you start the server automatically, you may have a trouble to) message |
% (If you start the server automatically, you may have a trouble to) message |
% (oxreset. In order to avoid this trouble, start the server by hand.) message |
% (oxreset. In order to avoid this trouble, start the server by hand.) message |
(sleep 5) system |
(sleep 5) system-csh |
[(localhost) 2300 2200] oxconnect /oxasir.ccc2 set |
[(localhost) 2300 2200] oxconnect /oxasir.ccc2 set |
/ccc2 oxasir.ccc2 def %% for compatibility. |
/ccc2 oxasir.ccc2 def %% for compatibility. |
oxasir.ccc2 asirinit |
oxasir.ccc2 asirinit |
Line 401 oxasir.verbose { |
|
Line 421 oxasir.verbose { |
|
[oxpath.oxlog.xterm oxpath.ox ( -reverse -ox ) oxasirpath.oxasir |
[oxpath.oxlog.xterm oxpath.ox ( -reverse -ox ) oxasirpath.oxasir |
( -data ) data ( -control ) control ( -pass ) pass |
( -data ) data ( -control ) control ( -pass ) pass |
oxpath.null |
oxpath.null |
( &)] cat system |
( &)] cat system-csh |
[(oxCreateClient2) peer 0 pass] extension /oxasir set |
[(oxCreateClient2) peer 0 pass] extension /oxasir set |
%% 0 means connect from only localhost. |
%% 0 means connect from only localhost. |
oxasir asirinit |
oxasir asirinit |
Line 577 oxasir.verbose { |
|
Line 597 oxasir.verbose { |
|
(Note that there may be a gcd that is more than 1 among the coefficients.) |
(Note that there may be a gcd that is more than 1 among the coefficients.) |
]] putUsages |
]] putUsages |
|
|
|
%% File should be preprocessed by OpenXM/misc/packages/Windows/oxpp |
|
%% and ./oxapp --removeSharp |
|
[(oxasirParseFile) |
|
[$[peer filename] oxasirParseFile $ |
|
$File should be preprocessed by OpenXM/misc/packages/Windows/oxpp$ |
|
$and ./oxapp --removeSharp $ |
|
]] putUsages |
|
|
|
/oxasirParseFile { |
|
/arg1 set |
|
[/in-oxasirParseFile /fname /sss] pushVariables |
|
[ |
|
/fname arg1 1 get def |
|
/peer arg1 0 get def |
|
fname pushfile /sss set |
|
peer |
|
[$if (1) { ; $ sss (}$)] cat |
|
oxsubmit |
|
] pop |
|
popVariables |
|
} def |
|
|
|
[(bfct) |
|
[ |
|
( f bfct b ) |
|
( poly f; poly b) |
|
([f v] bfct b) |
|
( string f ) |
|
( b is the global b-function of the polynomial f.) |
|
(Example: [(x^3-y^2) (x,y)] bfct fctr :: ) |
|
(Algorithm: M.Noro, Mathematical Software, icms 2002, pp.147--157.) |
|
( ) |
|
(If you interrupted the computation by typing ctrl-C, type in ) |
|
( oxasir.ccc oxreset ; ) |
|
(to interrupt the ox_asir server.) |
|
( ) |
|
(This function requires plugins cmo, socket and ox_asir server. cf.oxasir) |
|
(You need to install ox_asir server to use this function. (ox_asir function)) |
|
]] putUsages |
|
|
|
/bfct { |
|
/arg1 set |
|
[/in-bfct /f /comm /vv] pushVariables |
|
[(CurrentRingp)] pushEnv |
|
[ |
|
/f arg1 def |
|
oxasir.ccc [ ] eq { |
|
(Starting ox_asir server.) message |
|
ox_asirConnectMethod |
|
} { } ifelse |
|
|
|
f isPolynomial not { |
|
/vv f 1 get def |
|
vv isArray { /vv vv from_records def } { } ifelse |
|
/f f 0 get def |
|
[vv ring_of_polynomials 0] define_ring |
|
f . /f set |
|
}{ } ifelse |
|
oxasir.ccc [(oxasir_bfct) f] asir /f set |
|
[(s) ring_of_polynomials 0] define_ring |
|
f . /f set |
|
[f f fctr] /arg1 set |
|
] pop |
|
popEnv |
|
popVariables |
|
arg1 |
|
} def |
|
|
|
[(generic_bfct) |
|
[ |
|
( [ii weight] generic_bfct b ) |
|
( list of poly ii; list weight) |
|
([ii weight variables] generic_bfct b) |
|
( list of string ii; list weight; list variables) |
|
( b is the general b-function of the ideal ii w.r.t the weight.) |
|
(Example: [[(Dx^2) (Dy^2)] [(x) -1 (Dx) 1] [(x) (y)]] generic_bfct :: ) |
|
(Notion: Saito, Sturmfels, Takayama, Grobner deformations of hypergeometric differential equaitons) |
|
(Algorithm: M.Noro, Mathematical Software, icms 2002, pp.147--157.) |
|
( ) |
|
(If you interrupted the computation by typing ctrl-C, type in ) |
|
( oxasir.ccc oxreset ; ) |
|
(to interrupt the ox_asir server.) |
|
( ) |
|
(This function requires plugins cmo, socket and ox_asir server. cf.oxasir) |
|
(You need to install ox_asir server to use this function. (ox_asir function)) |
|
]] putUsages |
|
|
|
/generic_bfct { |
|
/arg1 set |
|
[/in-generic_bfct /aa /f /comm /vvv0 /n /vvv /ddd /r /setarg |
|
/bf /wt ] pushVariables |
|
[(CurrentRingp)] pushEnv |
|
[ |
|
/aa arg1 def |
|
aa isArray { } { (<<array>> generic_bfct) error } ifelse |
|
/setarg 0 def |
|
aa { tag } map /typev set |
|
typev [ ArrayP ArrayP] eq |
|
{ /f aa 0 get def |
|
f 0 tag PolyP { } { (The first argument must be a list of differential operators. Give the third variable: a list of variables) error } ifelse |
|
f 0 get (ring) dc /r set |
|
[(CurrentRingp) r] system_variable |
|
/wt aa 1 get def |
|
|
|
/vvv0 getVariableNames def |
|
/n [(N)] system_variable def |
|
/vvv vvv0 n carN rest reverse rest reverse def |
|
/ddd vvv0 reverse n carN reverse |
|
rest reverse rest reverse def |
|
|
|
/wt wt generic_bfct.aux1 def |
|
|
|
/setarg 1 def |
|
} { } ifelse |
|
typev [ArrayP ArrayP StringP] eq |
|
{ /f aa 0 get def |
|
/vvv [ aa 2 get to_records pop ] def |
|
/wt aa 1 get def |
|
|
|
/n vvv length def |
|
/ddd vvv { (D) 2 1 roll 2 cat_n } map def |
|
|
|
/setarg 1 def |
|
} { } ifelse |
|
typev [ArrayP ArrayP ArrayP] eq |
|
{ /f aa 0 get def |
|
/vvv aa 2 get {toString} map def |
|
/wt aa 1 get def |
|
|
|
/n vvv length def |
|
/ddd vvv { (D) 2 1 roll 2 cat_n } map def |
|
|
|
/setarg 1 def |
|
} { } ifelse |
|
setarg { } { (generic_bfct : Argument mismatch) error } ifelse |
|
|
|
f 0 get isPolynomial { |
|
|
|
} |
|
{ |
|
[vvv from_records ring_of_differential_operators 0] define_ring |
|
f { toString . } map /f set |
|
vvv { . } map /vvv set |
|
ddd { . } map /ddd set |
|
/wt wt generic_bfct.aux1 def |
|
} ifelse |
|
[f vvv ddd wt] message |
|
|
|
oxasir.ccc [ ] eq { |
|
(Starting ox_asir server.) message |
|
ox_asirConnectMethod |
|
} { } ifelse |
|
|
|
oxasir.ccc [(oxasir_generic_bfct) f vvv ddd wt] asir /bf set |
|
[(s) ring_of_polynomials 0] define_ring |
|
bf . /bf set |
|
[bf bf fctr] /arg1 set |
|
] pop |
|
popEnv |
|
popVariables |
|
arg1 |
|
} def |
|
|
|
/generic_bfct.aux1 { |
|
/arg1 set |
|
[/in-generic_bfct.aux1 /wt /wtx /wtd /n] pushVariables |
|
[ |
|
arg1 /wt set |
|
/n [(N)] system_variable def |
|
wt { dup tag PolyP eq { toString } { } ifelse } map /wt set |
|
wt weightv /wt set |
|
/wtx wt n carN rest reverse rest reverse def |
|
/wtd wt reverse n carN reverse |
|
rest reverse rest reverse def |
|
wtx wtd join /wt set |
|
wt { dup tag IntegerP eq { (universalNumber) dc } { } ifelse } map /wt set |
|
wt /arg1 set |
|
] pop |
|
popVariables |
|
arg1 |
|
} def |
|
|
/oxasir.sm1.loaded 1 def |
/oxasir.sm1.loaded 1 def |
initializePathNamesForOxAsir %% This should be the last. |
[(ostype)] extension 0 get (windows) eq { |
|
[(parse) (oxasir-win.sm1) pushfile ] extension |
|
}{ |
|
initializePathNamesForOxAsir %% This should be the last. |
|
} ifelse |
|
|