Changeset 1bc7201 in git
- Timestamp:
- Oct 19, 2012, 6:38:35 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- c879eea1669e963fb4c7287a3963abb287d00a49
- Parents:
- b37b3984a12e1552c7bafc9fd5a7849240ea79806bbe944402dfca102dcc3e036c4f2f119be41e44
- Files:
-
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
r6bbe94 r1bc7201 439 439 #endif 440 440 #ifdef TEST_MAC_ORDER 441 TEST_FOR("MAC_ORDER") ;441 TEST_FOR("MAC_ORDER") 442 442 #endif 443 443 // unconditional since 3-1-0-6 444 TEST_FOR("Namespaces") ;444 TEST_FOR("Namespaces") 445 445 #ifdef HAVE_DYNAMIC_LOADING 446 TEST_FOR("DynamicLoading") ;446 TEST_FOR("DynamicLoading") 447 447 #endif 448 448 #ifdef HAVE_EIGENVAL 449 TEST_FOR("eigenval") ;449 TEST_FOR("eigenval") 450 450 #endif 451 451 #ifdef HAVE_GMS 452 TEST_FOR("gms") ;452 TEST_FOR("gms") 453 453 #endif 454 454 #ifdef OM_NDEBUG 455 TEST_FOR("om_ndebug") ;455 TEST_FOR("om_ndebug") 456 456 #endif 457 457 #ifdef NDEBUG 458 TEST_FOR("ndebug") ;458 TEST_FOR("ndebug") 459 459 #endif 460 460 ; … … 2297 2297 test_PosInL=NULL; 2298 2298 } 2299 verbose|=Sy_bit(23);2299 si_opt_2|=Sy_bit(23); 2300 2300 return FALSE; 2301 2301 } … … 2648 2648 if ((h!=NULL) &&(h->Typ()==IDEAL_CMD)) 2649 2649 { 2650 int i=0;2651 2650 if (h->next!=NULL) 2652 2651 { … … 2670 2669 if ((h!=NULL) &&(h->Typ()==IDEAL_CMD)) 2671 2670 { 2672 int i=0;2673 2671 if (h->next!=NULL) 2674 2672 { … … 3064 3062 if (strcmp(sys_cmd, "minor")==0) 3065 3063 { 3066 ring r = currRing;3067 3064 matrix a = (matrix) h->Data(); 3068 3065 h = h->next; … … 3321 3318 { 3322 3319 int start,end; 3323 int is;3324 3320 if ((h!=NULL) && (h->Typ()==POLY_CMD)) 3325 3321 { … … 3426 3422 if (strcmp(sys_cmd, "unifastmult")==0) 3427 3423 { 3428 ring r = currRing;3429 3424 poly f = (poly)h->Data(); 3430 3425 h=h->next; … … 3437 3432 if (strcmp(sys_cmd, "multifastmult")==0) 3438 3433 { 3439 ring r = currRing;3440 3434 poly f = (poly)h->Data(); 3441 3435 h=h->next; … … 3466 3460 if (strcmp(sys_cmd, "normalpower")==0) 3467 3461 { 3468 ring r = currRing;3469 3462 poly f = (poly)h->Data(); 3470 3463 h=h->next; -
Singular/feOpt.cc
r6bbe94 r1bc7201 219 219 case FE_OPT_QUIET: 220 220 if (feOptSpec[FE_OPT_QUIET].value) 221 verbose&= ~(Sy_bit(0)|Sy_bit(V_LOAD_LIB));222 else 223 verbose|= Sy_bit(V_LOAD_LIB)|Sy_bit(0);221 si_opt_2 &= ~(Sy_bit(0)|Sy_bit(V_LOAD_LIB)); 222 else 223 si_opt_2 |= Sy_bit(V_LOAD_LIB)|Sy_bit(0); 224 224 return NULL; 225 225 -
Singular/iparith.cc
r6bbe94 r1bc7201 2490 2490 static BOOLEAN jjLIFT(leftv res, leftv u, leftv v) 2491 2491 { 2492 BITSET save_test=test;2493 2492 int ul= IDELEMS((ideal)u->Data()); 2494 2493 int vl= IDELEMS((ideal)v->Data()); … … 2497 2496 if (m==NULL) return TRUE; 2498 2497 res->data = (char *)id_Module2formatedMatrix(m,ul,vl,currRing); 2499 test=save_test;2500 2498 return FALSE; 2501 2499 } … … 3416 3414 } 3417 3415 } 3418 BITSET save_test=test; 3419 test|=Sy_bit(OPT_SB_1); 3416 BITSET save1; 3417 SI_SAVE_OPT1(save1); 3418 si_opt_1|=Sy_bit(OPT_SB_1); 3420 3419 /* ii0 appears to be the position of the first element of il that 3421 3420 does not belong to the old SB ideal */ 3422 3421 result=kStd(i1,currQuotient,hom,&w,NULL,0,ii0); 3423 test=save_test;3422 SI_RESTORE_OPT1(save1); 3424 3423 idDelete(&i1); 3425 3424 idSkipZeroes(result); … … 6413 6412 { 6414 6413 if (w->rtyp!=IDHDL) return TRUE; 6415 BITSET save_test=test;6416 6414 int ul= IDELEMS((ideal)u->Data()); 6417 6415 int vl= IDELEMS((ideal)v->Data()); … … 6421 6419 if (m==NULL) return TRUE; 6422 6420 res->data = (char *)id_Module2formatedMatrix(m,ul,vl,currRing); 6423 test=save_test;6424 6421 return FALSE; 6425 6422 } … … 7237 7234 Kstd1_deg=(int)(long)u3->Data(); 7238 7235 kModW=(intvec *)u4->Data(); 7239 BITSET save=verbose; 7240 verbose|=Sy_bit(V_DEG_STOP); 7236 BITSET save2; 7237 SI_SAVE_OPT2(save2); 7238 si_opt_2|=Sy_bit(V_DEG_STOP); 7241 7239 u2->next=NULL; 7242 7240 BOOLEAN r=jjCALL2ARG(res,u); 7243 7241 kModW=NULL; 7244 7242 Kstd1_deg=save_d; 7245 verbose=save;7243 SI_RESTORE_OPT2(save2); 7246 7244 u->next->next=u3; 7247 7245 return r; … … 7651 7649 i0=idInit(1,i1->rank); 7652 7650 i0->m[0]=(poly)v->Data(); 7653 BOOLEANcleanup_i0=TRUE;7651 cleanup_i0=TRUE; 7654 7652 } 7655 7653 else if (r==IDEAL_CMD)/* IDEAL */ … … 7685 7683 } 7686 7684 } 7687 BITSET save_test=test; 7688 test|=Sy_bit(OPT_SB_1); 7685 BITSET save1; 7686 SI_SAVE_OPT1(save1); 7687 si_opt_1|=Sy_bit(OPT_SB_1); 7689 7688 result=kStd(i1, 7690 7689 currQuotient, … … 7695 7694 IDELEMS(i1)-ii0, // new ideal 7696 7695 vw); // weights of vars 7697 test=save_test;7696 SI_RESTORE_OPT1(save1); 7698 7697 idDelete(&i1); 7699 7698 idSkipZeroes(result); -
Singular/ipassign.cc
r6bbe94 r1bc7201 92 92 Kstd1_deg=(int)((long)(a->Data())); 93 93 if (Kstd1_deg!=0) 94 test|=Sy_bit(OPT_DEGBOUND);94 si_opt_1 |=Sy_bit(OPT_DEGBOUND); 95 95 else 96 test&=(~Sy_bit(OPT_DEGBOUND));97 return FALSE; 98 } 99 static BOOLEAN jjMAXMULT(leftv res, leftv a)96 si_opt_1 &=(~Sy_bit(OPT_DEGBOUND)); 97 return FALSE; 98 } 99 static BOOLEAN jjMAXMULT(leftv, leftv a) 100 100 { 101 101 Kstd1_mu=(int)((long)(a->Data())); 102 102 if (Kstd1_mu!=0) 103 test|=Sy_bit(OPT_MULTBOUND);103 si_opt_1 |=Sy_bit(OPT_MULTBOUND); 104 104 else 105 test&=(~Sy_bit(OPT_MULTBOUND));105 si_opt_1 &=(~Sy_bit(OPT_MULTBOUND)); 106 106 return FALSE; 107 107 } … … 381 381 return FALSE; 382 382 } 383 static BOOLEAN jiA_NUMBER(leftv res, leftv a, Subexpr e)383 static BOOLEAN jiA_NUMBER(leftv res, leftv a, Subexpr) 384 384 { 385 385 number p=(number)a->CopyD(NUMBER_CMD); … … 430 430 return FALSE; 431 431 } 432 static BOOLEAN jiA_LIST_RES(leftv res, leftv a,Subexpr e)432 static BOOLEAN jiA_LIST_RES(leftv res, leftv a,Subexpr) 433 433 { 434 434 syStrategy r=(syStrategy)a->CopyD(RESOLUTION_CMD); … … 441 441 return FALSE; 442 442 } 443 static BOOLEAN jiA_LIST(leftv res, leftv a,Subexpr e)443 static BOOLEAN jiA_LIST(leftv res, leftv a,Subexpr) 444 444 { 445 445 lists l=(lists)a->CopyD(LIST_CMD); … … 565 565 return FALSE; 566 566 } 567 static BOOLEAN jiA_PROC(leftv res, leftv a, Subexpr e)567 static BOOLEAN jiA_PROC(leftv res, leftv a, Subexpr) 568 568 { 569 569 extern procinfo *iiInitSingularProcinfo(procinfo *pi, const char *libname, … … 585 585 return FALSE; 586 586 } 587 static BOOLEAN jiA_INTVEC(leftv res, leftv a, Subexpr e)587 static BOOLEAN jiA_INTVEC(leftv res, leftv a, Subexpr) 588 588 { 589 589 //if ((res->data==NULL) || (res->Typ()==a->Typ())) … … 608 608 #endif 609 609 } 610 static BOOLEAN jiA_BIGINTMAT(leftv res, leftv a, Subexpr e)610 static BOOLEAN jiA_BIGINTMAT(leftv res, leftv a, Subexpr) 611 611 { 612 612 if (res->data!=NULL) delete ((bigintmat *)res->data); … … 615 615 return FALSE; 616 616 } 617 static BOOLEAN jiA_IDEAL(leftv res, leftv a, Subexpr e)617 static BOOLEAN jiA_IDEAL(leftv res, leftv a, Subexpr) 618 618 { 619 619 if (res->data!=NULL) idDelete((ideal*)&res->data); … … 633 633 return FALSE; 634 634 } 635 static BOOLEAN jiA_RESOLUTION(leftv res, leftv a, Subexpr e)635 static BOOLEAN jiA_RESOLUTION(leftv res, leftv a, Subexpr) 636 636 { 637 637 if (res->data!=NULL) syKillComputation((syStrategy)res->data); … … 640 640 return FALSE; 641 641 } 642 static BOOLEAN jiA_MODUL_P(leftv res, leftv a, Subexpr e)642 static BOOLEAN jiA_MODUL_P(leftv res, leftv a, Subexpr) 643 643 { 644 644 if (res->data!=NULL) idDelete((ideal*)&res->data); … … 655 655 return FALSE; 656 656 } 657 static BOOLEAN jiA_IDEAL_M(leftv res, leftv a, Subexpr e)657 static BOOLEAN jiA_IDEAL_M(leftv res, leftv a, Subexpr) 658 658 { 659 659 if (res->data!=NULL) idDelete((ideal*)&res->data); … … 667 667 return FALSE; 668 668 } 669 static BOOLEAN jiA_LINK(leftv res, leftv a, Subexpr e)669 static BOOLEAN jiA_LINK(leftv res, leftv a, Subexpr) 670 670 { 671 671 si_link l=(si_link)res->data; … … 691 691 } 692 692 // assign map -> map 693 static BOOLEAN jiA_MAP(leftv res, leftv a, Subexpr e)693 static BOOLEAN jiA_MAP(leftv res, leftv a, Subexpr) 694 694 { 695 695 if (res->data!=NULL) … … 704 704 } 705 705 // assign ideal -> map 706 static BOOLEAN jiA_MAP_ID(leftv res, leftv a, Subexpr e)706 static BOOLEAN jiA_MAP_ID(leftv res, leftv a, Subexpr) 707 707 { 708 708 map f=(map)res->data; … … 812 812 return FALSE; 813 813 } 814 static BOOLEAN jiA_PACKAGE(leftv res, leftv a, Subexpr e)814 static BOOLEAN jiA_PACKAGE(leftv res, leftv a, Subexpr) 815 815 { 816 816 res->data=(void *)a->CopyD(PACKAGE_CMD); … … 1880 1880 } 1881 1881 } 1882 BOOLEAN jjIMPORTFROM(leftv res, leftv u, leftv v)1882 BOOLEAN jjIMPORTFROM(leftv, leftv u, leftv v) 1883 1883 { 1884 1884 //Print("importfrom %s::%s ->.\n",v->Name(),u->Name() ); -
Singular/ipshell.cc
r6bbe94 r1bc7201 426 426 BOOLEAN all = typ<0; 427 427 BOOLEAN really_all=FALSE; 428 BOOLEAN do_packages=FALSE; 429 430 if ( typ == -1 ) do_packages=TRUE; 428 431 429 if ( typ==0 ) 432 430 { … … 508 506 if (ii < 32) 509 507 { 510 test&= ~Sy_bit(ii);508 si_opt_1 &= ~Sy_bit(ii); 511 509 } 512 510 else if (ii < 64) 513 511 { 514 verbose&= ~Sy_bit(ii-32);512 si_opt_2 &= ~Sy_bit(ii-32); 515 513 } 516 514 else … … 523 521 { 524 522 Warn("Gerhard, use the option command"); 525 test|= Sy_bit(ii);523 si_opt_1 |= Sy_bit(ii); 526 524 } 527 525 else if (Sy_bit(ii) & validOpts) 528 test|= Sy_bit(ii);526 si_opt_1 |= Sy_bit(ii); 529 527 } 530 528 else if (i<64) 531 529 { 532 530 ii=i-32; 533 verbose|= Sy_bit(ii);531 si_opt_2 |= Sy_bit(ii); 534 532 } 535 533 else … … 2530 2528 { 2531 2529 par_perm_size=rPar(orig_ring); 2532 BITSET save_test=test;2533 2530 2534 2531 // if ((orig_ring->minpoly != NULL) || (orig_ring->qideal != NULL)) … … 2537 2534 2538 2535 nSetChar(currRing->cf); 2539 test=save_test;2540 2536 } 2541 2537 else … … 5055 5051 int float_len2=0; 5056 5052 ring R = NULL; 5057 BOOLEAN ffChar=FALSE;5053 //BOOLEAN ffChar=FALSE; 5058 5054 5059 5055 /* ch -------------------------------------------------------*/ … … 5251 5247 else 5252 5248 { 5253 sleftv* p = pn;5254 5249 Werror("Wrong or unknown ground field specification"); 5255 5250 #ifndef NDEBUG 5251 sleftv* p = pn; 5256 5252 while (p != NULL) 5257 5253 { -
Singular/links/ndbm.cc
r6bbe94 r1bc7201 61 61 static datum makdatum(char buf[PBLKSIZ], int n); 62 62 static int finddatum(char buf[PBLKSIZ], datum item); 63 static long hashinc(register DBM *db, long hash);64 63 static long dcalchash(datum item); 65 64 static int delitem(char buf[PBLKSIZ], int n); … … 449 448 }; 450 449 451 static long hashinc(register DBM *db, long hash)452 {453 long bit;454 455 hash &= db->dbm_hmask;456 bit = db->dbm_hmask+1;457 for (;;)458 {459 bit >>= 1;460 if (bit == 0)461 return (0L);462 if ((hash & bit) == 0)463 return (hash | bit);464 hash &= ~bit;465 }466 }467 468 450 static long dcalchash(datum item) 469 451 { -
Singular/links/silink.cc
r6bbe94 r1bc7201 236 236 leftv slRead(si_link l, leftv a) 237 237 { 238 char *mode;239 238 leftv v = NULL; 240 239 if( ! SI_LINK_R_OPEN_P(l)) // open r ? … … 381 380 382 381 /* =============== ASCII ============================================= */ 383 BOOLEAN slOpenAscii(si_link l, short flag, leftv h)382 BOOLEAN slOpenAscii(si_link l, short flag, leftv) 384 383 { 385 384 const char *mode; … … 546 545 547 546 if (currRingHdl != rh) rSetHdl(rh); 548 fprintf(fd, "option(set, intvec(%d, %d));\n", test, verbose);547 fprintf(fd, "option(set, intvec(%d, %d));\n", si_opt_1, si_opt_2); 549 548 fprintf(fd, "RETURN();\n"); 550 549 fflush(fd); … … 665 664 lists l = IDLIST(h); 666 665 int i, nl = l->nr + 1; 667 char *name;668 666 669 667 for (i=0; i<nl; i++) … … 740 738 else if (type_id == STRING_CMD) 741 739 { 742 char *pstr = IDSTRING(h) , c;740 char *pstr = IDSTRING(h); 743 741 fputc('"', fd); 744 742 while (*pstr != '\0') … … 753 751 { 754 752 procinfov pi = IDPROC(h); 755 if (pi->language == LANG_SINGULAR) { 753 if (pi->language == LANG_SINGULAR) 754 { 756 755 if( pi->data.s.body==NULL) iiGetLibProcBuffer(pi); 757 char *pstr = pi->data.s.body , c;756 char *pstr = pi->data.s.body; 758 757 fputc('"', fd); 759 while (*pstr != '\0') { 758 while (*pstr != '\0') 759 { 760 760 if (*pstr == '"' || *pstr == '\\') fputc('\\', fd); 761 761 fputc(*pstr, fd); … … 763 763 } 764 764 fputc('"', fd); 765 } else fputs("(null)", fd); 765 } 766 else fputs("(null)", fd); 766 767 } 767 768 else -
Singular/links/ssiLink.cc
r6bbe94 r1bc7201 243 243 } 244 244 245 void ssiWritePoly(ssiInfo *d, int typ,poly p)245 void ssiWritePoly(ssiInfo *d, poly p) 246 246 { 247 247 SSI_BLOCK_CHLD; … … 267 267 void ssiWriteIdeal(ssiInfo *d, int typ,ideal I) 268 268 { 269 // syntax : 7 # of elements <poly 1> <poly2>.....270 // syntax : 8 <rows> <cols> <poly 1> <poly2>.....269 // syntax ideal/module: 7 # of elements <poly 1> <poly2>..... 270 // syntax matrix: 8 <rows> <cols> <poly 1> <poly2>..... 271 271 matrix M=(matrix)I; 272 272 SSI_BLOCK_CHLD; … … 278 278 279 279 int i; 280 int tt;281 if (typ==MODUL_CMD) tt=VECTOR_CMD;282 else tt=POLY_CMD;283 280 284 281 for(i=0;i<IDELEMS(I);i++) 285 282 { 286 ssiWritePoly(d, tt,I->m[i]);283 ssiWritePoly(d,I->m[i]); 287 284 } 288 285 } … … 516 513 //Print("poly: terms:%d\n",n); 517 514 poly p; 518 int j;519 j=0;520 515 poly ret=NULL; 521 516 poly prev=NULL; … … 944 939 SI_LINK_SET_RW_OPEN_P(l); 945 940 d->send_quit_at_exit=1; 946 fprintf(d->f_write,"98 %d %d %u %u\n",SSI_VERSION,MAX_TOK, test,verbose);941 fprintf(d->f_write,"98 %d %d %u %u\n",SSI_VERSION,MAX_TOK,si_opt_1,si_opt_2); 947 942 } 948 943 // ---------------------------------------------------------------------- … … 1021 1016 { 1022 1017 d->f_write = outfile; 1023 fprintf(d->f_write,"98 %d %d %u %u\n",SSI_VERSION,MAX_TOK, test,verbose);1018 fprintf(d->f_write,"98 %d %d %u %u\n",SSI_VERSION,MAX_TOK,si_opt_1,si_opt_2); 1024 1019 } 1025 1020 } … … 1210 1205 Print("// opening ssi-%d, MAX_TOK=%d\n",n98_v,n98_m); 1211 1206 #endif 1212 test=n98_o1;1213 verbose=n98_o2;1207 si_opt_1=n98_o1; 1208 si_opt_2=n98_o2; 1214 1209 return ssiRead1(l); 1215 1210 } … … 1280 1275 if(tt==POLY_CMD) fputs("6 ",d->f_write); 1281 1276 else fputs("9 ",d->f_write); 1282 ssiWritePoly(d, tt,(poly)dd);1277 ssiWritePoly(d,(poly)dd); 1283 1278 break; 1284 1279 case IDEAL_CMD: … … 1796 1791 **/ 1797 1792 /*---------------------------------------------------------------------*/ 1798 void sig_chld_hdl(int sig)1793 void sig_chld_hdl(int) 1799 1794 { 1800 1795 pid_t kidpid; -
Singular/misc_ip.cc
r6bbe94 r1bc7201 562 562 { 563 563 intvec *w=new intvec(2); 564 (*w)[0]= test;565 (*w)[1]= verbose;564 (*w)[0]=si_opt_1; 565 (*w)[1]=si_opt_2; 566 566 res->rtyp=INTVEC_CMD; 567 567 res->data=(void *)w; … … 575 575 v=v->next; 576 576 intvec *w=(intvec*)v->Data(); 577 test=(*w)[0];578 verbose=(*w)[1];577 si_opt_1=(*w)[0]; 578 si_opt_2=(*w)[1]; 579 579 #if 0 580 580 if (TEST_OPT_INTSTRATEGY && (currRing!=NULL) … … 584 584 #endif 585 585 ) { 586 test&=~Sy_bit(OPT_INTSTRATEGY);586 si_opt_1 &=~Sy_bit(OPT_INTSTRATEGY); 587 587 } 588 588 #endif … … 592 592 if(strcmp(n,"none")==0) 593 593 { 594 test=0;595 verbose=0;594 si_opt_1=0; 595 si_opt_2=0; 596 596 goto okay; 597 597 } … … 602 602 if (optionStruct[i].setval & validOpts) 603 603 { 604 test|= optionStruct[i].setval;604 si_opt_1 |= optionStruct[i].setval; 605 605 // optOldStd disables redthrough 606 606 if (optionStruct[i].setval == Sy_bit(OPT_OLDSTD)) 607 test&= ~Sy_bit(OPT_REDTHROUGH);607 si_opt_1 &= ~Sy_bit(OPT_REDTHROUGH); 608 608 } 609 609 else … … 626 626 if (optionStruct[i].setval & validOpts) 627 627 { 628 test&= optionStruct[i].resetval;628 si_opt_1 &= optionStruct[i].resetval; 629 629 } 630 630 else … … 637 637 if (strcmp(n,verboseStruct[i].name)==0) 638 638 { 639 verbose|= verboseStruct[i].setval;639 si_opt_2 |= verboseStruct[i].setval; 640 640 #ifdef YYDEBUG 641 641 #if YYDEBUG … … 651 651 && (strcmp(n+2,verboseStruct[i].name)==0)) 652 652 { 653 verbose&= verboseStruct[i].resetval;653 si_opt_2 &= verboseStruct[i].resetval; 654 654 #ifdef YYDEBUG 655 655 #if YYDEBUG … … 666 666 okay: 667 667 if (currRing != NULL) 668 currRing->options = test& TEST_RINGDEP_OPTS;668 currRing->options = si_opt_1 & TEST_RINGDEP_OPTS; 669 669 omFree((ADDRESS)n); 670 670 v=v->next; … … 687 687 688 688 StringSetS("//options:"); 689 if (( test!=0)||(verbose!=0))690 { 691 tmp= test;689 if ((si_opt_1!=0)||(si_opt_2!=0)) 690 { 691 tmp=si_opt_1; 692 692 if(tmp) 693 693 { 694 694 for (i=0; optionStruct[i].setval!=0; i++) 695 695 { 696 if (optionStruct[i].setval & t est)696 if (optionStruct[i].setval & tmp) 697 697 { 698 698 StringAppend(" %s",optionStruct[i].name); … … 705 705 } 706 706 } 707 tmp= verbose;707 tmp=si_opt_2; 708 708 if (tmp) 709 709 { … … 723 723 return omStrDup(StringAppendS("")); 724 724 } 725 else 726 return omStrDup(StringAppendS(" none")); 725 return omStrDup(StringAppendS(" none")); 727 726 } 728 727 … … 1144 1143 if (! feOptValue(FE_OPT_NO_STDLIB)) 1145 1144 { 1146 int vv=verbose; 1147 verbose &= ~Sy_bit(V_LOAD_LIB); 1145 BITSET save1,save2; 1146 SI_SAVE_OPT(save1,save2); 1147 si_opt_2 &= ~Sy_bit(V_LOAD_LIB); 1148 1148 iiLibCmd(omStrDup("standard.lib"), TRUE,TRUE,TRUE); 1149 verbose=vv;1149 SI_RESTORE_OPT(save1,save2); 1150 1150 } 1151 1151 errorreported = 0; -
Singular/walk.cc
r6bbe94 r1bc7201 123 123 } 124 124 125 #if 0 /*unused*/ 125 126 /*2 126 127 *construct the set s from F u {P} … … 273 274 #endif 274 275 } 276 #endif 275 277 276 278 /*2 … … 351 353 } 352 354 355 #if 0 /*unused*/ 353 356 static void TimeString(clock_t tinput, clock_t tostd, clock_t tif,clock_t tstd, 354 357 clock_t tlf,clock_t tred, clock_t tnw, int step) … … 388 391 ((((double) xtextra)/1000000)/totm)*100); 389 392 } 390 393 #endif 394 395 #if 0 /*unused*/ 391 396 static void TimeStringFractal(clock_t tinput, clock_t tostd, clock_t tif,clock_t tstd, 392 397 clock_t textra, clock_t tlf,clock_t tred, clock_t tnw) … … 415 420 ostd,totm,mostd,mif,mstd,mextra,mlf,mred,mnw,tot,res); 416 421 } 422 #endif 417 423 418 424 static void idString(ideal L, const char* st) … … 427 433 } 428 434 435 #if 0 /*unused*/ 429 436 static void headidString(ideal L, char* st) 430 437 { … … 437 444 Print(" %s;", pString(pHead(L->m[nL-1]))); 438 445 } 439 446 #endif 447 448 #if 0 /*unused*/ 440 449 static void idElements(ideal L, char* st) 441 450 { … … 467 476 omFree(K); 468 477 } 469 478 #endif 470 479 471 480 … … 481 490 } 482 491 492 #if 0 /*unused*/ 483 493 static void MivString(intvec* iva, intvec* ivb, intvec* ivc) 484 494 { … … 498 508 Print("%d)", (*ivc)[nV]); 499 509 } 500 510 #endif 501 511 502 512 // returns gcd of integers a and b … … 534 544 } 535 545 546 #if 0 /*unused*/ 536 547 /* 23.07.03 */ 537 548 static int isVectorNeg(intvec* omega) … … 545 556 return 0; 546 557 } 558 #endif 547 559 548 560 /******************************************************************** … … 826 838 static ideal MstdCC(ideal G) 827 839 { 828 int save_test=test; 829 test|=(Sy_bit(OPT_REDTAIL)|Sy_bit(OPT_REDSB)); 840 BITSET save1,save2; 841 SI_SAVE_OPT(save1,save2); 842 si_opt_1|=(Sy_bit(OPT_REDTAIL)|Sy_bit(OPT_REDSB)); 830 843 ideal G1 = kStd(G, NULL, testHomog, NULL); 831 test=save_test;844 SI_RESTORE_OPT(save1,save2); 832 845 833 846 idSkipZeroes(G1); … … 839 852 static ideal MstdhomCC(ideal G) 840 853 { 841 int save_test=test; 842 test|=(Sy_bit(OPT_REDTAIL)|Sy_bit(OPT_REDSB)); 854 BITSET save1,save2; 855 SI_SAVE_OPT(save1,save2); 856 si_opt_1|=(Sy_bit(OPT_REDTAIL)|Sy_bit(OPT_REDSB)); 843 857 ideal G1 = kStd(G, NULL, isHomog, NULL); 844 test=save_test;858 SI_RESTORE_OPT(save1,save2); 845 859 846 860 idSkipZeroes(G1); … … 889 903 890 904 /**** 28.10.02 print the max total degree and the max coefficient of G***/ 905 #if 0 /*unused*/ 891 906 static void checkComplexity(ideal G, char* cG) 892 907 { … … 924 939 PrintLn(); 925 940 } 926 941 #endif 927 942 928 943 … … 1232 1247 } 1233 1248 1249 #if 0 /*unused*/ 1234 1250 static intvec* MatrixOrderdp(int nV) 1235 1251 { … … 1245 1261 return(ivM); 1246 1262 } 1263 #endif 1247 1264 1248 1265 intvec* MivUnit(int nV) … … 1464 1481 1465 1482 1483 #if 0 /*unused*/ 1466 1484 static void checkidealCC(ideal G, char* Ch) 1467 1485 { … … 1485 1503 PrintLn(); 1486 1504 } 1487 1505 #endif 1506 1507 #if 0 /*unused*/ 1488 1508 static void HeadidString(ideal L, char* st) 1489 1509 { … … 1496 1516 Print(" %s;\n", pString(pHead(L->m[nL]))); 1497 1517 } 1518 #endif 1498 1519 1499 1520 static inline int MivComp(intvec* iva, intvec* ivb) … … 2104 2125 } 2105 2126 2127 #if 0 /*unused*/ 2106 2128 /* check wheather one or more components of a vector are zero */ 2107 2129 static int isNolVector(intvec* hilb) … … 2114 2136 return 0; 2115 2137 } 2138 #endif 2116 2139 2117 2140 … … 2459 2482 } 2460 2483 2484 #if 0 /*unused*/ 2461 2485 /* 19.11.01 */ 2462 2486 /* find the maximal total degree of polynomials in G */ … … 2478 2502 return result; 2479 2503 } 2504 #endif 2480 2505 2481 2506 /* perturb the weight vector iva w.r.t. the ideal G. … … 2486 2511 */ 2487 2512 2513 #if 0 /*unused*/ 2488 2514 //GMP 2489 2515 static intvec* TranPertVector(ideal G, intvec* iva) … … 2612 2638 return repr_vector; 2613 2639 } 2614 2615 2616 2640 #endif 2641 2642 2643 2644 #if 0 /*unused*/ 2617 2645 static intvec* TranPertVector_lp(ideal G) 2618 2646 { … … 2702 2730 return repr_vector; 2703 2731 } 2704 2705 2732 #endif 2733 2734 2735 #if 0 /*unused*/ 2706 2736 //GMP 2707 2737 static intvec* RepresentationMatrix_Dp(ideal G, intvec* M) … … 2789 2819 return repvector; 2790 2820 } 2821 #endif 2791 2822 2792 2823 … … 2804 2835 2805 2836 // 19 Juni 2003 2837 #if 0 /* unused*/ 2806 2838 static int testnegintvec(intvec* v) 2807 2839 { … … 2814 2846 return(0); 2815 2847 } 2848 #endif 2816 2849 2817 2850 -
Singular/walk_ip.cc
r6bbe94 r1bc7201 64 64 { 65 65 WalkState state = WalkOk; 66 BITSET saveTest=test; 67 test &= (~Sy_bit(OPT_REDSB)); //make sure option noredSB is set 66 BITSET save1,save2; 67 SI_SAVE_OPT(save1,save2); 68 si_opt_1 &= (~Sy_bit(OPT_REDSB)); //make sure option noredSB is set 68 69 69 70 ring destRing = currRing; … … 108 109 } 109 110 110 test=saveTest;//making sure options are as before function call111 SI_RESTORE_OPT(save1,save2);//making sure options are as before function call 111 112 112 113 ring almostDestRing=currRing; … … 177 178 178 179 WalkState state = WalkOk; 179 BITSET saveTest=test; 180 test &= (~Sy_bit(OPT_REDSB)); //make sure option noredSB is set 180 BITSET save1,save2; 181 SI_SAVE_OPT(save1,save2); 182 si_opt_1 &= (~Sy_bit(OPT_REDSB)); //make sure option noredSB is set 181 183 182 184 ring destRing = currRing; … … 212 214 } 213 215 214 test=saveTest;//making sure options are as before functiocall216 SI_RESTORE_OPT(save1,save2);//making sure options are as before functiocall 215 217 216 218 if ( state == WalkOk ) -
Tst/Short/bug_55.res.gz.uu
r6bbe94 r1bc7201 1 begin 64 0bug_55.res.gz2 M'XL(" )QK;4H``V)U9U\U-2YR97,`[57/;YLP%+[S5SQ5DPI-XL4&3$(4#MLN3 M J:I-:JH=5G45`3>Q1@!ADPZI?_QLAT!%]N.TR[1W,/;S][[W_/`GK^\^K#X"4 M` ([@9O4.+J20*..;BX6U;G=(!,KYR',N;6=AZ2]$$6SJ[:/OHYP](R%CV<'=5 M "+JYA^#M6XT$GH,HL@/KMGRD\UT8YR`AC:#B^1:JY73<C-.RWPDBX"F+,U@M6 M &SKR:..-?#)OR`@33(,>-XN@*"4O<KNL"NGT&_-(%R1V19VEL.4'!E3756NL7 M T$6^/T'Q%!TKME<J_IY@+_!F+O6"$#]08=GK<.I8%C(VL@XIWR^!]FMMGP=A8 M OJ#"1X'PT$RX:"X(PE.!!Z".>M+:2S^Q[O%#:*ECV!."Z)SZ\V"&1_S*13B@9 M /B73P%%LYY#)`.*V$'Y%D>N[F'C84V[O%#GP^ZW_UX3T##&HRE)=OS3MO(2D10 M 8K%D*<3F+X]UUY]W/-DI1\:%A/6G&RB>(*_W&U8)L.6.05+LRXQ][_^5HQFY11 M `"&+BJ5(K^X*B).$"0$ZPE`IFK/(,<BF9.KP3P:7QWL&M_`<"XB%X-N<I9I,12 M %F:W8K*N<CC$6<T<<T9C@DES0V\7NMH%Z`B`9!=7<2)9I5+S!$*8@MVF#V>013 M \BV7*GN<IEP7HF[QR>D<XS&4BF#/%(-.$@)OB?<\+XNL.64/5?%?U9UOPXZ-14 M TF<]Q*I?(>"CW]@F*Y)OACN$HDJ9*3LK7R%Z"TTSA)XV/Z$@KREZG>"3)J^715 M =C/!SI4:B1E=,WIF],U(>REB\B<I?NF@[DF*UW]7B@C_7HTO`TV^G`D3=_HC16 LG<S<3EE>IR6_TPS]KXU_5QM>_Q9B]>#I9U2_E;6PL;-X8_T`7=GBXWP'````1 begin 644 bug_55.res.gz 2 M'XL("/+2?U```V)U9U\U-2YR97,`[57+;MLP$+SK*Q9!@4BQS9AZ4+8,Z]#V 3 MXB!H@3CHH4$:R!)C$Y5%0:2<"LC'EZ3U".P6/?52=`\4N9R=7:XXX/K^X^H3 4 M`.`8;E?OX4(*B7*VN5A8ZW;'C4$YGUC!I.TL+/V%.(9-O7T*`E30%R1D(GNX 5 M%T,_]Q%<7VLDL`($SP^TWPJ0SG=AG"<)20P5*[90+:?C9IR5PTX8`\MHDL-J 6 MV9"13QI_%+CSQAUA%Y-PP,UBX*5DO+#+BDMGV)C'NB"QXW6>P98=*!!=5ZVQ 7 M0A?YH8/B*3I6;*]4_(.+_="?><0/(_Q(A&6OHZEC6<C8R#ID;+\$,JRU?3D) 8 M"P01`0J%CV;"0W/A(CP5V+(FK;T.$^L!/T:6*MB>N(C,23`/9WC$KCR$0Q(0 9 M=QHZBOP<,CF!>"V$71'D!1YV?>PKM]]%GOB#UO][0G*&.*G*4OV]-(V[A+2B 10 MB:09).9_CG5_7W8LW2E'SH2$]>=;X,]0U/L-K038<D<AY?LRIS^&O^)H1B9` 11 M2%[1#.G5/8<D3:D0H",,E:(YBQR#;$JJ#O]L<$6RIW`'+XF`1`BV+6BFR20W 12 MNQ65=57`(<EKZI@S&A-4FKMXM]#5+D!'`*2[I$I222N5FJ40P13L-GTT@XQM 13 MF539DRQCNA!U7SNG<XS'4"J"/54,.DD$K"7>LZ+D>=-ECU3QW]3M;L..C=)G 14 M/22J7Q'@H]_8)N?I=\,=`:\R:LK.RS>(P2+3#*&GS2\HW+<4@R)PI[Z;I=U, 15 ML'.E1M>,GAE],P9F)(/HL/LGT7WMH5XGNIN_*SJ$.]V]GJCO]4R"N%>:VPO* 16 IZS7D]ZH)>G60_RKX=U7@#^\;5H^8?AKU^U<+&SN+=]9/YL0I)U`'```` 17 17 ` 18 18 end -
Tst/Short/bug_55.stat
r6bbe94 r1bc7201 1 1 >> tst_memory_0 :: 1 248684956:3104-2009072709:3-1-0:ix86-Linux:nepomuck:229764 1292524760:3120- 13145 :3-1-2:ix86-Linux:mamawutz:2428802 1 >> tst_memory_1 :: 1 248684956:3104-2009072709:3-1-0:ix86-Linux:nepomuck:748056 1292524760:3120- 13145 :3-1-2:ix86-Linux:mamawutz:6826843 1 >> tst_memory_2 :: 1 248684956:3104-2009072709:3-1-0:ix86-Linux:nepomuck:748056 1292524760:3120- 13145 :3-1-2:ix86-Linux:mamawutz:7515844 1 >> tst_timer_1 :: 1 248684956:3104-2009072709:3-1-0:ix86-Linux:nepomuck:6 1292524760:3120- 13145 :3-1-2:ix86-Linux:mamawutz:111 1 >> tst_memory_0 :: 1350554354:0- spielwiese :spielwiese:version:mamawutz:192636 2 1 >> tst_memory_1 :: 1350554354:0- spielwiese :spielwiese:version:mamawutz:655360 3 1 >> tst_memory_2 :: 1350554354:0- spielwiese :spielwiese:version:mamawutz:707456 4 1 >> tst_timer_1 :: 1350554354:0- spielwiese :spielwiese:version:mamawutz:7 -
Tst/Short/bug_qring.res.gz.uu
r6bbe94 r1bc7201 1 begin 64 0bug_qring.res.gz2 M'XL(" *+AGDX``V)U9U]Q<FEN9RYR97,`K51-;Z,P$+WG5XRJ/4!P*)BDS8?@3 M T%U5JK3*)7M;-9$=2-?:!!(PK,BO[X#YBAJJ5EVDQ)8]\^;-FQFO?OUX6@*`4 M [<'/IP>XD8DT]X+?+`:KZH9Z@(<;$0JIZ8M!L8+G`4]?-J=8A"]F&/PS$\ED5 M X^%XT.S')MS>0AC%![:''2[`0A^VT>&X#V0`RT<0(90XR;QQFI@MP)T)Q2T<6 M 78MH.3F3E&0Z\8\MP7L/HJ,44:C%@;]ZT-N;J:>@X>0FTM>$'["]EALI-=+,7 M (>?B7^^8S]!\,4"Z`-L_+&9;&<0BD6(+<[#4>9@>>!!#M(.,Q0F>C]5Y^?%]8 M M/U;:(GG4>P'96C_V+%HOSF$[!`DQ3:',Z2070&B7:#OA<$IC:0(0JDTV<719 M `<JL!IO?]K.+B>6C,^XI[C/'*+;.LYMGSNA<_-(Z5=ORE!\(%S5M)+"Q#4JE10 M 4)42<90;%1[BUD;8$<M'3=D12R\E&PYA`R+!2B,`EIC%/G"6B.0='.P3$:+&11 M 6+8*K0Y;V>:*?^4\OG`>(]-`JM9H^4\N\B*7M6[-[OI:QKYO!'A;,X!K[%*J12 M N&&`!F5:*K0A_5WWB4QG'Y3I"A%J=7S;FKU#ZPUTC62W0TUI-9,QN$")Q@CP13 M BY&D3I^^=-PAI"BP-25LR`U<F^B,J_",-HZ39I9/&+7-@*^I4;D3MN[.,\4J14 M GWH'FO8,-/WZ0#/@_V&8&>;%#4Z5$KRM:>][1Z<?$K>&1)%KQUE;7,<RR_>^15 2>-'31+/UQ;?!*X`@S@HE!@``1 begin 644 bug_qring.res.gz 2 M'XL("$[3?U```V)U9U]Q<FEN9RYR97,`K53?;YM`#'[/7V%5>X!PI7"0-C\$ 3 M#]U4J=*4E^QM:J*[0+K3DB.!@XG\]3,'`;*.;M*&E)SELS_;G^U;??GTO`0` 4 M-X3/SX]PHS)E[P6_68Q6S0T-`94;(84RS,6H.B$,@>>OFU,JY*LMXQ]VIIAJ 5 M/;P06MFWX>X.9)(>V!YV>`"3$6R3PW$?JQB63R`D:)QLWCI-[`[@WH;J%HZ! 6 M0XR2G$E."I-$QR[!AQ"2HQ*)--(X6CV:W<TTK*'A%&0J,D04L[U16CFU\L(C 7 MY^K?[)G/T'PQPG0!MM]8RK8J3D6FQ!;FX-1ZF1]XG$*R@X*E&>K]6J\_OD^V 8 MWRLN49^D4:Q#1\>>1??-0;)#G%5B"6?(H?@-$.T#?:P,3GFB1"Q5S<DN30Z@ 9 MJQIMOKHO`196WIY1IB@7GE6)WDM0%M[MN?KEEU)=)ZS]0`3(:4N!BV.@F4)6 10 M-.)M:35XB'LQPHE8/AFU'7%,3=EX#!L0&78:`;#%+(V`LTQD[^#@G`B)'&/; 11 M&K1+V,:V;$U]S"M6]2!TV4ZNJB#7G>W,[H<&Q'UHRWW;(8!?<M%<YA1/7]/; 12 MHDPU'QLR/&-OZM)8#2G^%2FS/Y,RE`AU>KY=A]Y):XAOZG8K3&FS@2D$0(G! 13 M"/"K!:3>$+_4[R54I\#6E+`QM_!LHS->AV>T=9RTFWO"J%T%?$VMQIVP=7][ 14 M*7;Y-+B^=&!]Z;^O+P/^'U:785W<XK1F@G<]'7S=Z/2OR+U`(LD7QUG77,^Q 15 5]>M>O=]Y9KCFXL/H)U7L&M03!@`` 16 16 ` 17 17 end -
Tst/Short/bug_qring.stat
r6bbe94 r1bc7201 1 1 >> tst_memory_0 :: 13 19035298:3133- 14004 :3-1-3:ix86-Linux:mamawutz:1744162 1 >> tst_memory_1 :: 13 19035298:3133- 14004 :3-1-3:ix86-Linux:mamawutz:6663323 1 >> tst_memory_2 :: 13 19035298:3133- 14004 :3-1-3:ix86-Linux:mamawutz:6991164 1 >> tst_timer_1 :: 13 19035298:3133- 14004 :3-1-3:ix86-Linux:mamawutz:81 1 >> tst_memory_0 :: 1350554446:0- spielwiese :spielwiese:version:mamawutz:123692 2 1 >> tst_memory_1 :: 1350554446:0- spielwiese :spielwiese:version:mamawutz:655360 3 1 >> tst_memory_2 :: 1350554446:0- spielwiese :spielwiese:version:mamawutz:658204 4 1 >> tst_timer_1 :: 1350554446:0- spielwiese :spielwiese:version:mamawutz:2 -
dyn_modules/syzextra/myNF.cc
r6bbe94 r1bc7201 224 224 //strat->ak = id_RankFreeModule(F, RING!); 225 225 /*- creating temp data structures------------------- -*/ 226 BITSET save_test=test; 227 test|=Sy_bit(OPT_REDTAIL); 226 BITSET save1; 227 SI_SAVE_OPT1(save1); 228 si_opt_1|=Sy_bit(OPT_REDTAIL); 228 229 initBuchMoraCrit(strat); 229 230 strat->initEcart = initEcartBBA; … … 260 261 #endif 261 262 { 262 BITSET save=test; 263 test &= ~Sy_bit(OPT_INTSTRATEGY); 263 si_opt_1 &= ~Sy_bit(OPT_INTSTRATEGY); 264 264 p = redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0); 265 test=save;266 265 } 267 266 } … … 277 276 omfree(strat->fromQ); 278 277 idDelete(&strat->Shdl); 279 test=save_test;278 SI_RESTORE_OPT1(save1); 280 279 if (TEST_OPT_PROT) PrintLn(); 281 280 return p; -
factory/algext.cc
rb37b398 r1bc7201 548 548 return; 549 549 m *= (x - alpha); 550 if( gnew == gm) // gnew did not change551 { 552 cf = tryvcontent(g m, Variable(2), M, fail);550 if((firstLC(gnew) == gamma) || (gnew == gm)) // gnew did not change 551 { 552 cf = tryvcontent(gnew, Variable(2), M, fail); 553 553 if(fail) 554 554 return; 555 555 divides = true; 556 g_image= g m;556 g_image= gnew; 557 557 g_image.tryDiv (cf, M, fail); 558 558 if(fail) … … 692 692 } 693 693 // here: a is the biggest alg. var in f and g AND some of f,g is in extension 694 // (in the sequel b is used to swap alg/poly vars)695 694 setReduce(a,false); // do not reduce expressions modulo mipo 696 695 tmp = getMipo(a); … … 703 702 mv = i; 704 703 // here: mv is level of the largest variable in f, g 705 b = Variable(mv+1);706 704 bound = new int[mv+1]; // 'bound' could be indexed from 0 to mv, but we will only use from 1 to mv 707 705 other = new int[mv+1]; … … 750 748 if(isEqual(bound, other, 1, mv)) // equal 751 749 { 752 chineseRemainder( D, q, replacevar( mapinto(Dp), a, b), p, tmp, newq );750 chineseRemainder( D, q, mapinto(Dp), p, tmp, newq ); 753 751 // tmp = Dp mod p 754 752 // tmp = D mod q … … 758 756 D = tmp; 759 757 On( SW_RATIONAL ); 760 tmp = replacevar( Farey( D, q ), b, a ); // Farey and switch back to alg var 758 tmp = Farey( D, q ); // Farey 759 tmp *= bCommonDen (tmp); 761 760 setReduce(a,true); // reduce expressions modulo mipo 762 761 On( SW_RATIONAL ); // needed by fdivides … … 780 779 // here: isLess(other, bound, 1, mv) ) ==> all previous primes unlucky 781 780 q = p; 782 D = replacevar( mapinto(Dp), a, b); // shortcut CRA // shortcut CRA781 D = mapinto(Dp); // shortcut CRA // shortcut CRA 783 782 for(int i=1; i<=mv; i++) // tighten bound 784 783 bound[i] = other[i]; -
factory/cf_chinese.cc
rb37b398 r1bc7201 227 227 } 228 228 else 229 result += power( x, i.exp() ) * Farey(c,q); 230 #else 231 if (c.inZ()) 232 result += power( x, i.exp() ) * Farey_n(c,q); 233 else 234 result += power( x, i.exp() ) * Farey(c,q); 229 235 #endif 230 result += power( x, i.exp() ) * Farey_n(c,q);231 236 } 232 237 else -
factory/cf_gcd_smallp.cc
r6bbe94 r1bc7201 4229 4229 Evaluation result= Evaluation (A.min(), A.max()); 4230 4230 ASSERT (A.min() == 2, "expected A.min() == 2"); 4231 ASSERT (A.max() >= n, "expected A.max() >= n");4232 4231 int max_deg; 4233 4232 int k= n; -
factory/facFqBivarUtil.cc
r6bbe94 r1bc7201 519 519 } 520 520 521 q= newtonDiv (bufF, G, xToLOldL); 521 if (l-oldL > 0) 522 q= newtonDiv (bufF, G, xToLOldL); 523 else 524 q= 0; 522 525 q *= xToOldL; 523 526 q += oldQ; -
factory/facFqSquarefree.h
r6bbe94 r1bc7201 18 18 #include "cf_factory.h" 19 19 #include "fac_sqrfree.h" 20 #include "cf_factory.h" 20 21 21 22 /// squarefree factorization over a finite field -
factory/facHensel.cc
r6bbe94 r1bc7201 544 544 } 545 545 546 setReduce (alpha, false); 546 547 for (k= 0; k < factors.length(); k++) 547 548 { … … 554 555 } 555 556 } 557 setReduce (alpha, true); 556 558 setCharacteristic(0); 557 559 … … 591 593 } 592 594 setCharacteristic (p); 595 setReduce (alpha, false); 593 596 recResult= mapinto (recResult); 597 setReduce (alpha, true); 594 598 if (mipoHasDen) 595 599 { … … 606 610 coeffE= div (e, modulus); 607 611 setCharacteristic (p); 612 if (mipoHasDen) 613 setReduce (gamma, false); 614 else 615 setReduce (alpha, false); 608 616 coeffE= coeffE.mapinto(); 617 if (mipoHasDen) 618 setReduce (gamma, true); 619 else 620 setReduce (alpha, true); 609 621 if (mipoHasDen) 610 622 coeffE= replacevar (coeffE, gamma, beta); … … 619 631 { 620 632 setCharacteristic (p); 633 setReduce (alpha, false); 621 634 g= mulNTL (coeffE, j.getItem()); 622 635 g= modNTL (g, bufFactors[ii]); 636 setReduce (alpha, true); 623 637 setCharacteristic (0); 624 638 if (mipoHasDen) 625 639 { 640 setReduce (beta, false); 626 641 k.getItem() += replacevar (g.mapinto()*modulus, beta, gamma); 627 642 e -= mulNTL (replacevar (g.mapinto(), beta, gamma)*modulus, 628 643 l.getItem(), b); 644 setReduce (beta, true); 629 645 } 630 646 else -
factory/facMul.cc
r6bbe94 r1bc7201 404 404 { 405 405 ZZ_p::init (convertFacCF2NTLZZ (b.getpk())); 406 ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha))); 406 CanonicalForm mipo= getMipo (alpha); 407 bool is_rat= isOn (SW_RATIONAL); 408 if (!is_rat) 409 On (SW_RATIONAL); 410 mipo *=bCommonDen (mipo); 411 if (!is_rat) 412 Off (SW_RATIONAL); 413 ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (mipo)); 407 414 ZZ_pE::init (NTLmipo); 408 415 ZZ_pEX NTLg= convertFacCF2NTLZZ_pEX (G, NTLmipo); -
factory/fac_ezgcd.cc
r6bbe94 r1bc7201 215 215 Evaluation result= Evaluation (A.min(), A.max()); 216 216 ASSERT (A.min() == 2, "expected A.min() == 2"); 217 ASSERT (A.max() == n, "expected A.max() == n");218 217 int max_deg; 219 218 int k= n; -
kernel/fast_maps.cc
r6bbe94 r1bc7201 67 67 poly max_pi_i, max_map_i; 68 68 69 int i , j;69 int i; 70 70 for (i=0; i<IDELEMS(map_id); i++) 71 71 { -
kernel/ideals.cc
r6bbe94 r1bc7201 130 130 } 131 131 132 133 /*3134 *multiplies p with t (!cas) or (t-1)135 *the index of t is:1, so we have to shift all variables136 *p is NOT in the actual ring, it has no t137 */138 static poly pMultWithT (poly p,BOOLEAN cas)139 {140 /*qp is the working pointer in p*/141 /*result is the result, qresult is the working pointer*/142 /*pp is p in the actual ring(shifted), qpp the working pointer*/143 poly result,qp,pp;144 poly qresult=NULL;145 poly qpp=NULL;146 int i,j,lex;147 number n;148 149 pp = NULL;150 result = NULL;151 qp = p;152 while (qp != NULL)153 {154 i = 0;155 if (result == NULL)156 {/*first monomial*/157 result = pInit();158 qresult = result;159 }160 else161 {162 qresult->next = pInit();163 pIter(qresult);164 }165 for (j=(currRing->N)-1; j>0; j--)166 {167 lex = pGetExp(qp,j);168 pSetExp(qresult,j+1,lex);/*copy all variables*/169 }170 lex = pGetComp(qp);171 pSetComp(qresult,lex);172 n=nCopy(pGetCoeff(qp));173 pSetCoeff0(qresult,n);174 qresult->next = NULL;175 pSetm(qresult);176 /*qresult is now qp brought into the actual ring*/177 if (cas)178 { /*case: mult with t-1*/179 pSetExp(qresult,1,0);180 pSetm(qresult);181 if (pp == NULL)182 { /*first monomial*/183 pp = pCopy(qresult);184 qpp = pp;185 }186 else187 {188 qpp->next = pCopy(qresult);189 pIter(qpp);190 }191 pGetCoeff(qpp)=nNeg(pGetCoeff(qpp));192 /*now qpp contains -1*qp*/193 }194 pSetExp(qresult,1,1);/*this is mult. by t*/195 pSetm(qresult);196 pIter(qp);197 }198 /*199 *now p is processed:200 *result contains t*p201 * if cas: pp contains -1*p (in the new ring)202 */203 if (cas) qresult->next = pp;204 /* else qresult->next = NULL;*/205 return result;206 }207 132 208 133 /*2 … … 850 775 } 851 776 852 BITSET save_verbose=verbose; 777 BITSET save2; 778 SI_SAVE_OPT2(save2); 853 779 854 780 k=si_max(1,(int)id_RankFreeModule(h1,currRing)); 855 781 856 if ((k==1) && (!lift3)) verbose|=Sy_bit(V_IDLIFT);782 if ((k==1) && (!lift3)) si_opt_2 |=Sy_bit(V_IDLIFT); 857 783 858 784 ring orig_ring = currRing; … … 974 900 975 901 if (syz_ring!=orig_ring) rDelete(syz_ring); 976 verbose = save_verbose;902 SI_RESTORE_OPT2(save2); 977 903 return s_h3; 978 904 } … … 1374 1300 } 1375 1301 h4->m[IDELEMS(h4)-1] = p; 1376 test|= Sy_bit(OPT_SB_1);1302 si_opt_1 |= Sy_bit(OPT_SB_1); 1377 1303 } 1378 1304 idDelete(&temph1); … … 1397 1323 return res; 1398 1324 } 1399 BITSET old_test=test; 1325 BITSET old_test1; 1326 SI_SAVE_OPT1(old_test1); 1400 1327 int i, kmax; 1401 1328 BOOLEAN addOnlyOne=TRUE; … … 1431 1358 s_h3 = kStd(s_h4,currQuotient,hom,&weights1,NULL,kmax-1); 1432 1359 } 1433 test = old_test;1360 SI_RESTORE_OPT1(old_test1); 1434 1361 #if 0 1435 1362 // only together with the above debug stuff … … 1672 1599 #if 1 1673 1600 //rWrite(tmpR);PrintLn(); 1674 BITSET save=test; 1675 //test |=1; 1601 //BITSET save1; 1602 //SI_SAVE_OPT1(save1); 1603 //si_opt_1 |=1; 1676 1604 //Print("h: %d gen, rk=%d\n",IDELEMS(h),h->rank); 1677 1605 //extern char * showOption(); 1678 1606 //Print("%s\n",showOption()); 1679 1607 hh = kStd(h,NULL,hom,&w,hilb); 1680 test=save;1608 //SI_RESTORE_OPT1(save1); 1681 1609 idDelete(&h); 1682 1610 #else … … 2194 2122 { 2195 2123 if ((s_temp1->m[i]!=NULL) 2196 && ( pGetComp(s_temp1->m[i])<=length))2124 && (((int)pGetComp(s_temp1->m[i]))<=length)) 2197 2125 { 2198 2126 p_Delete(&(s_temp1->m[i]),currRing); -
kernel/kInline.h
r6bbe94 r1bc7201 591 591 else 592 592 { 593 if (lq<=0) lq= ::pLength(q); 593 594 poly _p = (t_p != NULL ? t_p : p); 594 595 assume(_p != NULL); -
kernel/kstd1.cc
r6bbe94 r1bc7201 1234 1234 int red_result = 1; 1235 1235 int hilbeledeg=1,hilbcount=0; 1236 int save_test=test; 1236 BITSET save1; 1237 SI_SAVE_OPT1(save1); 1237 1238 if (currRing->MixedOrder) 1238 1239 { 1239 test&= ~Sy_bit(OPT_REDSB);1240 test&= ~Sy_bit(OPT_REDTAIL);1240 si_opt_1 &= ~Sy_bit(OPT_REDSB); 1241 si_opt_1 &= ~Sy_bit(OPT_REDTAIL); 1241 1242 } 1242 1243 … … 1455 1456 // } 1456 1457 if (Q!=NULL) updateResult(strat->Shdl,Q,strat); 1457 test=save_test;1458 SI_RESTORE_OPT1(save1); 1458 1459 idTest(strat->Shdl); 1459 1460 return (strat->Shdl); … … 1475 1476 int o; 1476 1477 LObject h; 1477 BITSET save_test=test; 1478 BITSET save1; 1479 SI_SAVE_OPT1(save1); 1478 1480 1479 1481 //if ((idIs0(F))&&(Q==NULL)) … … 1483 1485 strat->kHEdgeFound = (currRing->ppNoether) != NULL; 1484 1486 strat->kNoether = pCopy((currRing->ppNoether)); 1485 test|=Sy_bit(OPT_REDTAIL);1486 test&=~Sy_bit(OPT_INTSTRATEGY);1487 si_opt_1|=Sy_bit(OPT_REDTAIL); 1488 si_opt_1&=~Sy_bit(OPT_INTSTRATEGY); 1487 1489 if (TEST_OPT_STAIRCASEBOUND 1488 1490 && (! TEST_V_DEG_STOP) … … 1583 1585 // } 1584 1586 idDelete(&strat->Shdl); 1585 test=save_test;1587 SI_RESTORE_OPT1(save1); 1586 1588 if (TEST_OPT_PROT) PrintLn(); 1587 1589 return p; … … 1604 1606 LObject h; 1605 1607 ideal res; 1606 BITSET save_test=test; 1608 BITSET save1; 1609 SI_SAVE_OPT1(save1); 1607 1610 1608 1611 //if (idIs0(q)) return idInit(IDELEMS(q),si_max(q->rank,F->rank)); … … 1613 1616 strat->kHEdgeFound = (currRing->ppNoether) != NULL; 1614 1617 strat->kNoether=pCopy((currRing->ppNoether)); 1615 test|=Sy_bit(OPT_REDTAIL);1618 si_opt_1|=Sy_bit(OPT_REDTAIL); 1616 1619 if (TEST_OPT_STAIRCASEBOUND 1617 1620 && (0<Kstd1_deg) … … 1722 1725 // } 1723 1726 idDelete(&strat->Shdl); 1724 test=save_test;1727 SI_RESTORE_OPT1(save1); 1725 1728 if (TEST_OPT_PROT) PrintLn(); 1726 1729 return res; … … 2244 2247 Kstd1_deg=Kstd1_OldDeg; 2245 2248 if (!oldDegBound) 2246 test&= ~Sy_bit(OPT_DEGBOUND);2249 si_opt_1 &= ~Sy_bit(OPT_DEGBOUND); 2247 2250 } 2248 2251 else … … 2719 2722 //return kInterRedOld(F,Q); 2720 2723 2721 BITSET save=test; 2722 //test|=Sy_bit(OPT_NOT_SUGAR); 2723 test|=Sy_bit(OPT_REDTHROUGH); 2724 //test&= ~Sy_bit(OPT_REDTAIL); 2725 //test&= ~Sy_bit(OPT_REDSB); 2724 BITSET save1; 2725 SI_SAVE_OPT1(save1); 2726 //si_opt_1|=Sy_bit(OPT_NOT_SUGAR); 2727 si_opt_1|=Sy_bit(OPT_REDTHROUGH); 2728 //si_opt_1&= ~Sy_bit(OPT_REDTAIL); 2729 //si_opt_1&= ~Sy_bit(OPT_REDSB); 2726 2730 //extern char * showOption() ; 2727 2731 //Print("%s\n",showOption()); … … 2776 2780 } 2777 2781 if (null!=NULL) idDelete(&null); 2778 test=save;2782 SI_RESTORE_OPT1(save1); 2779 2783 idSkipZeroes(res); 2780 2784 return res; -
kernel/kstd2.cc
r6bbe94 r1bc7201 2031 2031 // only global: avoid normalization, return a multiply of NF 2032 2032 poly p; 2033 int i;2034 2033 2035 2034 //if ((idIs0(F))&&(Q==NULL)) … … 2037 2036 //strat->ak = idRankFreeModule(F); 2038 2037 /*- creating temp data structures------------------- -*/ 2039 BITSET save_test=test; 2040 test|=Sy_bit(OPT_REDTAIL); 2038 BITSET save1; 2039 SI_SAVE_OPT1(save1); 2040 si_opt_1|=Sy_bit(OPT_REDTAIL); 2041 2041 initBuchMoraCrit(strat); 2042 2042 strat->initEcart = initEcartBBA; … … 2071 2071 #endif 2072 2072 { 2073 BITSET save=test; 2074 test &= ~Sy_bit(OPT_INTSTRATEGY); 2073 si_opt_1 &= ~Sy_bit(OPT_INTSTRATEGY); 2075 2074 p = redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0); 2076 test=save;2077 2075 } 2078 2076 } … … 2088 2086 omfree(strat->fromQ); 2089 2087 idDelete(&strat->Shdl); 2090 test=save_test;2088 SI_RESTORE_OPT1(save1); 2091 2089 if (TEST_OPT_PROT) PrintLn(); 2092 2090 return p; … … 2113 2111 //strat->ak = idRankFreeModule(F); 2114 2112 /*- creating temp data structures------------------- -*/ 2115 BITSET save_test=test; 2116 test|=Sy_bit(OPT_REDTAIL); 2113 BITSET save1; 2114 SI_SAVE_OPT1(save1); 2115 si_opt_1|=Sy_bit(OPT_REDTAIL); 2117 2116 initBuchMoraCrit(strat); 2118 2117 strat->initEcart = initEcartBBA; … … 2127 2126 /*- compute------------------------------------------------------- -*/ 2128 2127 res=idInit(IDELEMS(q),si_max(q->rank,F->rank)); 2129 BITSET save=test; 2130 test &= ~Sy_bit(OPT_INTSTRATEGY); 2128 si_opt_1 &= ~Sy_bit(OPT_INTSTRATEGY); 2131 2129 for (i=IDELEMS(q)-1; i>=0; i--) 2132 2130 { … … 2155 2153 } 2156 2154 /*- release temp data------------------------------- -*/ 2157 test=save;2155 SI_RESTORE_OPT1(save1); 2158 2156 omfree(strat->sevS); 2159 2157 omfree(strat->ecartS); … … 2166 2164 omfree(strat->fromQ); 2167 2165 idDelete(&strat->Shdl); 2168 test=save_test;2166 SI_RESTORE_OPT1(save1); 2169 2167 if (TEST_OPT_PROT) PrintLn(); 2170 2168 return res; … … 2184 2182 { 2185 2183 int Ll_old, red_result = 1; 2186 BOOLEAN withT = FALSE;2187 2184 int pos = 0; 2188 2185 hilbeledeg=1; … … 3001 2998 void initBbaShift(ideal F,kStrategy strat) 3002 2999 { 3003 int i;3004 // idhdl h;3005 3000 /* setting global variables ------------------- */ 3006 3001 strat->enterS = enterSBba; /* remains as is, we change enterT! */ … … 3035 3030 // if (TEST_OPT_PROT) 3036 3031 // { 3037 // for(i =1; i<=(currRing->N); i++)3032 // for(int i=1; i<=rVar(currRing); i++) 3038 3033 // Print(" %d",ecartWeights[i]); 3039 3034 // PrintLn(); -
kernel/nc.cc
r6bbe94 r1bc7201 174 174 175 175 #if 1 176 BITSET save_test=test; 177 test|=Sy_bit(OPT_SB_1); // ring independent 176 BITSET save1; 177 SI_SAVE_OPT1(save1); 178 si_opt_1|=Sy_bit(OPT_SB_1); // ring independent 178 179 J = kStd(id_tmp, currQuotient, testHomog, NULL, NULL, 0, iSize); // J = J + K, J - std // in currRing! 179 test = save_test;180 SI_RESTORE_OPT1(save1); 180 181 #else 181 182 J=kStd(id_tmp, currQuotient,testHomog,NULL,NULL,0,0,NULL); … … 255 256 int flag, flagcnt=0, syzcnt=0; 256 257 int syzcomp = 0; 257 int k=1; // for ideals not modules258 258 ideal I = kStd(L, currQuotient,testHomog,NULL,NULL,0,0,NULL); 259 259 idSkipZeroes(I); … … 275 275 poly x=pOne(); 276 276 var[0]=x; 277 ideal h2, h3,s_h2, s_h3;278 poly p,q ,qq;277 ideal h2, s_h2, s_h3; 278 poly p,q; 279 279 // init vars 280 280 for (i=1; i<=N; i++ ) … … 335 335 Print(".proceeding with the variable %d\n",i); 336 336 s_h3 = idPrepareStd(s_I, s_h2, 1); 337 BITSET save_test=test; 338 test|=Sy_bit(OPT_SB_1); 337 BITSET save1; 338 SI_SAVE_OPT1(save1); 339 si_opt_1|=Sy_bit(OPT_SB_1); 339 340 idTest(s_h3); 340 341 idDelete(&s_h2); … … 343 344 Print("...computing Syz"); 344 345 s_h3 = kStd(s_h2, currQuotient,(tHomog)FALSE,NULL,NULL,syzcomp,idI); 345 test=save_test;346 SI_RESTORE_OPT1(save1); 346 347 //idShow(s_h3); 347 348 if (orig_ring != syz_ring) -
kernel/syz.cc
r6bbe94 r1bc7201 293 293 static void syMinStep1(resolvente res, int length) 294 294 { 295 int i,j,k, l,index=0;295 int i,j,k,index=0; 296 296 poly p; 297 297 ideal deg0=NULL,reddeg0=NULL; … … 331 331 { 332 332 p = res[index]->m[k]; 333 while ((p!=NULL) && ((!pLmIsConstantComp(p)) || (pGetComp(p)!= j)))333 while ((p!=NULL) && ((!pLmIsConstantComp(p)) || (pGetComp(p)!=(unsigned)j))) 334 334 pIter(p); 335 if ((p!=NULL) && (pLmIsConstantComp(p)) && (pGetComp(p)== j)) break;335 if ((p!=NULL) && (pLmIsConstantComp(p)) && (pGetComp(p)==(unsigned)j)) break; 336 336 k++; 337 337 } … … 394 394 intvec *** weights, BOOLEAN minim) 395 395 { 396 BITSET save1; 397 SI_SAVE_OPT1(save1); 396 398 resolvente res; 397 399 resolvente newres; … … 530 532 { 531 533 res[/*syzIndex+*/1] = idSyzygies(res[0/*syzIndex*/],hom,&w,FALSE,setRegularity,&Kstd1_deg); 532 if ((!TEST_OPT_NOTREGULARITY) && (Kstd1_deg>0)) test|= Sy_bit(OPT_DEGBOUND);534 if ((!TEST_OPT_NOTREGULARITY) && (Kstd1_deg>0)) si_opt_1 |= Sy_bit(OPT_DEGBOUND); 533 535 } 534 536 else … … 591 593 Kstd1_deg=Kstd1_OldDeg; 592 594 if (!oldDegBound) 593 test&= ~Sy_bit(OPT_DEGBOUND);595 si_opt_1 &= ~Sy_bit(OPT_DEGBOUND); 594 596 595 597 for (i=1; i<=syzIndex; i++) … … 613 615 rDelete(syz_ring); 614 616 } 617 SI_RESTORE_OPT1(save1); 615 618 return res; 616 619 } … … 645 648 #endif 646 649 647 int typ0;648 650 syStrategy result=(syStrategy)omAlloc0(sizeof(ssyStrategy)); 649 651 … … 723 725 int syDetect(ideal id,int index,BOOLEAN homog,int * degrees,int * tocancel) 724 726 { 725 int i, j, k, ModComp,subFromRank=0, lu; 726 poly p, q, qq, Unit1, Unit2; 727 int i, j, k, subFromRank=0; 727 728 ideal temp; 728 729 … … 741 742 } 742 743 j = 0; 743 p = NULL;744 744 while ((j<i) && (temp->m[j]==NULL)) j++; 745 745 while (j<i) … … 777 777 deg[i-1] = (*degrees)[i-1]-rsmin; 778 778 } 779 int dummy=syDetect(id,index,homog,deg,tocan);779 syDetect(id,index,homog,deg,tocan); 780 780 for (i=tocancel->length();i>0;i--) 781 781 (*tocancel)[i-1] = tocan[i-1]; … … 865 865 if (res[i]->m[j]!=NULL) 866 866 { 867 if ((pGetComp(res[i]->m[j])> l)867 if ((pGetComp(res[i]->m[j])>(unsigned)l) 868 868 || ((i>1) && (res[i-1]->m[pGetComp(res[i]->m[j])-1]==NULL))) 869 869 { … … 917 917 else 918 918 memset(temp2,0,l*sizeof(int)); 919 int dummy =syDetect(res[0],0,TRUE,temp2,tocancel);919 syDetect(res[0],0,TRUE,temp2,tocancel); 920 920 if (weights!=NULL) p_SetModDeg(NULL, currRing); 921 921 if (tomin) … … 957 957 { 958 958 memset(tocancel,0,(rows+1)*sizeof(int)); 959 dummy =syDetect(res[i+1],i+1,TRUE,temp2,tocancel);959 syDetect(res[i+1],i+1,TRUE,temp2,tocancel); 960 960 for (j=0;j<rows;j++) 961 961 { -
kernel/syz1.cc
r6bbe94 r1bc7201 474 474 int *F1=syzstr->Firstelem[index-1]; 475 475 int *H1=syzstr->Howmuch[index-1]; 476 poly pp;477 476 polyset o_r=syzstr->orderedRes[index]->m; 478 polyset or1=syzstr->orderedRes[index-1]->m;479 477 BOOLEAN ret = FALSE; 480 478 … … 660 658 int ** Fin=syzstr->Firstelem; 661 659 int ** Hin=syzstr->Howmuch; 662 int ** bin=syzstr->backcomponents;663 660 ideal o_r=syzstr->orderedRes[index+1]; 664 661 intvec *result=new intvec(howmuch+1); … … 778 775 { 779 776 int i,j,k=IDELEMS(syzstr->res[index]); 780 int ks=IDELEMS(syzstr->res[index+1]) ,kk,l,ll;777 int ks=IDELEMS(syzstr->res[index+1]); 781 778 int * Fin=syzstr->Firstelem[index-1]; 782 779 int * Hin=syzstr->Howmuch[index-1]; 783 780 int * bin=syzstr->backcomponents[index]; 784 781 int * elL=syzstr->elemLength[index]; 785 number coefgcd ,n;782 number coefgcd; 786 783 polyset redset=syzstr->orderedRes[index]->m; 787 784 poly p=NULL,q; … … 924 921 { 925 922 ideal res=syzstr->res[index]; 926 int i=0,j,k=IDELEMS(res) ,kk;923 int i=0,j,k=IDELEMS(res); 927 924 SSet sPairs=syzstr->resPairs[index-1]; 928 925 … … 994 991 { 995 992 int ll,k,no=(*so).order,sP=*sPlength,i; 996 poly p=(*so).lcm;997 993 998 994 if ((sP==0) || (sPairs[sP-1].order<=no)) … … 1081 1077 SObject tso; 1082 1078 int i,ii,j,k=IDELEMS(syzstr->res[index]),l=(*syzstr->Tl)[index],ll; 1083 int qc,first,pos,jj,j1;1079 int first,pos,jj,j1; 1084 1080 int * bci=syzstr->backcomponents[index]; 1085 1081 poly p,q; … … 1099 1095 { 1100 1096 q = rs[j]; 1101 qc = pGetComp(q);1102 1097 first = syzstr->Firstelem[index-1][pGetComp(q)]-1; 1103 1098 pos = first+syzstr->Howmuch[index-1][pGetComp(q)]; … … 1193 1188 { 1194 1189 int newdeg=*actdeg,newindex=-1,i,t,sldeg; 1195 poly p;1196 1190 SSet result; 1197 1191 SRes resPairs=syzstr->resPairs; … … 1866 1860 int syDim(syStrategy syzstr) 1867 1861 { 1868 int i, j=-1,l;1862 int i,l; 1869 1863 if (syzstr->resPairs!=NULL) 1870 1864 { … … 2106 2100 * minimizes toMin 2107 2101 */ 2102 #if 0 /* unused */ 2108 2103 static poly syMinimizeP(int toMin,syStrategy syzstr,intvec * ordn,int index, 2109 2104 intvec * toStrip) … … 2133 2128 while (p!=NULL) 2134 2129 { 2135 if (pGetComp(p)== tc)2130 if (pGetComp(p)==(unsigned)tc) 2136 2131 { 2137 2132 tq = pInit(); … … 2158 2153 return pp; 2159 2154 } 2155 #endif 2160 2156 2161 2157 /*2 … … 2165 2161 intvec * toStrip) 2166 2162 { 2167 int ii=0,i, j,tc,lp,ltS=-1;2168 poly p,mp=NULL,pp ,q=NULL,tq,pisN;2163 int ii=0,i,tc,lp,ltS=-1; 2164 poly p,mp=NULL,pp; 2169 2165 SSet sPairs=syzstr->resPairs[index]; 2170 2166 poly tempStripped=NULL; … … 2329 2325 intvec * Strip, * ordn; 2330 2326 resolvente tres=(resolvente)omAlloc0((syzstr->length+1)*sizeof(ideal)); 2331 ring tmpR = NULL;2332 2327 ring origR = currRing; 2333 2328 … … 2339 2334 return tres; 2340 2335 } 2341 int i,j,l,index,ii,i1; 2342 poly p; 2343 ideal rs; 2336 int i,l,index,i1; 2344 2337 SSet sPairs; 2345 int * ord,*b0,*b1;2346 2338 2347 2339 assume(syzstr->syRing != NULL); … … 2443 2435 syStrategy syLaScala3(ideal arg,int * length) 2444 2436 { 2445 BOOLEAN noPair=FALSE; 2446 int i,j,actdeg=32000,index=0,reg=-1; 2447 int startdeg,howmuch; 2448 poly p; 2437 int i,j,actdeg=32000,index=0; 2438 int howmuch; 2449 2439 ideal temp; 2450 2440 SSet nextPairs; … … 2510 2500 int len0=id_RankFreeModule(temp,currRing)+1; 2511 2501 2512 startdeg = actdeg;2513 2502 nextPairs = syChosePairs(syzstr,&index,&howmuch,&actdeg); 2514 2503 //if (TEST_OPT_PROT) Print("(%d,%d)",howmuch,index); … … 2574 2563 syStrategy syLaScala(ideal arg, int& maxlength, intvec* weights) 2575 2564 { 2576 BOOLEAN noPair=FALSE; 2577 int i,j,actdeg=32000,index=0,reg=-1; 2578 int startdeg,howmuch; 2579 poly p; 2565 int i,j,actdeg=32000,index=0; 2566 int howmuch; 2580 2567 ideal temp; 2581 2568 SSet nextPairs; … … 2658 2645 int len0=id_RankFreeModule(temp,currRing)+1; 2659 2646 2660 startdeg = actdeg;2661 2647 nextPairs = syChosePairs(syzstr,&index,&howmuch,&actdeg); 2662 2648 //if (TEST_OPT_PROT) Print("(%d,%d)",howmuch,index); -
kernel/syz2.cc
r6bbe94 r1bc7201 75 75 int actdeg) 76 76 { 77 SSet temp;78 77 SObject tso; 79 poly toHandle, tsyz=NULL,p,pp;78 poly toHandle,p,pp; 80 79 int r1,r2=0,rr,l=(*syzstr->Tl)[index]; 81 80 int i,j,r=0,ti; … … 85 84 #endif 86 85 actdeg += index; 87 long * ShiftedComponents = syzstr->ShiftedComponents[index-1];88 int* Components = syzstr->truecomponents[index-1];89 86 90 87 while ((l>0) && ((syzstr->resPairs[index])[l-1].lcm==NULL)) l--; … … 119 116 { 120 117 if (((syzstr->resPairs[index])[i].p!=NULL) && 121 (pGetComp((syzstr->resPairs[index])[i].p)== tc))118 (pGetComp((syzstr->resPairs[index])[i].p)==(unsigned)tc)) 122 119 { 123 120 #ifdef USE_CHAINCRIT … … 506 503 { 507 504 int i,j,k=IDELEMS(syzstr->res[index]); 508 int ks=IDELEMS(syzstr->res[index+1]),kk ,l,ll;505 int ks=IDELEMS(syzstr->res[index+1]),kk; 509 506 int ks1=IDELEMS(syzstr->orderedRes[index+1]); 510 507 int kres=(*syzstr->Tl)[index]; 511 508 int toGo=0; 512 509 int il; 513 number coefgcd,n;514 510 SSet redset=syzstr->resPairs[index]; 515 poly p=NULL,q,tp;511 poly q; 516 512 intvec *spl1; 517 513 SObject tso; … … 522 518 int step=1,jj,j1,j2; 523 519 #endif 524 long * ShiftedComponents = syzstr->ShiftedComponents[index]; 525 int* Components = syzstr->truecomponents[index]; 526 assume(Components != NULL && ShiftedComponents != NULL); 527 BOOLEAN need_reset; 520 assume((syzstr->truecomponents[index]) != NULL && (syzstr->ShiftedComponents[index]) != NULL); 528 521 529 522 actord += index; … … 858 851 { 859 852 ideal res=syzstr->res[1]; 860 int i=0,j,k=IDELEMS(res),k1=IDELEMS(syzstr->orderedRes[1]); 861 SSet sPairs1=syzstr->resPairs[1]; 853 int i=0,k=IDELEMS(res),k1=IDELEMS(syzstr->orderedRes[1]); 862 854 SSet sPairs=syzstr->resPairs[0]; 863 855 … … 964 956 syStrategy syHilb(ideal arg,int * length) 965 957 { 966 int i,j,actdeg=32000,index=0 ,reg=-1;967 int startdeg,howmuch,toSub=0;958 int i,j,actdeg=32000,index=0; 959 int howmuch,toSub=0; 968 960 int maxindex=0,maxdeg=0; 969 961 ideal temp=NULL; … … 1028 1020 syzstr->bucket = kBucketCreate(currRing); 1029 1021 syzstr->syz_bucket = kBucketCreate(currRing); 1030 startdeg = actdeg;1031 1022 nextPairs = syChosePairs(syzstr,&index,&howmuch,&actdeg); 1032 1023 /*--- computes the resolution ----------------------*/ -
kernel/syz3.cc
r6bbe94 r1bc7201 89 89 * shows the resolution stored in syzstr->orderedRes 90 90 */ 91 #if 0 /* unused*/ 91 92 static void syShowRes(syStrategy syzstr) 92 93 { … … 103 104 } 104 105 } 106 #endif 105 107 106 108 /*3 … … 601 603 * the corresponding representation) 602 604 */ 605 #if 0 /*unused*/ 603 606 static void syRedTailSyzPair(SObject tso,syStrategy syzstr,int index, 604 607 int * gen_length,int* orp_l,int * tored_l,int * syzred_l) … … 637 640 assume(pLength(tso.p)==*tored_l); 638 641 } 642 #endif 639 643 640 644 /*3 … … 1178 1182 int ng_place=IDELEMS(new_generators); 1179 1183 int i,j; 1180 number coefgcd,n;1184 number n; 1181 1185 poly p; 1182 BOOLEAN deleteP=FALSE;1183 1186 #ifdef EXPERIMENT1 1184 1187 poly syzp; … … 1367 1370 { 1368 1371 if (resPairs[0].lcm==NULL) return FALSE; 1369 int i=0 ,j;1372 int i=0; 1370 1373 poly deg_soc; 1371 1374 … … 1450 1453 if (next_p!=NULL) 1451 1454 { 1452 if (pGetComp(next_p)<= crit_comp)1455 if (pGetComp(next_p)<=(unsigned)crit_comp) 1453 1456 { 1454 1457 pDelete(&next_p); … … 1675 1678 resolvente totake) 1676 1679 { 1677 int i,j,newIdeal; 1678 intvec * w; 1679 poly p; 1680 int i,j; 1680 1681 ideal result; 1681 1682 int rk_new_gens = id_RankFreeModule(new_generators,currRing); … … 1752 1753 syStrategy syKosz(ideal arg,int * length) 1753 1754 { 1754 int i,j,jj,k=0,index=0,rk_arg, actual_syzcomp,next_syz=0;1755 int i,j,jj,k=0,index=0,rk_arg,next_syz=0; 1755 1756 int crit_comp,t_comp,next_deg,old_tl; 1756 1757 ideal temp=NULL,old_ideal,old_repr; 1757 ring origR = currRing,actR; 1758 poly p,next_gen; 1759 tHomog hom=isNotHomog; 1758 ring origR = currRing; 1759 poly next_gen; 1760 1760 BOOLEAN isRegular; 1761 1761 -
kernel/walkMain.cc
r6bbe94 r1bc7201 70 70 /* OLDRING **************************************************** */ 71 71 ideal nextG; 72 BITSET optionState;73 72 74 73 if (currwOnBorder64(G,currw64)) … … 113 112 nextG=(ideal)resMat; 114 113 115 optionState=test; 116 test|=Sy_bit(OPT_REDSB); 114 BITSET save1,save2; 115 SI_SAVE_OPT(save1,save2); 116 si_opt_1|=Sy_bit(OPT_REDSB); 117 117 nextG = idInterRed(nextG); 118 test=optionState;118 SI_RESTORE_OPT(save1,save2); 119 119 } 120 120 else … … 145 145 /////////////////////////////////////////////////////////////////// 146 146 147 WalkState walkStep64(ideal & G,int64vec* currw64, int step){ 147 WalkState walkStep64(ideal & G,int64vec* currw64, int step) 148 { 148 149 WalkState state=WalkOk; 149 BITSET optionState;150 150 151 151 /* OLDRING ****************************************************** */ … … 196 196 nextG=(ideal)resMat; 197 197 198 optionState=test; 199 test|=Sy_bit(OPT_REDSB); 198 BITSET save1,save2; 199 SI_SAVE_OPT(save1,save2); 200 si_opt_1|=Sy_bit(OPT_REDSB); 200 201 nextG = idInterRed(nextG); 201 test=optionState;202 SI_RESTORE_OPT(save1,save2); 202 203 203 204 G=nextG; … … 219 220 220 221 WalkState walk64(ideal I,int64vec* currw64,ring destRing, 221 int64vec* destVec64,ideal & destIdeal,BOOLEAN sourceIsSB) {222 222 int64vec* destVec64,ideal & destIdeal,BOOLEAN sourceIsSB) 223 { 223 224 //some initializations 224 225 WalkState state=WalkOk; 225 BITSET optionState; 226 test|=Sy_bit(OPT_REDTAIL); 226 BITSET save1,save2; 227 SI_SAVE_OPT(save1,save2); 228 229 si_opt_1|=Sy_bit(OPT_REDTAIL); 227 230 overflow_error=FALSE; 228 231 int step=0; 229 232 ideal G=I; 230 233 231 optionState=test; 232 test|=Sy_bit(OPT_REDSB); 234 si_opt_1|=Sy_bit(OPT_REDSB); 233 235 if(!sourceIsSB) 234 236 { … … 238 240 else 239 241 G=idInterRed(G); 240 test=optionState;242 SI_RESTORE_OPT(save1,save2); 241 243 242 244 ideal nextG; … … 244 246 nextG=G; 245 247 246 if(overflow_error){ 247 state=WalkOverFlowError; 248 if(overflow_error) 249 { 250 state=WalkOverFlowError; 248 251 return(state); 249 250 251 252 253 252 } 253 254 int64 nexttvec0,nexttvec1; 255 //int64vec* nexttvec64=nextt64(nextG,currw64,destVec64); 256 nextt64(nextG,currw64,destVec64,nexttvec0,nexttvec1); 254 257 255 258 //while(0<t<=1) ( t=((*nexttvec64)[0])/((*nexttvec64)[1]) ) 256 259 //while( (*nexttvec64)[0]<=(*nexttvec64)[1] ) { 257 while (nexttvec0<=nexttvec1 ) {258 260 while (nexttvec0<=nexttvec1 ) 261 { 259 262 step=step+1; 260 263 … … 271 274 //uppdates nextG if all is OK 272 275 273 if(overflow_error) {276 if(overflow_error) 274 277 return(WalkOverFlowError); 275 }276 278 277 279 //delete nexttvec64; … … 353 355 /////////////////////////////////////////////////////////////////// 354 356 355 WalkState unperturbedFirstStep64(ideal & G,int64vec* currw64, ring destRing){ 357 WalkState unperturbedFirstStep64(ideal & G,int64vec* currw64, ring destRing) 358 { 356 359 WalkState state=WalkOk; 357 360 /* OLDRING **************************************************** */ 358 361 ideal nextG; 359 BITSET optionState; 362 BITSET save1,save2; 363 SI_SAVE_OPT(save1,save2); 360 364 361 365 if (currwOnBorder64(G,currw64)) … … 371 375 372 376 //turn off bucket representation of polynomials and on redSB 373 optionState=test; 374 //test|=Sy_bit(OPT_NOT_BUCKETS); 375 test|=Sy_bit(OPT_REDSB); 377 //si_opt_1|=Sy_bit(OPT_NOT_BUCKETS); 378 si_opt_1|=Sy_bit(OPT_REDSB); 376 379 377 380 ideal newStdGw=idStd(newGw); 378 381 379 //turn on bucket representation of polynomials and off redSB380 test=optionState;382 //turn on bucket representation of polynomials and off redSB 383 SI_RESTORE_OPT(save1,save2); 381 384 382 385 matrix L=matIdLift(newGw,newStdGw); … … 394 397 nextG=(ideal)resMat; 395 398 396 optionState=test; 397 test|=Sy_bit(OPT_REDSB); 399 si_opt_1|=Sy_bit(OPT_REDSB); 398 400 nextG = idInterRed(nextG); 399 test=optionState;401 SI_RESTORE_OPT(save1,save2); 400 402 } 401 403 else … … 436 438 { PrintS("fractal walk, weights");currw64->show();PrintLn(); } 437 439 WalkState state=WalkOk; 438 BITSET optionState=test; 440 BITSET save1,save2; 441 SI_SAVE_OPT(save1,save2); 439 442 440 443 //1 … … 530 533 newGw=idrMoveR(GwCp,oldRing,newring); 531 534 532 test|=Sy_bit(OPT_REDSB);535 si_opt_1|=Sy_bit(OPT_REDSB); 533 536 newStdGw=idStd(newGw); //computes new reduced GB of Gw 534 test=optionState;537 SI_RESTORE_OPT(save1,save2); 535 538 } 536 539 else … … 567 570 //fractalRec64(Gw,level+1) has returned 568 571 569 // test|=Sy_bit(OPT_NOT_BUCKETS);572 //si_opt_1|=Sy_bit(OPT_NOT_BUCKETS); 570 573 matrix L=matIdLift(newGw,newStdGw); 571 test=optionState;574 SI_RESTORE_OPT(save1,save2); 572 575 573 576 newG=idrMoveR(GCp,oldRing,currRing); … … 581 584 //9 582 585 583 test|=Sy_bit(OPT_REDSB);586 si_opt_1|=Sy_bit(OPT_REDSB); 584 587 G=idInterRed(G); 585 test=optionState;588 SI_RESTORE_OPT(save1,save2); 586 589 587 590 old_w=iv64Copy(w); … … 615 618 overflow_error=FALSE; //global 616 619 WalkState state=WalkOk; 617 test|=Sy_bit(OPT_REDTAIL); 620 BITSET save1,save2; 621 SI_SAVE_OPT(save1,save2); 622 623 si_opt_1|= (Sy_bit(OPT_REDTAIL)|Sy_bit(OPT_REDSB)); 618 624 ideal G; 619 625 620 BITSET optionState=test;621 test|=Sy_bit(OPT_REDSB);622 626 if(!sourceIsSB) 623 627 { … … 630 634 } 631 635 632 test=optionState; //switches REDSB off636 SI_RESTORE_OPT(save1,save2); //switches REDSB off 633 637 634 638 //matrices for the orders of the rings -
libpolys/misc/mylimits.h
r6bbe94 r1bc7201 21 21 22 22 // #define ULONG_MAX (~0UL) // ?? 23 #ifndef ULONG_MAX 23 24 #define ULONG_MAX (~0L) 25 #endif 24 26 25 27 // TODO: fixing the following BUG (!?) leads to wrong ring::bitmask 26 28 // #if ~0UL != 4294967295UL 29 #ifndef LONG_MAX 27 30 #if ~0UL == 4294967295UL 28 31 #define LONG_MAX 9223372036854775807L … … 30 33 #define LONG_MAX 2147483647L 31 34 #endif 35 #endif 32 36 33 37 #endif /* _MYLIMITS_H */ -
libpolys/misc/options.c
r6bbe94 r1bc7201 2 2 // since initialized variables will be "D" (uninit. go to "C") segments 3 3 #include <misc/options.h> 4 unsigned test= 0;5 unsigned verbose= Sy_bit(V_QUIET)4 unsigned si_opt_1 = 0; 5 unsigned si_opt_2 = Sy_bit(V_QUIET) 6 6 //| Sy_bit(V_QRING) // not default, as speed drops by 10 % 7 7 | Sy_bit(V_REDEFINE) -
libpolys/misc/options.h
r6bbe94 r1bc7201 11 11 /*the general set of verbose-options : verbose */ 12 12 #ifdef __cplusplus 13 extern "C" unsigned test;14 extern "C" unsigned verbose;13 extern "C" unsigned si_opt_1; 14 extern "C" unsigned si_opt_2; 15 15 #else 16 extern unsigned test;17 extern unsigned verbose;16 extern unsigned si_opt_1; 17 extern unsigned si_opt_2; 18 18 #endif 19 #define SI_SAVE_OPT(A,B) { A=si_opt_1; B=si_opt_2; } 20 #define SI_SAVE_OPT1(A) { A=si_opt_1; } 21 #define SI_SAVE_OPT2(A) { A=si_opt_2; } 22 #define SI_RESTORE_OPT(A,B) { si_opt_1=A; si_opt_2=B; } 23 #define SI_RESTORE_OPT1(A) { si_opt_1=A; } 24 #define SI_RESTORE_OPT2(A) { si_opt_2=A; } 19 25 20 26 /* … … 24 30 #define Sy_bit(x) ((unsigned)1<<(x)) 25 31 #define Sy_inset(x,s) ((Sy_bit(x)&(s))?TRUE:FALSE) 26 #define BTEST1(a) Sy_inset((a), test)27 #define BVERBOSE(a) Sy_inset((a), verbose)32 #define BTEST1(a) Sy_inset((a), si_opt_1) 33 #define BVERBOSE(a) Sy_inset((a), si_opt_2) 28 34 29 35 /* -
libpolys/polys/monomials/p_polys.cc
r6bbe94 r1bc7201 246 246 const int limit = o->data.syz.limit; 247 247 248 if (c > limit)248 if (c > (unsigned long)limit) 249 249 p->exp[place] = o->data.syz.curr_index; 250 250 else if (c > 0) 251 251 { 252 assume( (1 <= c) && (c <= limit) );252 assume( (1 <= c) && (c <= (unsigned long)limit) ); 253 253 p->exp[place]= o->data.syz.syz_index[c]; 254 254 } … … 530 530 p_LmCheckPolyRing(p, r); 531 531 int i, k; 532 int pIS = 0;533 532 long j =0; 534 533 … … 1914 1913 assume( ph != NULL ); 1915 1914 1916 assume( r != NULL ); assume( r->cf != NULL ); const coeffs C = r->cf;1915 assume( r != NULL ); assume( r->cf != NULL ); 1917 1916 1918 1917 … … 1920 1919 if( 0 ) 1921 1920 { 1921 const coeffs C = r->cf; 1922 1922 // experimentall (recursive enumerator treatment) of alg. Ext! 1923 1923 CPolyCoeffsEnumerator itr(ph); … … 1977 1977 n_ClearContent(itr, r->cf); 1978 1978 1979 p_Test(ph, r); n_Test(pGetCoeff(ph), C);1980 assume(n_GreaterZero(pGetCoeff(ph), C)); // ??1979 p_Test(ph, r); n_Test(pGetCoeff(ph), r->cf); 1980 assume(n_GreaterZero(pGetCoeff(ph), r->cf)); // ?? 1981 1981 1982 1982 // if(!n_GreaterZero(pGetCoeff(ph),r->cf)) ph = p_Neg(ph,r); -
libpolys/polys/monomials/ring.cc
r6bbe94 r1bc7201 3430 3430 if (complete) 3431 3431 { 3432 test&= ~ TEST_RINGDEP_OPTS;3433 test|= r->options;3432 si_opt_1 &= ~ TEST_RINGDEP_OPTS; 3433 si_opt_1 |= r->options; 3434 3434 } 3435 3435 } -
libpolys/polys/monomials/ring.h
r6bbe94 r1bc7201 659 659 if( ret ) 660 660 { 661 const ring R = C->extRing; 662 assume( R != NULL ); 661 assume( (C->extRing) != NULL ); 663 662 BOOLEAN idIs0 (ideal h); 664 assume( !idIs0(R->qideal));663 assume((!((C->extRing)->qideal==NULL)) && (!idIs0((C->extRing)->qideal))); 665 664 } 666 665
Note: See TracChangeset
for help on using the changeset viewer.