Changeset 86ff333 in git


Ignore:
Timestamp:
Feb 7, 2018, 4:15:27 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b589d885903c0731e6b4e32e8bc16f6db8315b8f
Parents:
2d5de0e852ecfab863aa4029489f8f45a35259f2
Message:
add: allow interrupt with partial results in std(bba+mora), removed ADIDEBUG
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/khstd.cc

    r2d5de0e r86ff333  
    2121
    2222#include "kernel/polys.h"
    23 
    24 #define ADIDEBUG 0
    25 
    2623
    2724/*2
     
    153150  newhilb =hHstdSeries(Lm,w,strat->kHomW,Q,currRing); // ,strat->tailRing?
    154151
    155 #if ADIDEBUG
    156 PrintS("\nOriginal\n");
    157 int   i, j, l, k;
    158   if (hilb == NULL)
    159     return;
    160   l = hilb->length()-1;
    161   k = (*hilb)[l];
    162   for (i = 0; i < l; i++)
    163   {
    164     j = (*hilb)[i];
    165     if (j != 0)
    166     {
    167       Print("//  %8d t^%d\n", j, i+k);
    168     }
    169   }
    170   PrintS("\nActual\n");
    171   if (newhilb == NULL)
    172     return;
    173   l = newhilb->length()-1;
    174   k = (*newhilb)[l];
    175   for (i = 0; i < l; i++)
    176   {
    177     j = (*newhilb)[i];
    178     if (j != 0)
    179     {
    180       Print("//  %8d t^%d\n", j, i+k);
    181     }
    182   }
    183 #endif
    184 
    185152  if(newhilb->compare(hilb) == 0)
    186153  {
  • kernel/GBEngine/kspoly.cc

    r2d5de0e r86ff333  
    2020#include "kernel/polys.h"
    2121#endif
    22 
    23 //#define ADIDEBUG 0
    2422
    2523#ifdef KDEBUG
     
    516514                 kStrategy strat)
    517515{
    518 #ifdef ADIDEBUG
    519 printf("\nksReducePolySig\n");
    520 pWrite(PR->p);pWrite(PR->sig);
    521 pWrite(PW->p);pWrite(PW->sig);
    522 #endif
    523516#ifdef KDEBUG
    524517  red_count++;
     
    614607      if(PR->sig == NULL)
    615608      {
    616         #ifdef ADIDEBUG
    617         printf("\nPossible sigdrop in ksreducepolysig (lost signature)\n");
    618         #endif
    619609        strat->sigdrop=TRUE;
    620610      }
     
    633623        if(pLtCmp(PR->sig,origsig) == -1)
    634624        {
    635           #ifdef ADIDEBUG
    636           printf("\nSigdrop in ksreducepolysig from * to *\n");pWrite(origsig);pWrite(PR->sig);
    637           #endif
    638625          strat->sigdrop=TRUE;
    639626        }
  • kernel/GBEngine/kstd1.cc

    r2d5de0e r86ff333  
    1212#define MORA_USE_BUCKETS
    1313
    14 //#define ADIDEBUG 0
    15 //#define ADIDEBUG_NF 0
    1614#define PRE_INTEGER_CHECK 0
    1715
     
    351349  long d,reddeg;
    352350
    353 
    354 #ifdef ADIDEBUG_NF
    355   int iii;
    356   PrintS("\n---------------------------- NEW REDRILOC COMPUTATION ----------------------------\n");
    357   PrintS("    The pair h :\n");
    358   PrintS("\n      p1 = "); p_Write(h->p1,strat->tailRing);
    359   PrintS("\n      p2 = "); p_Write(h->p2,strat->tailRing);
    360   PrintS("\n      p  = "); p_Write(h->p,strat->tailRing);
    361   PrintS("\n    The actual reducer T is: ");
    362   if(strat->tl<0)
    363     {PrintS(" Empty.\n");}
    364   else
    365   {
    366     for (iii=0;iii<=strat->tl;iii++)
    367     {
    368       Print("\n      T[%i] = ",iii);p_Write(strat->T[iii].p,strat->tailRing);
    369     }
    370   }
    371 #endif /* ADIDEBUG_NF */
    372 
    373351  d = h->GetpFDeg()+ h->ecart;
    374352  reddeg = strat->LazyDegree+d;
    375353  h->SetShortExpVector();
    376 #ifdef ADIDEBUG_NF
    377   Print("\n  Searching for a poly in T that divides h (of ecart %i) ...\n",h->ecart);
    378 #endif
    379354  loop
    380355  {
    381356    j = kFindDivisibleByInT(strat, h);
    382 #ifdef ADIDEBUG_NF
    383     if(j != -1)
    384     {
    385       ei = strat->T[j].ecart;
    386       Print("\n    Found one: T[%i] of ecart %i: ",j,ei);
    387       p_Write(strat->T[j].p,strat->tailRing);
    388       PrintS("\n    Try to find another with smaller ecart:\n");
    389     }
    390     else
    391     {
    392       PrintS("\n    No poly in T divides h.\n");
    393     }
    394     //getchar();
    395 #endif
    396357    if (j < 0)
    397358    {
     
    420381    ei = strat->T[j].ecart;
    421382    ii = j;
    422 #ifdef ADIDEBUG_NF
    423     iii=ii;
    424 #endif
    425383    if (ei > h->ecart && ii < strat->tl)
    426384    {
     
    451409        {
    452410          // the polynomial to reduce with is now
    453           #ifdef ADIDEBUG_NF
    454           printf("\n    Intermidiate one, h.ecart = %i < ecart = %i < ei = %i: ",h->ecart,strat->T[i].ecart, ei);
    455           pWrite(strat->T[i].p);
    456           #endif
    457411          ii = i;
    458412          ei = strat->T[i].ecart;
     
    461415        }
    462416      }
    463 
    464 #ifdef ADIDEBUG_NF
    465       if(iii == ii)
    466       {
    467         PrintS("\n    None was found.\n");
    468       }
    469       else
    470       {
    471         Print("\n    A better one (ecart = %i): T[%i] = ",ei,ii);
    472         p_Write(strat->T[ii].p,strat->tailRing);
    473         PrintLn();
    474       }
    475 #endif
    476417    }
    477418
     
    479420    if (ei > h->ecart)
    480421    {
    481       #ifdef ADIDEBUG_NF
    482       printf("\nHAD TO REDUCE WITH BIGGER ECART!!!\n");
    483       #endif
    484422      // It is not possible to reduce h with smaller ecart;
    485423      // if possible h goes to the lazy-set L,i.e
     
    516454    if (h->IsNull())
    517455    {
    518       #ifdef ADIDEBUG_NF
    519       printf("\nReduced to 0. Exit\n");
    520       #endif
    521456      if (h->lcm!=NULL) pLmDelete(h->lcm);
    522457      h->Clear();
     
    537472      // this has the side effect of setting h->length
    538473      h->ecart = h->pLDeg(strat->LDegLast) - h->GetpFDeg();
    539     #ifdef ADIDEBUG_NF
    540     printf("\n  Partial Reduced (ecart %i) h = ",h->ecart);p_Write(h->p,strat->tailRing);
    541     PrintLn();
    542     #endif
    543474    /*- try to reduce the s-polynomial -*/
    544475    pass++;
     
    853784      if (H.p==NULL) return NULL;
    854785    }
    855     #ifdef ADIDEBUG_NF
    856     printf("\nSearching for a reducer...\n");
    857     #endif
    858786    if (p_LmShortDivisibleBy(strat->T[j].GetLmTailRing(), strat->sevT[j], H.GetLmTailRing(), not_sev, strat->tailRing)
    859787        && (n_DivBy(H.p->coef, strat->T[j].p->coef,strat->tailRing->cf))
     
    865793      int li = strat->T[j].length;
    866794      int ii = j;
    867       #ifdef ADIDEBUG_NF
    868       printf("\nFound: j = %i, ecart = %i\nTrying to find a better one...\n",j,ei);pWrite(strat->T[j].p);
    869       #endif
    870795      /*
    871796      * the polynomial to reduce with (up to the moment) is;
     
    893818          li = strat->T[j].length;
    894819          ii = j;
    895           #ifdef ADIDEBUG_NF
    896           printf("\nFound a better one: j = %i, ecart = %i\nTrying to find a better one...\n",j,ei);
    897           pWrite(strat->T[j].p);
    898           #endif
    899820        }
    900821      }
     
    914835        * we have to reduce with bad ecart: H has to enter in T
    915836        */
    916         #ifdef ADIDEBUG_NF
    917         printf("\nHAVE TO REDUCE IT WITH BIGGER ECART\n");
    918         #endif
    919837        doRed(&H,&(strat->T[ii]),TRUE,strat,TRUE);
    920838        if (H.p == NULL)
     
    930848          return NULL;
    931849      }
    932       #ifdef ADIDEBUG_NF
    933       printf("\nAfter the small reduction it looks like this:\n");pWrite(H.p);
    934       getchar();
    935       #endif
    936850      /*- try to reduce the s-polynomial -*/
    937851      o = H.SetpFDeg();
     
    16041518ideal mora (ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat)
    16051519{
    1606 #ifdef HAVE_RINGS
    1607 #ifdef ADIDEBUG
    1608 int loop_count;
    1609 loop_count = 1;
    1610 #endif
    1611 #endif
    16121520  int olddeg = 0;
    16131521  int reduc = 0;
     
    16721580  while (strat->Ll >= 0)
    16731581  {
    1674     #ifdef ADIDEBUG
    1675     printf("\n      ------------------------NEW LOOP\n");
    1676     printf("\nShdl = \n");
    1677     for(int iii = 0; iii<= strat->sl; iii++)
    1678     {
    1679         printf("S[%i]:",iii);
    1680         p_Write(strat->S[iii], strat->tailRing);
    1681     }
    1682     printf("\n   list   L has %i\n", strat->Ll);
    1683     int iii;
    1684     #ifdef ADIDEBUG
    1685     for(iii = 0; iii<= strat->Ll; iii++)
    1686     {
    1687         printf("L[%i]:",iii);
    1688         pWrite(strat->L[iii].p);
    1689         pWrite(strat->L[iii].p1);
    1690         pWrite(strat->L[iii].p2);
    1691     }
    1692     #endif
    1693     getchar();
    1694     #endif
    16951582    #ifdef KDEBUG
    16961583    if (TEST_OPT_DEBUG) messageSets(strat);
    16971584    #endif
    1698     if (TEST_OPT_DEGBOUND
    1699     && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg))
     1585    if (siCntrlc
     1586    || (TEST_OPT_DEGBOUND
     1587      && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg)))
    17001588    {
    17011589      /*
     
    17031591      * - 24 (degBound)
    17041592      *   && upper degree is bigger than Kstd1_deg
     1593      * or siCntrlc
    17051594      */
    1706       while ((strat->Ll >= 0)
    1707         && (strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL)
    1708         && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg)
     1595      while ((strat->Ll >= 0) &&
     1596        siCntrlc
     1597        || ((strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL)
     1598          && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg))
    17091599      )
    17101600      {
     
    17591649        message(strat->P.ecart+strat->P.GetpFDeg(),&olddeg,&reduc,strat, red_result);
    17601650      // reduce
    1761       #ifdef ADIDEBUG
    1762       printf("\nThis is P vor red:\n");p_Write(strat->P.p,strat->tailRing);p_Write(strat->P.p1,strat->tailRing);p_Write(strat->P.p2,strat->tailRing);
    1763       printf("\nBefore Ll = %i\n", strat->Ll);
    1764       #endif
    17651651      red_result = strat->red(&strat->P,strat);
    1766       #ifdef ADIDEBUG
    1767       printf("\nThis is P nach red:\n");p_Write(strat->P.p,strat->tailRing);p_Write(strat->P.p1,strat->tailRing);p_Write(strat->P.p2,strat->tailRing);
    1768       printf("\nAfter Ll = %i\n", strat->Ll);
    1769       #endif
    17701652    }
    17711653
     
    18051687        enterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl);
    18061688      // put in S
    1807 
    1808         #ifdef ADIDEBUG
    1809         Print("\n    The new pair list L -- after superenterpairs in loop %d -- is:\n",loop_count);
    1810         for(int iii=0;iii<=strat->Ll;iii++)
    1811         {
    1812           printf("\n    L[%d]:\n",iii);
    1813           PrintS("         ");p_Write(strat->L[iii].p,strat->tailRing);
    1814           PrintS("         ");p_Write(strat->L[iii].p1,strat->tailRing);
    1815           PrintS("         ");p_Write(strat->L[iii].p2,strat->tailRing);
    1816         }
    1817         #endif
    18181689      strat->enterS(strat->P,
    18191690                    posInS(strat,strat->sl,strat->P.p, strat->P.ecart),
    18201691                    strat, strat->tl);
    1821       #ifdef ADIDEBUG
    1822       printf("\nThis pair has been added to S:\n");
    1823       pWrite(strat->P.p);
    1824       pWrite(strat->P.p1);
    1825       pWrite(strat->P.p2);
    1826       #endif
    1827 
    18281692      // apply hilbert criterion
    18291693      if (hilb!=NULL)
     
    23212185      {
    23222186        idInsertPoly(FCopy, pFmon);
    2323         #ifdef ADIDEBUG
    2324         printf("\nPreintegerCheck found this constant:\n");pWrite(pFmon);
    2325         #endif
    2326 
    23272187        strat->kModW=kModW=NULL;
    23282188        if (h==testHomog)
     
    23572217        strat->homog=h;
    23582218      }
    2359       #ifdef ADIDEBUG
    2360       else
    2361       {
    2362         printf("\npreIntegerCheck didn't found any new information\n");
    2363       }
    2364       #endif
    23652219      omTestMemory(1);
    23662220      if(w == NULL)
     
    25532407    int sbaEnterS = -1;
    25542408    bool sigdrop = TRUE;
    2555     #ifdef ADIDEBUG
    2556     printf("\nEnter the nice kSba loop\n");
    2557     #endif
    25582409    //This is how we set the SBA algorithm;
    25592410    int totalsbaruns = 1,blockedreductions = 20,blockred = 0,loops = 0;
     
    26792530            r=sba(r,Q,NULL,hilb,strat);
    26802531          }
    2681           #ifdef ADIDEBUG
    2682           printf("\nSBA Run %i: %i elements (syzCrit = %i,rewCrit = %i)\n",loops,IDELEMS(r),strat->nrsyzcrit,strat->nrrewcrit);
    2683           idPrint(r);
    2684           //getchar();
    2685           #endif
    26862532        }
    26872533      }
     
    27002546      sbaEnterS = strat->sbaEnterS;
    27012547      blockred = strat->blockred;
    2702       #ifdef ADIDEBUG
    2703       printf("\nsbaEnterS = %i\n",sbaEnterS);
    2704       #endif
    27052548      delete(strat);
    27062549      if ((delete_w)&&(w!=NULL)&&(*w!=NULL)) delete *w;
     
    27092552    if(sigdrop || blockred > blockedreductions)
    27102553    {
    2711       #ifdef ADIDEBUG
    2712       printf("\nWent to std\n");
    2713       idPrint(r);
    2714       getchar();
    2715       #endif
    27162554      r = kStd(r, Q, h, w, hilb, syzComp, newIdeal, vw);
    27172555    }
  • kernel/GBEngine/kstd2.cc

    r2d5de0e r86ff333  
    1010#include "kernel/mod2.h"
    1111
    12 //#define ADIDEBUG 1
    1312#define GCD_SBA 1
    1413
     
    879878  assume(rField_is_Ring(currRing));
    880879  #if GCD_SBA
    881   #ifdef ADIDEBUG
    882   printf("\nBefore sbaCheckGcdPair ");pWrite(h->p);
    883   #endif
    884880  while(sbaCheckGcdPair(h,strat))
    885881  {
    886     #ifdef ADIDEBUG
    887     printf("\nIntermidiate sbaCheckGcdPair ");pWrite(h->p);
    888     #endif
    889882    h->sev = pGetShortExpVector(h->p);
    890883  }
    891   #ifdef ADIDEBUG
    892   printf("\nAfter sbaCheckGcdPair ");pWrite(h->p);
    893   #endif
    894884  #endif
    895885  poly beforeredsig;
     
    900890  //printf("FDEGS: %ld -- %ld\n",h->FDeg, h->pFDeg());
    901891  assume(h->FDeg == h->pFDeg());
    902   #ifdef ADIDEBUG
    903   printf("\n--------------------------redSig-------------------------------------\n");
    904   printf("\nBefore redSig:\n");
    905   p_Write(h->p,strat->tailRing);pWrite(h->sig);
    906   #endif
    907892//#if 1
    908893#ifdef DEBUGF5
     
    935920    {
    936921      #if GCD_SBA
    937       #ifdef ADIDEBUG
    938       printf("\nBefore sbaCheckGcdPair ");pWrite(h->p);
    939       #endif
    940922      while(sbaCheckGcdPair(h,strat))
    941923      {
    942         #ifdef ADIDEBUG
    943         printf("\nIntermidiate sbaCheckGcdPair ");pWrite(h->p);
    944         #endif
    945924        h->sev = pGetShortExpVector(h->p);
    946925        h->is_redundant = FALSE;
    947926        start = 0;
    948927      }
    949       #ifdef ADIDEBUG
    950       printf("\nAfter sbaCheckGcdPair ");pWrite(h->p);
    951       #endif
    952928      #endif
    953929      // over ZZ: cleanup coefficients by complete reduction with monomials
     
    970946        if(pLtCmp(beforeredsig,h->sig) == 1)
    971947        {
    972           #ifdef ADIDEBUG
    973           printf("\nSigDrop after reduce\n");pWrite(beforeredsig);pWrite(h->sig);
    974           #endif
    975948          strat->sigdrop = TRUE;
    976949          //Reduce it as much as you can
     
    979952          {
    980953            //It reduced to 0, cancel the sigdrop
    981             #ifdef ADIDEBUG
    982             printf("\nReduced to 0 via redRing. Cancel sigdrop\n");
    983             #endif
    984954            strat->sigdrop = FALSE;
    985955            p_Delete(&h->sig,currRing);h->sig = NULL;
     
    988958          else
    989959          {
    990             #ifdef ADIDEBUG
    991             printf("\nReduced to this via redRing.SIGDROP\n");pWrite(h->p);
    992             #endif
    993960            //strat->enterS(*h, strat->sl+1, strat, strat->tl);
    994961            return 0;
     
    10591026    printf("INDEX OF REDUCER T: %d\n",ii);
    10601027#endif
    1061     #ifdef ADIDEBUG
    1062     printf("\nWe reduce it with:\n");p_Write(strat->T[ii].p,strat->tailRing);pWrite(strat->T[ii].sig);
    1063     #endif
    10641028    sigSafe = ksReducePolySigRing(h, &(strat->T[ii]), strat->S_2_R[ii], NULL, NULL, strat);
    1065     #ifdef ADIDEBUG
    1066     printf("\nAfter small reduction:\n");pWrite(h->p);pWrite(h->sig);
    1067     #endif
    10681029    if(h->p == NULL && h->sig == NULL)
    10691030    {
     
    10761037    if(rField_is_Ring(currRing) && h->p != NULL && pLmCmp(h->p,strat->T[ii].p)==0)
    10771038    {
    1078       #ifdef ADIDEBUG
    1079       printf("\nReducer and Original have same LT. Force it with redRing!\n");
    1080       #endif
    10811039      int red_result = redRing(h,strat);
    10821040      if(red_result == 0)
    10831041      {
    1084         #ifdef ADIDEBUG
    1085         printf("\nRedRing reduced it to 0. Perfect\n");
    1086         #endif
    10871042        pDelete(&h->sig);h->sig = NULL;
    10881043        return 0;
     
    10901045      else
    10911046      {
    1092         #ifdef ADIDEBUG
    1093         printf("\nRedRing reduced it to *.\nHave to sigdrop now\n");pWrite(h->p);
    1094         #endif
    10951047        strat->sigdrop = TRUE;
    10961048        return 1;
     
    12331185      }
    12341186      strat->redTailChange=TRUE;
    1235       #ifdef ADIDEBUG
    1236       printf("\nWill TAILreduce * with *:\n");p_Write(Ln.p,strat->tailRing);pWrite(Ln.sig);
    1237       p_Write(With->p,strat->tailRing);pWrite(With->sig);pWrite(L->sig);
    1238       #endif
    12391187      int ret = ksReducePolyTailSig(L, With, &Ln, strat);
    12401188      if(rField_is_Ring(currRing))
     
    12421190      //Because Ln.sig is set to L->sig, but in ksReducePolyTailSig -> ksReducePolySig
    12431191      // I delete it an then set Ln.sig. Hence L->sig is lost
    1244       #ifdef ADIDEBUG
    1245       printf("\nAfter small TAILreduce:\n");pWrite(Ln.p);pWrite(Ln.sig);pWrite(L->sig);
    1246       #endif
    12471192#if SBA_PRINT_REDUCTION_STEPS
    12481193      if (ret != 3)
     
    20141959  while (strat->Ll >= 0)
    20151960  {
    2016     #ifdef ADIDEBUG
    2017     printf("\n      ------------------------NEW LOOP\n");
    2018     printf("\nShdl = \n");
    2019     #if 0
    2020     idPrint(strat->Shdl);
    2021     #else
    2022     for(int ii = 0; ii<=strat->sl;ii++)
    2023         p_Write(strat->S[ii],strat->tailRing);
    2024     #endif
    2025     printf("\n   list   L\n");
    2026     int iii;
    2027     #if 1
    2028     for(iii = 0; iii<= strat->Ll; iii++)
    2029     {
    2030         printf("L[%i]:",iii);
    2031         p_Write(strat->L[iii].p, currRing);
    2032         p_Write(strat->L[iii].p1, currRing);
    2033         p_Write(strat->L[iii].p2, currRing);
    2034     }
    2035     #else
    2036     {
    2037         printf("L[%i]:",strat->Ll);
    2038         p_Write(strat->L[strat->Ll].p, strat->tailRing);
    2039         p_Write(strat->L[strat->Ll].p1, strat->tailRing);
    2040         p_Write(strat->L[strat->Ll].p2, strat->tailRing);
    2041     }
    2042     #endif
    2043     #if 0
    2044     for(iii = 0; iii<= strat->Bl; iii++)
    2045     {
    2046         printf("B[%i]:",iii);
    2047         p_Write(strat->B[iii].p, /*strat->tailRing*/currRing);
    2048         p_Write(strat->B[iii].p1, /*strat->tailRing*/currRing);
    2049         p_Write(strat->B[iii].p2, strat->tailRing);
    2050     }
    2051     #endif
    2052     //getchar();
    2053     #endif
    20541961    #ifdef KDEBUG
    20551962      if (TEST_OPT_DEBUG) messageSets(strat);
    20561963    #endif
    20571964    if (strat->Ll== 0) strat->interpt=TRUE;
    2058     if (TEST_OPT_DEGBOUND
     1965    if (siCntrlc
     1966    || (TEST_OPT_DEGBOUND
    20591967        && ((strat->honey && (strat->L[strat->Ll].ecart+currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
    2060             || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))
     1968            || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg)))))
    20611969    {
    20621970      /*
     
    20641972       * 24 IN test and the degree +ecart of L[strat->Ll] is bigger then
    20651973       *a predefined number Kstd1_deg
     1974       * or siCntrlc
    20661975       */
    20671976      while ((strat->Ll >= 0)
    2068         && (strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL)
    2069         && ((strat->honey && (strat->L[strat->Ll].ecart+currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
     1977        && (siCntrlc ||
     1978          ((strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL)
     1979            && ((strat->honey && (strat->L[strat->Ll].ecart+currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
    20701980            || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg)))
    2071         )
     1981        )))
    20721982        deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
    20731983      if (strat->Ll<0) break;
     
    22072117        // posInS only depends on the leading term
    22082118        strat->enterS(strat->P, pos, strat, strat->tl);
    2209         #ifdef ADIDEBUG
    2210         printf("\nThis element has been added to S:\n");pWrite(strat->P.p);pWrite(strat->P.p1);pWrite(strat->P.p2);
    2211         #endif
    22122119#if 0
    22132120        int pl=pLength(strat->P.p);
     
    25492456  while (strat->Ll >= 0)
    25502457  {
    2551     #ifdef ADIDEBUG
    2552     printf("\n      ------------------------NEW LOOP\n");
    2553     printf("\nShdl = \n");
    2554     #if 0
    2555     idPrint(strat->Shdl);
    2556     #else
    2557     for(int ii = 0; ii<=strat->sl;ii++)
    2558     {
    2559       printf("\nS[%i]:  ",ii);p_Write(strat->S[ii],strat->tailRing);
    2560       printf("sig:   ");pWrite(strat->sig[ii]);
    2561     }
    2562     #endif
    2563     #if 0
    2564     for(int iii = 0; iii< strat->syzl; iii++)
    2565     {
    2566         printf("\nsyz[%i]:\n",iii);
    2567         p_Write(strat->syz[iii], currRing);
    2568     }
    2569     #endif
    2570     #if 0
    2571     for(int iii = 0; iii<= strat->tl; iii++)
    2572     {
    2573         printf("\nT[%i]:\n",iii);
    2574         p_Write(strat->T[iii].p, currRing);
    2575     }
    2576     #endif
    2577     printf("\n   list   L\n");
    2578     int iii;
    2579     #if 0
    2580     for(iii = 0; iii<= strat->Ll; iii++)
    2581     {
    2582         printf("\nL[%i]:\n",iii);
    2583         p_Write(strat->L[iii].p, currRing);
    2584         p_Write(strat->L[iii].p1, currRing);
    2585         p_Write(strat->L[iii].p2, currRing);
    2586         p_Write(strat->L[iii].sig, currRing);
    2587     }
    2588     #else
    2589     {
    2590         printf("L[%i]:",strat->Ll);
    2591         p_Write(strat->L[strat->Ll].p, strat->tailRing);
    2592         p_Write(strat->L[strat->Ll].p1, strat->tailRing);
    2593         p_Write(strat->L[strat->Ll].p2, strat->tailRing);
    2594         p_Write(strat->L[strat->Ll].sig, currRing);
    2595     }
    2596     #endif
    2597     //getchar();
    2598     #endif
    25992458    if (strat->Ll > lrmax) lrmax =strat->Ll;/*stat.*/
    26002459    #ifdef KDEBUG
     
    26432502    if(rField_is_Ring(currRing))
    26442503      strat->sbaEnterS = pGetComp(strat->P.sig) - 1;
    2645 
    2646     #ifdef ADIDEBUG
    2647     printf("\n-------------------------\nThis is the current element P\n");
    2648     p_Write(strat->P.p,strat->tailRing);
    2649     p_Write(strat->P.p1,strat->tailRing);
    2650     p_Write(strat->P.p2,strat->tailRing);
    2651     p_Write(strat->P.sig,currRing);
    2652     #endif
    26532504    /* reduction of the element chosen from L */
    26542505    if (!strat->rewCrit2(strat->P.sig, ~strat->P.sevSig, strat->P.GetLmCurrRing(), strat, strat->P.checked+1))
     
    27592610        strat->P.sev = pGetShortExpVector(strat->P.p);
    27602611    }
    2761     #ifdef ADIDEBUG
    2762     printf("\nAfter reduce (redresult=%i): \n",red_result);pWrite(strat->P.p);pWrite(strat->P.sig);
    2763     #endif
    27642612    //sigdrop case
    27652613    if(rField_is_Ring(currRing) && strat->sigdrop)
    27662614    {
    27672615      //First reduce it as much as one can
    2768       #ifdef ADIDEBUG
    2769       printf("\nSigdrop in the reduce. Trying redring\n");
    2770       #endif
    27712616      red_result = redRing(&strat->P,strat);
    27722617      if(red_result == 0)
    27732618      {
    2774         #ifdef ADIDEBUG
    2775         printf("\nSigdrop cancelled since redRing reduced to 0\n");
    2776         #endif
    27772619        strat->sigdrop = FALSE;
    27782620        pDelete(&strat->P.sig);
     
    27812623      else
    27822624      {
    2783         #ifdef ADIDEBUG
    2784         printf("\nStill Sigdrop - redRing reduced to:\n");pWrite(strat->P.p);
    2785         #endif
    27862625        strat->enterS(strat->P, 0, strat, strat->tl);
    27872626        if (TEST_OPT_PROT)
     
    27922631    if(rField_is_Ring(currRing) && strat->blockred > strat->blockredmax)
    27932632    {
    2794       #ifdef ADIDEBUG
    2795       printf("\nToo many blocked reductions\n");
    2796       #endif
    27972633      strat->sigdrop = TRUE;
    27982634      break;
     
    28882724      if(rField_is_Ring(currRing) && strat->sigdrop)
    28892725      {
    2890         #ifdef ADIDEBUG
    2891         printf("\n Still sigdrop after redtailSba - it reduced to \n");pWrite(strat->P.p);
    2892         #endif
    28932726        strat->enterS(strat->P, 0, strat, strat->tl);
    28942727        break;
     
    28992732      if(strat->P.sig == NULL || pLtCmp(beforetailred,strat->P.sig) == 1)
    29002733      {
    2901         #ifdef ADIDEBUG
    2902         printf("\nSigDrop after TAILred\n");pWrite(beforetailred);pWrite(strat->P.sig);
    2903         #endif
    29042734        strat->sigdrop = TRUE;
    29052735        //Reduce it as much as you can
     
    29082738        {
    29092739          //It reduced to 0, cancel the sigdrop
    2910           #ifdef ADIDEBUG
    2911           printf("\nReduced to 0 via redRing. Cancel sigdrop\n");
    2912           #endif
    29132740          strat->sigdrop = FALSE;
    29142741          p_Delete(&strat->P.sig,currRing);strat->P.sig = NULL;
     
    29162743        else
    29172744        {
    2918           #ifdef ADIDEBUG
    2919           printf("\nReduced to this via redRing.SIGDROP\n");pWrite(strat->P.p);
    2920           #endif
    29212745          strat->enterS(strat->P, 0, strat, strat->tl);
    29222746          break;
     
    29282752        goto case_when_red_result_changed;
    29292753    }
    2930     #ifdef ADIDEBUG
    2931     printf("\nNach redTailSba: \n");
    2932     p_Write(strat->P.p,strat->tailRing);p_Write(strat->P.sig,currRing);
    2933     #endif
    29342754    // remove sigsafe label since it is no longer valid for the next element to
    29352755    // be reduced
     
    29892809      else
    29902810        enterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl);
    2991       #ifdef ADIDEBUG
    2992         printf("\nThis element is added to S\n");
    2993         p_Write(strat->P.p, strat->tailRing);p_Write(strat->P.p1, strat->tailRing);p_Write(strat->P.p2, strat->tailRing);pWrite(strat->P.sig);
    2994         //getchar();
    2995         #endif
    29962811      if(rField_is_Ring(currRing) && strat->sigdrop)
    29972812        break;
  • kernel/GBEngine/kutil.cc

    r2d5de0e r86ff333  
    1212#define MYTEST 0
    1313
    14 //#define ADIDEBUG 1
    1514//All vs Just strategy over rings:
    1615// 1 - Just
     
    344343  if (rField_is_Ring(r) /*&& (rHasLocalOrMixedOrdering(r))*/)
    345344    lc = pGetCoeff(p);
    346   #ifdef ADIDEBUG
    347   printf("\n        cancelunit\n");
    348   pWrite(p);
    349   #endif
    350345#ifdef HAVE_RINGS
    351346  // Leading coef have to be a unit
     
    406401      // Note: As long as qring j forbidden if j contains integer (i.e. ground rings are
    407402      //       domains), no zerodivisor test needed  CAUTION
    408       #ifdef ADIDEBUG
    409       pWrite(h);
    410       #endif
    411403      if (!n_DivBy(pGetCoeff(h),lc,r->cf))
    412404      {
    413         #ifdef ADIDEBUG
    414         printf("\nDoes not divide\n");
    415         #endif
    416405        return;
    417406      }
    418       #ifdef ADIDEBUG
    419       printf("\nDivides. Go On\n");
    420       #endif
    421407      pIter(h);
    422408    }
     
    13441330    compare=pDivCompRing(strat->B[j].lcm,h.lcm);
    13451331    compareCoeff = n_DivComp(pGetCoeff(strat->B[j].lcm), pGetCoeff(h.lcm), currRing->cf);
    1346     #ifdef ADIDEBUG
    1347     printf("\nChainCrit in enteronepairring\n");
    1348     printf("\nB[j]\n");
    1349     pWrite(strat->B[j].p);
    1350     pWrite(strat->B[j].p1);
    1351     pWrite(strat->B[j].p2);
    1352     pWrite(strat->B[j].lcm);
    1353     printf("\nh - neue Paar\n");
    1354     pWrite(h.p);
    1355     pWrite(p);
    1356     pWrite(strat->S[i]);
    1357     pWrite(h.lcm);
    1358     printf("\ncompare = %i\ncompareCoeff = %i\n",compare,compareCoeff);
    1359     #endif
    13601332    if(compare == pDivComp_EQUAL)
    13611333    {
     
    13651337        if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0))
    13661338        {
    1367           #ifdef ADIDEBUG
    1368           printf("\ndelete h\n");
    1369           #endif
    13701339          strat->c3++;
    13711340          pLmDelete(h.lcm);
     
    13761345      if(compareCoeff == pDivComp_GREATER)
    13771346      {
    1378         #ifdef ADIDEBUG
    1379         printf("\ndelete: B[j]\n");
    1380         #endif
    13811347        deleteInL(strat->B,&strat->Bl,j,strat);
    13821348        strat->c3++;
     
    13861352        if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0))
    13871353        {
    1388           #ifdef ADIDEBUG
    1389           printf("\ndelete h\n");
    1390           #endif
    13911354          strat->c3++;
    13921355          pLmDelete(h.lcm);
     
    14021365        if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0))
    14031366        {
    1404           #ifdef ADIDEBUG
    1405           printf("\ndelete h\n");
    1406           #endif
    14071367          strat->c3++;
    14081368          pLmDelete(h.lcm);
     
    14131373      if(compare == pDivComp_GREATER)
    14141374      {
    1415         #ifdef ADIDEBUG
    1416         printf("\ndelete B[j]\n");
    1417         #endif
    14181375        deleteInL(strat->B,&strat->Bl,j,strat);
    14191376        strat->c3++;
     
    14231380  number s, t;
    14241381  poly m1, m2, gcd = NULL;
    1425   #ifdef ADIDEBUG
    1426   printf("\nTrying to add spair S[%i] und p\n",i);pWrite(strat->S[i]);pWrite(p);
    1427   #endif
    14281382  s = pGetCoeff(strat->S[i]);
    14291383  t = pGetCoeff(p);
     
    14951449  //h.pCleardenom();
    14961450  //pSetm(h.p);
    1497   #ifdef ADIDEBUG
    1498   printf("\nThis is afterwards:\n");
    1499   pWrite(h.p);
    1500   #endif
    15011451  h.i_r1 = -1;h.i_r2 = -1;
    15021452  strat->initEcart(&h);
     
    15191469  if (currRing!=strat->tailRing)
    15201470    h.t_p = k_LmInit_currRing_2_tailRing(h.p, strat->tailRing);
    1521   #ifdef ADIDEBUG
    1522   printf("\nThis s-poly was added to B:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2);printf("\ni_r1 = %i, i_r2 = %i\n",h.i_r1, h.i_r2);pWrite(strat->T[h.i_r1].p);pWrite(strat->T[h.i_r2].p);
    1523   #endif
    15241471  enterL(&strat->B,&strat->Bl,&strat->Bmax,h,posx);
    15251472  kTest_TS(strat);
     
    16561603    }
    16571604  }
    1658   //#if 1
    1659   #ifdef ADIDEBUG
    1660   printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2);
    1661   #endif
    16621605  return TRUE;
    16631606}
     
    16951638      if(pairsig!= NULL && pLtCmp(pairsig,h->sig) == 0)
    16961639      {
    1697         #ifdef ADIDEBUG
    1698         printf("\nCan replace * (sig = *) with * (sig = *) since of * with sig *\n");
    1699         pWrite(h->p);pWrite(h->sig);pWrite(gcd);pWrite(pairsig);pWrite(strat->S[i]);pWrite(strat->sig[i]);
    1700         //getchar();
    1701         #endif
    17021640        pDelete(&h->p);
    17031641        h->p = gcd;
     
    18391777  if(h.sig == NULL)
    18401778    {
    1841       #ifdef ADIDEBUG
    1842       printf("\nPossible sigdrop in enterpairstrongSig (due to lost of sig)\n");
    1843       #endif
    18441779      //sigdrop since we loose the signature
    18451780      strat->sigdrop = TRUE;
    18461781      //Try to reduce it as far as we can via redRing
    18471782      int red_result = redRing(&h,strat);
    1848       #ifdef ADIDEBUG
    1849       printf("\nAfter redRing reduce:\n");pWrite(h.p);
    1850       #endif
    18511783      if(red_result == 0)
    18521784      {
    18531785        // Cancel the sigdrop
    1854         #ifdef ADIDEBUG
    1855         printf("\nCancel the sigdrop. It reduced to 0\n");
    1856         #endif
    18571786        p_Delete(&h.sig,currRing);h.sig = NULL;
    18581787        strat->sigdrop = FALSE;
     
    18611790      else
    18621791      {
    1863         #ifdef ADIDEBUG
    1864         printf("\nSigdrop. end\n");
    1865         #endif
    18661792        strat->enterS(strat->P,strat->sl+1,strat, strat->tl+1);
    18671793        #if 1
     
    18791805    if(rField_is_Ring(currRing) &&  pLtCmp(h.sig,sig) == -1)
    18801806    {
    1881       #ifdef ADIDEBUG
    1882       printf("\nSigDrop in enteronestrongpolySig\n");
    1883       pWrite(h.sig);
    1884       pWrite(p);pWrite(sig);
    1885       pWrite(strat->S[i]);pWrite(strat->sig[i]);
    1886       #endif
    18871807      strat->sigdrop = TRUE;
    18881808      // Completely reduce it
     
    18911811      {
    18921812        // Reduced to 0
    1893         #ifdef ADIDEBUG
    1894         printf("\nCancel the sigdrop after redRing (=0)\n");
    1895         #endif
    18961813        strat->sigdrop = FALSE;
    18971814        p_Delete(&h.sig,currRing);h.sig = NULL;
     
    19001817      else
    19011818      {
    1902         #ifdef ADIDEBUG
    1903         printf("\nAfter redRing still sigdrop:\n");pWrite(h.p);
    1904         #endif
    19051819        strat->enterS(strat->P,strat->sl+1,strat, strat->tl+1);
    19061820        // 0 - add just the original poly causing the sigdrop, 1 - add also this
     
    19111825      }
    19121826    }
    1913   #ifdef ADIDEBUG
    1914   printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2);pWrite(h.sig);
    1915   #endif
    19161827  //Check for sigdrop
    19171828  if(gcd != NULL && pLtCmp(sig,pairsig) > 0 && pLtCmp(strat->sig[i],pairsig) > 0)
    19181829  {
    1919     #ifdef ADIDEBUG
    1920     printf("\nSigDrop in strongpair\noriginals: ");pWrite(sig);pWrite(strat->sig[i]);
    1921     printf("\nnow: ");pWrite(pairsig);
    1922     #endif
    19231830    strat->sigdrop = TRUE;
    19241831    //Enter this element to S
     
    27052612#endif
    27062613{
    2707   #ifdef ADIDEBUG
    2708   printf("\nTrying to add p and S[%i]\n",i);
    2709   pWrite(p);pWrite(pSig);
    2710   pWrite(strat->S[i]);pWrite(strat->sig[i]);
    2711   #endif
    27122614  #if ALL_VS_JUST
    27132615  //Over rings, if we construct the strong pair, do not add the spair
     
    27642666    pSetCoeff0(m1,s);
    27652667    pSetCoeff0(m2,t);
    2766     #ifdef ADIDEBUG
    2767     printf("\nIn Spoly: m1, m2 :\n");pWrite(m1);pWrite(m2);
    2768     #endif
    27692668  }
    27702669  else
     
    28302729    if(sigCmp == 0)
    28312730    {
    2832       #ifdef ADIDEBUG
    2833       printf("\nPossible sigdrop in enterpairSig (due to lost of sig)\n");
    2834       #endif
    28352731      //sigdrop since we loose the signature
    28362732      strat->sigdrop = TRUE;
     
    28472743      }
    28482744      int red_result = redRing(&Lp,strat);
    2849       #ifdef ADIDEBUG
    2850       printf("\nAfter redRing reduce:\n");pWrite(Lp.p);
    2851       #endif
    28522745      if(red_result == 0)
    28532746      {
    28542747        // Cancel the sigdrop
    2855         #ifdef ADIDEBUG
    2856         printf("\nCancel the sigdrop. It reduced to 0\n");
    2857         #endif
    28582748        p_Delete(&Lp.sig,currRing);Lp.sig = NULL;
    28592749        strat->sigdrop = FALSE;
     
    28622752      else
    28632753      {
    2864         #ifdef ADIDEBUG
    2865         printf("\nSigdrop. end\n");
    2866         #endif
    28672754        strat->enterS(strat->P,strat->sl+1,strat, strat->tl+1);
    28682755        #if 1
     
    29162803      )
    29172804  {
    2918     #ifdef ADIDEBUG
    2919     printf("\nDELETED!\n");
    2920     #endif
    29212805    pDelete(&pSigMult);
    29222806    pDelete(&sSigMult);
     
    30292913    {
    30302914      pLmFree(Lp.lcm);
    3031       #ifdef ADIDEBUG
    3032       printf("\nrewCrit3 deletes it!\n");
    3033       #endif
    30342915      pDelete(&Lp.sig);
    30352916      pDelete (&m1);
     
    31012982    if(rField_is_Ring(currRing) && pLtCmp(Lp.sig,pSig) == -1)
    31022983    {
    3103       #ifdef ADIDEBUG
    3104       printf("\nSigDrop in enteronepairSig\n");pWrite(Lp.sig);
    3105       pWrite(p);pWrite(pSig);
    3106       pWrite(strat->S[i]);pWrite(strat->sig[i]);
    3107       #endif
    31082984      strat->sigdrop = TRUE;
    31092985      // Completely reduce it
     
    31122988      {
    31132989        // Reduced to 0
    3114         #ifdef ADIDEBUG
    3115         printf("\nCancel the sigdrop after redRing (=0)\n");
    3116         #endif
    31172990        strat->sigdrop = FALSE;
    31182991        p_Delete(&Lp.sig,currRing);Lp.sig = NULL;
     
    31212994      else
    31222995      {
    3123         #ifdef ADIDEBUG
    3124         printf("\nAfter redRing still sigdrop:\n");pWrite(Lp.p);
    3125         #endif
    31262996        strat->enterS(strat->P,strat->sl+1,strat, strat->tl+1);
    31272997        // 0 - add just the original poly causing the sigdrop, 1 - add also this
     
    31323002      }
    31333003    }
    3134     #ifdef ADIDEBUG
    3135     printf("\nThis spair was added to B:\n");
    3136     pWrite(Lp.p);
    3137     pWrite(Lp.p1);
    3138     pWrite(Lp.p2);
    3139     pWrite(Lp.sig);
    3140     #endif
    31413004    l = strat->posInLSba(strat->L,strat->Ll,&Lp,strat);
    31423005    enterL(&strat->L,&strat->Ll,&strat->Lmax,Lp,l);
     
    38653728        for (j=0; j<=k; j++)
    38663729        {
    3867           #ifdef ADIDEBUG
    3868           PrintS("\n Trying to add spoly : \n");
    3869           PrintS("                ");p_Write(h, strat->tailRing);
    3870           PrintS("                ");p_Write(strat->S[j],strat->tailRing);
    3871           #endif
    38723730          strat->enterOnePair(j,h,ecart,isFromQ,strat, atR);
    38733731          //Print("j:%d, Ll:%d\n",j,strat->Ll);
     
    40643922              }
    40653923#endif
    4066               #ifdef ADIDEBUG
    4067               printf("\nChainCrit1\n");
    4068               pWrite(strat->B[i].p);
    4069               pWrite(strat->B[i].p1);
    4070               pWrite(strat->B[i].p2);
    4071               #endif
    40723924              deleteInL(strat->B,&strat->Bl,i,strat);
    40733925              strat->c3++;
     
    40893941        if ((pNext(strat->L[j].p) == strat->tail) || (rHasGlobalOrdering(currRing)))
    40903942        {
    4091           #ifdef ADIDEBUG
    4092           printf("\nChainCrit2\n");
    4093           pWrite(strat->L[j].p);
    4094           pWrite(strat->L[j].p1);
    4095           pWrite(strat->L[j].p2);
    4096           #endif
    40973943          deleteInL(strat->L,&strat->Ll,j,strat);
    40983944          strat->c3++;
     
    41584004          }
    41594005#endif
    4160           #ifdef ADIDEBUG
    4161           printf("\nChainCrit3\n");
    4162           pWrite(strat->L[j].p);
    4163           pWrite(strat->L[j].p1);
    4164           pWrite(strat->L[j].p2);
    4165           #endif
    41664006          if (isInPairsetL(i-1,strat->L[j].p1,strat->L[i].p1,&l,strat)
    41674007          && (pNext(strat->L[l].p) == strat->tail)
     
    48044644      if(Lp.sig == NULL || nIsZero(pGetCoeff(Lp.sig)))
    48054645      {
    4806         #ifdef ADIDEBUG
    4807         printf("\nSigdrop in enterextended spoly\n");pWrite(h);pWrite(hSig);
    4808         #endif
    48094646        strat->sigdrop = TRUE;
    48104647        //Try to reduce it as far as we can via redRing
    48114648        int red_result = redRing(&Lp,strat);
    4812         #ifdef ADIDEBUG
    4813         printf("\nAfter redRing reduce:\n");pWrite(Lp.p);
    4814         #endif
    48154649        if(red_result == 0)
    48164650        {
    48174651          // Cancel the sigdrop
    4818           #ifdef ADIDEBUG
    4819           printf("\nCancel the sigdrop. It reduced to 0\n");
    4820           #endif
    48214652          p_Delete(&Lp.sig,currRing);Lp.sig = NULL;
    48224653          strat->sigdrop = FALSE;
     
    48254656        else
    48264657        {
    4827           #ifdef ADIDEBUG
    4828           printf("\nSigdrop. end\n");
    4829           #endif
    48304658          strat->enterS(strat->P,strat->sl+1,strat, strat->tl+1);
    48314659          #if 1
     
    49154743  assume (rField_is_Ring(currRing));
    49164744  // enter also zero divisor * poly, if this is non zero and of smaller degree
    4917   #ifdef ADIDEBUG
    4918   printf("\n      Trying to add extended spolys\n");
    4919   #endif
    49204745  if (!(rField_is_Domain(currRing))) enterExtendedSpolySig(h, hSig, strat);
    49214746  if(strat->sigdrop) return;
    4922   #ifdef ADIDEBUG
    4923   printf("\n      Trying to add spolys\n");
    4924   #endif
    49254747  initenterpairsSigRing(h, hSig, hFrom, k, ecart, 0, strat, atR);
    49264748  if(strat->sigdrop) return;
    4927   #ifdef ADIDEBUG
    4928   printf("\n      Trying to add gcd-polys\n");
    4929   #endif
    49304749  initenterstrongPairsSig(h, hSig, k, ecart, 0, strat, atR);
    49314750  if(strat->sigdrop) return;
     
    71476966      PrintS("DELETE!\n");
    71486967#endif
    7149       #ifdef ADIDEBUG
    7150       printf("\nsyzCrit:\n");pWrite(strat->syz[k]);pWrite(sig);
    7151       #endif
    71526968      strat->nrsyzcrit++;
    71536969      //printf("- T -\n\n");
     
    72007016      (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing->cf) && pLtCmp(sig,strat->syz[k]) == 1)))
    72017017      {
    7202         #ifdef ADIDEBUG
    7203         printf("\nsyzCrit:\n");pWrite(strat->syz[k]);pWrite(sig);
    7204         #endif
    72057018        strat->nrsyzcrit++;
    72067019        return TRUE;
     
    72387051      PrintS("DELETE!\n");
    72397052#endif
    7240       #ifdef ADIDEBUG
    7241       printf("\nFaugere RewCrit: * divisible by *\n");pWrite(sig);pWrite(strat->sig[k]);
    7242       #endif
    72437053      strat->nrrewcrit++;
    72447054      return TRUE;
     
    72787088BOOLEAN arriRewCriterion(poly /*sig*/, unsigned long /*not_sevSig*/, poly /*lm*/, kStrategy strat, int start=0)
    72797089{
    7280   #ifdef ADIDEBUG
    7281   printf("\narriRewCrit\n");
    7282   #endif
    72837090  if(rField_is_Ring(currRing))
    72847091    return FALSE;
     
    72937100      if (!(pLmCmp(p1,p2) == 1))
    72947101      {
    7295         #ifdef ADIDEBUG
    7296         printf("\narriRewCrit deleted: sig, P.sig\n");
    7297         #endif
    72987102        pDelete(&p1);
    72997103        pDelete(&p2);
     
    73097113BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int /*start=0*/)
    73107114{
    7311   #ifdef ADIDEBUG
    7312   printf("\narriRewCritPre\n");
    7313   #endif
    73147115  //Over Rings, there are still some changes to do: considering coeffs
    73157116  if(rField_is_Ring(currRing))
     
    73287129    {
    73297130      deleteInL(strat->B,&strat->Bl,found,strat);
    7330       #ifdef ADIDEBUG
    7331       printf("\nDelete!\n");
    7332       #endif
    73337131    }
    73347132    else
    73357133    {
    7336       #ifdef ADIDEBUG
    7337       printf("\nDelete this one!\n");
    7338       #endif
    73397134      return TRUE;
    73407135    }
     
    73527147        pDelete(&p1);
    73537148        pDelete(&p2);
    7354         #ifdef ADIDEBUG
    7355         printf("\nDelete this one!\n");
    7356         #endif
    73577149        return TRUE;
    73587150      }
     
    95439335  }
    95449336  strat->T[atT] = (TObject) p;
    9545   #ifdef ADIDEBUG
    9546   printf("\nenterT: add in position %i\n",atT);
    9547   p_Write(p.p,strat->tailRing);p_Write(p.sig,currRing);
    9548   #endif
    95499337  //printf("\nenterT: add new: length = %i, ecart = %i\n",p.length,p.ecart);
    95509338
     
    96299417  }
    96309418  strat->T[atT] = (TObject) p;
    9631   #ifdef ADIDEBUG
    9632   printf("\nenterT_strong: add in position %i\n",atT);
    9633   pWrite(p.p);
    9634   #endif
    96359419  //printf("\nenterT_strong: add new: length = %i, ecart = %i\n",p.length,p.ecart);
    96369420
     
    96499433  && !n_IsUnit(p.p->coef, currRing->cf))
    96509434  {
    9651     #ifdef ADIDEBUG
    9652     printf("\nDas ist p:\n");pWrite(p.p);
    9653     #endif
    96549435    for(i=strat->tl;i>=0;i--)
    96559436    {
    96569437      if(strat->T[i].ecart <= p.ecart && pLmDivisibleBy(strat->T[i].p,p.p))
    96579438      {
    9658         #ifdef ADIDEBUG
    9659         printf("\nFound one: %i\n",i);pWrite(strat->T[i].p);
    9660         #endif
    96619439        enterOneStrongPoly(i,p.p,p.ecart,0,strat,0 , TRUE);
    96629440      }
     
    96809458void enterSyz(LObject &p, kStrategy strat, int atT)
    96819459{
    9682   #ifdef ADIDEBUG
    9683   printf("\n  Entersyz:\n");pWrite(p.sig);
    9684   #endif
    96859460  int i;
    96869461  strat->newt = TRUE;
     
    97399514    {
    97409515      //printf("\nYES!\n");
    9741       #ifdef ADIDEBUG
    9742       printf("\n syzCrit deleted!\n");pWrite(strat->L[cc].p);pWrite(strat->L[cc].sig);
    9743       #endif
    97449516      deleteInL(strat->L,&strat->Ll,cc,strat);
    97459517    }
  • libpolys/polys/monomials/p_polys.cc

    r2d5de0e r86ff333  
    4646
    4747#include "clapsing.h"
    48 
    49 #define ADIDEBUG 0
    5048
    5149/*
Note: See TracChangeset for help on using the changeset viewer.