Changeset 743c32 in git


Ignore:
Timestamp:
Apr 29, 1999, 6:57:18 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
Children:
b98018048375e2844cb029948d521db0a81570d8
Parents:
ce5fb2786eb5fa61fee54f85fe8647ef13e7be20
Message:
* hannes: - OPT_DEBUG revisited
          - fixes to sdb


git-svn-id: file:///usr/local/Singular/svn/trunk@3014 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • Singular/febase.inc

    rce5fb2 r743c32  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: febase.inc,v 1.22 1999-04-20 17:02:48 Singular Exp $ */
     4/* $Id: febase.inc,v 1.23 1999-04-29 16:57:12 Singular Exp $ */
    55/*
    66* ABSTRACT: handling of 'voices'
     
    366366* print echo (si_echo or TRACE), set my_yylinebuf
    367367*/
    368 static int fePrintEcho(char *anf)
     368static int fePrintEcho(char *anf, char *b)
    369369{
    370370  char *ss=strchr(anf,'\n');
     
    430430  && (currentVoice->pi->trace_flag!=0))
    431431  {
    432     sdb(currentVoice, anf, len_s);
     432    sdb(currentVoice, anf, len_s, b);
    433433  }
    434434  prompt_char = '.';
     
    485485          strncpy(s,anf,len+2);
    486486          s[len+1]='\0';
    487           fePrintEcho(s);
     487          fePrintEcho(s,b);
    488488          FreeL((ADDRESS)s);
    489489        }
     
    500500          s[len+1]='\0';
    501501          yylineno++;
    502           fePrintEcho(s);
     502          fePrintEcho(s,b);
    503503          FreeL((ADDRESS)s);
    504504        }
     
    541541      fputs(s,feProtFile);
    542542    }
    543     int rc=fePrintEcho(s)+1;
     543    int rc=fePrintEcho(s,b)+1;
    544544    //s[strlen(s)+1]='\0'; add an second \0 at the end of the string
    545545    s[rc]='\0';
  • Singular/hutil.cc

    rce5fb2 r743c32  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: hutil.cc,v 1.9 1998-12-08 10:55:19 pohl Exp $ */
     4/* $Id: hutil.cc,v 1.10 1999-04-29 16:57:13 Singular Exp $ */
    55/*
    66* ABSTRACT: Utilities for staircase operations
     
    142142}
    143143
    144  
     144
    145145void hComp(scfmon exist, int Nexist, Exponent_t ak, scfmon stc, int *Nstc)
    146146{
     
    249249         g -= o;
    250250       else
    251         g = o - g;
     251        g = o - g;
    252252       if (g > h)
    253253         h = g;
  • Singular/iplib.cc

    rce5fb2 r743c32  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iplib.cc,v 1.54 1999-04-15 17:28:04 Singular Exp $ */
     4/* $Id: iplib.cc,v 1.55 1999-04-29 16:57:13 Singular Exp $ */
    55/*
    66* ABSTRACT: interpreter: LIB and help
     
    172172    s[procbuflen+head+2] = '\0';
    173173    offset=0;
    174     for(i=0;i<=procbuflen+head+2; i++) {
     174    for(i=0;i<=procbuflen+head+2; i++)
     175    {
    175176      if(s[i]=='\\' &&
    176          (s[i+1]=='"' || s[i+1]=='{' || s[i+1]=='}' || s[i+1]=='\\')) {
     177         (s[i+1]=='"' || s[i+1]=='{' || s[i+1]=='}' || s[i+1]=='\\'))
     178      {
    177179        i++;
    178180        offset++;
     
    316318  {
    317319    namehdl nshdl;
    318     for(nshdl=namespaceroot; nshdl->isroot != TRUE; nshdl = nshdl->next) {
     320    for(nshdl=namespaceroot; nshdl->isroot != TRUE; nshdl = nshdl->next)
     321    {
    319322      Print("%d lev %d:",nshdl->lev, nshdl->myynest);
    320323      if (nshdl->currRing==NULL) PrintS("NULL");
     
    603606  lib_types LT;
    604607
    605   for(i=0; suffix[i] != NULL; i++) {
     608  for(i=0; suffix[i] != NULL; i++)
     609  {
    606610    sprintf(libname, "%s%s", id, suffix[i]);
    607611    *libname = mytolower(*libname);
    608     if((LT = type_of_LIB(libname, libnamebuf)) != LT_NONE) {
    609       if(!(LoadResult = iiLibCmd(mstrdup(libname), FALSE))) {
     612    if((LT = type_of_LIB(libname, libnamebuf)) != LT_NONE)
     613    {
     614      if(!(LoadResult = iiLibCmd(mstrdup(libname), FALSE)))
     615      {
    610616        v->name = iiConvName(libname);
    611617        break;
     
    813819  }
    814820#ifdef HAVE_NAMESPACES
    815   if (BVERBOSE(V_LOAD_LIB)) {
     821  if (BVERBOSE(V_LOAD_LIB))
     822  {
    816823    idhdl versionhdl  = namespaceroot->get("version",0);
    817824    if(versionhdl != NULL)
     
    10411048         "line", "start", "line", "body", "line", "example");
    10421049#ifdef HAVE_NAMESPACES
    1043 //  for(pl = IDROOT; pl != NULL; pl = IDNEXT(pl)) {
    1044     for(pl = NSROOT(namespaceroot->root); pl != NULL; pl = IDNEXT(pl)) {
    1045     if(IDTYP(pl) == PACKAGE_CMD) {
     1050//  for(pl = IDROOT; pl != NULL; pl = IDNEXT(pl))
     1051//{
     1052    for(pl = NSROOT(namespaceroot->root); pl != NULL; pl = IDNEXT(pl))
     1053    {
     1054    if(IDTYP(pl) == PACKAGE_CMD)
     1055    {
    10461056      for(h = IDPACKAGE(pl)->idroot; h != NULL; h = IDNEXT(h))
    10471057#else /* HAVE_NAMESPACES */
     
    11011111  char *f = NULL;
    11021112  if(hl!=NULL) f = strstr(IDSTRING(hl),libname);
    1103   if( (hl==NULL) || (f == NULL)) {
    1104     for(lp = this;lp!=NULL;lp=lp->next) {
     1113  if( (hl==NULL) || (f == NULL))
     1114  {
     1115    for(lp = this;lp!=NULL;lp=lp->next)
     1116    {
    11051117      if(strcmp(lp->get(), libname)==0) break;
    11061118    }
    1107     if(lp==NULL) {
     1119    if(lp==NULL)
     1120    {
    11081121      libstackv ls = (libstack *)Alloc0(sizeof(libstack));
    11091122      ls->next = this;
     
    11331146lib_types type_of_LIB(char *newlib, char *libnamebuf)
    11341147{
    1135   char  buf[HOWMANY+1]; /* one extra for terminating '\0' */
     1148  char        buf[HOWMANY+1];        /* one extra for terminating '\0' */
    11361149  struct stat sb;
    11371150  int nbytes = 0;
     
    11461159    return LT;
    11471160  }
    1148   if((sb.st_mode & S_IFMT) != S_IFREG) {
     1161  if((sb.st_mode & S_IFMT) != S_IFREG)
     1162  {
    11491163    goto lib_type_end;
    11501164  }
    1151   if ((nbytes = fread((char *)buf, sizeof(char), HOWMANY, fp)) == -1) {
     1165  if ((nbytes = fread((char *)buf, sizeof(char), HOWMANY, fp)) == -1)
     1166  {
    11521167    goto lib_type_end;
    11531168    /*NOTREACHED*/
     
    11551170  if (nbytes == 0)
    11561171    goto lib_type_end;
    1157   else {
    1158     buf[nbytes++] = '\0';       /* null-terminate it */
    1159   }
    1160   if( (strncmp(buf, "\177ELF\01\01\01", 7)==0) && buf[16]=='\03') {
     1172  else
     1173  {
     1174    buf[nbytes++] = '\0';        /* null-terminate it */
     1175  }
     1176  if( (strncmp(buf, "\177ELF\01\01\01", 7)==0) && buf[16]=='\03')
     1177  {
    11611178    LT = LT_ELF;
    11621179    FreeL(newlib);
     
    11641181    goto lib_type_end;
    11651182  }
    1166   if( (strncmp(buf, "\02\020\01\016\05\022@", 7)==0)) {
     1183  if( (strncmp(buf, "\02\020\01\016\05\022@", 7)==0))
     1184  {
    11671185    LT = LT_HPUX;
    11681186    FreeL(newlib);
     
    11701188    goto lib_type_end;
    11711189  }
    1172   if(isprint(buf[0]) || buf[0]=='\n') { LT = LT_SINGULAR; goto lib_type_end; }
     1190  if(isprint(buf[0]) || buf[0]=='\n')
     1191  { LT = LT_SINGULAR; goto lib_type_end; }
    11731192
    11741193  lib_type_end:
  • Singular/kstd1.cc

    rce5fb2 r743c32  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd1.cc,v 1.32 1999-04-29 11:38:45 Singular Exp $ */
     4/* $Id: kstd1.cc,v 1.33 1999-04-29 16:57:14 Singular Exp $ */
    55/*
    66* ABSTRACT:
     
    102102  if (!TEST_OPT_INTSTRATEGY)
    103103    pNorm(*with);
     104  if (TEST_OPT_DEBUG)
     105  {
     106    PrintS("reduce ");wrp((*h).p); PrintS(" with ");wrp(*with);PrintLn();
     107  }
    104108  if (intoT)
    105109  {
     
    111115  {
    112116    (*h).p = spSpolyRed(*with,(*h).p,strat->kNoether, strat->spSpolyLoop);
     117  }
     118  if (TEST_OPT_DEBUG)
     119  {
     120    PrintS("to ");wrp((*h).p);PrintLn();
    113121  }
    114122}
     
    132140    if (j > strat->tl)
    133141    {
    134       if (TEST_OPT_DEBUG) PrintLn();
    135142      return;
    136143    }
    137     if (TEST_OPT_DEBUG) Print("%d",j);
    138144    if (pDivisibleBy1(strat->T[j].p,(*h).p))
    139145    {
    140146      //if (strat->interpt) test_int_std(strat->kIdeal);
    141       if (TEST_OPT_DEBUG) PrintS("+");
    142147      /*- compute the s-polynomial -*/
    143148      if (strat->T[j].ecart > (*h).ecart)
     
    174179      if ((*h).p == NULL)
    175180      {
    176         if (TEST_OPT_DEBUG) PrintS(" to 0\n");
    177181        if (h->lcm!=NULL) pFree1((*h).lcm);
    178182        return;
     
    230234      }
    231235      j = 0;
    232       if TEST_OPT_DEBUG PrintLn();
    233236    }
    234237    else
    235238    {
    236       if (TEST_OPT_DEBUG) PrintS("-");
    237239      j++;
    238240    }
     
    258260    if (j > strat->tl)
    259261    {
    260       if (TEST_OPT_DEBUG) PrintLn();
    261262      return;
    262263    }
    263     if (TEST_OPT_DEBUG) Print("%d",j);
    264264    if (pDivisibleBy1(strat->T[j].p,(*h).p))
    265265    {
    266266      //if (strat->interpt) test_int_std(strat->kIdeal);
    267       if (TEST_OPT_DEBUG) PrintS("+");
    268267      /*- compute the s-polynomial -*/
    269268      pi = strat->T[j].p;
     
    281280        i++;
    282281        if (i > strat->tl) break;
    283         if (TEST_OPT_DEBUG) Print("%d",i);
    284282        if ((((strat->T[i]).ecart < ei)
    285283          || (((strat->T[i]).ecart == ei)
     
    287285          && pDivisibleBy1((strat->T[i]).p,(*h).p))
    288286        {
    289           if (TEST_OPT_DEBUG) PrintS("+");
    290287          /*
    291288           * the polynomial to reduce with is now;
     
    295292          li = strat->T[i].length;
    296293        }
    297         else if (TEST_OPT_DEBUG) PrintS("-");
    298294      }
    299295      /*
     
    329325        }
    330326      }
    331       if (TEST_OPT_DEBUG)
    332       {
    333         wrp(h->p);
    334         PrintS(" with ");
    335         wrp(pi);
    336       }
    337327      doRed(h,&pi,strat->fromT,strat);
    338328      strat->fromT=FALSE;
    339       if (TEST_OPT_DEBUG)
    340       {
    341         PrintS(" to ");
    342         wrp(h->p);
    343         PrintLn();
    344       }
    345329      if ((*h).p == NULL)
    346330      {
     
    404388    else
    405389    {
    406       if (TEST_OPT_DEBUG) PrintS("-");
    407390      j++;
    408391    }
     
    427410    if (j > strat->tl)
    428411    {
    429       if (TEST_OPT_DEBUG) PrintLn();
    430412      return;
    431413    }
    432     if (TEST_OPT_DEBUG) Print("%d",j);
    433414    if (pDivisibleBy1(strat->T[j].p,(*h).p))
    434415    {
    435416      //if (strat->interpt) test_int_std(strat->kIdeal);
    436       if (TEST_OPT_DEBUG) PrintS("+\n");
    437417      /*
    438418      * the polynomial to reduce with is;
     
    443423      if (TEST_OPT_DEBUG)
    444424      {
     425        PrintS("reduce ");
    445426        wrp(h->p);
    446427        PrintS(" with ");
     
    453434        PrintS(" to ");
    454435        wrp(h->p);
     436        PrintLn();
    455437      }
    456438      if ((*h).p == NULL)
     
    503485      }
    504486      j = 0;
    505       if TEST_OPT_DEBUG PrintLn();
    506487    }
    507488    else
    508489    {
    509       if (TEST_OPT_DEBUG) PrintS("-");
    510490      j++;
    511491    }
     
    531511    if (j > strat->tl)
    532512    {
    533       if (TEST_OPT_DEBUG) PrintLn();
    534513      return;
    535514    }
    536     if (TEST_OPT_DEBUG) Print("%d",j);
    537515    if (pDivisibleBy1(strat->T[j].p,(*h).p))
    538516    {
    539517      //if (strat->interpt) test_int_std(strat->kIdeal);
    540       if (TEST_OPT_DEBUG) PrintS("+");
    541518      /*- compute the s-polynomial -*/
    542519      pi = strat->T[j].p;
     
    553530        i++;
    554531        if (i > strat->tl) break;
    555         if (TEST_OPT_DEBUG) Print("%d",i);
    556532        if (((strat->T[i].ecart < ei)
    557533          || ((strat->T[i].ecart == ei)
     
    559535        && pDivisibleBy1(strat->T[i].p,(*h).p))
    560536        {
    561           if (TEST_OPT_DEBUG) PrintS("+");
    562537          /*
    563538          * the polynomial to reduce with is now:
     
    566541          ei = strat->T[i].ecart;
    567542          li = strat->T[i].length;
    568         }
    569         else
    570         {
    571           if (TEST_OPT_DEBUG) PrintS("-");
    572543        }
    573544      }
     
    604575        }
    605576      }
    606       if (TEST_OPT_DEBUG)
    607       {
    608         wrp(h->p);
    609         PrintS(" with ");
    610         wrp(pi);
    611       }
    612577      doRed(h,&pi,strat->fromT,strat);
    613578      strat->fromT=FALSE;
    614       if (TEST_OPT_DEBUG)
    615       {
    616         PrintS(" to ");
    617         wrp(h->p);
    618       }
    619579      if ((*h).p == NULL)
    620580      {
     
    674634      }
    675635      j = 0;
    676       if TEST_OPT_DEBUG PrintLn();
    677636    }
    678637    else
    679638    {
    680       if (TEST_OPT_DEBUG) PrintS("-");
    681639      j++;
    682640    }
     
    705663    if (j > strat->tl)
    706664    {
    707       if (TEST_OPT_DEBUG) PrintLn();
    708665      return H.p;
    709666    }
    710     if (TEST_OPT_DEBUG) Print("%d",j);
    711667    if (pDivisibleBy1(strat->T[j].p,H.p))
    712668    {
    713669      //if (strat->interpt) test_int_std(strat->kIdeal);
    714       if (TEST_OPT_DEBUG) PrintS("+");
    715670      /*- remember the found T-poly -*/
    716671      pi = strat->T[j].p;
     
    728683        if (j > strat->tl) break;
    729684        if (ei <= H.ecart) break;
    730         if (TEST_OPT_DEBUG) Print("%d",j);
    731685        if (((strat->T[j].ecart < ei)
    732686          || ((strat->T[j].ecart == ei)
     
    734688        && pDivisibleBy1(strat->T[j].p,H.p))
    735689        {
    736           if (TEST_OPT_DEBUG) PrintS("+");
    737690          /*
    738691          * the polynomial to reduce with is now;
     
    742695          li = strat->T[j].length;
    743696        }
    744         else
    745         {
    746           if (TEST_OPT_DEBUG) PrintS("-");
    747         }
    748697      }
    749698      /*
     
    765714        if (H.p == NULL)
    766715        {
    767           if (TEST_OPT_DEBUG) PrintS(" to 0\n");
    768716          return NULL;
    769717        }
     
    777725        if (H.p == NULL)
    778726        {
    779           if (TEST_OPT_DEBUG) PrintS(" to 0\n");
    780727          return NULL;
    781728        }
     
    789736    else
    790737    {
    791       if (TEST_OPT_DEBUG) PrintS("-");
    792738      j++;
    793739    }
     
    13521298      while ((strat->Ll >= 0)
    13531299        && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p)> Kstd1_deg)
    1354         && (strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL))
     1300        && (strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL))
    13551301      {
    13561302        deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
  • Singular/kstd2.cc

    rce5fb2 r743c32  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.24 1999-04-29 11:38:46 Singular Exp $ */
     4/* $Id: kstd2.cc,v 1.25 1999-04-29 16:57:15 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    7272        if ((strat->L[i].p1==strat->P.p1) || (strat->L[i].p2==strat->P.p1))
    7373        {
    74 //PrintS("#");
    7574          deleteInL(strat->L,&strat->Ll,i,strat);
    7675        }
     
    8584    PrintS("red:");
    8685    wrp(h->p);
    87     PrintS(" ");
    8886  }
    8987  loop
    9088  {
    91     if (TEST_OPT_DEBUG) Print("%d",j);
    9289    if (pDivisibleBy(strat->S[j],(*h).p))
    9390    {
    94       if (TEST_OPT_DEBUG)
    95       {
    96         PrintS("+\nwith ");
    97         wrp(strat->S[j]);
    98       }
    9991      if ((!exchanged) && (pEqual((*h).p,strat->S[j])))
    10092      {
    101 //PrintS("@");
    10293        q = kFromInput(strat->S[j],strat);
    10394        if (q!=NULL)
    10495        {
    105 //Print("%d*",pGetComp(q));
    10696          exchanged = TRUE;
    10797          p = strat->S[j];
     
    126116      //if (strat->interpt) test_int_std(strat->kIdeal);
    127117      /*- compute the s-polynomial -*/
     118      if (TEST_OPT_DEBUG)
     119      {
     120        PrintS(" with ");
     121        wrp(strat->S[j]);
     122      }
    128123      (*h).p = spSpolyRed(strat->S[j],(*h).p,strat->kNoether,
    129124                          strat->spSpolyLoop);
     125      if (TEST_OPT_DEBUG)
     126      {
     127        PrintS("\nto "); wrp((*h).p);PrintLn();
     128      }
    130129      if ((*h).p == NULL)
    131130      {
    132         if (TEST_OPT_DEBUG) PrintS(" to 0\n");
    133131        if (h->lcm!=NULL) pFree1((*h).lcm);
    134132#ifdef KDEBUG
     
    148146          if (pGetComp((*h).p) > strat->syzComp)
    149147          {
    150 //PrintS("syz");
    151148            pDelete(&((*h).p));
    152149            return;
     
    156153            if (!TEST_OPT_INTSTRATEGY)
    157154            {
    158 //PrintS("r");
    159155              pos = posInS(strat->S,strat->sl,(*h).p);
    160156              pNorm((*h).p);
     
    186182*  and the case of a degree-ordering
    187183*/
    188 static reductions = 0;
    189184
    190185static void redHomog (LObject* h,kStrategy strat)
     
    198193  int j = 0;
    199194
    200   if (TEST_OPT_DEBUG)
    201   {
    202     PrintS("red:");
    203     wrp(h->p);
    204     PrintS(" ");
    205   }
    206195  if (strat->ak!=0)
    207196  {
    208197    loop
    209198      {
    210         if (TEST_OPT_DEBUG) Print("%d",j);
    211199        if (pDivisibleBy1(strat->S[j],(*h).p))
    212200        {
    213           reductions++;
    214           if (TEST_OPT_DEBUG)
    215           {
    216             Print("+\n%d:with ", reductions);
    217             wrp(strat->S[j]);
    218           }
    219201          //if (strat->interpt) test_int_std(strat->kIdeal);
    220202          /*- compute the s-polynomial -*/
     203          if (TEST_OPT_DEBUG)
     204          {
     205            PrintS("red:");
     206            wrp(h->p);
     207            PrintS(" with ");
     208            wrp(strat->S[j]);
     209          }
    221210          (*h).p = spSpolyRed(strat->S[j],(*h).p,strat->kNoether,
    222211                              strat->spSpolyLoop);
     212          if (TEST_OPT_DEBUG)
     213          {
     214            PrintS("\nto ");
     215            wrp(h->p);
     216            PrintLn();
     217          }
    223218          if ((*h).p == NULL)
    224219          {
    225             if (TEST_OPT_DEBUG) PrintS(" to 0\n");
    226220            if (h->lcm!=NULL) pFree1((*h).lcm);
    227221#ifdef KDEBUG
     
    248242    loop
    249243      {
    250         if (TEST_OPT_DEBUG) Print("%d",j);
    251244        if (pDivisibleBy2(strat->S[j],(*h).p))
    252245        {
    253           reductions++;
    254           if (TEST_OPT_DEBUG)
    255           {
    256             Print("+\n%d:with ",reductions);
    257             wrp(strat->S[j]);
    258           }
    259246          //if (strat->interpt) test_int_std(strat->kIdeal);
    260247          /*- compute the s-polynomial -*/
     248          if (TEST_OPT_DEBUG)
     249          {
     250            PrintS("red:");
     251            wrp(h->p);
     252            PrintS(" with ");
     253            wrp(strat->S[j]);
     254          }
    261255          (*h).p = spSpolyRed(strat->S[j],(*h).p,strat->kNoether,
    262256                              strat->spSpolyLoop);
     257          if (TEST_OPT_DEBUG)
     258          {
     259            PrintS("\nto ");
     260            wrp(h->p);
     261            PrintLn();
     262          }
    263263          if ((*h).p == NULL)
    264264          {
    265             if (TEST_OPT_DEBUG) PrintS(" to 0\n");
    266265            if (h->lcm!=NULL) pFree1((*h).lcm);
    267266#ifdef KDEBUG
     
    269268#endif
    270269            return;
    271           }
    272           if (TEST_OPT_DEBUG)
    273           {
    274             Print(" to %d:", pLength((*h).p));
    275             wrp((*h).p);
    276             PrintS("\n");
    277270          }
    278271          j = 0;
     
    306299  int k = 0;
    307300
    308   if (TEST_OPT_DEBUG)
    309   {
    310     PrintS("red:");
    311     wrp(h->p);
    312     PrintS(" ");
    313   }
    314301  if (strat->ak)
    315302  {
    316303    loop
    317304      {
    318         if (TEST_OPT_DEBUG) Print("%d",j);
    319305        if (pDivisibleBy1(strat->T[j].p,(*h).p))
    320306        {
    321307          //if (strat->interpt) test_int_std(strat->kIdeal);
     308          /*- compute the s-polynomial -*/
    322309          if (TEST_OPT_DEBUG)
    323310          {
    324             PrintS("+\nwith ");
    325             wrp(strat->S[j]);
    326           }
    327           /*- compute the s-polynomial -*/
     311            PrintS("red:");
     312            wrp(h->p);
     313            PrintS(" with ");
     314            wrp(strat->T[j].p);
     315          }
    328316          (*h).p = spSpolyRed(strat->T[j].p,(*h).p,strat->kNoether,
    329317                              strat->spSpolyLoop);
     318          if (TEST_OPT_DEBUG)
     319          {
     320            PrintS("\nto ");
     321            wrp(h->p);
     322            PrintLn();
     323          }
    330324          if ((*h).p == NULL)
    331325          {
    332             if (TEST_OPT_DEBUG) PrintS(" to 0\n");
    333326            if (h->lcm!=NULL) pFree1((*h).lcm);
    334327#ifdef KDEBUG
     
    362355
    363356        // no module component
    364         if (TEST_OPT_DEBUG) Print("%d",j);
    365357        if (pDivisibleBy2(strat->T[j].p,(*h).p))
    366358        {
    367359          //if (strat->interpt) test_int_std(strat->kIdeal);
     360          /*- compute the s-polynomial -*/
    368361          if (TEST_OPT_DEBUG)
    369362          {
    370             PrintS("+\nwith ");
    371             wrp(strat->S[j]);
    372           }
    373           /*- compute the s-polynomial -*/
     363            PrintS("red:");
     364            wrp(h->p);
     365            PrintS(" with ");
     366            wrp(strat->T[j].p);
     367          }
    374368          (*h).p = spSpolyRed(strat->T[j].p,(*h).p,strat->kNoether,
    375369                              strat->spSpolyLoop);
     370          if (TEST_OPT_DEBUG)
     371          {
     372            PrintS("\nto ");
     373            wrp(h->p);
     374            PrintLn();
     375          }
    376376          if ((*h).p == NULL)
    377377          {
    378             if (TEST_OPT_DEBUG) PrintS(" to 0\n");
    379378            if (h->lcm!=NULL) pFree1((*h).lcm);
    380379#ifdef KDEBUG
     
    422421  int reddeg = pFDeg((*h).p);
    423422
    424   if (TEST_OPT_DEBUG)
    425   {
    426     PrintS("red:");
    427     wrp(h->p);
    428     PrintS(" ");
    429   }
    430423  loop
    431424  {
     
    433426    {
    434427      //if (strat->interpt) test_int_std(strat->kIdeal);
     428      /*- compute the s-polynomial -*/
    435429      if (TEST_OPT_DEBUG)
    436430      {
    437         Print("\nwith S[%d] ",j);
    438         wrp(strat->S[j]);
    439       }
    440       /*- compute the s-polynomial -*/
     431        PrintS("red:");
     432        wrp(h->p);
     433        PrintS(" with ");
     434        wrp(strat->T[j].p);
     435      }
    441436      (*h).p = spSpolyRed(strat->S[j],(*h).p,strat->kNoether
    442437                          , strat->spSpolyLoop);
     438      if (TEST_OPT_DEBUG)
     439      {
     440        PrintS("\nto ");
     441        wrp(h->p);
     442        PrintLn();
     443      }
    443444      if ((*h).p == NULL)
    444445      {
    445         if (TEST_OPT_DEBUG) PrintS(" to 0\n");
    446446        if (h->lcm!=NULL) pFree1((*h).lcm);
    447447#ifdef KDEBUG
     
    450450        return;
    451451      }
    452 #ifdef KDEBUG
    453       else if (TEST_OPT_DEBUG)
    454       {
    455         PrintS("to:");
    456         wrp((*h).p);
    457         PrintLn();
    458       }
    459 #endif
    460452      /*- try to reduce the s-polynomial -*/
    461453      pass++;
     
    494486      if (j >= strat->sl)
    495487      {
    496         if (TEST_OPT_DEBUG) PrintLn();
    497488        if (TEST_OPT_INTSTRATEGY)
    498489        {
     
    526517  pass = j = 0;
    527518  d = reddeg = pFDeg((*h).p)+(*h).ecart;
    528   if (TEST_OPT_DEBUG)
    529   {
    530     PrintS("red:");
    531     wrp((*h).p);
    532   }
    533519  loop
    534520  {
    535521    if (pDivisibleBy1(strat->T[j].p,(*h).p))
    536522    {
    537       if (TEST_OPT_DEBUG) Print(" T[%d]",j);
    538523      pi = strat->T[j].p;
    539524      ei = strat->T[j].ecart;
     
    553538        if ((strat->T[i].ecart < ei) && pDivisibleBy1(strat->T[i].p,(*h).p))
    554539        {
    555           if (TEST_OPT_DEBUG) Print(" T[%d]",i);
    556540          /*
    557541          * the polynomial to reduce with is now;
     
    594578      if (TEST_OPT_DEBUG)
    595579      {
    596         PrintS("\nwith ");
     580        PrintS("red:");
     581        wrp(h->p);
     582        PrintS(" with ");
    597583        wrp(pi);
    598584      }
     
    607593      if (TEST_OPT_DEBUG)
    608594      {
    609         PrintS(" to ");
    610         wrp((*h).p);
     595        PrintS("\nto ");
     596        wrp(h->p);
    611597        PrintLn();
    612598      }
     
    681667      if (j >= strat->tl)
    682668      {
    683         if (TEST_OPT_DEBUG) PrintLn();
    684669        if (TEST_OPT_INTSTRATEGY)
    685670        {
     
    863848  int z = 3;
    864849
    865  if (TEST_OPT_DEBUG)
    866  {
    867    PrintS("red:");wrp(h);
    868  }
    869850  if (0 > strat->sl)
    870851  {
    871     if (TEST_OPT_DEBUG) PrintLn();
    872852    return h;
    873853  }
     
    880860      if (TEST_OPT_DEBUG)
    881861      {
    882         Print("\nwith S[%d]:",j);wrp(strat->S[j]);
     862        PrintS("red:");
     863        wrp(h);
     864        PrintS(" with ");
     865        wrp(strat->S[j]);
    883866      }
    884867      h = spSpolyRed(strat->S[j],h,strat->kNoether, strat->spSpolyLoop);
     
    887870        PrintS("\nto:");
    888871        wrp(h);
    889         if (h==NULL) PrintLn();
    890872      }
    891873      if (h == NULL) return NULL;
     
    11441126                    strat->P.p = redtailBba(strat->P.p,pos-1,strat);
    11451127                    //if (strat->redTailChange)
    1146                       pCleardenom(strat->P.p);
     1128                      pCleardenom(strat->P.p);
    11471129                  }
    11481130                }
     
    13931375                  strat->P.p = redtailBba(strat->P.p,pos-1,strat);
    13941376                  //if (strat->redTailChange)
    1395                     pCleardenom(strat->P.p);
     1377                    pCleardenom(strat->P.p);
    13961378                }
    13971379              }
  • Singular/kutil.cc

    rce5fb2 r743c32  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.32 1999-04-29 11:38:48 Singular Exp $ */
     4/* $Id: kutil.cc,v 1.33 1999-04-29 16:57:16 Singular Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    27502750        pTest(h.p);
    27512751#endif
    2752 #ifdef KDEBUG
     2752#ifdef SDRING
    27532753        if (TEST_OPT_DEBUG && pSDRING)
    27542754        {
     
    29202920        {
    29212921          h.p=redBba(h.p,strat->sl,strat);
    2922           if (h.p!=NULL)
     2922          if (h.p!=NULL)
    29232923            h.p=redtailBba(h.p,strat->sl,strat);
    29242924        }
     
    30943094      {
    30953095        h1 = spSpolyRedNew(strat->S[j],h,strat->kNoether, strat->spSpolyLoop);
     3096        if(TEST_OPT_DEBUG)
     3097        {
     3098          PrintS("reduce "); wrp(h); Print(" with S[%d] (",j);wrp(strat->S[j]);
     3099          PrintS(")\nto "); wrp(h1); PrintLn();
     3100        }
    30963101        pDelete(&h);
    30973102        if (h1 == NULL) return NULL;
     
    31473152        && ((strat->fromQ==NULL) || (strat->fromQ[i]==0)))
    31483153        {
    3149           if (TEST_OPT_DEBUG)
    3150           {
    3151             PrintS("reduce:");
    3152             wrp(strat->S[i]);
    3153           }
    31543154          pDelete(&redSi);
    31553155          redSi = pHead(strat->S[i]);
     
    31573157          if ((strat->ak!=0)&&(strat->S[i]!=NULL))
    31583158            strat->S[i]=redQ(strat->S[i],i+1,strat); /*reduce S[i] mod Q*/
     3159          if (TEST_OPT_DEBUG && (pComp(redSi,strat->S[i])!=0))
     3160          {
     3161            PrintS("reduce:");
     3162            wrp(redSi);PrintS(" to ");wrp(strat->S[i]);PrintLn();
     3163          }
    31593164          if (TEST_OPT_PROT && (pComp(redSi,strat->S[i])!=0))
    31603165          {
     
    31683173          {
    31693174            pDelete(&redSi);
    3170             if (TEST_OPT_DEBUG) PrintS(" to 0");
    31713175            deleteInS(i,strat);
    31723176            i--;
     
    32333237              pNorm(strat->S[i]);
    32343238            }
    3235             if (TEST_OPT_DEBUG)
    3236             {
    3237               PrintS(" to ");
    3238               wrp(strat->S[i]);
    3239             }
    32403239          }
    3241           if (TEST_OPT_DEBUG) PrintLn();
    32423240        }
    32433241        i++;
     
    37093707         /*Shdl=*/initS(F, Q,strat); /*sets also S, ecartS, fromQ */
    37103708    else
    3711     #endif     
     3709    #endif
    37123710    /*Shdl=*/initSL(F, Q,strat); /*sets also S, ecartS, fromQ */
    37133711    // /*Shdl=*/initS(F, Q,strat); /*sets also S, ecartS, fromQ */
  • Singular/misc.cc

    rce5fb2 r743c32  
    578578
    579579        if (TEST_OPT_INTSTRATEGY && (currRing!=NULL)
    580         && rField_has_simple_inverse())
     580        && rField_has_simple_inverse())
    581581        {
    582582          test &=~Sy_bit(OPT_INTSTRATEGY);
     
    602602          Warn("cannot set option");
    603603        if (TEST_OPT_INTSTRATEGY && (currRing!=NULL)
    604         && rField_has_simple_inverse())
     604        && rField_has_simple_inverse())
    605605        {
    606606          test &=~Sy_bit(OPT_INTSTRATEGY);
  • Singular/sdb.cc

    rce5fb2 r743c32  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: sdb.cc,v 1.2 1999-04-20 17:02:48 Singular Exp $ */
     4/* $Id: sdb.cc,v 1.3 1999-04-29 16:57:18 Singular Exp $ */
    55/*
    66* ABSTRACT: Singular debugger
     
    1515#include "sdb.h"
    1616
    17 int sdb_lines[6]={-1,-1,-1,-1,-1,-1,-1};
     17int sdb_lines[]={-1,-1,-1,-1,-1,-1,-1,-1};
    1818
    1919int sdb_checkline(char f)
     
    3333static char sdb_lastcmd='c';
    3434
    35 void sdb(Voice * currentVoice, char * currLine, int len)
     35void sdb(Voice * currentVoice, char * currLine, int len, char *b)
    3636{
    3737  int bp=0;
     
    6666      {
    6767        case 'd':
     68        {
     69          fprintf(stdout,"delete break point %d\n",bp);
    6870          currentVoice->pi->trace_flag &= (~Sy_bit(bp));
     71          if (bp!=0)
     72          {
     73            sdb_lines[bp-1]=-1;
     74          }
     75          int f=currentVoice->pi->trace_flag;
     76          fprintf(stdout,"active breakpoints: \n");
     77          int i;
     78          for(i=1;i<=7;i++)
     79          {
     80            f=f>>1;
     81            if (f&1)
     82              fprintf(stdout,"%d:line %d", i,  sdb_lines[i-1]);
     83          }
     84          fprintf(stdout,"\n");
    6985          break;
     86        }
    7087        case 'n':
    7188          currentVoice->pi->trace_flag|= 1;
    7289          return;
    73 //        case 'e':
    74 //        {
     90        case 'e':
     91        {
     92          int i=strlen(b);
     93          while ((i>=0) && (b[i]<=' ')) i--;
     94          if (i<0)
     95          {
     96            fprintf(stdout,"cannot set ~ at empty line\n");
     97            break;
     98          }
     99          if (b[i]!=';')
     100          {
     101            fprintf(stdout,"cannot set ~ at char `%c`\n",b[i]);
     102            break;
     103          }
     104          b[i+1]='~';
     105          b[i+2]=';';
     106          b[i+3]='\n';
     107          b[i+4]='\0';
     108          return;
     109        }
    75110//          sdb_lastcmd='c';
    76111//          if (*(p+1)!=' ')
  • Singular/sdb.h

    rce5fb2 r743c32  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: sdb.h,v 1.2 1999-04-20 17:02:49 Singular Exp $ */
     6/* $Id: sdb.h,v 1.3 1999-04-29 16:57:18 Singular Exp $ */
    77/*
    88* ABSTRACT: Singular debugger
     
    1313extern int sdb_lines[];
    1414
    15 void sdb(Voice * currentVoice, char * currLine, int len);
     15void sdb(Voice * currentVoice, char * currLine, int len, char * buffer);
    1616#endif
    1717
Note: See TracChangeset for help on using the changeset viewer.