Changeset 9d72fe in git
- Timestamp:
- Aug 24, 2000, 4:42:47 PM (23 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- d04e5c6da27fdd8c08fbad5b2d62afe127e20d5c
- Parents:
- 30d8a152a104abfe89fae353b5945c3210760945
- Location:
- Singular
- Files:
-
- 9 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/Makefile.in
r30d8a1 r9d72fe 100 100 pcv.cc kbuckets.cc prProcs.cc \ 101 101 mpr_inout.cc mpr_base.cc mpr_numeric.cc \ 102 prCopy.cc 102 prCopy.cc p_Procs.cc 103 103 104 104 … … 110 110 111 111 SOURCES=${CSOURCES} ${CXXSOURCES} ${ESOURCES} mmalloc.cc\ 112 grammar.y scanner.l libparse.l syz2.cc 112 grammar.y scanner.l libparse.l syz2.cc \ 113 p_Delete__Template.cc p_ShallowCopyDelete__Template.cc \ 114 p_Copy__Template.cc p_Mult_n__Template.cc p_Mult_m__Template.cc \ 115 p_Minus_m_Mult_q__Template.cc p_Add_q__Template.cc 113 116 114 117 … … 130 133 mpr_global.h mpr_inout.h mpr_base.h mpr_numeric.h \ 131 134 feOpt.h fegetopt.h distrib.h walk.h \ 132 prCopy.h 135 prCopy.h \ 136 p_MemAdd.h p_MemCopy.h p_MemCmp.h p_Numbers.h 133 137 134 138 INCS=febase.inc polys.inc iparith.inc mpsr_Tok.inc feOpt.inc … … 268 272 $(PERL) prCopy.pl > prCopy.inc 269 273 274 p_Procs.inc: p_Procs.cc p_Procs.h mod2.h 275 $(CXX) -g -Wall -DGENERATE_P_PROCS p_Procs.cc -o p_Procs 276 ./p_Procs > p_Procs.inc 277 278 270 279 src: scanner.cc grammar.h grammar.cc libparse.cc 271 280 … … 348 357 ## 349 358 mostlyclean: 350 -rm -f Singular Singular-static Singular g Singularp Singularb libparse feOpt*.inc351 -rm -f *.o *.og core *.op *.ob *.ot Singulart 359 -rm -f Singular Singular-static Singulara Singularg Singularp Singularb libparse feOpt*.inc p_Procs.inc 360 -rm -f *.o *.og core *.op *.ob *.ot Singulart *.od *_d.cc *_d.c p_Procs *.oa 352 361 -rm ESingular* TSingular* 353 362 … … 498 507 499 508 ## 500 ## op and ob files for gprof and bprof, ot for mtrack 509 ## op and ob files for gprof and bprof, ot for mtrack, oc for OMCHECK=1 501 510 ## 502 511 … … 585 594 586 595 596 # 597 # for Singulara 598 # 599 DEFSA = -DOM_CHECK=1 -DHAVE_ASSUME -DNDEBUG -D@SING_UNAME@ @DEFS@ 600 OBJA1 := $(CXXSOURCES:.cc=.oa) 601 OBJA2 := $(CSOURCES:.c=.oa) 602 OBJA=$(OBJA1) $(OBJA2) 603 CFLAGSA = -g -O -Wall -Wno-unused ${PIPE} 604 CXXFLAGSA = -g -O -Wall -Wno-unused ${PIPE} 605 606 claptmpl.oa: claptmpl.cc mod2.h 607 $(CXX) ${CXXFLAGSA} ${CPPFLAGS} ${DEFSA} -c $< -o $@ 608 609 $(OBJA1) mmalloc.oa: %.oa: %.cc 610 $(CXX) ${CXXFLAGSA} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSA} -c $< -o $@ 611 612 $(OBJA2) : %.oa: %.c 613 $(CCP) ${CFLAGSA} ${CPPFLAGS} ${DEFSA} -c $< -o $@ 614 615 Singulara: scanner.cc $(OBJA) iparith.oa mpsr_Tok.oa claptmpl.oa tesths.cc version.h mmalloc.oa 616 $(CXXP) ${CXXFLAGSA} ${CPPFLAGS} ${DEFSA} -o Singulara \ 617 tesths.cc iparith.oa mpsr_Tok.oa claptmpl.oa $(OBJA) ${LDFLAGS} ${LIBS} -lomalloc mmalloc.oa \ 618 ${LD_DYN_FLAGS} 619 620 iparith.oa: iparith.inc iparith.cc 621 $(CXXP) ${CXXFLAGSA} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSA} -c iparith.cc -o iparith.oa 622 623 mpsr_Tok.oa: iparith.inc mpsr_Tok.cc 624 $(CXXP) ${CXXFLAGAT} ${CXXTEMPLFLAGSB} ${CPPFLAGS} ${DEFSA} -c mpsr_Tok.cc -o mpsr_Tok.oa 625 626 # 627 # for Macro expansion 628 # 629 CXXSOURCESD := $(CXXSOURCES:%.cc=%_d.cc) 630 CSOURCESD := $(CSOURCES:%.c=%_d.c) 631 OBJD1 := $(CXXSOURCESD:.cc=.od) 632 OBJD2 := $(CSOURCESD:.c=.od) 633 634 p_ProcsGen_d.cc: p_Procs.cc p_Procs.h mod2.h 635 $(CCG) -DGENERATE_P_PROCS ${CPPFLAGS} -E -P p_Procs.cc | $(PERL) -p -e 's/;/;\n/g' | $(PERL) -p -e 's/\{/\n\{/g' | $(PERL) -p -e 's/\}/\n\}/g' > $@ 636 p_ProcsGen_d: p_Procs_d.cc 637 gcc -g -Wall -DGENERATE_P_PROCS p_Procs_d.cc -o p_ProcsGen_d 638 639 %_d.c : %.c 640 $(CCG) $(CFLAGSG) ${CPPFLAGS} -E -P $< | $(PERL) -p -e 's/;/;\n/g' | $(PERL) -p -e 's/\{/\n\{/g' | $(PERL) -p -e 's/\}/\n\}/g' > $@ 641 642 %_d.cc : %.cc 643 $(CCG) $(CXXFLAGS) ${CPPFLAGS} -E -P $< | $(PERL) -p -e 's/;/;\n/g' | $(PERL) -p -e 's/\{/\n\{/g' | $(PERL) -p -e 's/\}/\n\}/g' > $@ 644 645 .PRECIOUS: %_d.cc %_d.c 646 647 %.od : %.c 648 $(CCG) ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ 649 650 %.od : %.cc 651 $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ 652 653 Singular_d: scanner.cc $(OBJD) mmalloc.od\ 654 iparith.od mpsr_Tok.od claptmpl.og tesths.cc version.h 655 $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -o Singularg_d \ 656 tesths.cc iparith.od mpsr_Tok.od claptmpl.og $(OBJG) ${LDFLAGS} ${LIBS} -lomalloc mmalloc.od \ 657 ${LD_DYN_FLAGS} ${LD_LIBC} 658 587 659 ## 588 660 ## check_aso … … 595 667 596 668 %.dd: %.cc mod2.h 597 echo $(@:.dd=.og) $(@:.dd=.op) $(@:.dd= .ob) $(@:.dd=.ot)" " \\ > $@669 echo $(@:.dd=.og) $(@:.dd=.op) $(@:.dd=_d.cc) $(@:.dd=.od) $(@:.dd=.ob) $(@:.dd=.ot) $(@:.dd=.oa) " " \\ > $@ 598 670 $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@ 599 671 600 672 %.d: %.c mod2.h 601 echo $(@:.d=.og) $(@:.d=.o p) $(@:.d=.ob) $(@:.d=.ot)" " \\ > $@673 echo $(@:.d=.og) $(@:.d=.od) $(@:.dd=_d.c) $(@:.d=.op) $(@:.d=.ob) $(@:.d=.ot) $(@:.dd=.oa)" " \\ > $@ 602 674 $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@ 603 675 604 depend: $(CXXSOURCES:.cc=.dd) $(CSOURCES:.c=.d) mmalloc.dd mod2.h676 depend: $(CXXSOURCES:.cc=.dd) $(CSOURCES:.c=.d) iparith.dd mmalloc.dd mod2.h 605 677 cat *.d *.dd >depend 606 678 … … 610 682 611 683 612 -
Singular/extra.cc
r30d8a1 r9d72fe 2 2 * Computer Algebra System SINGULAR * 3 3 *****************************************/ 4 /* $Id: extra.cc,v 1.13 8 2000-08-14 14:35:50 SingularExp $ */4 /* $Id: extra.cc,v 1.139 2000-08-24 14:42:39 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: general interface to internals of Singular ("system" command) … … 628 628 char *sys_cmd=(char *)(h->Data()); 629 629 h=h->next; 630 #ifdef RDEBUG 630 631 /*==================== poly debug ==================================*/ 631 632 if(strcmp(sys_cmd,"p")==0) … … 642 643 } 643 644 else 645 #endif 644 646 /*==================== mtrack ==================================*/ 645 647 if(strcmp(sys_cmd,"mtrack")==0) -
Singular/febase.cc
r30d8a1 r9d72fe 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: febase.cc,v 1.8 8 2000-08-14 12:56:06obachman Exp $ */4 /* $Id: febase.cc,v 1.89 2000-08-24 14:42:40 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: i/o system … … 407 407 { 408 408 fprintf(stderr, "Internal assume violation: file %s line %d\n", file, line); 409 omPrintCurrentBackTrace(stderr); 409 410 } 410 411 } -
Singular/iparith.cc
r30d8a1 r9d72fe 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.22 0 2000-08-14 12:56:21obachman Exp $ */4 /* $Id: iparith.cc,v 1.221 2000-08-24 14:42:40 obachman Exp $ */ 5 5 6 6 /* … … 24 24 #include "longalg.h" 25 25 #include "polys.h" 26 #include "polys-comp.h" 26 27 #include "ideals.h" 27 28 #include "matpol.h" -
Singular/mod2.h.in
r30d8a1 r9d72fe 6 6 * DO NOT EDIT! 7 7 * 8 * Version: $Id: mod2.h.in,v 1.8 4 2000-08-14 12:56:39obachman Exp $8 * Version: $Id: mod2.h.in,v 1.85 2000-08-24 14:42:42 obachman Exp $ 9 9 *******************************************************************/ 10 10 #ifndef MOD2_H … … 104 104 /* Define if you have petpwnam */ 105 105 #undef HAVE_GETPWNAM 106 /* Define if you have popen */ 107 #undef HAVE_POPEN 106 108 /* Define sizeof(char) */ 107 109 #define SIZEOF_CHAR 1 -
Singular/omSingularConfig.h
r30d8a1 r9d72fe 2 2 * File: omSingularConfig.h 3 3 * Purpose: declaration of External Config stuff for omalloc 4 * This file is inlcuded by omDefaultConfig.h, i.e., at the the time 5 * the omalloc library is built. Any changes to the default config 6 * of omalloc should be done here (and, of course, you need to 7 * rebuilt the library). 4 8 * Author: obachman@mathematik.uni-kl.de (Olaf Bachmann) 5 9 * Created: 8/00 6 * Version: $Id: omSingularConfig.h,v 1. 1 2000-08-14 12:57:49obachman Exp $10 * Version: $Id: omSingularConfig.h,v 1.2 2000-08-24 14:42:42 obachman Exp $ 7 11 *******************************************************************/ 8 12 #ifndef OM_SINGULAR_CONFIG_H -
Singular/polys-comp.h
r30d8a1 r9d72fe 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: polys-comp.h,v 1.2 3 2000-08-18 15:42:06 SingularExp $ */6 /* $Id: polys-comp.h,v 1.24 2000-08-24 14:42:44 obachman Exp $ */ 7 7 8 8 /*************************************************************** … … 100 100 101 101 // need to undefine this, since longs might be negative 102 #define u_s 102 #define u_s unsigned 103 103 104 104 #define _memcmp(p1, p2, i, l, actionE, actionD) \ … … 137 137 #endif 138 138 139 #if defined(PDEBUG) && defined(HAVE_SHIFTED_EXPONENTS) 140 extern int pDBsyzComp; 141 int rComp0(poly p1, poly p2); 139 #ifdef PDEBUG 140 extern int rComp0(poly p1, poly p2); 142 141 #else 143 142 inline int rComp0(poly p1, poly p2) -
Singular/polys-impl.cc
r30d8a1 r9d72fe 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys-impl.cc,v 1.4 6 2000-08-24 14:28:55 SingularExp $ */4 /* $Id: polys-impl.cc,v 1.47 2000-08-24 14:42:44 obachman Exp $ */ 5 5 6 6 /*************************************************************** … … 915 915 916 916 #ifdef HAVE_SHIFTED_EXPONENTS 917 #ifdef PDEBUG 918 int rComp0(poly p1,poly p2) 917 int rComp0_Func(poly p1,poly p2) 919 918 { 920 919 int i; … … 931 930 return 0; 932 931 } 932 933 #ifdef PDEBUG 934 int rComp0(poly p1,poly p2) 935 { 936 int i; 937 for(i=0; i<=currRing->pCompHighIndex;i++) 938 { 939 if (p1->exp.l[i] != p2->exp.l[i]) 940 { 941 if (p1->exp.l[i] > p2->exp.l[i]) 942 return currRing->ordsgn[i]; 943 else 944 return -currRing->ordsgn[i]; 945 } 946 } 947 return 0; 948 } 933 949 #endif 934 950 #endif -
Singular/polys.h
r30d8a1 r9d72fe 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: polys.h,v 1.3 2 2000-08-14 12:56:46obachman Exp $ */6 /* $Id: polys.h,v 1.33 2000-08-24 14:42:45 obachman Exp $ */ 7 7 /* 8 8 * ABSTRACT - all basic methods to manipulate polynomials … … 124 124 // frees the space of monomial and frees coefficient 125 125 #define pDelete1(m) _pDelete1(m, currPolyBin) 126 // deletes the whole polynomial p 127 #define pDelete(p) _pDelete(p, currPolyBin) 126 128 127 129 128 // similar to routines above, except that monomials are assumed to be from heap h (resp. are allocated from heap h) … … 154 153 155 154 extern poly pHeadProc(poly p); 156 // Returns copy of the whole polynomial157 #define pCopy(p) _pCopy(currPolyBin, p)158 155 // Returns copy of the whole poly, new monomials are taken from dest_heap 159 156 #define pHeapCopy(dest_heap, p) _pCopy(dest_heap, p) … … 180 177 181 178 /*-------------operations on polynomials:------------*/ 182 poly pAdd(poly p1, poly p2);183 179 poly pNeg(poly p); 184 180 poly pSub(poly a, poly b); … … 187 183 poly pMultCopyN(poly a, number c); 188 184 poly pPower(poly p, int i); 185 186 187 // ----------------- define to enable new p_procs -----*/ 188 // #define HAVE_P_PROCS 189 #ifdef HAVE_P_PROCS 190 #include "p_Procs.h" 191 #define pDelete p_Delete 192 #define pCopy p_Copy 193 #define pAdd p_Add_q 194 #else 195 // deletes the whole polynomial p 196 #define pDelete(p) _pDelete(p, currPolyBin) 197 // Returns copy of the whole polynomial 198 #define pCopy(p) _pCopy(currPolyBin, p) 199 poly pAdd(poly p1, poly p2); 200 #endif 189 201 190 202 // return TRUE, if exponent and component of Lm(p1) and Lm(p2) are equal, -
Singular/polys1.cc
r30d8a1 r9d72fe 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys1.cc,v 1.4 2 2000-08-24 11:21:45 SingularExp $ */4 /* $Id: polys1.cc,v 1.43 2000-08-24 14:42:45 obachman Exp $ */ 5 5 6 6 /* … … 136 136 } 137 137 138 #ifndef HAVE_P_PROCS 138 139 /*-------------operations on polynomials:------------*/ 139 140 /*2 … … 206 207 return p; 207 208 } 209 #endif 210 208 211 209 212 /*2 -
Singular/prProcs.cc
r30d8a1 r9d72fe 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: prProcs.cc,v 1. 3 2000-08-14 12:56:47obachman Exp $ */4 /* $Id: prProcs.cc,v 1.4 2000-08-24 14:42:45 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT - Routines for primitive poly arithmetic … … 43 43 } \ 44 44 while(0) 45 /***************************************************************46 *47 * General: pr_Mult_n which always works48 * Returns: p*n49 * Destroys: p50 * Const: n51 *52 ***************************************************************/53 45 54 46 poly pr_Mult_n_General(poly p, number n) -
Singular/ring.cc
r30d8a1 r9d72fe 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ring.cc,v 1.10 6 2000-08-24 11:21:46 SingularExp $ */4 /* $Id: ring.cc,v 1.107 2000-08-24 14:42:46 obachman Exp $ */ 5 5 6 6 /* … … 28 28 #include "ring.h" 29 29 #include "prCopy.h" 30 #include "p_Procs.h" 30 31 31 32 #define BITS_PER_LONG 8*SIZEOF_LONG … … 186 187 187 188 if (ppNoether!=NULL) pDelete(&ppNoether); 188 if ((sLastPrinted.rtyp>BEGIN_RING) && (sLastPrinted.rtyp<END_RING)) 189 if (((sLastPrinted.rtyp>BEGIN_RING) && (sLastPrinted.rtyp<END_RING)) || 190 ((sLastPrinted.rtyp==LIST_CMD)&&(lRingDependend((lists)sLastPrinted.data)))) 191 189 192 { 190 193 sLastPrinted.CleanUp(); … … 874 877 } 875 878 if (ppNoether!=NULL) pDelete(&ppNoether); 876 if ((sLastPrinted.rtyp>BEGIN_RING) && (sLastPrinted.rtyp<END_RING)) 879 if (((sLastPrinted.rtyp>BEGIN_RING) && (sLastPrinted.rtyp<END_RING)) || 880 ((sLastPrinted.rtyp==LIST_CMD)&&(lRingDependend((lists)sLastPrinted.data)))) 877 881 { 878 882 sLastPrinted.CleanUp(); … … 2555 2559 // r->pCompHighIndex already set 2556 2560 r->pCompLSize = r->pCompHighIndex + 1; 2557 r->ordsgn=(long *)omAlloc0(r-> pCompLSize*sizeof(long));2561 r->ordsgn=(long *)omAlloc0(r->ExpLSize*sizeof(long)); 2558 2562 2559 2563 for(j=0;j<=r->pCompHighIndex;j++) … … 2578 2582 // ---------------------------- 2579 2583 // indices for (first copy of ) variable entries in exp.e vector (VarOffset): 2580 // BIGENDIAN:2581 2584 r->VarOffset=v; 2582 2585 … … 2598 2601 if (i==r->pCompIndex) i++; 2599 2602 r->pOrdIndex=i; 2603 2604 // ---------------------------- 2605 // p_Procs 2606 r->p_Procs = omAlloc(sizeof(p_Procs_s)); 2607 p_SetProcs(r, r->p_Procs); 2600 2608 return FALSE; 2601 2609 } … … 2985 2993 #endif 2986 2994 r->pCompLSize = r->pCompHighIndex - r->pCompLowIndex + 1; 2987 r->ordsgn=(long *)omAlloc0(r-> pCompLSize*sizeof(long));2995 r->ordsgn=(long *)omAlloc0(r->ExpLSize*sizeof(long)); 2988 2996 2989 2997 #ifndef WORDS_BIGENDIAN … … 3116 3124 } 3117 3125 if (r->ordsgn != NULL && r->pCompLSize != 0) 3118 omFreeSize((ADDRESS)r->ordsgn,r->pCompLSize*sizeof(long)); 3119 } 3120 } 3121 3126 omFreeSize((ADDRESS)r->ordsgn,r->pExpLSize*sizeof(long)); 3127 if (r->p_Procs != NULL) 3128 omFreeSize(r->p_Procs, sizeof(p_Procs_s)); 3129 } 3130 } 3131 3132 #ifdef RDEBUG 3122 3133 void rDebugPrint(ring r) 3123 3134 { … … 3225 3236 PrintLn(); 3226 3237 } 3227 } 3238 3239 // p_Procs stuff 3240 p_Procs_s proc_names; 3241 char* field; 3242 char* length; 3243 char* ord; 3244 p_Debug_GetProcNames(r, &proc_names); 3245 p_Debug_GetSpecNames(r, field, length, ord); 3246 3247 Print("p_Spec : %s, %s, %s\n", field, length, ord); 3248 PrintS("p_Procs :\n"); 3249 for (i=0; i<sizeof(p_Procs_s)/sizeof(void*); i++) 3250 { 3251 Print(" %s,\n", ((char**) &proc_names)[i]); 3252 } 3253 } 3254 3228 3255 void pDebugPrint(poly p) 3229 3256 { … … 3250 3277 } 3251 3278 } 3279 #endif // RDEBUG 3252 3280 3253 3281 -
Singular/structs.h
r30d8a1 r9d72fe 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: structs.h,v 1.3 4 2000-08-24 11:21:47 SingularExp $ */6 /* $Id: structs.h,v 1.35 2000-08-24 14:42:46 obachman Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 105 105 typedef struct reca * alg; 106 106 107 108 107 #ifdef __cplusplus 109 108 typedef idrec * idhdl; … … 120 119 typedef namerec * namehdl; 121 120 typedef kBucket* kBucket_pt; 121 typedef struct p_Procs_s p_Procs_s; 122 122 123 123 // for hdegree.cc … … 305 305 short OrdSize; /* size of ord vector (in sro_ord) */ 306 306 307 p_Procs_s* p_Procs; 307 308 short ref; /* reference counter to the ring */ 308 309 }; -
Singular/subexpr.cc
r30d8a1 r9d72fe 5 5 * ABSTRACT: handling of leftv 6 6 */ 7 /* $Id: subexpr.cc,v 1.5 8 2000-08-14 12:56:52obachman Exp $ */7 /* $Id: subexpr.cc,v 1.59 2000-08-24 14:42:47 obachman Exp $ */ 8 8 9 9 #include <stdlib.h> … … 1523 1523 omCheckAddr(d->arg1.name); 1524 1524 nok=nok||iiAssign(&d->arg1,&d->arg2); 1525 om DebugIf(d->arg1.name != NULL, // OB: ????1526 omCheckAddr(d->arg1.name));1525 omCheckIf(d->arg1.name != NULL, // OB: ???? 1526 omCheckAddr(d->arg1.name)); 1527 1527 if (!nok) 1528 1528 {
Note: See TracChangeset
for help on using the changeset viewer.