groebmes.red 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. module groebmes;
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3. %
  4. % Trace messages for the algorithms .
  5. %
  6. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  7. symbolic procedure groebpairprint(p);
  8. << groebmessff(" pair(",cadr p,nil);
  9. groebmessff(",",caddr p,nil);
  10. prin2 "), ";prin2 " lcm = ";print car p >>;
  11. symbolic procedure groetimeprint;
  12. << prin2 " >> accum. cpu time : ";
  13. prin2(time() - groetime!*);prin2t " ms " >>;
  14. symbolic procedure groebmessff(m1,f,m2);
  15. << prin2 m1;prin2 vdpnumber f;
  16. if !*gsugar then << prin2 " / ";prin2 gsugar f >>;
  17. if m2 then prin2t m2 >>;
  18. symbolic procedure groebmess1(g,d);
  19. if !*trgroeb then << g := g;d := d;
  20. prin2 " variables : ";print vdpvars!*;
  21. printbl();prin2t " Start of ITERATION ";terpri() >>;
  22. symbolic procedure groebmess2 f;
  23. if !*trgroeb then << terpri();
  24. groebmessff(" polynomial ",f," eliminated ");
  25. groetimeprint() >>;
  26. symbolic procedure groebmess2a(f,cf,fn);
  27. if !*trgroeb then << terpri();
  28. groebmessff("polynomial ",f,nil);
  29. groebmessff(" elim . with cofactor ",cf," to ");
  30. vdpprint fn;terpri();groetimeprint() >>;
  31. symbolic procedure groebmess3(p,s);
  32. if !*trgroebs then << prin2 " S - polynomial from ";
  33. groebpairprint p;vdpprint s;terpri();
  34. groetimeprint();terprit 3 >>;
  35. symbolic procedure groebmess4(p,d);
  36. << hcount!* := hcount!* + 1;
  37. hzerocount!* := hzerocount!* + 1;
  38. if !*trgroeb then << terpri();printbl();
  39. groebmessff(" reduction(",cadr p,nil);
  40. groebmessff(",",caddr p,nil);
  41. prin2 ")leads to 0;";
  42. prin2 n;
  43. prin2 if n = 1 then " pair" else " pairs" >> where n = length d;
  44. prin2t " left ";
  45. printbl();groetimeprint() >>;
  46. symbolic procedure groebmess41 p;
  47. << hcount!* := hcount!* + 1;
  48. hzerocount!* := hzerocount!* + 1;
  49. if !*trgroeb then << terpri();printbl();
  50. groebmessff(" polynomial(",p,nil);
  51. prin2 ")reduced to 0;";
  52. terpri();printbl();groetimeprint() >> >>;
  53. symbolic procedure groebmess5(p,h);
  54. if car p then
  55. << hcount!* := hcount!* + 1;
  56. if !*trgroeb then << terpri();prin2 " H - polynomial ";
  57. prin2 pcount!*;prin2 " ev : ";prin2 vdpevlmon h;
  58. groebmessff(" from pair(",cadr p,nil);
  59. groebmessff(",",caddr p,")");
  60. vdpprint h;terpri();groetimeprint() >> >>
  61. else
  62. if !*trgroeb then << prin2t " from actual problem input : ";
  63. vdpprint h;groetimeprint() >>;
  64. symbolic procedure groebmess50 g;
  65. if !*trgroeb1 then << prin2 " list of active polynomials : ";
  66. for each d1 in g do
  67. << prin2 vdpgetprop(d1,'number);prin2 " " >>;terprit 2 >>;
  68. symbolic procedure groebmess51 d;
  69. if !*trgroeb1 then <<
  70. prin2t " Candidates for pairs in this step : ";
  71. for each d1 in d do groebpairprint d1;terprit 2 >>;
  72. symbolic procedure groebmess52 d;
  73. if !*trgroeb1 then <<
  74. prin2t " Actual new pairs from this step : ";
  75. for each d1 in d do groebpairprint d1;terprit 2 >>;
  76. symbolic procedure groebmess7 h;
  77. if !*trgroebs then
  78. << prin2t " Testing factorization for ";vdpprint h >>;
  79. symbolic procedure groebmess8(g,d);
  80. if !*trgroeb1 then <<
  81. g := g;prin2t " actual pairs : ";
  82. if null d then prin2t " null "
  83. else for each d1 in d do groebpairprint d1;
  84. groetimeprint() >>
  85. else if !*trgroeb then <<
  86. prin2 n;prin2t if n = 1 then " pair" else " pairs " >>
  87. where n = length d;
  88. symbolic procedure groebmess13(g,problems);
  89. if !*trgroeb or !*trgroebr then <<
  90. if g then << basecount!* := basecount!* + 1;
  91. printbl();printbl();
  92. prin2 " end of iteration ";
  93. for each f in reverse factorlevel!* do
  94. << prin2 f;prin2 " . " >>;
  95. prin2 ";basis ";prin2 basecount!*;prin2t " : ";
  96. prin2 " { ";for each g1 in g do vdpprin3t g1;prin2t " } ";
  97. printbl();printbl();groetimeprint() >>
  98. else
  99. << printbl();prin2 " end of iteration branch ";
  100. for each f in reverse factorlevel!* do
  101. << prin2 f;prin2 " . " >>;
  102. prin2t " ";printbl();groetimeprint() >>;
  103. if problems and !*trgroeb then
  104. << groetimeprint();terpri();printbl();
  105. prin2 " number of partial problems still to be solved : ";
  106. prin2t length problems;terpri();
  107. prin2 " preparing next problem ";
  108. if car car problems = 'file then prin2 cdr car problems
  109. else if cadddr car problems then
  110. vdpprint car cadddr car problems;terpri() >> >>;
  111. symbolic procedure groebmess14(h,hf);
  112. if !*trgroeb then <<
  113. prin2 " ******************* factorization of polynomial ";
  114. (if x then prin2t x else terpri())where x = vdpnumber h;
  115. prin2t " factors : ";
  116. for each g in hf do vdpprint car g;groetimeprint() >>;
  117. symbolic procedure groebmess15 f;
  118. if !*trgroeb then
  119. << prin2t " ***** monomial factor reduced : ";
  120. vdpprint vdpfmon(a2vbc 1,f)>>;
  121. symbolic procedure groebmess19(p,restr,u);
  122. if !*trgroeb then <<
  123. u := u;restr := restr;printbl();
  124. prin2 " calculation branch ";
  125. for each f in reverse factorlevel!* do
  126. << prin2 f;prin2 " . " >>;
  127. prin2t " cancelled because ";vdpprint p;
  128. prin2t " is member of an actual abort condition ";
  129. printbl();printbl() >>;
  130. symbolic procedure groebmess19a(p,u);
  131. if !*trgroeb then << u := u;printbl();
  132. prin2 " during branch preparation ";
  133. for each f in reverse u do << prin2 f;prin2 "." >>;
  134. prin2t " cancelled because ";vdpprint p;
  135. prin2t " was found in the ideal branch ";printbl() >>;
  136. symbolic procedure groebmess20 p;
  137. if !*trgroeb then <<
  138. terpri();prin2 " secondary reduction starting with ";vdpprint p >>;
  139. symbolic procedure groebmess21(p1,p2);
  140. if !*trgroeb then <<
  141. prin2 " polynomial ";prin2 vdpnumber p1;
  142. prin2 " replaced during secondary reduction by ";
  143. vdpprint p2 >>;
  144. symbolic procedure groebmess22(factl,abort1,abort2);
  145. if null factl then nil
  146. else if !*trgroeb then
  147. begin integer n;
  148. prin2t " BRANCHING after factorization point ";
  149. n := 0;for each x in reverse factl do
  150. << n := n+1;prin2 " branch ";
  151. for each f in reverse factorlevel!* do << prin2 f;prin2 " . " >>;
  152. prin2t n;for each y in car x do vdpprint y;
  153. prin2t " simple IGNORE restrictions for this branch : ";
  154. for each y in abort1 do vdpprint y;
  155. for each y in cadr x do vdpprint y;
  156. if abort2 or caddr x then
  157. << prin2t " set type IGNORE restrictions for this branch : ";
  158. for each y in abort2 do vdpprintset y;
  159. for each y in caddr x do vdpprintset y >>;
  160. printbl() >> end;
  161. symbolic procedure groebmess23(g0,rest1,rest2);
  162. if !*trgroeb then
  163. if null factorlevel!* then
  164. prin2t " ** starting calculation ****************************** "
  165. else << prin2 "** resuming calculation for branch ";
  166. for each f in reverse factorlevel!* do << prin2 f;prin2 "." >>;
  167. terpri();if rest1 or rest2 then
  168. << prin2t " -------IGNORE restrictions for this branch : ";
  169. g0 := g0;for each x in rest1 do vdpprint x;
  170. for each x in rest2 do vdpprintset x >> >>;
  171. symbolic procedure groebmess24(h,problems1,restr);
  172. % if !*trgroeb then
  173. << prin2t " ********** polynomial affected by branch restriction : ";
  174. vdpprint h;if restr then prin2t " under current restrictions ";
  175. for each x in restr do vdpprint x;
  176. if null problems1 then prin2t " CANCELLED "
  177. else << prin2t " partitioned into ";vdpprintset car problems1 >> >>;
  178. symbolic procedure groebmess25(h,abort2);
  179. << prin2t " reduction of set type cancel conditions by ";
  180. vdpprint h;prin2t " remaining : ";
  181. for each x in abort2 do vdpprintset x >>;
  182. symbolic procedure groebmess26(f1,f2);
  183. if !*trgroebs and not vdpequal(f1,f2)then
  184. << terpri();prin2t " during final reduction ";
  185. vdpprint f1;prin2t " reduced to ";vdpprint f2;terpri() >>;
  186. symbolic procedure groebmess27 r;
  187. if !*trgroeb then << terpri();
  188. prin2t " factor ignored(considered already): ";vdpprint r >>;
  189. symbolic procedure groebmess27a(h,r);
  190. if !*trgroeb then
  191. << terpri();vdpprint h;
  192. prin2t " reduced to zero by factor ";vdpprint r >>;
  193. symbolic procedure groebmess28 r;
  194. if !*trgroeb then
  195. << writepri(" interim content reduction : ",'first);
  196. writepri(mkquote prepsq r,'last)>>;
  197. symbolic procedure groebmess29 omega;
  198. if !*trgroeb then
  199. << terpri();prin2 " actual weight vector : [ ";
  200. for each x in omega do << prin2 " ";prin2 x >>;prin2 " ] ";
  201. terpri();terpri() >>;
  202. symbolic procedure groebmess30 gomegaplus;
  203. if !*trgroeb and gomegaplus then
  204. << terpri();prin2 " new head term(or full)basis ";terpri();
  205. for each x in gomegaplus do << vdpprint x;terpri() >> >>;
  206. symbolic procedure groebmess31 gg;
  207. if !*trgroeb then << prin2 " full basis ";terpri();
  208. for each x in gg do << vdpprint x;terpri();terpri() >> >>;
  209. symbolic procedure groebmess32 g;
  210. if !*trgroeb then << terpri();
  211. prin2 " ***** start of iteation with ";terpri();
  212. for each x in g do vdpprint x;
  213. prin2 " **************************** ";terpri() >>;
  214. symbolic procedure groebmess33 g;
  215. if !*trgroeb then
  216. << terpri();prin2 " ***** resulting system ***** ";terpri();
  217. for each x in g do vdpprint x;
  218. prin2 " **************************** ";terpri() >>;
  219. symbolic procedure groebmess34 mx;
  220. if !*trgroeb then
  221. << terpri();prin2 " sum of weight vector ";print mx;terpri() >>;
  222. symbolic procedure groebmess35 omega;
  223. if !*trgroeb then
  224. << terpri();prin2 " next weight vector ";print omega;terpri() >>;
  225. symbolic procedure groebmess36 tt;
  226. if !*trgroeb then
  227. << terpri();prin2 " new weight : ";print tt >>;
  228. symbolic procedure groebmess37 s;
  229. if !*trgroeb then
  230. << if not s then prin2 " NOT ";prin2 " taking initials ";
  231. terpri();terpri() >>;
  232. symbolic procedure printbl();printb(linelength nil #- 2);
  233. symbolic procedure printb n;<< for i := 1 : n do prin2 "-";terpri() >>;
  234. symbolic procedure vdpprintset l;
  235. if l then << prin2 " { ";vdpprin2 car l;
  236. for each x in cdr l do << prin2 ";";vdpprin2 x >>;
  237. prin2t " } " >>;
  238. symbolic procedure vdpprin2l u;
  239. << prin2 "(";vdpprin2 car u;
  240. for each x in cdr u do << prin2 ",";vdpprin2 x >>;rin2 ")" >>;
  241. endmodule;;end;