Changeset d1df84 in git
- Timestamp:
- Jun 2, 2014, 11:05:05 AM (9 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- f0c04483fc85bda32ad578ef2d17303bc3bb3d7b
- Parents:
- 7835f61d17a89c6f9e24dcc0904db0042ade03fc68e8ddfaf4c44baab2c1a43c6fa8f1d9a2002746
- Files:
-
- 6 added
- 3 deleted
- 42 edited
- 18 moved
Legend:
- Unmodified
- Added
- Removed
-
HOWTO-libsingular
r7835f61 rd1df84 1 1 The following is valid for Singular 4-x-x: 2 (for technical details see http://www.singular.uni-kl.de/Manual/modules.pdf) 2 3 3 4 ./configure --disable-static .... -
Makefile.am
r7835f61 rd1df84 6 6 7 7 SUBDIRS = resources omalloc xalloc $(USE_FACTORY) \ 8 libpolys kernel gfanlib\9 IntegerProgramming Singular dox\10 emacs debian redhat desktop8 libpolys gfanlib IntegerProgramming \ 9 kernel Singular \ 10 dox emacs debian redhat desktop 11 11 12 12 EXTRA_DIST = README autogen.sh git-version-gen -
Singular/LIB/modular.lib
r7835f61 rd1df84 32 32 SEE ALSO: link, tasks_lib, parallel_lib, modstd_lib, assprimeszerodim_lib 33 33 34 KEYWORDS: modular .lib; Modular techniques; Parallelization;34 KEYWORDS: modular_lib; Modular techniques; Parallelization; 35 35 Skeletons for parallelization; Distributed computing 36 36 … … 61 61 NOTE: For the general algorithm and the role of the optional arguments 62 62 primeTest, deleteUnluckyPrimes, pTest, and finalTest, see 63 @ref{modStd} and the reference given in @ref{modular .lib}. The63 @ref{modStd} and the reference given in @ref{modular_lib}. The 64 64 default for these arguments is that all tests succeed and that all 65 65 primes are assumed to be lucky. -
Singular/LIB/primdec.lib
r68e8dd rd1df84 22 22 They work in any characteristic.@* 23 23 Baserings must have a global ordering and no quotient ideal. 24 Exceptions: primdecGTZ, absPrimdecGTZ, minAssGTZ, primdecSY, minAssChar, radical accept non-global ordering. 24 25 25 26 … … 64 65 " 65 66 { 67 ASSUME(0, not isQuotientRing(basering) ) ; 68 ASSUME(0, hasGlobalOrdering(basering) ) ; 69 66 70 int @k; 67 71 ideal inew=std(id); … … 89 93 " 90 94 { 95 ASSUME(0, not isQuotientRing(basering) ) ; 96 ASSUME(0, hasGlobalOrdering(basering) ) ; 91 97 int @k,@i; 92 98 def @P= basering; … … 154 160 proc minSat(ideal inew, ideal h) 155 161 { 162 ASSUME(0, not isQuotientRing(basering) ) ; 163 ASSUME(0, hasGlobalOrdering(basering) ) ; 156 164 int i,k; 157 165 poly f=1; … … 200 208 static proc quotMin(list tsil) 201 209 { 210 ASSUME(0, not isQuotientRing(basering) ) ; 211 ASSUME(0, hasGlobalOrdering(basering) ) ; 202 212 int i,j,k,action; 203 213 ideal verg; … … 260 270 static proc testFactor(list act,poly p) 261 271 { 272 ASSUME(0, not isQuotientRing(basering) ) ; 273 ASSUME(0, hasGlobalOrdering(basering) ) ; 262 274 poly keep=p; 263 275 … … 284 296 " 285 297 { 298 ASSUME(0, not isQuotientRing(basering) ) ; 299 ASSUME(0, hasGlobalOrdering(basering) ) ; 286 300 ideal @i; 287 301 list @l; … … 402 416 proc primaryTest (ideal i, poly p) 403 417 { 418 ASSUME(0, not isQuotientRing(basering) ) ; 419 ASSUME(0, hasGlobalOrdering(basering) ) ; 404 420 int m=1; 405 421 int n=nvars(basering); … … 495 511 proc gcdTest(ideal act) 496 512 { 513 ASSUME(0, not isQuotientRing(basering) ) ; 514 ASSUME(0, hasGlobalOrdering(basering) ) ; 497 515 int i,j; 498 516 if(size(act)<=1) … … 516 534 static proc splitPrimary(list l,ideal ser,int @wr,list sact) 517 535 { 536 ASSUME(0, not isQuotientRing(basering) ) ; 537 ASSUME(0, hasGlobalOrdering(basering) ) ; 518 538 int i,j,k,s,r,w; 519 539 list keepresult,act,keepprime; … … 705 725 static proc splitCharp(list l) 706 726 { 727 ASSUME(0, not isQuotientRing(basering) ) ; 728 ASSUME(0, hasGlobalOrdering(basering) ) ; 707 729 if((char(basering)==0)||(npars(basering)>0)) 708 730 { … … 833 855 " 834 856 { 857 ASSUME(0, not isQuotientRing(basering) ) ; 858 ASSUME(0, hasGlobalOrdering(basering) ) ; 859 835 860 def @P = basering; 836 861 int uytrewq; … … 1290 1315 proc extF(list l,list #) 1291 1316 { 1317 ASSUME(0, not isQuotientRing(basering) ) ; 1318 ASSUME(0, hasGlobalOrdering(basering) ) ; 1292 1319 //zero_dimensional primary decomposition after finite field extension 1293 1320 def R=basering; … … 1381 1408 //the radical of the intersection of the pe[l] is equal to the radical of i 1382 1409 1410 ASSUME(0, not isQuotientRing(basering) ) ; 1411 ASSUME(0, hasGlobalOrdering(basering) ) ; 1383 1412 def R=basering; 1384 1413 1385 1414 //i has to be a reduced groebner basis 1415 ASSUME(1, dim(i)==0); 1386 1416 ideal F=finduni(i); 1387 1417 … … 1470 1500 //i.e. var(i)----->var(i)^(p^v[i]) 1471 1501 1502 ASSUME(0, not isQuotientRing(basering) ) ; 1503 ASSUME(0, hasGlobalOrdering(basering) ) ; 1472 1504 if(homog(I)==1){return(maxideal(1));} 1473 1505 … … 1508 1540 //computes the prime decomposition of the special ideals 1509 1541 //and transforms it back to a decomposition of i 1510 1542 1543 ASSUME(0, not isQuotientRing(basering) ) ; 1544 ASSUME(0, hasGlobalOrdering(basering) ) ; 1511 1545 def R=basering; 1512 1546 list pr=zeroSp(i); … … 1553 1587 " 1554 1588 { 1589 ASSUME(0, not isQuotientRing(basering) ) ; 1590 ASSUME(0, hasGlobalOrdering(basering) ) ; 1555 1591 int k,j; 1556 1592 poly m; … … 1630 1666 " 1631 1667 { 1668 ASSUME(0, not isQuotientRing(basering) ) ; 1669 ASSUME(0, hasGlobalOrdering(basering) ) ; 1632 1670 int k,j; 1633 1671 intvec m,n,v,w; … … 1754 1792 " 1755 1793 { 1794 ASSUME(0, not isQuotientRing(basering) ) ; 1795 ASSUME(0, hasGlobalOrdering(basering) ) ; 1756 1796 int n,k,di; 1757 1797 list resu,hilf; … … 1820 1860 " 1821 1861 { 1862 ASSUME(0, not isQuotientRing(basering) ) ; 1863 ASSUME(0, hasGlobalOrdering(basering) ) ; 1822 1864 ideal @ih,@jh; 1823 1865 int npar=npars(basering); … … 1884 1926 " 1885 1927 { 1928 ASSUME(0, not isQuotientRing(basering) ) ; 1929 ASSUME(0, hasGlobalOrdering(basering) ) ; 1886 1930 def @P=basering; 1887 1931 if(size(i)==0){return(list(ideal(0)));} … … 2010 2054 static proc primT(ideal i) 2011 2055 { 2056 ASSUME(0, not isQuotientRing(basering) ) ; 2057 ASSUME(0, hasGlobalOrdering(basering) ) ; 2058 2012 2059 //assumes that all generators of i are irreducible 2013 2060 //i is standard basis … … 2037 2084 " 2038 2085 { 2086 ASSUME(0, not isQuotientRing(basering) ) ; 2087 ASSUME(0, hasGlobalOrdering(basering) ) ; 2088 2039 2089 if(size(i) == 0){return(list(ideal(0)));} 2040 2090 string algorithm; // Algorithm to be used … … 2327 2377 " 2328 2378 { 2379 2380 ASSUME(0, not isQuotientRing(basering) ) ; 2329 2381 if(attrib(basering,"global")!=1) 2330 2382 { … … 2333 2385 ); 2334 2386 } 2387 ASSUME(0, hasGlobalOrdering(basering) ) ; 2388 2335 2389 intvec op ; 2336 2390 def P = basering; … … 2433 2487 " 2434 2488 { 2489 ASSUME(0, not isQuotientRing(basering) ) ; 2435 2490 if(attrib(basering,"global")!=1) 2436 2491 { … … 2439 2494 ); 2440 2495 } 2496 ASSUME(0, hasGlobalOrdering(basering) ) ; 2497 2441 2498 def P = basering; 2442 2499 ideal eq; … … 2560 2617 proc algeDeco(ideal i, int w) 2561 2618 { 2619 ASSUME(0, not isQuotientRing(basering) ) ; 2620 ASSUME(0, hasGlobalOrdering(basering) ) ; 2621 2562 2622 //reduces primery decomposition over algebraic extensions to 2563 2623 //the other cases … … 2680 2740 static proc prepare_absprimdec(list primary) 2681 2741 { 2742 ASSUME(0, not isQuotientRing(basering) ) ; 2743 ASSUME(0, hasGlobalOrdering(basering) ) ; 2744 2682 2745 list resu,tempo; 2683 2746 string absotto; … … 2704 2767 " 2705 2768 { 2769 ASSUME(0, not isQuotientRing(basering) ) ; 2770 ASSUME(0, hasGlobalOrdering(basering) ) ; 2771 2706 2772 intvec op,@vv; 2707 2773 def @P = basering; … … 3684 3750 //the p^e th power of the coefficients of f 3685 3751 { 3752 ASSUME(0, not isQuotientRing(basering) ) ; 3753 ASSUME(0, hasGlobalOrdering(basering) ) ; 3754 3686 3755 int i; 3687 3756 poly g; … … 3704 3773 EXAMPLE: example sep; shows an example 3705 3774 { 3775 ASSUME(0, not isQuotientRing(basering) ) ; 3776 ASSUME(0, hasGlobalOrdering(basering) ) ; 3777 3706 3778 def R=basering; 3707 3779 int k; … … 3754 3826 EXAMPLE: example zeroRad; shows an example 3755 3827 { 3828 ASSUME(0, not isQuotientRing(basering) ) ; 3829 ASSUME(0, hasGlobalOrdering(basering) ) ; 3830 3756 3831 if(homog(I)==1){return(maxideal(1));} 3757 3832 //I needs to be a reduced standard basis … … 3776 3851 3777 3852 option(redSB); 3853 ASSUME(1, dim(I)==0); 3778 3854 ideal F=finduni(I);//F[i] generates I intersected with K[var(i)] 3779 3855 … … 3849 3925 " 3850 3926 { 3927 ASSUME(0, not isQuotientRing(basering) ) ; 3851 3928 if(attrib(basering,"global")!=1) 3852 3929 { … … 3855 3932 ); 3856 3933 } 3934 ASSUME(0, hasGlobalOrdering(basering) ) ; 3935 3857 3936 if((char(basering)<100)&&(char(basering)!=0)) 3858 3937 { … … 3952 4031 " 3953 4032 { 4033 3954 4034 M=prune(M); //to obtain a small embedding 3955 4035 ideal ann=quotient1(M,freemodule(nrows(M))); … … 3973 4053 static proc int_ass_primary_e(ideal i, int e) 3974 4054 { 4055 ASSUME(0, not isQuotientRing(basering) ) ; 4056 ASSUME(0, hasGlobalOrdering(basering) ) ; 4057 3975 4058 if(homog(i)!=1) 3976 4059 { … … 3993 4076 static proc AnnExt_R(int n,list re) 3994 4077 { 4078 3995 4079 if(n<nvars(basering)) 3996 4080 { … … 4015 4099 static proc analyze(list pr) 4016 4100 { 4101 ASSUME(0, not isQuotientRing(basering) ) ; 4102 ASSUME(0, hasGlobalOrdering(basering) ) ; 4103 4017 4104 int ii,jj; 4018 4105 for(ii=1;ii<=size(pr) div 2;ii++) … … 4045 4132 static proc simplifyIdeal(ideal i) 4046 4133 { 4134 ASSUME(0, not isQuotientRing(basering) ) ; 4135 ASSUME(0, hasGlobalOrdering(basering) ) ; 4136 4047 4137 def r=basering; 4048 4138 … … 4149 4239 static proc min_ass_prim_charsets0 (ideal PS) 4150 4240 { 4241 ASSUME(0, not isQuotientRing(basering) ) ; 4242 ASSUME(0, hasGlobalOrdering(basering) ) ; 4243 4151 4244 intvec op; 4152 4245 matrix m=char_series(PS); // We compute an irreducible … … 4250 4343 static proc min_ass_prim_charsets1 (ideal PS) 4251 4344 { 4345 ASSUME(0, not isQuotientRing(basering) ) ; 4346 ASSUME(0, hasGlobalOrdering(basering) ) ; 4347 4252 4348 intvec op; 4253 4349 def oldring=basering; … … 4389 4485 static proc prim_dec(ideal I, int choose) 4390 4486 { 4487 ASSUME(0, not isQuotientRing(basering) ) ; 4488 ASSUME(0, hasGlobalOrdering(basering) ) ; 4489 4391 4490 if((choose<0) or (choose>3)) 4392 4491 { … … 4612 4711 static proc pseudo_prim_dec_charsets (ideal I, ideal SI, int choo) 4613 4712 { 4713 ASSUME(0, not isQuotientRing(basering) ) ; 4714 ASSUME(0, hasGlobalOrdering(basering) ) ; 4715 4614 4716 list L; // The list of minimal associated primes, 4615 4717 // each one given by a standard basis … … 4662 4764 static proc pseudo_prim_dec_special_charsets (ideal SI,list V6, int choo) 4663 4765 { 4766 ASSUME(0, not isQuotientRing(basering) ) ; 4767 ASSUME(0, hasGlobalOrdering(basering) ) ; 4768 4664 4769 int i,j,l; 4665 4770 list m; … … 4760 4865 static proc pseudo_prim_dec_i (ideal SI, list L) 4761 4866 { 4867 ASSUME(0, not isQuotientRing(basering) ) ; 4868 ASSUME(0, hasGlobalOrdering(basering) ) ; 4869 4762 4870 list Q; 4763 4871 if (size(L)==1) // one minimal associated prime only … … 4829 4937 static proc extraction (ideal SI, ideal SP) 4830 4938 { 4939 ASSUME(0, not isQuotientRing(basering) ) ; 4940 ASSUME(0, hasGlobalOrdering(basering) ) ; 4941 4831 4942 list indsets=indepSet(SP,0); 4832 4943 poly f; … … 4934 5045 static proc minsat(ideal SI, poly p) 4935 5046 { 5047 ASSUME(0, not isQuotientRing(basering) ) ; 5048 ASSUME(0, hasGlobalOrdering(basering) ) ; 5049 4936 5050 ideal fac=factorize(p,1); //the irreducible factors of p 4937 5051 fac=sort(fac)[1]; … … 4980 5094 static proc minsat_ppd(ideal SI, ideal fac) 4981 5095 { 5096 ASSUME(0, not isQuotientRing(basering) ) ; 5097 ASSUME(0, hasGlobalOrdering(basering) ) ; 5098 4982 5099 fac=sort(fac)[1]; 4983 5100 int i,k; … … 5024 5141 static proc minquot(list tsil) 5025 5142 { 5143 ASSUME(0, not isQuotientRing(basering) ) ; 5144 ASSUME(0, hasGlobalOrdering(basering) ) ; 5145 5026 5146 intvec op; 5027 5147 int i,j,k,action; … … 5094 5214 static proc special_ideals_equal( ideal k1, ideal k2) 5095 5215 { 5216 ASSUME(0, not isQuotientRing(basering) ) ; 5217 ASSUME(0, hasGlobalOrdering(basering) ) ; 5218 5096 5219 int j; 5097 5220 if(size(k1)==size(k2)) … … 5161 5284 " 5162 5285 { 5286 ASSUME(0, not isQuotientRing(basering) ) ; 5163 5287 if(size(#)>0) 5164 5288 { … … 5237 5361 " 5238 5362 { 5363 ASSUME(0, not isQuotientRing(basering) ) ; 5239 5364 if (char(basering) != 0) 5240 5365 { … … 5405 5530 " 5406 5531 { 5532 ASSUME(0, not isQuotientRing(basering) ) ; 5407 5533 if(size(#)>1) 5408 5534 { … … 5480 5606 " 5481 5607 { 5608 ASSUME(0, not isQuotientRing(basering) ) ; 5482 5609 if(size(#)>0) 5483 5610 { … … 5584 5711 " 5585 5712 { 5713 ASSUME(0, not isQuotientRing(basering) ) ; 5586 5714 if(size(#)>1) 5587 5715 { … … 5637 5765 " 5638 5766 { 5767 ASSUME(0, not isQuotientRing(basering) ) ; 5639 5768 if(attrib(basering,"global")!=1) 5640 5769 { … … 5643 5772 ); 5644 5773 } 5774 ASSUME(0, hasGlobalOrdering(basering) ) ; 5775 5645 5776 return(radical(i, 1)); 5646 5777 } … … 5671 5802 " 5672 5803 { 5804 ASSUME(0, not isQuotientRing(basering) ) ; 5673 5805 dbprint(printlevel - voice, "Radical, version 2006.05.08"); 5674 5806 if(attrib(basering,"global")!=1) … … 5854 5986 static proc radicalKL(ideal I, ideal ser, list #) 5855 5987 { 5988 ASSUME(0, not isQuotientRing(basering) ) ; 5989 ASSUME(0, hasGlobalOrdering(basering) ) ; 5990 5856 5991 // ideal I The ideal for which the radical is computed 5857 5992 // ideal ser Used to reduce components already obtained … … 5891 6026 // obtained in intermediate steps. 5892 6027 { 6028 ASSUME(0, not isQuotientRing(basering) ) ; 6029 ASSUME(0, hasGlobalOrdering(basering) ) ; 6030 5893 6031 ideal rad = 1; 5894 6032 ideal equiRad = 1; … … 5973 6111 // only equiradical is required. 5974 6112 // It is used to set the value of done.) 6113 ASSUME(0, not isQuotientRing(basering) ) ; 6114 ASSUME(0, hasGlobalOrdering(basering) ) ; 5975 6115 5976 6116 attrib(I, "isSB", 1); // I needs to be a reduced standard basis … … 6246 6386 // Output: ideal. Intersection of some primes of I different from the ones in P. 6247 6387 { 6388 ASSUME(0, not isQuotientRing(basering) ) ; 6389 ASSUME(0, hasGlobalOrdering(basering) ) ; 6390 6248 6391 int k = 1; // Counter 6249 6392 int good = 0; // Checks if an element of P is in rad(I) … … 6313 6456 " 6314 6457 { 6458 ASSUME(0, not isQuotientRing(basering) ) ; 6459 ASSUME(0, hasGlobalOrdering(basering) ) ; 6460 6315 6461 int n, k, di; 6316 6462 list resu, hilf; … … 6404 6550 " 6405 6551 { 6552 ASSUME(0, not isQuotientRing(basering) ) ; 6553 ASSUME(0, hasGlobalOrdering(basering) ) ; 6554 6406 6555 ideal @ih,@jh; 6407 6556 int npar=npars(basering); … … 6450 6599 " 6451 6600 { 6601 ASSUME(0, not isQuotientRing(basering) ) ; 6452 6602 if(attrib(basering,"global")!=1) 6453 6603 { … … 6456 6606 ); 6457 6607 } 6608 ASSUME(0, hasGlobalOrdering(basering) ) ; 6609 6458 6610 ideal j=std(i); 6459 6611 int cod=nvars(basering)-dim(j); … … 6498 6650 " 6499 6651 { 6652 ASSUME(0, not isQuotientRing(basering) ) ; 6500 6653 if(attrib(basering,"global")!=1) 6501 6654 { … … 6504 6657 ); 6505 6658 } 6659 ASSUME(0, hasGlobalOrdering(basering) ) ; 6660 6506 6661 ideal j=groebner(i); 6507 6662 int cod=nvars(basering)-dim(j); … … 6534 6689 " 6535 6690 { 6691 ASSUME(0, not isQuotientRing(basering) ) ; 6692 ASSUME(0, hasGlobalOrdering(basering) ) ; 6693 6536 6694 int i; 6537 6695 pr=reconvList(pr); … … 6566 6724 " 6567 6725 { 6726 ASSUME(0, not isQuotientRing(basering) ) ; 6568 6727 if(attrib(basering,"global")!=1) 6569 6728 { … … 6572 6731 ); 6573 6732 } 6733 ASSUME(0, hasGlobalOrdering(basering) ) ; 6734 6574 6735 def R=basering; 6575 6736 poly q; … … 6683 6844 " 6684 6845 { 6846 ASSUME(0, not isQuotientRing(basering) ) ; 6847 ASSUME(0, hasGlobalOrdering(basering) ) ; 6848 6685 6849 intvec op,@vv; 6686 6850 def @P = basering; … … 7585 7749 static proc newReduction(ideal @j, ideal ser, intvec @hilb, intvec @w, int jdim, int abspri, int @wr, list data) 7586 7750 { 7751 ASSUME(0, not isQuotientRing(basering) ) ; 7752 ASSUME(0, hasGlobalOrdering(basering) ) ; 7753 7754 7587 7755 string @va; 7588 7756 string quotring; … … 7882 8050 // associated primes and the primary components corresponding to these primes. 7883 8051 { 8052 ASSUME(0, not isQuotientRing(basering) ) ; 8053 ASSUME(0, hasGlobalOrdering(basering) ) ; 8054 7884 8055 ideal P = 1; 7885 8056 list pd = list(); … … 7922 8093 static proc minAssSLIteration(ideal I, ideal P); 7923 8094 { 8095 ASSUME(0, not isQuotientRing(basering) ) ; 8096 ASSUME(0, hasGlobalOrdering(basering) ) ; 8097 7924 8098 int k = 1; 7925 8099 int good = 0; … … 7974 8148 " 7975 8149 { 8150 ASSUME(0, not isQuotientRing(basering) ) ; 8151 ASSUME(0, hasGlobalOrdering(basering) ) ; 8152 7976 8153 int n, k, di; 7977 8154 list resu, hilf; … … 8074 8251 " 8075 8252 { 8253 ASSUME(0, not isQuotientRing(basering) ) ; 8254 ASSUME(0, hasGlobalOrdering(basering) ) ; 8255 8076 8256 def @P = basering; 8077 8257 int uytrewq; -
Singular/Makefile.am
r7835f61 rd1df84 5 5 AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(FACTORY_INCLUDES) $(GMP_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS) -DGIT_VERSION='"$(GIT_VERSION)"' 6 6 7 if HAVE_GFANLIB8 USE_GFANLIB = ${builddir}/dyn_modules/callgfanlib/gfanlib.la ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS}9 else10 USE_GFANLIB =11 endif12 13 # AM_LDFLAGS = libSingular.la ${top_builddir}/kernel/libkernel.la14 15 ########################### Dynamic Modules... #########################16 7 SUBDIRS = dyn_modules 17 8 18 if ENABLE_P_PROCS_DYNAMIC 19 moduledir = $(libexecdir)/singular/MOD 20 else !ENABLE_P_PROCS_DYNAMIC 21 moduledir = $(libdir)/singular 22 endif !ENABLE_P_PROCS_DYNAMIC 23 24 ########################################################################## 25 module_LTLIBRARIES = pyobject.la 26 27 pyobject_la_SOURCES = pyobject.cc 28 29 pyobject_la_CXXFLAGS = $(PYTHON_CSPEC) 30 pyobject_la_CPPFLAGS = $(PYTHON_CPPFLAGS) ${AM_CPPFLAGS} 31 32 pyobject_la_LDFLAGS = $(PYTHON_EXTRA_LIBS) $(PYTHON_LSPEC) ${AM_LDFLAGS} $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 33 ### -export-dynamic -shared -module -avoid-version (add to all DMs?) 34 35 ########################################################################## 36 if PYTHON_USE 37 PY=pyobject.la $(PYTHON_EXTRA_LIBS) $(PYTHON_LSPEC) $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) 38 else !PYTHON_USE 39 PY= 40 endif !PYTHON_USE 41 42 if SI_EMBED_PYTHON 43 EMBED_PYOBJECT = ${PY} ${builddir}/dyn_modules/syzextra/syzextra.la ${USE_GFANLIB} 44 else !SI_EMBED_PYTHON 45 EMBED_PYOBJECT = 46 endif !SI_EMBED_PYTHON 9 ########################### Possible builtin modules... ######################### 10 BUILTIN_FLAGS = ${BUILTIN_LIBS} 47 11 48 12 ########################### libSingular* ######################### … … 96 60 subexpr.cc\ 97 61 pyobject_setup.cc\ 98 singmathic.cc\99 62 walk.cc\ 100 63 walk_ip.cc\ … … 161 124 162 125 libSingular_la_LDFLAGS =${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} -release ${PACKAGE_VERSION} ${PTHREAD_LDFLAGS} 163 libSingular_la_LIBADD =${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${ EMBED_PYOBJECT} ${top_builddir}/kernel/libkernel.la ${PTHREAD_LIBS}126 libSingular_la_LIBADD =${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${BUILTIN_FLAGS} ${top_builddir}/kernel/libkernel.la ${PTHREAD_LIBS} 164 127 165 128 libSingular_includedir = ${includedir}/singular/Singular … … 185 148 ########################### Singular* ######################### 186 149 187 EXTRA_PROGRAMS = libparse Singular s150 EXTRA_PROGRAMS = libparse Singulard 188 151 189 152 # the "optional_programs" variable should be defined in the configure … … 197 160 Singular_SOURCES = tesths.cc mmalloc.cc fegetopt.c fegetopt.h utils.cc utils.h 198 161 199 Singular_LDADD = libSingular.la ${EMBED_PYOBJECT} 200 201 Singular_LDFLAGS = -static ${EMBED_PYOBJECT} 202 203 Singulars_SOURCES = tesths.cc mmalloc.cc fegetopt.c fegetopt.h utils.cc utils.h 204 205 # ${EMBED_PYOBJECT_LDFLAGS} ${EMBED_PYOBJECT_LDFLAGS} 206 Singulars_LDADD = libSingular.la ${EMBED_PYOBJECT} 207 208 Singulars_LDFLAGS = -static ${AM_LDFLAGS} ${EMBED_PYOBJECT} 162 Singular_LDADD = libSingular.la ${BUILTIN_FLAGS} 163 164 Singular_LDFLAGS = -static ${AM_LDFLAGS} ${BUILTIN_FLAGS} 165 166 Singulard_SOURCES = tesths.cc mmalloc.cc fegetopt.c fegetopt.h utils.cc utils.h 167 168 Singulard_LDADD = libSingular.la ${BUILTIN_FLAGS} 169 170 Singulard_LDFLAGS = -shared ${AM_LDFLAGS} ${BUILTIN_FLAGS} 209 171 210 172 scriptdir = $(libexecdir)/singular/MOD … … 267 229 268 230 test_SOURCES = test.cc 269 # ${EMBED_PYOBJECT_LDFLAGS}270 231 test_LDADD = libSingular.la 271 232 -
Singular/dyn_modules/Makefile.am
r7835f61 rd1df84 1 1 ACLOCAL_AMFLAGS = -I ../m4 2 2 3 SUBDIRS= bigintm syzextra callgfanlib callpolymake3 SUBDIRS=staticdemo bigintm syzextra pyobject gfanlib polymake singmathic 4 4 5 5 -
Singular/dyn_modules/bigintm/Makefile.am
r7835f61 rd1df84 1 1 ACLOCAL_AMFLAGS = -I ../../m4 2 2 3 # moduledir = $(libexecdir)/singular/MOD 4 5 if ENABLE_P_PROCS_DYNAMIC 3 if SI_BUILTIN_BIGINTM 6 4 noinst_LTLIBRARIES=bigintm.la 7 5 # check_LTLIBRARIES=bigintm.la 8 6 P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION 7 P_PROCS_MODULE_LDFLAGS = -module 8 else 9 module_LTLIBRARIES=bigintm.la 10 moduledir = $(libexecdir)/singular/MOD 11 P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION 12 P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 13 # Add under Mac OS X: -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 9 14 endif 10 15 … … 14 19 $(FLINT_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS) 15 20 16 bigintm_la_SOURCES = mod_main.cc bigintm.cc bigintm.h 17 18 if ENABLE_P_PROCS_DYNAMIC 19 P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION 20 else 21 P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION 22 endif 23 24 bigintm_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON} 25 26 if ENABLE_P_PROCS_DYNAMIC 27 P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 28 # Add under Mac OS X: -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 29 else 30 P_PROCS_MODULE_LDFLAGS = 31 endif 32 33 bigintm_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS} 21 bigintm_la_SOURCES = mod_main.cc bigintm.cc bigintm.h 22 bigintm_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON} 23 bigintm_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS} 34 24 35 25 # AM_COLOR_TESTS=always -
Singular/dyn_modules/bigintm/mod_main.cc
r7835f61 rd1df84 1 /* 2 * Developer's BB tests 3 */ 1 #include <kernel/mod2.h> 4 2 5 6 7 8 9 #include <kernel/mod2.h> 3 #include <Singular/mod_lib.h> 10 4 11 5 #include <Singular/blackbox.h> … … 47 41 48 42 49 extern "C" 43 extern "C" int SI_MOD_INIT(bigintm)(SModulFunctions* psModulFunctions) 50 44 { 51 int mod_init(SModulFunctions* psModulFunctions) 52 { 53 psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0); 54 psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0); 45 psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0); 46 psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0); 55 47 56 // Q: should we call 'bigintm_setup' here??!?!? 57 return 0; 58 } 48 // Q: should we call 'bigintm_setup' here??!?!? 49 return 0; 59 50 } -
Singular/dyn_modules/gfanlib/Makefile.am
r7835f61 rd1df84 3 3 SOURCES = bbcone.cc bbcone.h bbfan.cc bbfan.h bbpolytope.cc bbpolytope.h gfan.h gitfan.cc gitfan.h gfanlib.cc 4 4 5 MY INCLUDES = -I${top_srcdir} -I${top_builddir} \5 MY_CPPFLAGS = -I${top_srcdir} -I${top_builddir} \ 6 6 -I${top_srcdir}/libpolys -I${top_builddir}/libpolys \ 7 7 ${FACTORY_INCLUDES} ${RESOURCES_INCLUDES} ${OMALLOC_INCLUDES} \ 8 8 ${FLINT_CFLAGS} ${NTL_CFLAGS} ${GMP_CFLAGS} 9 9 10 if HAVE_GFANLIB 10 if SI_BUILTIN_GFANLIB 11 noinst_LTLIBRARIES=gfanlib.la 12 ## moduledir = $(libdir)/singular 13 P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION 14 P_PROCS_MODULE_LDFLAGS = -module 15 else 11 16 module_LTLIBRARIES=gfanlib.la 12 endif13 14 if ENABLE_P_PROCS_DYNAMIC15 17 moduledir = $(libexecdir)/singular/MOD 16 18 P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION 17 19 # Add under Mac OS X: -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 18 else 19 moduledir = $(libdir)/singular 20 P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION 20 P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 21 21 endif 22 22 23 P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 23 gfanlib_la_SOURCES = $(SOURCES) 24 24 25 gfanlib_la_SOURCES = $(SOURCES) 26 gfanlib_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON} 27 gfanlib_la_LDFLAGS = ${AM_LDFLAGS} ${P_PROCS_MODULE_LDFLAGS} 25 gfanlib_la_CPPFLAGS = ${MY_CPPFLAGS} ${P_PROCS_CPPFLAGS_COMMON} 26 gfanlib_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS} 28 27 29 gfanlib_la_LIBADD = ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS} 30 28 if HAVE_GFANLIB 29 gfanlib_la_LIBADD = ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS} 30 endif 31 31 32 32 #AM_COLOR_TESTS=always -
Singular/dyn_modules/gfanlib/bbcone.cc
r7835f61 rd1df84 1 1 #include <kernel/mod2.h> 2 2 3 #include <gfanlib/gfanlib.h> 4 #include <gfanlib/gfanlib_q.h> 5 6 #include <Singular/ipid.h> 7 #include <Singular/ipshell.h> 8 #include <Singular/blackbox.h> 3 #if HAVE_GFANLIB 4 5 #include <bbfan.h> 6 #include <bbpolytope.h> 7 9 8 #include <misc/intvec.h> 10 9 #include <misc/sirandom.h> … … 12 11 #include <coeffs/bigintmat.h> 13 12 14 #include <bbfan.h> 15 #include <bbpolytope.h> 13 #include <Singular/ipid.h> 14 #include <Singular/ipid.h> 15 #include <Singular/ipshell.h> 16 #include <Singular/blackbox.h> 17 16 18 #include <sstream> 17 18 #include "Singular/ipid.h"19 19 20 20 // #include <omalloc/omalloc.h> … … 23 23 // #include <Singular/lists.h> 24 24 // #include <Singular/subexpr.h> 25 26 #include <gfanlib/gfanlib.h> 27 #include <gfanlib/gfanlib_q.h> 28 25 29 26 30 int coneID; … … 1961 1965 coneID=setBlackboxStuff(b,"cone"); 1962 1966 } 1967 1968 #endif -
Singular/dyn_modules/gfanlib/bbcone.h
r7835f61 rd1df84 4 4 #include <kernel/mod2.h> 5 5 6 #include <gfanlib/gfanlib.h> 6 #if HAVE_GFANLIB 7 7 8 #include <misc/intvec.h> 8 9 #include <coeffs/bigintmat.h> 10 #include <Singular/ipid.h> 9 11 10 #include < Singular/ipid.h>12 #include <gfanlib/gfanlib.h> 11 13 12 14 extern int coneID; … … 38 40 39 41 #endif 42 #endif -
Singular/dyn_modules/gfanlib/bbfan.cc
r7835f61 rd1df84 1 1 #include <kernel/mod2.h> 2 3 #if HAVE_GFANLIB 2 4 3 5 #include <Singular/ipid.h> … … 20 22 // #include <gfanlib/gfanlib.h> 21 23 // #include <gfanlib/gfanlib_zfan.h> 22 23 24 24 25 int fanID; … … 1062 1063 //Print("created type %d (fan)\n",fanID); 1063 1064 } 1065 1066 #endif -
Singular/dyn_modules/gfanlib/bbfan.h
r7835f61 rd1df84 4 4 #include <kernel/mod2.h> 5 5 6 #if HAVE_GFANLIB 7 8 #include <Singular/ipid.h> 9 6 10 #include <gfanlib/gfanlib.h> 7 #include <Singular/ipid.h>8 11 9 12 extern int fanID; … … 19 22 20 23 #endif 24 #endif -
Singular/dyn_modules/gfanlib/bbpolytope.cc
r7835f61 rd1df84 1 1 #include <kernel/mod2.h> 2 2 3 #include <gfanlib/gfanlib.h> 4 #include <gfanlib/gfanlib_q.h> 3 #if HAVE_GFANLIB 5 4 6 5 #include <Singular/ipid.h> … … 20 19 // #include <kernel/ring.h> 21 20 // #include <kernel/polys.h> 21 22 #include <gfanlib/gfanlib.h> 23 #include <gfanlib/gfanlib_q.h> 22 24 23 25 int polytopeID; … … 489 491 //Print("created type %d (polytope)\n",polytopeID); 490 492 } 493 494 #endif -
Singular/dyn_modules/gfanlib/bbpolytope.h
r7835f61 rd1df84 4 4 #include <kernel/mod2.h> 5 5 6 #if HAVE_GFANLIB 7 8 #include <Singular/ipid.h> 6 9 #include <gfanlib/gfanlib.h> 7 #include <Singular/ipid.h>8 10 9 11 extern int polytopeID; … … 18 20 19 21 #endif 22 #endif -
Singular/dyn_modules/gfanlib/gfan.cc
r7835f61 rd1df84 6 6 7 7 #include <kernel/mod2.h> 8 9 #if HAVE_GFANLIB 8 10 9 11 #include <misc/options.h> … … 4526 4528 // WerrorS("Need wp ordering"); 4527 4529 // } 4530 4531 #endif -
Singular/dyn_modules/gfanlib/gfan.h
r7835f61 rd1df84 6 6 #ifndef GFAN_H 7 7 #define GFAN_H 8 9 #include <kernel/mod2.h> 10 11 #if HAVE_GFANLIB 8 12 9 13 #include <misc/int64vec.h> … … 278 282 // bool iv64isStrictlyPositive(int64vec *); 279 283 #endif 284 #endif -
Singular/dyn_modules/gfanlib/gfanlib.cc
r7835f61 rd1df84 1 #include <kernel/mod2.h> 1 2 2 3 4 5 #include <kernel/mod2.h> 3 #if HAVE_GFANLIB 6 4 7 5 #include <bbcone.h> … … 13 11 #include <Singular/mod_lib.h> 14 12 13 15 14 template class gfan::Vector<gfan::Integer>; 16 15 template class gfan::Vector<gfan::Rational>; … … 18 17 template class gfan::Matrix<gfan::Rational>; 19 18 20 int SI_MOD_INIT(gfanlib)(SModulFunctions* p)19 extern "C" int SI_MOD_INIT(gfanlib)(SModulFunctions* p) 21 20 { 22 21 bbcone_setup(p); … … 27 26 } 28 27 29 #ifndef EMBED_PYTHON30 extern "C"31 {32 int mod_init(SModulFunctions* psModulFunctions)33 {34 return SI_MOD_INIT(gfanlib)(psModulFunctions);35 }36 }37 28 #endif -
Singular/dyn_modules/gfanlib/gitfan.cc
r7835f61 rd1df84 12 12 #include <kernel/mod2.h> 13 13 14 #if HAVE_GFANLIB 15 16 #include <bbcone.h> 17 #include <bbfan.h> 18 #include <gitfan.h> 19 14 20 #include <Singular/ipid.h> 15 21 #include <Singular/lists.h> 16 22 #include <Singular/ipshell.h> 23 17 24 #include <coeffs/bigintmat.h> 18 25 19 #include <bbcone.h>20 #include <bbfan.h>21 #include <gitfan.h>22 26 23 27 namespace gitfan … … 370 374 p->iiAddCproc("","nextAfaceToCheck",FALSE,nextAfaceToCheck); 371 375 } 376 377 #endif -
Singular/dyn_modules/gfanlib/gitfan.h
r7835f61 rd1df84 4 4 #include <kernel/mod2.h> 5 5 6 #if HAVE_GFANLIB 7 6 8 #include <bbcone.h> 7 9 #include <bbfan.h> 10 8 11 #include <Singular/ipid.h> 12 9 13 10 14 namespace gitfan … … 51 55 52 56 void gitfan_setup(SModulFunctions* p); 57 #endif 53 58 54 59 #endif -
Singular/dyn_modules/polymake/polymake_conversion.cc
r7835f61 rd1df84 1 #include <kernel/mod2.h> 2 3 #ifdef HAVE_POLYMAKE 4 1 5 #include <gmpxx.h> 2 6 … … 12 16 #include <gfanlib/gfanlib_q.h> 13 17 14 #include <kernel/mod2.h>15 18 #include <misc/intvec.h> 16 19 #include <coeffs/numbers.h> … … 518 521 return pf; 519 522 } 523 524 #endif -
Singular/dyn_modules/polymake/polymake_conversion.h
r7835f61 rd1df84 3 3 4 4 #include <kernel/mod2.h> 5 6 #ifdef HAVE_POLYMAKE 5 7 6 8 #include <gmpxx.h> … … 67 69 68 70 #endif 71 #endif -
Singular/dyn_modules/polymake/polymake_documentation.cc
r7835f61 rd1df84 1 #include <kernel/mod2.h> 2 3 #ifdef HAVE_POLYMAKE 4 5 /* 6 #include <polymake_conversion.h> 7 8 #include <Singular/dyn_modules/gfanlib/bbcone.h> 9 #include <Singular/dyn_modules/gfanlib/bbfan.h> 10 #include <Singular/dyn_modules/gfanlib/bbpolytope.h> 11 12 #include <Singular/blackbox.h> 13 #include <Singular/ipshell.h> 14 #include <Singular/subexpr.h> 15 16 #include <string> 17 */ 18 1 19 #include <Singular/ipid.h> 20 2 21 3 22 void init_polymake_help() … … 206 225 207 226 } 227 #endif -
Singular/dyn_modules/polymake/polymake_wrapper.cc
r7835f61 rd1df84 1 #include <kernel/mod2.h> 2 3 #ifdef HAVE_POLYMAKE 4 5 #include <Singular/dyn_modules/gfanlib/bbcone.h> 6 #include <Singular/dyn_modules/gfanlib/bbfan.h> 7 #include <Singular/dyn_modules/gfanlib/bbpolytope.h> 8 9 #include <Singular/blackbox.h> 10 #include <Singular/ipshell.h> 11 #include <Singular/subexpr.h> 12 1 13 #include <polymake_conversion.h> 2 14 #include <polymake_documentation.h> 3 15 #include <polymake/Graph.h> 4 5 #include <Singular/dyn_modules/callgfanlib/bbcone.h>6 #include <Singular/dyn_modules/callgfanlib/bbfan.h>7 #include <Singular/dyn_modules/callgfanlib/bbpolytope.h>8 9 #include <Singular/blackbox.h>10 #include <Singular/ipshell.h>11 #include <Singular/subexpr.h>12 16 13 17 polymake::Main* init_polymake=NULL; … … 1753 1757 } 1754 1758 1755 1756 extern "C" int mod_init(SModulFunctions* p) 1759 extern "C" int SI_MOD_INIT(polymake)(SModulFunctions* p) 1757 1760 { 1758 1761 if (init_polymake==NULL) … … 1808 1811 return 0; 1809 1812 } 1813 1814 #endif /* HAVE_POLYMAKE */ -
Singular/dyn_modules/pyobject/pyobject.cc
r7835f61 rd1df84 707 707 (char*)#name, FALSE, name); 708 708 709 int SI_MOD_INIT(pyobject)(SModulFunctions* psModulFunctions)709 extern "C" int SI_MOD_INIT(pyobject)(SModulFunctions* psModulFunctions) 710 710 { 711 711 int tok = -1; … … 734 734 #undef PYOBJECT_ADD_C_PROC 735 735 736 #ifndef EMBED_PYTHON737 extern "C" {738 int mod_init(SModulFunctions* psModulFunctions)739 {740 return SI_MOD_INIT(pyobject)(psModulFunctions);741 }742 }743 #endif744 745 736 #endif /* HAVE_PYTHON */ -
Singular/dyn_modules/singmathic/singmathic.cc
r7835f61 rd1df84 1 // include header files2 3 1 #include <kernel/mod2.h> 2 3 #ifdef HAVE_MATHICGB 4 4 5 #include <misc/auxiliary.h> 5 6 … … 11 12 #include <Singular/ipid.h> 12 13 #include <Singular/mod_lib.h> 13 14 #ifdef HAVE_MATHICGB15 14 16 15 #include <mathicgb.h> … … 550 549 } 551 550 552 #else /* HAVE_MATHICGB */ 551 /* #else 553 552 554 553 int SI_MOD_INIT(singmathic)(SModulFunctions* psModulFunctions) … … 561 560 return 1; 562 561 } 562 */ 563 563 564 564 #endif /* HAVE_MATHICGB */ -
Singular/dyn_modules/syzextra/Makefile.am
r7835f61 rd1df84 6 6 $(FLINT_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS) $(GOOGLE_PERFTOOLS_CFLAGS) 7 7 8 module_LTLIBRARIES=syzextra.la 9 10 if ENABLE_P_PROCS_DYNAMIC 8 if SI_BUILTIN_SYZEXTRA 9 noinst_LTLIBRARIES=syzextra.la 10 P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION 11 P_PROCS_MODULE_LDFLAGS = -module 12 else 13 module_LTLIBRARIES=syzextra.la 11 14 moduledir = $(libexecdir)/singular/MOD 12 15 P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION 13 16 # Add under Mac OS X: -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 14 else 15 moduledir = $(libdir)/singular 16 P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION 17 P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 17 18 endif 18 19 P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup20 19 21 20 SOURCES = mod_main.cc DebugPrint.cc DebugPrint.h myNF.cc myNF.h singularxx_defs.h syzextra.cc syzextra.h -
Singular/dyn_modules/syzextra/mod_main.cc
r7835f61 rd1df84 1 2 3 4 5 1 #include <kernel/mod2.h> 6 2 … … 1926 1922 END_NAMESPACE 1927 1923 1928 1929 int SI_MOD_INIT(syzextra)(SModulFunctions* psModulFunctions) 1924 extern "C" int SI_MOD_INIT(syzextra)(SModulFunctions* psModulFunctions) 1930 1925 { 1931 1926 … … 1988 1983 return 0; 1989 1984 } 1990 1991 #ifndef EMBED_PYTHON1992 extern "C" {1993 int mod_init(SModulFunctions* psModulFunctions)1994 {1995 return SI_MOD_INIT(syzextra)(psModulFunctions);1996 }1997 }1998 #endif -
Singular/dyn_modules/syzextra/syzextra.cc
r7835f61 rd1df84 66 66 BEGIN_NAMESPACE(SORT_c_ds) 67 67 68 69 #ifdef _GNU_SOURCE 70 static int cmp_c_ds(const void *p1, const void *p2, void *R)71 {68 #if (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || defined __FREEBSD__ || defined __BSD__ || defined OpenBSD3_1 || defined OpenBSD3_9) 69 static int cmp_c_ds(void *R, const void *p1, const void *p2){ 70 #elif (defined _GNU_SOURCE || defined __GNU__ || defined __linux__) 71 static int cmp_c_ds(const void *p1, const void *p2, void *R){ 72 72 #else 73 static int cmp_c_ds(const void *p1, const void *p2) 74 { 75 void *R = currRing; 76 #endif 77 73 static int cmp_c_ds(const void *p1, const void *p2){ void *R = currRing; 74 #endif 75 assume(R != NULL); 78 76 const int YES = 1; 79 77 const int NO = -1; … … 81 79 const ring r = (const ring) R; // TODO/NOTE: the structure is known: C, lp!!! 82 80 83 assume( r == currRing ); 81 assume( r == currRing ); // for now... 84 82 85 83 const poly a = *(const poly*)p1; … … 154 152 } 155 153 156 154 /* 157 155 static int cmp_poly(const poly &a, const poly &b) 158 156 { … … 200 198 return 0; 201 199 } 200 */ 202 201 203 202 END_NAMESPACE … … 390 389 const int sizeNew = IDELEMS(id); 391 390 392 #ifdef _GNU_SOURCE 391 #if (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || defined __FREEBSD__ || defined __BSD__ || defined OpenBSD3_1 || defined OpenBSD3_9) 392 #define qsort_my(m, s, ss, r, cmp) qsort_r(m, s, ss, r, cmp) 393 #elif (defined _GNU_SOURCE || defined __GNU__ || defined __linux__) 393 394 #define qsort_my(m, s, ss, r, cmp) qsort_r(m, s, ss, cmp, r) 394 395 #else 395 #define qsort_my(m, s, ss, r, cmp) qsort _r(m, s, ss, cmp)396 #define qsort_my(m, s, ss, r, cmp) qsort(m, s, ss, cmp) 396 397 #endif 397 398 -
Singular/iparith.cc
r7835f61 rd1df84 7907 7907 if (traceit&TRACE_CALL) 7908 7908 Print("call %s(%s,%s)\n",iiTwoOps(op), 7909 Tok2Cmdname( an->rtyp),Tok2Cmdname(bn->rtyp));7909 Tok2Cmdname(dArith2[i].arg1),Tok2Cmdname(dArith2[i].arg2)); 7910 7910 failed= ((iiConvert(at,dArith2[i].arg1,ai,a,an)) 7911 7911 || (iiConvert(bt,dArith2[i].arg2,bi,b,bn)) … … 8092 8092 if (!failed) 8093 8093 { 8094 if (traceit&TRACE_CALL) 8095 Print("call %s(%s)\n",iiTwoOps(op),Tok2Cmdname(dArith1[i].arg)); 8094 8096 #ifdef PROC_BUG 8095 8097 dArith1[i].p(res,a); … … 8112 8114 else 8113 8115 { 8114 if (traceit&TRACE_CALL)8115 Print("call %s(%s)\n",iiTwoOps(op),Tok2Cmdname(an->rtyp));8116 8116 if (an->Next() != NULL) 8117 8117 { … … 8262 8262 if (traceit&TRACE_CALL) 8263 8263 Print("call %s(%s,%s,%s)\n", 8264 iiTwoOps(op),Tok2Cmdname( an->rtyp),8265 Tok2Cmdname( bn->rtyp),Tok2Cmdname(cn->rtyp));8264 iiTwoOps(op),Tok2Cmdname(dArith3[i].arg1), 8265 Tok2Cmdname(dArith3[i].arg2),Tok2Cmdname(dArith3[i].arg3)); 8266 8266 failed= ((iiConvert(at,dArith3[i].arg1,ai,a,an)) 8267 8267 || (iiConvert(bt,dArith3[i].arg2,bi,b,bn)) -
Singular/iplib.cc
r7835f61 rd1df84 716 716 } 717 717 718 int SI_MOD_INIT(staticdemo)(SModulFunctions*){ PrintS("init of staticdemo\n"); return (0); } 719 720 #define SI_GET_BUILTIN_MOD_INIT(name) \ 721 if (strcmp(libname, #name ".so") == 0){ int SI_MOD_INIT(name)(SModulFunctions*); return SI_MOD_INIT(name); } 718 719 extern "C" 720 { 721 # define SI_GET_BUILTIN_MOD_INIT0(name) int SI_MOD_INIT0(name)(SModulFunctions*); 722 SI_FOREACH_BUILTIN(SI_GET_BUILTIN_MOD_INIT0) 723 # undef SI_GET_BUILTIN_MOD_INIT0 724 }; 725 722 726 723 727 SModulFunc_t 724 728 iiGetBuiltinModInit(const char* libname) 725 729 { 726 SI_FOREACH_BUILTIN(SI_GET_BUILTIN_MOD_INIT) 730 # define SI_GET_BUILTIN_MOD_INIT(name) if (strcmp(libname, #name ".so") == 0){ return SI_MOD_INIT0(name); } 731 SI_FOREACH_BUILTIN(SI_GET_BUILTIN_MOD_INIT) 732 # undef SI_GET_BUILTIN_MOD_INIT 727 733 728 734 return NULL; … … 730 736 731 737 732 #undef SI_GET_BUILTIN_MOD_INIT733 738 734 739 … … 1100 1105 else sModulFunctions.iiAddCproc = iiAddCproc; 1101 1106 (*fktn)(&sModulFunctions); 1102 }1103 else Werror("mod_init: %s\n", dynl_error());1104 if (BVERBOSE(V_LOAD_LIB)) Print( "// ** loaded %s \n", fullname);1105 currPack->loaded=1;1106 currPack=s;1107 }1108 RET=FALSE;1107 if (BVERBOSE(V_LOAD_LIB)) Print( "// ** loaded %s \n", fullname); 1108 currPack->loaded=1; 1109 currPack=s; 1110 RET=FALSE; 1111 } 1112 else Werror("mod_init not found:: %s\nThis is probably not a dynamic module for Singular!\n", dynl_error()); 1113 } 1109 1114 1110 1115 load_modules_end: -
Singular/ipshell.cc
r7835f61 rd1df84 5824 5824 if ((a->Typ()==INT_CMD)&&((long)a->Data()>=0)) 5825 5825 { 5826 if ((TEST_V_ALLWARN) && (myynest==0)) WarnS("ASSUME at top level ");5826 if ((TEST_V_ALLWARN) && (myynest==0)) WarnS("ASSUME at top level is of no use: see documentation"); 5827 5827 char assume_yylinebuf[80]; 5828 5828 strncpy(assume_yylinebuf,my_yylinebuf,79); -
Singular/links/semaphore.c
r7835f61 rd1df84 6 6 7 7 #ifdef HAVE_SIMPLEIPC 8 #include <semaphore.h> 9 #include <fcntl.h> 10 #include <sys/types.h> 11 #include <sys/stat.h> 12 #include <stdio.h> 13 #include <stdlib.h> 14 #include <sys/types.h> 15 #include <unistd.h> 16 8 17 9 18 # include "simpleipc.h" … … 12 21 #include <reporter/si_signals.h> 13 22 14 #include <semaphore.h>15 #include <fcntl.h>16 #include <sys/types.h>17 #include <sys/stat.h>18 #include <stdio.h>19 #include <stdlib.h>20 23 21 24 -
Singular/links/ssiLink.cc
r7835f61 rd1df84 63 63 64 64 // 64 bit version: 65 //#if SIZEOF_LONG == 8 66 #if 0 65 #if SIZEOF_LONG == 8 67 66 #define MAX_NUM_SIZE 60 68 67 #define POW_2_28 (1L<<60) -
Singular/mod_lib.cc
r7835f61 rd1df84 1 2 3 4 5 1 #include <kernel/mod2.h> 6 2 -
Singular/mod_lib.h
r7835f61 rd1df84 2 2 #define MOD_LIB_H 3 3 4 // #include config.h 5 #include <kernel/mod2.h> /* for EMBED_PYTHON, HAVE_MATHICGB */ 4 #define SI_MOD_INIT0(name) name##_mod_init 6 5 7 #include <polys/mod_raw.h> /* for lib_types */ 8 9 lib_types type_of_LIB(const char *newlib, char *fullname); 10 11 12 #if HAVE_GFANLIB 13 #define SI_BUILTIN_GFANLIB(add) add(gfanlib) 14 #else 15 #define SI_BUILTIN_GFANLIB(add) 6 #ifdef STATIC_VERSION 7 # define SI_MOD_INIT(name) SI_MOD_INIT0(name) 8 #elif defined(DYNAMIC_VERSION) 9 # define SI_MOD_INIT(name) mod_init 16 10 #endif 17 11 18 19 #ifdef EMBED_PYTHON 20 #define SI_BUILTIN_PYOBJECT(add) add(pyobject) add(syzextra) SI_BUILTIN_GFANLIB(add) 21 //TODO: the line above means that syzextra should be staticly embedded IFF pyobjects do so :( 22 #else 23 #define SI_BUILTIN_PYOBJECT(add) 24 #endif 25 26 #ifdef HAVE_MATHICGB 27 # define SI_BUILTIN_MATHIC(add) add(singmathic) 28 #else 29 # define SI_BUILTIN_MATHIC(add) 30 #endif 12 // Note that STATIC_VERSION and DYNAMIC_VERSION should not be defined in the following config header mod2.h! 13 #include <kernel/mod2.h> /* for SI_BUILTINMODULES_ADD */ 31 14 32 15 /// Data for @c type_of_LIB to determine built-in modules, 33 16 /// use @c add(name) to add built-in library to macro 34 #define SI_FOREACH_BUILTIN(add)\ 35 add(staticdemo)\ 36 SI_BUILTIN_MATHIC(add)\ 37 SI_BUILTIN_PYOBJECT(add) 17 #define SI_FOREACH_BUILTIN(add) SI_BUILTINMODULES_ADD(add) 38 18 39 #define SI_MOD_INIT(name) name##_mod_init 19 #include <polys/mod_raw.h> /* for lib_types */ 20 lib_types type_of_LIB(const char *newlib, char *fullname); 40 21 41 22 #endif 42 23 24 /* 25 #if HAVE_GFANLIB 26 #define SI_BUILTIN_GFANLIB(add) add(gfanlib) 27 #endif 28 #ifdef HAVE_MATHICGB 29 # define SI_BUILTIN_MATHIC(add) add(singmathic) 30 #endif 31 #ifdef EMBED_PYTHON 32 //TODO: the line above means that syzextra should be staticly embedded IFF pyobjects do so :((((( 33 #define SI_BUILTIN_PYOBJECT(add) add(pyobject) add(syzextra) SI_BUILTIN_GFANLIB(add) SI_BUILTIN_MATHIC(add) 34 #endif 35 */ -
Singular/pyobject_setup.cc
r7835f61 rd1df84 13 13 //***************************************************************************** 14 14 15 #include <kernel/mod2.h> 15 16 16 17 18 19 #include <kernel/mod2.h>20 17 #include <Singular/blackbox.h> 21 18 #include <Singular/ipshell.h> 22 23 //#ifdef EMBED_PYTHON24 //#include "pyobject.cc"25 //#endif26 19 27 20 static BOOLEAN pyobject_load() … … 53 46 54 47 /// Explicitely load, if not loaded already 55 BOOLEAN pyobject_ensure() { 48 BOOLEAN pyobject_ensure() 49 { 56 50 57 51 int tok = -1; … … 61 55 return (bbx->blackbox_Init == pyobject_autoload? pyobject_load(): FALSE); 62 56 } 63 64 65 -
Tst/Short.lst
r7835f61 rd1df84 188 188 Short/lres_s.tst 189 189 Short/minor_s.tst 190 Short/modstd_s.tst191 190 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UA0\'B5.B[)DOH@WNR 62 MP*"QCZ30:[3-M=I!0+LV\ES;SSNZ38,O+^A-RE,#6@!'3884ZN%9*%Q$V^+I 63 M^O4$?'9&#J#3L(^?B$#N7,.!;H7UP7/Q\Y.LVG53@H,A'C"*L64T0.,[M:M5 64 MO6Z`U[*4>N-=C4&F37A092_X0S]E&Y#Q@X3+=)YZ<:@/DD7#QKH0Q:WPS#M= 65 MO1,7)@#P0.).).*P(Q;B-U/'F5@7?"DUA=@\=X/HYQ]7I14_KV'@$DL(U\!# 66 M%R1@>C0SA=@S941TED/]R8XEX&<Y9!_NA.%._%(OU3W]MOYX!!MXZZ+KP#5& 67 M@^<B6!B^(8*IM79,HCNE]ORKPW2\?`NQ2:H1]$O8UXJRL1B2]-2V"-EW0B'V 68 93_%S0_RB<--Y7"JP_^]._@/RC@7*L"@````` 70 69 ` 71 70 end -
Tst/Short/pyobject.stat
r7835f61 rd1df84 1 1 >> tst_memory_0 :: 1 340804707:3144- exported :3-1-4:x86_64-Linux:lts035:2273682 1 >> tst_memory_1 :: 1 340804707:3144- exported :3-1-4:x86_64-Linux:lts035:32399363 1 >> tst_memory_2 :: 1 340804707:3144- exported :3-1-4:x86_64-Linux:lts035:32399364 1 >> tst_timer_1 :: 1 340804707:3144- exported :3-1-4:x86_64-Linux:lts035:91 1 >> tst_memory_0 :: 1400685929:4.0.0, 64 bit:4.0.0:x86_64-Linux:dilbert:196488 2 1 >> tst_memory_1 :: 1400685929:4.0.0, 64 bit:4.0.0:x86_64-Linux:dilbert:3203072 3 1 >> tst_memory_2 :: 1400685929:4.0.0, 64 bit:4.0.0:x86_64-Linux:dilbert:3203072 4 1 >> tst_timer_1 :: 1400685929:4.0.0, 64 bit:4.0.0:x86_64-Linux:dilbert:3 -
Tst/Short/ringutils_s.res.gz.uu
r7835f61 rd1df84 1 1 begin 640 ringutils_s.res.gz 2 M'XL(".&J;%,``W)I;F=U=&EL<U]S+G)E<P"-E=UNXC`0A>]YBMFH%P&Q(;$=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y57=)N>[39MDGK8AI>K$C",W9@3+Y:6L30&V?SQ^<^73 8 M*DEX:CV4^%U"R;-B]#3*]]:*>FQ$"_W]J(S`5?[`P@`+$0VV@-G6Q_B`#B?[ 9 MP[-_;&43U[?C>3@SG3JF,QN9H">VEM_SLA-[?M:R\]S$8Y#(,DCL!B?+R*J( 10 M:RR5^5_VCK$SOH39\!3#1WYLDMP0F_KNSJB3J1N;+FV[R>R%=G=,Y]<'J-'1 11 MR!L?_U$\CW_)<<[Q+:]%PV%;&[N17OW)]&?!B_R#XKN=V%;A@E.%.]B4V,52 12 MVBZV0N<XNL&3(V4OVQ]\\\0QG_A#%EU9$W$7->V\+A?717SVS&'/_1E!IVQP 13 MA4\=/HMNY5./SV++9\Z>P"K^:5=H(S2J[L9PD<1\DK,_L,22DH;4Y4QNY20^ 14 @Q]DRV,P>&@R[6QU`U0%SU$$\6,#K1>\?U():S[@&```` 14 15 ` 15 16 end -
configure.ac
r7835f61 rd1df84 121 121 122 122 SING_CHECK_PLURAL 123 124 SING_BUILTIN_MODULES 123 125 124 126 ### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc... … … 236 238 AC_CONFIG_FILES([Singular/dyn_modules/bigintm/Makefile]) 237 239 AC_CONFIG_FILES([Singular/dyn_modules/syzextra/Makefile]) 238 AC_CONFIG_FILES([Singular/dyn_modules/callgfanlib/Makefile]) 239 AC_CONFIG_FILES([Singular/dyn_modules/callpolymake/Makefile]) 240 AC_CONFIG_FILES([Singular/dyn_modules/gfanlib/Makefile]) 241 AC_CONFIG_FILES([Singular/dyn_modules/polymake/Makefile]) 242 AC_CONFIG_FILES([Singular/dyn_modules/pyobject/Makefile]) 243 AC_CONFIG_FILES([Singular/dyn_modules/singmathic/Makefile]) 244 AC_CONFIG_FILES([Singular/dyn_modules/staticdemo/Makefile]) 240 245 241 246 AC_CONFIG_FILES([Singular/Makefile]) -
kernel/GBEngine/Makefile.am
r7835f61 rd1df84 7 7 libGBEngine_la_SOURCES=khstd.cc kstdfac.cc kstd1.cc kstd2.cc kutil.cc nc.cc sca.cc gr_kstd2.cc kspoly.cc kpolys.cc syz.cc syz0.cc syz1.cc syz2.cc syz3.cc units.cc tgb.cc tgbgauss.cc f5data.cc f5lists.cc f5gb.cc f5c.cc ratgring.cc shiftgb.cc ringgb.cc janet.cc 8 8 9 libGBEngine_la_includedir=$(includedir)/ kernel/GBEngine9 libGBEngine_la_includedir=$(includedir)/singular/kernel/GBEngine 10 10 libGBEngine_la_include_HEADERS=stairc.h syz.h kstdfac.h kutil.h khstd.h kstd1.h units.h ratgring.h shiftgb.h nc.h kInline.h tgb.h ringgb.h tgbgauss.h tgb_internal.h f5c.h f5data.h f5gb.h f5lists.h janet.h 11 11 -
kernel/combinatorics/Makefile.am
r7835f61 rd1df84 7 7 libcombinatorics_la_SOURCES=hdegree.cc hilb.cc hutil.cc 8 8 9 libcombinatorics_la_includedir=$(includedir)/ kernel/combinatorics9 libcombinatorics_la_includedir=$(includedir)/singular/kernel/combinatorics 10 10 libcombinatorics_la_include_HEADERS=hutil.h 11 11 -
kernel/fglm/Makefile.am
r7835f61 rd1df84 7 7 libfglm_la_SOURCES=fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc 8 8 9 libfglm_la_includedir=$(includedir)/singular/ fglm9 libfglm_la_includedir=$(includedir)/singular/kernel/fglm 10 10 libfglm_la_include_HEADERS=fglm.h fglmgauss.h fglmvec.h 11 11 -
kernel/groebner_walk/Makefile.am
r7835f61 rd1df84 7 7 libgroebner_walk_la_SOURCES=walkProc.cc walkMain.cc walkSupport.cc 8 8 9 libgroebner_walk_la_includedir=$(includedir)/ kernel/groebner_walk9 libgroebner_walk_la_includedir=$(includedir)/singular/kernel/groebner_walk 10 10 libgroebner_walk_la_include_HEADERS=walkProc.h walkMain.h walkSupport.h 11 11 -
kernel/linear_algebra/Makefile.am
r7835f61 rd1df84 10 10 11 11 12 liblinear_algebra_la_includedir=$(includedir)/ kernel/linear_algebra12 liblinear_algebra_la_includedir=$(includedir)/singular/kernel/linear_algebra 13 13 liblinear_algebra_la_include_HEADERS= \ 14 14 Minor.h MinorInterface.h MinorProcessor.h \ -
kernel/maps/Makefile.am
r7835f61 rd1df84 7 7 libmaps_la_SOURCES=fast_maps.cc 8 8 9 libmaps_la_includedir=$(includedir)/ kernel/maps9 libmaps_la_includedir=$(includedir)/singular/kernel/maps 10 10 libmaps_la_include_HEADERS=fast_maps.h 11 11 -
kernel/spectrum/Makefile.am
r7835f61 rd1df84 7 7 libspectrum_la_SOURCES=GMPrat.cc multicnt.cc npolygon.cc semic.cc spectrum.cc splist.cc 8 8 9 libspectrum_la_includedir=$(includedir)/ kernel/spectrum9 libspectrum_la_includedir=$(includedir)/singular/kernel/spectrum 10 10 libspectrum_la_include_HEADERS=GMPrat.h multicnt.h npolygon.h semic.h spectrum.h splist.h kmatrix.h 11 11 -
libpolys/coeffs/longrat.cc
r7835f61 rd1df84 17 17 18 18 // 64 bit version: 19 //#if SIZEOF_LONG == 820 #if 019 #if SIZEOF_LONG == 8 20 //#if 0 21 21 #define MAX_NUM_SIZE 60 22 22 #define POW_2_28 (1L<<60) … … 265 265 if ( SR_HDL(n) & SR_INT ) 266 266 { 267 term = SR_TO_INT(n); 267 int nn=SR_TO_INT(n); 268 if ((long)nn==SR_TO_INT(n)) 269 term = nn; 270 else 271 { 272 mpz_t dummy; 273 mpz_init_set_si(dummy, SR_TO_INT(n)); 274 term = make_cf(dummy); 275 } 268 276 } 269 277 else … … 534 542 nlTest(i, r); 535 543 nlNormalize(i,r); 536 if (SR_HDL(i) &SR_INT) return SR_TO_INT(i); 544 if (SR_HDL(i) & SR_INT) 545 { 546 int dummy = SR_TO_INT(i); 547 if((long)dummy == SR_TO_INT(i)) 548 return SR_TO_INT(i); 549 else 550 return 0; 551 } 537 552 if (i->s==3) 538 553 { … … 563 578 nlTest(i, r); 564 579 nlNormalize(i,r); 565 if (SR_HDL(i) & SR_INT) return (i);580 if (SR_HDL(i) & SR_INT) return (i); 566 581 if (i->s==3) 567 582 { … … 786 801 { 787 802 LONG bb=SR_TO_INT(b); 788 LONG c=SR_TO_INT(a)%bb; 803 LONG c=SR_TO_INT(a) % bb; 804 /*if(c < 0) 805 { 806 if(bb < 0) 807 c = c - bb; 808 else 809 c = c + bb; 810 }*/ 811 /*if((((SR_TO_INT(a)) / (bb))*bb+c) != SR_TO_INT(a)) 812 { 813 printf("\nERROR longrat:819\n"); 814 printf("\na = %ld\n",SR_TO_INT(a)); 815 printf("\nb = %ld\n",bb); 816 printf("\nc = %ld\n",c); 817 }*/ 789 818 return INT_TO_SR(c); 790 819 } 791 820 if (SR_HDL(a) & SR_INT) 792 821 { 793 /* a is a small and b is a large int: -> a */ 794 return a; 822 // a is a small and b is a large int: -> a 823 // INCORRECT, IT COULD HAPPEN THAT b IS A SMALL NUMBER 824 number aa=ALLOC_RNUMBER(); 825 mpz_init(aa->z); 826 mpz_set_si(aa->z, SR_TO_INT(a)); 827 u=ALLOC_RNUMBER(); 828 #if defined(LDEBUG) 829 u->debug=123456; 830 #endif 831 u->s = 3; 832 mpz_init(u->z); 833 mpz_mod(u->z,aa->z,b->z); 834 if (mpz_isNeg(u->z)) 835 { 836 if (mpz_isNeg(b->z)) 837 mpz_sub(u->z,aa->z,b->z); 838 else 839 mpz_add(u->z,aa->z,b->z); 840 } 841 /*mpz_t dummy; 842 mpz_init(dummy); 843 mpz_fdiv_q(dummy, aa->z, b->z); 844 mpz_mul(dummy, dummy, b->z); 845 mpz_add(dummy, dummy, u->z); 846 if(mpz_cmp(dummy,aa->z) != 0) 847 { 848 printf("\nERROR longrat:911\n"); 849 printf("\na = ");n_Print(aa,r); 850 gmp_printf("\ndummy = %Zd",dummy); 851 mpz_clear(dummy);mpz_init(dummy);mpz_tdiv_q(dummy, a->z, b->z); 852 gmp_printf("\na div b = %Zd\n u = ", dummy); 853 n_Print(u,r); 854 } 855 mpz_clear(dummy);*/ 856 mpz_clear(aa->z); 857 #if defined(LDEBUG) 858 aa->debug=654324; 859 #endif 860 FREE_RNUMBER(aa); 861 u=nlShort3(u); 862 nlTest(u,r); 863 return u; 795 864 } 796 865 number bb=NULL; … … 807 876 u->s = 3; 808 877 mpz_mod(u->z,a->z,b->z); 809 if (bb!=NULL)810 {811 mpz_clear(bb->z);812 #if defined(LDEBUG)813 bb->debug=654324;814 #endif815 FREE_RNUMBER(bb);816 }817 878 if (mpz_isNeg(u->z)) 818 879 { … … 822 883 mpz_add(u->z,u->z,b->z); 823 884 } 885 if (bb!=NULL) 886 { 887 mpz_clear(bb->z); 888 #if defined(LDEBUG) 889 bb->debug=654324; 890 #endif 891 FREE_RNUMBER(bb); 892 } 893 /*mpz_t dummy; 894 mpz_init(dummy); 895 mpz_fdiv_q(dummy, a->z, b->z); 896 mpz_mul(dummy, dummy, b->z); 897 mpz_add(dummy, dummy, u->z); 898 if(mpz_cmp(dummy,a->z) != 0) 899 { 900 printf("\nERROR longrat:911\n"); 901 printf("\na = ");n_Print(a,r); 902 gmp_printf("\ndummy = %Zd",dummy); 903 mpz_clear(dummy);mpz_init(dummy);mpz_tdiv_q(dummy, a->z, b->z); 904 gmp_printf("\na div b = %Zd\n u = ", dummy); 905 n_Print(u,r); 906 } 907 mpz_clear(dummy);*/ 824 908 u=nlShort3(u); 825 909 nlTest(u,r); … … 2092 2176 assume( getCoeffType(dst) == ID ); 2093 2177 assume( getCoeffType(src) == ID ); 2094 2095 2178 if ((SR_HDL(a) & SR_INT)||(a==NULL)) 2096 2179 { … … 2693 2776 2694 2777 nlInpGcd(cand, n, cf); 2695 2696 2778 assume( nlGreaterZero(cand,cf) ); 2697 2779 … … 2842 2924 #else 2843 2925 long nn=SR_TO_INT(n); 2844 if ((nn<POW_2_28) ||(nn>= -POW_2_28))2926 if ((nn<POW_2_28)&&(nn>= -POW_2_28)) 2845 2927 fprintf(f,"4 %ld ",nn); 2846 2928 else … … 2899 2981 s_readmpz(f,n->z); 2900 2982 n->s=3; /*sub_type*/ 2983 #if SIZEOF_LONG == 8 2984 n=nlShort3(n); 2985 #endif 2901 2986 return n; 2902 2987 } … … 2925 3010 s_readmpz_base (f,n->z, SSI_BASE); 2926 3011 n->s=sub_type=3; /*subtype-5*/ 3012 #if SIZEOF_LONG == 8 3013 n=nlShort3(n); 3014 #endif 2927 3015 return n; 2928 3016 } -
libpolys/coeffs/mpr_complex.cc
r7835f61 rd1df84 377 377 if (SR_HDL(num) & SR_INT) 378 378 { 379 r= SR_TO_INT(num); 379 //n_Print(num, src);printf("\n"); 380 int nn = SR_TO_INT(num); 381 if((long)nn == SR_TO_INT(num)) 382 r = SR_TO_INT(num); 383 else 384 r = gmp_float(SR_TO_INT(num)); 385 //int dd = 20; 386 //gmp_printf("\nr = %.*Ff\n",dd,*r.mpfp()); 387 //getchar(); 380 388 } 381 389 else … … 436 444 if (SR_HDL(num) & SR_INT) 437 445 { 438 r= SR_TO_INT(num); 446 int nn = SR_TO_INT(num); 447 if((long)nn == SR_TO_INT(num)) 448 r = SR_TO_INT(num); 449 else 450 r = gmp_float(SR_TO_INT(num)); 439 451 } 440 452 else … … 446 458 if (SR_HDL(num) & SR_INT) 447 459 { 448 r= SR_TO_INT(num); 460 int nn = SR_TO_INT(num); 461 if((long)nn == SR_TO_INT(num)) 462 r = SR_TO_INT(num); 463 else 464 r = gmp_float(SR_TO_INT(num)); 449 465 } 450 466 else -
libpolys/coeffs/numbers.cc
r7835f61 rd1df84 413 413 assume(n->cfInpNeg!=NULL); 414 414 assume(n->cfCopy!=NULL); 415 assume(n->cfRePart!=NULL);416 assume(n->cfImPart!=NULL);417 415 418 416 assume(n->cfWriteLong!=NULL); -
libpolys/coeffs/shortfl.cc
r7835f61 rd1df84 425 425 #define SR_HDL(A) ((long)(A)) 426 426 #define IS_INT(A) ((A)->s==3) 427 #define IS_IMM(A) (SR_HDL(A) &SR_INT)427 #define IS_IMM(A) (SR_HDL(A) & SR_INT) 428 428 #define GET_NOM(A) ((A)->z) 429 429 #define GET_DENOM(A) ((A)->n) -
libpolys/libpolys-config.in
r7835f61 rd1df84 89 89 90 90 --cflags) 91 ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_INCLUDES@ @NTL_CFLAGS@ @GMP_CFLAGS@ " 91 #### @FACTORY_INCLUDES@ 92 ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ " 92 93 ;; 93 94 -
libpolys/polys/ext_fields/algext.cc
r7835f61 rd1df84 98 98 void naWriteLong(number &a, const coeffs cf); 99 99 void naWriteShort(number &a, const coeffs cf); 100 number naRePart(number a, const coeffs cf);101 number naImPart(number a, const coeffs cf);102 100 number naGetDenom(number &a, const coeffs cf); 103 101 number naGetNumerator(number &a, const coeffs cf); … … 248 246 BOOLEAN naDBTest(number a, const char *f, const int l, const coeffs cf) 249 247 { 250 assume(getCoeffType(cf) == ID);251 248 if (a == NULL) return TRUE; 252 249 p_Test((poly)a, naRing); 253 if((((poly)a)!=naMinpoly) 254 && p_Totaldegree((poly)a, naRing) >= p_Totaldegree(naMinpoly, naRing) 255 && (p_Totaldegree((poly)a, naRing)> 1)) // allow to output par(1) 256 { 257 dReportError("deg >= deg(minpoly) in %s:%d\n",f,l); 258 return FALSE; 250 if (getCoeffType(cf)==n_algExt) 251 { 252 if((((poly)a)!=naMinpoly) 253 && p_Totaldegree((poly)a, naRing) >= p_Totaldegree(naMinpoly, naRing) 254 && (p_Totaldegree((poly)a, naRing)> 1)) // allow to output par(1) 255 { 256 dReportError("deg >= deg(minpoly) in %s:%d\n",f,l); 257 return FALSE; 258 } 259 259 } 260 260 return TRUE; … … 348 348 if (a != NULL) a = (number)p_Neg((poly)a, naRing); 349 349 return a; 350 }351 352 number naImPart(number a, const coeffs cf)353 {354 naTest(a);355 return NULL;356 350 } 357 351 … … 486 480 poly aPlusB = p_Add_q(p_Copy((poly)a, naRing), 487 481 p_Copy((poly)b, naRing), naRing); 488 definiteReduce(aPlusB, naMinpoly, cf);482 //definiteReduce(aPlusB, naMinpoly, cf); 489 483 return (number)aPlusB; 490 484 } … … 497 491 if (a == NULL) return (number)minusB; 498 492 poly aMinusB = p_Add_q(p_Copy((poly)a, naRing), minusB, naRing); 499 definiteReduce(aMinusB, naMinpoly, cf);493 //definiteReduce(aMinusB, naMinpoly, cf); 500 494 return (number)aMinusB; 501 495 } … … 724 718 static BOOLEAN naCoeffIsEqual(const coeffs cf, n_coeffType n, void * param) 725 719 { 726 if ( ID!= n) return FALSE;720 if (n_algExt != n) return FALSE; 727 721 AlgExtInfo *e = (AlgExtInfo *)param; 728 722 /* for extension coefficient fields we expect the underlying … … 1421 1415 e->r->ref ++; // increase the ref.counter for the ground poly. ring! 1422 1416 const ring R = e->r; // no copy! 1423 assume( R->qideal == e->r->qideal );1424 1417 cf->extRing = R; 1425 1418 … … 1445 1438 cf->cfChineseRemainder= naChineseRemainder; 1446 1439 cf->cfInt = naInt; 1447 cf->cfInpNeg 1440 cf->cfInpNeg = naNeg; 1448 1441 cf->cfAdd = naAdd; 1449 1442 cf->cfSub = naSub; … … 1467 1460 cf->cfGetNumerator = naGetNumerator; 1468 1461 cf->cfRePart = naCopy; 1469 cf->cfImPart = naImPart;1470 1462 cf->cfCoeffWrite = naCoeffWrite; 1471 1463 cf->cfNormalize = naNormalize; … … 1503 1495 template class IAccessor<snumber*>; 1504 1496 1497 /* --------------------------------------------------------------------*/ 1498 #if 0 1499 void npolyCoeffWrite(const coeffs cf, BOOLEAN details) 1500 { 1501 assume( cf != NULL ); 1502 1503 const ring A = cf->extRing; 1504 1505 assume( A != NULL ); 1506 Print("// polynomial ring as coefficient ring :\n"); 1507 rWrite(A); 1508 PrintLn(); 1509 } 1510 number npolyMult(number a, number b, const coeffs cf) 1511 { 1512 naTest(a); naTest(b); 1513 if ((a == NULL)||(b == NULL)) return NULL; 1514 poly aTimesB = p_Mult_q(p_Copy((poly)a, naRing), 1515 p_Copy((poly)b, naRing), naRing); 1516 return (number)aTimesB; 1517 } 1518 1519 number npolyDiv(number a, number b, const coeffs cf) 1520 { 1521 naTest(a); naTest(b); 1522 if (b == NULL) WerrorS(nDivBy0); 1523 if (a == NULL) return NULL; 1524 poly p=singclap_pdivide((poly)a,(poly)b,naRing); 1525 return (number)p; 1526 } 1527 1528 1529 BOOLEAN npolyInitChar(coeffs cf, void * infoStruct) 1530 { 1531 assume( infoStruct != NULL ); 1532 1533 AlgExtInfo *e = (AlgExtInfo *)infoStruct; 1534 /// first check whether cf->extRing != NULL and delete old ring??? 1535 1536 assume(e->r != NULL); // extRing; 1537 assume(e->r->cf != NULL); // extRing->cf; 1538 1539 assume( cf != NULL ); 1540 1541 e->r->ref ++; // increase the ref.counter for the ground poly. ring! 1542 const ring R = e->r; // no copy! 1543 cf->extRing = R; 1544 1545 /* propagate characteristic up so that it becomes 1546 directly accessible in cf: */ 1547 cf->ch = R->cf->ch; 1548 1549 cf->cfCoeffString = naCoeffString; 1550 1551 cf->cfGreaterZero = naGreaterZero; 1552 cf->cfGreater = naGreater; 1553 cf->cfEqual = naEqual; 1554 cf->cfIsZero = naIsZero; 1555 cf->cfIsOne = naIsOne; 1556 cf->cfIsMOne = naIsMOne; 1557 cf->cfInit = naInit; 1558 cf->cfInit_bigint = naInit_bigint; 1559 cf->cfFarey = naFarey; 1560 cf->cfChineseRemainder= naChineseRemainder; 1561 cf->cfInt = naInt; 1562 cf->cfInpNeg = naNeg; 1563 cf->cfAdd = naAdd; 1564 cf->cfSub = naSub; 1565 cf->cfMult = npolyMult; 1566 cf->cfDiv = npolyDiv; 1567 cf->cfPower = naPower; 1568 cf->cfCopy = naCopy; 1569 1570 cf->cfWriteLong = naWriteLong; 1571 1572 if( rCanShortOut(naRing) ) 1573 cf->cfWriteShort = naWriteShort; 1574 else 1575 cf->cfWriteShort = naWriteLong; 1576 1577 cf->cfRead = naRead; 1578 cf->cfDelete = naDelete; 1579 cf->cfSetMap = naSetMap; 1580 cf->cfGetDenom = naGetDenom; 1581 cf->cfGetNumerator = naGetNumerator; 1582 cf->cfRePart = naCopy; 1583 cf->cfCoeffWrite = npolyCoeffWrite; 1584 cf->cfNormalize = npolyNormalize; 1585 cf->cfKillChar = naKillChar; 1586 #ifdef LDEBUG 1587 cf->cfDBTest = naDBTest; 1588 #endif 1589 cf->cfGcd = naGcd; 1590 cf->cfLcm = naLcmContent; 1591 cf->cfSize = naSize; 1592 cf->nCoeffIsEqual = naCoeffIsEqual; 1593 cf->cfInvers = npolyInvers; 1594 cf->cfIntDiv = npolyDiv; 1595 cf->convFactoryNSingN=naConvFactoryNSingN; 1596 cf->convSingNFactoryN=naConvSingNFactoryN; 1597 cf->cfParDeg = naParDeg; 1598 1599 cf->iNumberOfParameters = rVar(R); 1600 cf->pParameterNames = (const char**)R->names; 1601 cf->cfParameter = naParameter; 1602 cf->has_simple_Inverse=FALSE; 1603 /* cf->has_simple_Alloc= FALSE; */ 1604 1605 if( nCoeff_is_Q(R->cf) ) 1606 { 1607 cf->cfClearContent = naClearContent; 1608 cf->cfClearDenominators = naClearDenominators; 1609 } 1610 1611 return FALSE; 1612 } 1613 #endif -
libsingular-config.in
r7835f61 rd1df84 89 89 90 90 --cflags) 91 ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_INCLUDES@ @FLINT_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ " 91 #### @FACTORY_INCLUDES@ 92 ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FLINT_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ " 92 93 ;; 93 94 -
m4/ax_python_embed.m4
r7835f61 rd1df84 236 236 # ax_python_includespec="${ax_python_includespec} $ax_python_execspec" 237 237 # fi 238 ax_python_cspec=`${PYTHON}-config --cflags | sed -e "s@ -arch i386@@" -e "s@ -arch x86_64@@" -e 's@ -g@@g' -e 's@ -mno-fused-madd@@g'`238 ax_python_cspec=`${PYTHON}-config --cflags | sed -e 's@ -mno-fused-madd @ @g'` 239 239 # or -Qunused-arguments / clang :( 240 240 # ax_python_cspec="${ax_python_ccshared} ${ax_python_includespec}" … … 315 315 # AC_MSG_NOTICE([PYTHON_LSPEC=${ax_python_output}]) 316 316 317 ax_python_lspec=`${PYTHON}-config --ldflags | sed -e "s@ -arch i386@@" -e "s@ -arch x86_64@@" -e 's@ -g@@g'`317 ax_python_lspec=`${PYTHON}-config --ldflags` 318 318 AC_SUBST([PYTHON_LSPEC], [${ax_python_lspec}]) 319 319 AC_MSG_NOTICE([PYTHON_LSPEC=${ax_python_lspec}]) -
m4/options.m4
r7835f61 rd1df84 289 289 290 290 ]) 291 292 293 294 AC_DEFUN([SING_BUILTIN_MODULES], 295 [ 296 ## m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl 297 AC_MSG_CHECKING([built-in modules]) 298 299 AC_ARG_VAR( [BUILTIN_LIBS], [LIB FLAGS for buildins] ) 300 AC_ARG_WITH(builtinmodules, 301 AS_HELP_STRING([--with-builtinmodules], [List of builtin modules (experimental), default: staticdemo,bigintm,syzextra]), 302 [if test "x$with_builtinmodules" == xyes; then 303 with_builtinmodules=syzextra 304 fi], 305 [with_builtinmodules=""] 306 ) 307 # staticdemo,bigintm, 308 # ,pyobject,gfanlib,polymake,singmathic 309 310 AH_TEMPLATE([SI_BUILTINMODULES_ADD],[Add(list) for Builtin modules]) 311 312 #### TODO Dynamic Modules??? 313 L="" 314 bi_staticdemo=false 315 bi_syzextra=false 316 bi_pyobject=false 317 bi_gfanlib=false 318 bi_polymake=false 319 bi_singmathic=false 320 bi_bigintm=false 321 322 323 if test -z "$with_builtinmodules"; then 324 AC_MSG_RESULT(no) 325 else 326 AC_MSG_RESULT(yes) 327 328 L="" 329 330 for a in ${with_builtinmodules//,/ }; 331 do 332 AC_MSG_CHECKING([whether to build-in '$a'?]) 333 334 L+=" add($a)" 335 LL+=" $a" 336 BUILTIN_LIBS+=" dyn_modules/$a/$a.la" 337 AC_MSG_RESULT(yes) 338 339 # *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; 340 341 case "${a}" in 342 staticdemo ) bi_staticdemo=true;; 343 syzextra ) bi_syzextra=true ;; 344 pyobject ) bi_pyobject=true ;; 345 gfanlib ) bi_gfanlib=true ;; 346 polymake ) bi_polymake=true ;; 347 singmathic ) bi_singmathic=true ;; 348 bigintm ) bi_bigintm=true ;; 349 esac 350 351 ###### In case of out-of tree building: the build dir is empty in configure time!!! 352 if test ! -d "Singular/dyn_modules/$a"; then 353 AC_MSG_WARN([The directory 'Singular/dyn_modules/$a' is missing :(]) 354 ## else 355 ## AC_MSG_RESULT(no) 356 fi 357 358 # A=`echo "SI_BUILTIN_$a" | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"` 359 # echo "A:: $A" 360 # AM_CONDITIONAL(m4_unquote([A]),[test -d "Singular/dyn_modules/$a"]) ## :((( 361 done # for 362 363 AC_DEFINE_UNQUOTED([SI_BUILTINMODULES],"$LL",[Refined list of builtin modules]) 364 365 fi # else ("x$with_builtinmodules" != xno) 366 367 AC_MSG_CHECKING([SI_BUILTINMODULES_ADD(add)...]) 368 AC_MSG_RESULT(${L:-unset}) 369 370 AC_DEFINE_UNQUOTED([SI_BUILTINMODULES_ADD(add)],[$L],[Add(list) for Builtin modules]) 371 AC_SUBST(BUILTIN_LIBS) 372 373 AM_CONDITIONAL([SI_BUILTIN_STATICDEMO], [test x$bi_staticdemo = xtrue]) 374 AM_CONDITIONAL([SI_BUILTIN_SYZEXTRA], [test x$bi_syzextra = xtrue]) 375 AM_CONDITIONAL([SI_BUILTIN_PYOBJECT], [test x$bi_pyobject = xtrue]) 376 AM_CONDITIONAL([SI_BUILTIN_GFANLIB], [test x$bi_gfanlib = xtrue]) 377 AM_CONDITIONAL([SI_BUILTIN_POLYMAKE], [test x$bi_polymake = xtrue]) 378 AM_CONDITIONAL([SI_BUILTIN_SINGMATHIC], [test x$bi_singmathic = xtrue]) 379 AM_CONDITIONAL([SI_BUILTIN_BIGINTM], [test x$bi_bigintm = xtrue]) 380 381 AC_MSG_CHECKING([BUILTIN_LIBS...]) 382 AC_MSG_RESULT(${BUILTIN_LIBS:-unset}) 383 ]) 384 385 -
resources/feResource.cc
r7835f61 rd1df84 66 66 // path for dynamic modules, should match ProcDir: 67 67 "%b/MOD;" 68 "%r/lib/singular/MOD;" 69 "%r/libexec/singular/MOD;" 70 LIB_DIR "/singular/MOD;" 68 71 LIBEXEC_DIR "/singular/MOD;" 69 72 "%b", … … 74 77 {"ProcDir", 'P', feResPath, "SINGULAR_PROCS_DIR", 75 78 "%b/MOD;" 76 LIBEXEC_DIR "/singular/MOD;" 79 "%r/lib/singular/MOD;" 80 "%r/libexec/singular/MOD;" 77 81 LIB_DIR "/singular/MOD;" /*debian: -> /usr/lib/singular/MOD */ 78 "%r/libexec/singular/MOD", (char *)""},82 LIBEXEC_DIR "/singular/MOD" , (char *)""}, 79 83 {"RootDir", 'r', feResDir, "SINGULAR_ROOT_DIR", "%b/..", (char *)""}, 80 84 {"DataDir", 'D', feResDir, "SINGULAR_DATA_DIR", "%b/../share/", (char *)""},
Note: See TracChangeset
for help on using the changeset viewer.