Changeset ca0d3b5 in git


Ignore:
Timestamp:
Oct 28, 2015, 1:51:20 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
e57f485f2c88f4cf7d5d1ceff79ea4c9103d2204
Parents:
e736f717a4d2e550245f1677b099556f119a6d3c
Message:
simplified debug for facstd: now always via option(teach)
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    re736f71 rca0d3b5  
    28972897  #endif
    28982898  #endif
    2899   /*==================== facstd_debug ==================================*/
    2900   #if !defined(SING_NDEBUG)
    2901       if(strcmp(sys_cmd,"facstd")==0)
    2902       {
    2903         extern int strat_nr;
    2904         extern int strat_fac_debug;
    2905         strat_fac_debug=(int)(long)h->Data();
    2906         strat_nr=0;
    2907         return FALSE;
    2908       }
    2909       else
    2910   #endif
    29112899  #ifdef HAVE_RING2TOM
    29122900  /*==================== ring-GB ==================================*/
  • kernel/GBEngine/kstdfac.cc

    re736f71 rca0d3b5  
    2525#include <kernel/GBEngine/kstdfac.h>
    2626
    27 #ifndef SING_NDEBUG
    2827int strat_nr=0;
    29 int strat_fac_debug=0;
    30 #endif
    3128/*3
    3229* copy o->T to n->T, assumes that n->S is already copied
     
    259256    if (TEST_OPT_DEBUG)
    260257    {
    261       Print("-> %d factors\n",fac_elems);
    262       if (fac_elems!=1)
    263       {
    264         pWrite(p); PrintS(" ->\n");
    265         int ii=fac_elems;
    266         while(ii>0) { ii--;pWrite(fac->m[ii]); }
    267       }
     258      Print("%d factors:\n",fac_elems);
     259      pWrite(p); PrintS(" ->\n");
     260      int ii=fac_elems;
     261      while(ii>0) { ii--;pWrite(fac->m[ii]); }
    268262    }
    269263    else if (TEST_OPT_PROT)
     
    275269      }
    276270    }
    277 #ifndef SING_NDEBUG
    278     else if (strat_fac_debug)
    279     {
    280       pWrite(p);
    281       Print("-> %d factors\n",fac_elems);
    282       if (fac_elems!=1)
    283       {
    284         int ii=fac_elems;
    285         while(ii>0) { ii--;pWrite(fac->m[ii]); }
    286       }
    287     }
    288 #endif
    289271    return TRUE;
    290272  }
     
    376358      if (TEST_OPT_DEBUG)
    377359      {
    378         PrintS("new s:");
    379         wrp(n->P.p);
    380         PrintLn();
     360        Print("new s(%d)->S:",n->nr);
     361        pWrite(n->P.p);
    381362      }
    382363      enterpairs(n->P.p,n->sl,n->P.ecart,pos,n);
     
    401382        if (TEST_OPT_DEBUG)
    402383        {
    403           PrintS("new D:\n");
     384          Print("new s(%d)->D:\n",n->nr);
    404385          iiWriteMatrix((matrix)n->D,"D",1,currRing,0);
    405386          PrintLn();
    406387        }
    407388      }
    408 #ifndef SING_NDEBUG
    409       if(strat_fac_debug)
    410       {
    411         int ii;
    412         Print("---------------------------------------------------------------\ns(%d), set S\n",n->nr);
    413         for(ii=0;ii<n->sl;ii++)
    414         { Print("s(%d->S[%d]= ",n->nr,ii);pWrite(n->S[ii]);}
    415         Print("s(%d), set D\n",n->nr);
    416         if (n->D!=NULL)
    417         {
    418           for(ii=0;ii<IDELEMS(n->D);ii++)
    419           { Print("s(%d->D[%d]= ",n->nr,ii);pWrite(n->D->m[ii]);}
    420         }
    421         else PrintS(" empty\n");
    422       }
    423 #endif
    424389
    425390      fac_copy->m[i]=pCopy(fac->m[i]);
     
    437402            if (r==NULL)
    438403            {
    439 #ifndef SING_NDEBUG
    440               if(strat_fac_debug)
    441               {
    442                 Print("empty set s(%d) because: D[%d] -> 0\n",
    443                        n->nr, j);
    444                 Print("s(%d)->D[%d]= ",n->nr,j);pWrite(n->D->m[j]);
    445               }
    446 #endif
    447404              if (TEST_OPT_DEBUG)
    448405              {
    449                 PrintS("empty set because:");
    450                 wrp(n->D->m[j]);
    451                 PrintLn();
     406                Print("empty set s(%d) because D[%d]:",n->nr,j);
     407                pWrite(n->D->m[j]);
    452408                messageSets(n);
    453409              }
     
    489445          {
    490446            ideal r=kNF(n->Shdl,NULL,Lj->d,0,KSTD_NF_LAZY | KSTD_NF_NONORM);
    491 #ifndef SING_NDEBUG
    492               if(strat_fac_debug)
    493               {
    494                 Print("empty set s(%d) because:L[%d]\n",n->nr,Lj->nr);
    495                 PrintS("L:\n");
    496                 iiWriteMatrix((matrix)Lj->d,"L",1,currRing,0);
    497               }
    498 #endif
    499447            if (idIs0(r))
    500448            {
     
    502450              {
    503451                Print("empty set because:L[%p]\n",(void *)Lj);
     452                iiWriteMatrix((matrix)Lj->d,"L",1,currRing,0);
    504453              }
    505454              while (n->Ll >= 0) deleteInL(n->L,&n->Ll,n->Ll,n);
     
    725674          }
    726675        }
    727 #ifndef SING_NDEBUG
    728         if(strat_fac_debug)
    729         {
    730           int ii;
    731           Print("-------------------------------------------------------------\ns(%d), set S\n",n->nr);
    732           for(ii=0;ii<n->sl;ii++)
    733           { Print("s(%d->S[%d]= ",n->nr,ii);pWrite(n->S[ii]);}
    734           Print("s(%d), set D\n",n->nr);
    735           if (n->D!=NULL)
    736           {
    737             for(ii=0;ii<IDELEMS(n->D);ii++)
    738             { Print("s(%d->D[%d]= ",n->nr,ii);pWrite(n->D->m[ii]);}
    739           }
    740           else PrintS(" empty\n");
    741         }
    742 #endif
    743676
    744677        fac_copy->m[i]=pCopy(fac->m[i]);
     
    756689              if (r==NULL)
    757690              {
    758 #ifndef SING_NDEBUG
    759                 if(strat_fac_debug)
    760                 {
    761                   Print("empty set s(%d) because: D[%d] -> 0\n",
    762                        n->nr, j);
    763                   Print("s(%d)->D[%d]= ",n->nr,j);pWrite(n->D->m[j]);
    764                 }
    765 #endif
    766691                if (TEST_OPT_DEBUG)
    767692                {
    768                   PrintS("empty set because:");
    769                   wrp(n->D->m[j]);
    770                   PrintLn();
     693                  Print("empty set s(%d) because: D[%d]:", n->nr,j);
     694                  pWrite(n->D->m[j]);
    771695                  messageSets(n);
    772696                }
     
    812736              if (idIs0(r))
    813737              {
    814 #ifndef SING_NDEBUG
    815                 if(strat_fac_debug)
    816                 {
    817                   Print("empty set s(%d) because:L[%d]\n",n->nr,Lj->nr);
    818                   PrintS("L:\n");
    819                   iiWriteMatrix((matrix)Lj->d,"L",1,currRing,0);
    820                 }
    821 #endif
    822738                if (TEST_OPT_DEBUG)
    823739                {
    824                   Print("empty set because:L[%p]\n",(void*)Lj);
     740                  #ifdef KDEBUG
     741                  Print("empty set s(%d) because:L[%d]\n",n->nr,Lj->nr);
     742                  #else
     743                  Print("empty set s(%d) because:\n",n->nr);
     744                  #endif
     745                  iiWriteMatrix((matrix)Lj->d,"L",1,currRing,0);
    825746                }
    826747                while (n->Ll >= 0) deleteInL(n->L,&n->Ll,n->Ll,n);
     
    865786    kTest_TS(strat);
    866787  }
     788#ifdef KDEBUG
    867789  if (TEST_OPT_DEBUG) messageSets(strat);
     790#endif
    868791  /* complete reduction of the standard basis--------- */
    869792  /* release temp data-------------------------------- */
     
    981904        if (idIs0(r))
    982905        {
    983 #ifndef SING_NDEBUG
    984           if(strat_fac_debug)
    985           {
    986             Print("empty set L(%d) because:L(%d)\n",Lj->nr,Li->nr);
     906#ifdef KDEBUG
     907          if (TEST_OPT_DEBUG)
     908          {
     909            Print("empty set L[%p] because:L[%p]\n",(void*)Lj,(void*)Li);
    987910          }
    988911#endif
    989           if (TEST_OPT_DEBUG)
    990           {
    991             Print("empty set L[%p] because:L[%p]\n",(void*)Lj,(void*)Li);
    992           }
    993912          // delete L[j],
    994913          Li=L;
  • kernel/GBEngine/kutil.cc

    re736f71 rca0d3b5  
    97109710{
    97119711  memset(this, 0, sizeof(skStrategy));
    9712 #ifndef SING_NDEBUG
    97139712  strat_nr++;
    97149713  nr=strat_nr;
    9715   if (strat_fac_debug) Print("s(%d) created\n",nr);
    9716 #endif
    97179714  tailRing = currRing;
    97189715  P.tailRing = currRing;
  • kernel/GBEngine/kutil.h

    re736f71 rca0d3b5  
    175175};
    176176
    177 #ifndef SING_NDEBUG
    178177extern int strat_nr;
    179 extern int strat_fac_debug;
    180 #endif
    181178
    182179class sLObject : public sTObject
     
    345342  omBin lmBin;
    346343  omBin tailBin;
    347 #ifndef SING_NDEBUG
    348344  int nr;
    349 #endif
    350345  int cp,c3;
    351   int cv; // in shift bases: counting V criterion
    352346  int sl,mu;
    353347  int syzl,syzmax,syzidxmax;
     
    363357  #ifdef HAVE_SHIFTBBA
    364358  int lV;
     359  int cv; // in shift bases: counting V criterion
    365360  #endif
    366361  BOOLEAN interpt;
  • libpolys/polys/simpleideals.h

    re736f71 rca0d3b5  
    5252  ideal_list next;
    5353  ideal      d;
    54 #ifndef SING_NDEBUG
     54#ifdef KDEBUG
    5555  int nr;
    5656#endif
Note: See TracChangeset for help on using the changeset viewer.