=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/lib/gr,v retrieving revision 1.9 retrieving revision 1.11 diff -u -p -r1.9 -r1.11 --- OpenXM_contrib2/asir2000/lib/gr 2001/09/05 08:09:10 1.9 +++ OpenXM_contrib2/asir2000/lib/gr 2001/09/28 00:41:16 1.11 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/lib/gr,v 1.8 2001/04/09 02:42:29 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/lib/gr,v 1.10 2001/09/06 00:24:07 noro Exp $ */ extern INIT_COUNT,ITOR_FAIL$ extern REMOTE_MATRIX,REMOTE_NF,REMOTE_VARS$ @@ -1330,13 +1330,39 @@ def dgr(G,V,O) Win = "nonhomo"; Lose = P1; } else { - Win = "nhomo"; + Win = "homo"; Lose = P0; } ox_reset(Lose); return [Win,R]; } +/* competitive Gbase computation : F4 vs. Bucbberger */ +/* P : process list */ + +def dgrf4mod(G,V,M,O) +{ + P = getopt(proc); + if ( type(P) == -1 ) + return dp_f4_mod_main(G,V,M,O); + P0 = P[0]; P1 = P[1]; P = [P0,P1]; + map(ox_reset,P); + ox_cmo_rpc(P0,"dp_f4_mod_main",G,V,M,O); + ox_cmo_rpc(P1,"dp_gr_mod_main",G,V,0,M,O); + map(ox_push_cmd,P,262); /* 262 = OX_popCMO */ + F = ox_select(P); + R = ox_get(F[0]); + if ( F[0] == P0 ) { + Win = "F4"; + Lose = P1; + } else { + Win = "Buchberger"; + Lose = P0; + } + ox_reset(Lose); + return [Win,R]; +} + /* functions for rpc */ def register_matrix(M) @@ -1449,8 +1475,10 @@ def register_input(List) Poly <- (Coef*Poly+Monomial*PolyList[Index])/Denominator */ -def tracetogen(GBIndex,Trace) +def tracetogen(G) { + GB = G[0]; GBIndex = G[1]; Trace = G[2]; + InputList = Trace[0]; Trace = cdr(Trace); @@ -1468,10 +1496,14 @@ def tracetogen(GBIndex,Trace) /* stores coeffs */ Coef = vector(N); + /* XXX create dp_ptod(1,V) */ + HT = dp_ht(InputList[0]); + One = dp_subd(HT,HT); + for ( I = 0; I < Nini; I++ ) { - Tr[I] = [1,I,1,1]; + Tr[I] = [1,I,One,1]; C = vector(Nini); - C[I] = 1; + C[I] = One; Coef[I] = C; } for ( ; I < N; I++ ) @@ -1511,5 +1543,4 @@ def compute_coef_by_trace(I,Tr,Coef) } Coef[I] = CI; } -end$ end$