- Timestamp:
- Dec 17, 2013, 1:23:10 PM (10 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- a1e807a999ad81c88502c684ee93531e7840ea82
- Parents:
- 81f4bd5c5a8887cb6c7de707703727b6435fcbd84c13414601e276ca17f4e13f1d191e558fb2ef91
- Location:
- Singular
- Files:
-
- 2 added
- 23 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/COPYING
r4c1341 rce70e6 134 134 paramet.lib Thomas Keilen keilen@mathematik.uni-kl.de 135 135 perron.lib Oleksandr Motsak motsak at mathematik dot uni minus kl dot de 136 phindex.lib 136 phindex.lib 137 137 pointid.lib Stefan Steidel steidel@mathematik.uni-kl.de 138 138 poly.lib Olaf Bachmann obachman@mathematik.uni-kl.de 139 139 Gert-Martin Greuel greuel@mathematik.uni-kl.de 140 140 Anne Fruehbis-Krueger anne@mathematik.uni-kl.de 141 oldpolymake.libThomas Markwig keilen@mathematik.uni-kl.de141 polymake.lib Thomas Markwig keilen@mathematik.uni-kl.de 142 142 presolve.lib Gert-Martin Greuel greuel@mathematik.uni-kl.de 143 143 primdec.lib Gerhard Pfister pfister@mathematik.uni-kl.de -
Singular/LIB/grobcov.lib
r4c1341 rce70e6 1 1 ////////////////////////////////////////////////////////////////////////////// 2 version="version grobcov.lib 4 .0.0.0 Jun_2013 "; // $Id$2 version="version grobcov.lib 4-0-0-0 Dec_2013 "; 3 3 category="General purpose"; 4 4 info=" … … 15 15 The locus algorithm and definitions will be 16 16 published in a forthcoming paper by Abanades, Botana, Montes, Recio: 17 \''Geometrical locus of points using the Groebner cover\''. 18 17 \''An Algebraic Taxonomy for Locus Computation in Dynamic Geometry\''. 19 18 20 19 The central routine is grobcov. Given a parametric … … 69 68 PROCEDURES: 70 69 71 grobcov(F); 70 grobcov(F); Is the basic routine giving the canonical 72 71 Groebner cover of the parametric ideal F. 73 72 This routine accepts many options, that … … 75 74 computation does not finish in reasonable time. 76 75 77 cgsdr(F); 76 cgsdr(F); Is the procedure for obtaining a first disjoint, 78 77 reduced Comprehensive Groebner System that 79 is used in grobcov, but that canbe used78 is used in grobcov, that can also be used 80 79 independently if only the CGS is required. 81 80 It is a more efficient routine than buildtree … … 86 85 respectively the rings Q[a][x], Q[a], Q[x,a]. 87 86 It is called inside each of the fundamental routines 88 of the library: grobcov, cgsdr and killed before87 of the library: grobcov, cgsdr, locus, locusdg and killed before 89 88 the output. 90 If the user want to use some other internal routine, 91 then setglobalrings() is to be called before, as 92 the rings @R, @P and @RP are needed in most of them. 93 globally, and more internal routines can be used, but 94 these rings are killed by the call to any of the 95 basic routines. 89 So, if the user want to use some other internal routine, 90 then setglobalrings() is to be called before, as most of them use 91 these rings. 96 92 97 93 pdivi(f,F); Performs a pseudodivision of a parametric polynomial 98 94 by a parametric ideal. 95 Can be used without calling presiouly setglobalrings(), 99 96 100 97 pnormalf(f,E,N); Reduces a parametric polynomial f over V(E) \ V(N) 101 98 E is the null ideal and N the non-null ideal 102 99 over the parameters. 100 Can be used without calling presiouly setglobalrings(), 101 102 Prep(N,M); Computes the P-representation of V(N) \ V(M). 103 Can be used without calling previously setglobalrings(). 103 104 104 105 extend(GC); When the grobcov of an ideal has been computed … … 110 111 the bases are computed, and one can obtain the full 111 112 representation using extend. 112 113 locus(G): Special routine for determining the locus of points 113 Can be used without calling presiouly setglobalrings(), 114 115 locus(G); Special routine for determining the locus of points 114 116 of objects. Given a parametric ideal J with 115 117 parameters (a_1,..a_m) and variables (x_1,..,xn), … … 126 128 The description of the algorithm and definitions will be 127 129 given in a forthcoming paper by Abanades, Botana, Montes, Recio: 128 ''Geometrical locus of points using the Groebner cover'' 129 130 locusdg(G): Is a special routine for computing the locus in dinamical geometry. 130 ''An Algebraic Taxonomy for Locus Computation in Dynamic Geometry''. 131 Can be used without calling presiouly setglobalrings(), 132 133 locusdg(G); Is a special routine for computing the locus in dinamical geometry. 131 134 It detects automatically a possible point that is to be avoided by the mover, 132 135 whose coordinates must be the last two coordinates in the definition of the ring. … … 134 137 depending on the point that is to be avoided. 135 138 Then it calls locus. 136 137 locusto(L): Transforms the output of locus to a string that 139 Can be used without calling presiouly setglobalrings(), 140 141 locusto(L); Transforms the output of locus to a string that 138 142 can be reed from different computational systems. 143 Can be used without calling presiouly setglobalrings(), 144 145 addcons(L); Given a disjoint set of locally closed subsets in P-representation, 146 it returns the canonical P-representation of the constructible set 147 formed by the union of them. 148 Can be used without calling presiouly setglobalrings(), 139 149 140 150 SEE ALSO: compregb_lib … … 154 164 // Initial data: 6-9-2009 155 165 // Final data: 25-10-2011 156 // Release 3: (this release, public)166 // Release 3: 157 167 // Initial data: 1-7-2012 158 168 // Final data: 4-9-2012 169 // Release 4: (this release, public) 170 // Initial data: 4-9-2012 171 // Final data: 21-11-2013 159 172 // basering Q[a][x]; 160 173 … … 166 179 RETURN: After its call the rings @R=Q[a][x], @P=Q[a], @RP=Q[x,a] are 167 180 defined as global variables. 168 NOTE: 169 library grobcov, cgsdr, extend, pdivi, pnormalf, locus, locus to,181 NOTE: It is called internally by the fundamental routines of the 182 library grobcov, cgsdr, extend, pdivi, pnormalf, locus, locusdg, locusto, 170 183 and killed before the output. 171 184 The user does not need to call it, except when it is interested … … 210 223 } 211 224 212 //*************Auxil liary routines**************225 //*************Auxiliary routines************** 213 226 214 227 // cld : clears denominators of an ideal and normalizes to content 1 215 // can be used in @R or @P or @RP228 // can be used in @R or @P or @RP 216 229 // input: 217 // ideal J (J can be also poly), but the output is an ideal;230 // ideal J (J can be also poly), but the output is an ideal; 218 231 // output: 219 // ideal Jc (the new form of ideal J without denominators and220 // normalized to content 1)232 // ideal Jc (the new form of ideal J without denominators and 233 // normalized to content 1) 221 234 proc cld(ideal J) 222 235 { … … 369 382 //"USAGE: subset(J,K); 370 383 // (J,K) expected (ideal,ideal) 371 // 384 // or (list, list) 372 385 //RETURN: 1 if all the elements of J are in K, 0 if not. 373 386 //EXAMPLE: subset; shows an example;" … … 419 432 } 420 433 421 // pdivi : pseudodivision of a p olyf by a parametric ideal F in Q[a][x].434 // pdivi : pseudodivision of a parametric polynomial f by a parametric ideal F in Q[a][x]. 422 435 // input: 423 // poly f (in the parametric ring @R)424 // ideal F (in the parametric ring @R)436 // poly f 437 // ideal F 425 438 // output: 426 439 // list (poly r, ideal q, poly mu) … … 438 451 EXAMPLE: pdivi; shows an example" 439 452 { 453 int i; 454 int j; 455 // string("T_f=",f); 456 poly v=1; 457 for(i=1;i<=nvars(basering);i++){v=v*var(i);} 440 458 int te=0; 459 def R=basering; 441 460 if (defined(@P)==1){te=1;} 442 461 else{setglobalrings();} 443 def R=basering;444 int i;445 int j;446 462 poly r=0; 447 463 poly mu=1; … … 476 492 rho=qlc[1]*qlm; 477 493 p=nu*p-rho*F[i]; 494 // string("i=",i," coef(p,v)=",coef(p,v)); 478 495 r=nu*r; 479 496 for (j=1;j<=size(F);j++){q[j]=nu*q[j];} … … 487 504 r=r+lcp*lpp; 488 505 p=p-lcp*lpp; 506 // string("pasa al rem p=",p); 489 507 } 490 508 } … … 845 863 { 846 864 int i; 865 int nt; 866 if (typeof(F)=="ideal"){nt=ncols(F);} 867 else{nt=size(F);} 868 847 869 def FF=F; 848 870 FF=F[1]; 849 for (i=2;i<=n cols(F);i++)871 for (i=2;i<=nt;i++) 850 872 { 851 873 if (not(memberpos(F[i],FF)[1])) … … 979 1001 poly g; int i; 980 1002 ideal Nb; ideal Na=N; 981 982 // begins incquotient983 1003 if (size(Na)==1) 984 1004 { … … 1055 1075 } 1056 1076 1077 // Auxiliary routine to define an order for ideals 1078 // Returns 1 if the ideal a is shoud precede ideal b by sorting them in idbefid order 1079 // 2 if the the contrary happen 1080 // 0 if the order is not relevant 1057 1081 proc idbefid(ideal a, ideal b) 1058 1082 { … … 1086 1110 } 1087 1111 1112 // sort a list of ideals using idbefid 1088 1113 proc sortlistideals(list L) 1089 1114 { … … 1139 1164 // the Prep of V(N)\V(M) 1140 1165 // Assumed to work in the ring @P of the parameters 1166 // Can be used without calling previously setglobalrings(). 1141 1167 proc Prep(ideal N, ideal M) 1142 1168 { 1169 int te; 1143 1170 if (N[1]==1) 1144 1171 { … … 1146 1173 } 1147 1174 def RR=basering; 1175 if(defined(@P)){te=1;} 1176 else{te=0; setglobalrings();} 1148 1177 setring(@P); 1149 1178 ideal Np=imap(RR,N); … … 1175 1204 if (size(prep)==0){prep=list(list(ideal(1),list(ideal(1))));} 1176 1205 setring(RR); 1177 return(imap(@P,prep)); 1206 def pprep=imap(@P,prep); 1207 if(te==0){kill @P; kill @R; kill @RP;} 1208 return(pprep); 1178 1209 } 1179 1210 … … 1187 1218 // the C-representaion of V(N)\V(M) = V(ida)\V(idb) 1188 1219 // Assumed to work in the ring @P of the parameters 1220 // If the routine is to be called from the top, a previous call to 1221 // setglobalrings() is needed. 1189 1222 proc PtoCrep(list L) 1190 1223 { … … 1293 1326 EXAMPLE: cgsdr; shows an example" 1294 1327 { 1328 int te; 1295 1329 def RR=basering; 1296 setglobalrings(); 1330 if(defined(@P)){te=1;} 1331 else{te=0; setglobalrings();} 1297 1332 // INITIALIZING OPTIONS 1298 1333 int i; int j; … … 1452 1487 } 1453 1488 } 1454 if( defined(@P)){kill @P; kill @R; kill @RP;}1489 if(te==0){kill @P; kill @R; kill @RP;} 1455 1490 return(GS); 1456 1491 } … … 1469 1504 1470 1505 // input: internal routine called by cgsdr at the end to group the 1471 // lpp segments and improve the output1506 // lpp segments and improve the output 1472 1507 // output: grouped segments by lpp obtained in cgsdr 1473 1508 proc grsegments(list T) … … 1505 1540 // input: ideal p, ideal q 1506 1541 // output: 1 if p contains q, 0 otherwise 1542 // If the routine is to be called from the top, a previous call to 1543 // setglobalrings() is needed. 1507 1544 proc idcontains(ideal p, ideal q) 1508 1545 { … … 1530 1567 // input: L (list of ideals) 1531 1568 // output: the list of integers corresponding to the minimal ideals in L 1569 // If the routine is to be called from the top, a previous call to 1570 // setglobalrings() is needed. 1532 1571 proc selectminideals(list L) 1533 1572 { … … 1568 1607 1569 1608 // LCUnion 1570 // Given a list of the P-representations of locally closed segments1609 // Given a list of the P-representations of disjoint locally closed segments 1571 1610 // for which we know that the union is also locally closed 1572 1611 // it returns the P-representation of its union … … 1576 1615 // output: P-representation of the union 1577 1616 // ((P_j,(P_j1,...,P_jk_j | j=1..t))) 1617 // If the routine is to be called from the top, a previous call to 1618 // setglobalrings() is needed. 1619 // Auxiliary routine called by grobcov and addcons 1620 // A previous call to setglobarings() is needed if it is to be used at the top. 1578 1621 proc LCUnion(list LL) 1579 1622 { 1580 1623 def RR=basering; 1581 1624 setring(@P); 1625 int care; 1582 1626 def L=imap(RR,LL); 1583 1627 int i; int j; int k; list H; list C; list T; 1584 list L0; list P0; list P; list Q0; list Q; 1628 list L0; list P0; list P; list Q0; list Q; intvec Qi; 1629 if(not(defined(@Q2))){list @Q2;} 1630 else{kill @Q2; list @Q2;} 1631 exportto(Top,@Q2); 1585 1632 for (i=1;i<=size(L);i++) 1586 1633 { … … 1592 1639 } 1593 1640 Q0=selectminideals(P0); 1641 //"T_3Q0="; Q0; 1642 kill P; list P; 1594 1643 for (i=1;i<=size(Q0);i++) 1595 1644 { 1596 Q[i]=L0[Q0[i]]; 1597 P[i]=L[Q[i][1]][Q[i][2]]; 1645 Qi=L0[Q0[i]]; 1646 Q[size(Q)+1]=Qi; 1647 P[size(P)+1]=L[Qi[1]][Qi[2]]; 1648 } 1649 @Q2=Q; 1650 if(size(P)==0) 1651 { 1652 setring(RR); 1653 list TT; 1654 return(TT); 1598 1655 } 1599 1656 // P is the list of the maximal components of the union … … 1611 1668 { 1612 1669 C[size(C)+1]=L[i][j]; 1670 C[size(C)][3]=intvec(i,j); 1613 1671 } 1614 1672 } 1615 1673 } 1616 T[size(T)+1]=list(Q[k],P[k][1],addpart(H,C)); 1617 } 1674 if(size(P[k])>=3){T[size(T)+1]=list(Q[k],P[k][1],addpart(H,C),P[k][3]);} 1675 else{T[size(T)+1]=list(Q[k],P[k][1],addpart(H,C));} 1676 } 1677 @Q2=sortpairs(@Q2); 1618 1678 setring(RR); 1619 1679 def TT=imap(@P,T); … … 1621 1681 } 1622 1682 1623 // Called by LCUnion to modify the holes of a primepart of the union 1683 // Auxiliary routine 1684 // called by LCUnion to modify the holes of a primepart of the union 1624 1685 // by the addition of the segments that do not correspond to that part 1625 1686 // Works on @P ring. … … 1627 1688 // H=(p_i1,..,p_is) the holes of a component to be transformed by the addition of 1628 1689 // the segments C that do not correspond to that component 1629 // C=((q_1,(q_11,..,q_1l_1)),..,(q_k,(q_k1,..,q_kl_k))) 1690 // C=((q_1,(q_11,..,q_1l_1),pos1),..,(q_k,(q_k1,..,q_kl_k),posk)) 1691 // posi=(i,j) position of the component 1630 1692 // the list of segments to be added to the holes 1631 1693 proc addpart(list H, list C) … … 1633 1695 list Q; int i; int j; int k; int l; int t; int t1; 1634 1696 Q=H; intvec notQ; list QQ; list addq; 1697 // @Q2=list of (i,j) positions of the components that have been aded to some hole of the maximal ideals 1698 // plus those of the components added to the holes. 1635 1699 ideal q; 1636 1700 i=1; … … 1645 1709 if (equalideals(q,C[j][1])) 1646 1710 { 1711 @Q2[size(@Q2)+1]=C[j][3]; 1647 1712 t=0; 1648 1713 for (k=1;k<=size(C[j][2]);k++) … … 1666 1731 { 1667 1732 addq[size(addq)+1]=C[j][2][k]; 1733 @Q2[size(@Q2)+1]=C[j][3]; 1668 1734 } 1669 1735 } … … 1697 1763 } 1698 1764 1699 // Called by addpart to finish the modification of the holes of a primepart1765 // Auxiliary routine called by addpart to finish the modification of the holes of a primepart 1700 1766 // of the union by the addition of the segments that do not correspond to 1701 1767 // that part. … … 1787 1853 } 1788 1854 1789 // specswellCrep 1790 // input: 1791 // given two corresponding polynomials g1 and g2 with the same lpp 1792 // g1 belonging to the basis in the segment ida1,idb1 1793 // g2 belonging to the basis in the segment ida2,idb2 1794 // output: 1795 // 1 if g1 spezializes well to g2 on the whole (ida2,idb2) segment 1796 // 0 if not 1797 proc specswellCrep(poly g1, poly g2, ideal ida2) 1798 { 1799 poly S; 1800 S=leadcoef(g2)*g1-leadcoef(g1)*g2; 1801 def RR=basering; 1802 setring(@RPt); 1803 def SR=imap(RR,S); 1804 def ida2R=imap(RR,ida2); 1805 attrib(ida2R,"isSB",1); 1806 poly S2R=reduce(SR,ida2R); 1807 setring(RR); 1808 def S2=imap(@RPt,S2R); 1809 if (S2==0){return(1);} // and (nonnullCrep(leadcoef(g1),ida2,idb2)) 1810 else {return(0);} 1811 } 1812 1855 // Auxiliary routine for grobcov: ideal F is assumed to be homogeneous 1813 1856 // gcover 1814 1857 // input: ideal F: a generating set of a homogeneous ideal in Q[a][x] … … 1881 1924 LCU=LCUnion(pairspP); 1882 1925 kill prep; list prep; 1926 kill crep; list crep; 1883 1927 for(k=1;k<=size(LCU);k++) 1884 1928 { … … 1945 1989 for(j=1;j<=size(B);j++) 1946 1990 { 1947 B[j]=pnormalf(B[j],crep[1], N);1991 B[j]=pnormalf(B[j],crep[1],crep[2]); 1948 1992 } 1949 1993 S[i]=list(lpp,B,prep,crep,lpph); … … 2015 2059 each point of the segment. With option (\"ext\",1) the 2016 2060 full representation of the bases is computed (possible 2017 sh aves) and sometimes a simpler result is obtained.2061 sheaves) and sometimes a simpler result is obtained. 2018 2062 \"rep\",0-1-2: The default is (\"rep\",0) and then the segments 2019 2063 are given in canonical P-representation. Option (\"rep\",1) … … 2204 2248 } 2205 2249 2206 // input. GC the grobcov of an ideal in generic representation of the2250 // Input. GC the grobcov of an ideal in generic representation of the 2207 2251 // bases computed with option option ("rep",2). 2208 // output The grobcov in full representation. 2209 // option ("comment",1) shows the time. 2252 // Output The grobcov in full representation. 2253 // Option ("comment",1) shows the time. 2254 // Can be called from the top 2210 2255 proc extend(list GC, list #); 2211 2256 "USAGE: extend(GC); When the grobcov of an ideal has been computed … … 2394 2439 } 2395 2440 2396 2441 // Auxiliary routine 2397 2442 // nonzerodivisor 2398 2443 // input: … … 2435 2480 } 2436 2481 2482 // Auxiliary routine 2437 2483 // deltai 2438 2484 // input: … … 2475 2521 } 2476 2522 2523 // Auxiliary routine 2477 2524 // combine 2478 2525 // input: a list of pairs ((p1,P1),..,(pr,Pr)) where … … 2498 2545 } 2499 2546 2547 // Auxiliary routine 2500 2548 // elimconstfac: eliminate the factors in the polynom f that are in K[a] 2501 2549 // input: … … 2523 2571 }; 2524 2572 2573 //Auxiliary routine 2525 2574 // nullin 2526 2575 // input: … … 2544 2593 } 2545 2594 2595 // Auxiliary routine 2546 2596 // monoms 2597 // Input: A polynomial f 2598 // Output: The list of leading terms 2547 2599 proc monoms(poly f) 2548 2600 { … … 2563 2615 } 2564 2616 2617 // Auxiliary routine called by extend 2565 2618 // extend0 2566 2619 // input: … … 2622 2675 } 2623 2676 2677 // Auxiliary routine 2624 2678 // findindexpolys 2625 2679 // input: … … 2670 2724 } 2671 2725 2726 // Auxiliary routine 2672 2727 // extendcoef: given Q,P in K[a] where P/Q specializes on an open and dense subset 2673 2728 // of the whole V(p1 int...int pr), it returns a basis of the module … … 2698 2753 } 2699 2754 2755 // Auxiliary routine 2700 2756 // selectregularfun 2701 2757 // input: … … 2755 2811 } 2756 2812 2813 // Auxiliary routine 2757 2814 // searchinlist 2758 2815 // input: … … 2776 2833 } 2777 2834 2835 // Auxiliary routine 2778 2836 // comb: the list of combinations of elements (1,..n) of order p 2779 2837 proc comb(int n, int p) … … 2812 2870 } 2813 2871 2872 // Auxiliary routine 2814 2873 // selectminsheaves 2815 2874 // Input: L=((v_11,..,v_1k_1),..,(v_s1,..,v_sk_s)) … … 2834 2893 } 2835 2894 2895 // Auxiliary routine 2836 2896 // smsheaves 2837 2897 // Input: … … 2868 2928 } 2869 2929 2930 // Auxiliary routine 2870 2931 // allsheaves 2871 2932 // Input: L=((v_11,..,v_1k_1),..,(v_s1,..,v_sk_s)) … … 2910 2971 } 2911 2972 2973 // Auxiliary routine 2912 2974 // numones 2913 2975 // Input: … … 2926 2988 } 2927 2989 2990 // Auxiliary routine 2928 2991 // pos 2929 2992 // Input: intvec p of zeros and ones … … 2940 3003 } 2941 3004 3005 // Auxiliary routine 2942 3006 // actualize: actualizes zeroes of p 2943 3007 // Input: … … 2957 3021 } 2958 3022 3023 // Auxiliary routine 2959 3024 // combrep 2960 3025 // Input: V=(n_1,..,n_i) … … 2990 3055 } 2991 3056 3057 // Auxiliary routine 2992 3058 proc reducemodN(poly f,ideal E) 2993 3059 { … … 3005 3071 } 3006 3072 3073 // Auxiliary routine 3007 3074 // intersp: computes the intersection of the ideals in S in @P 3008 3075 proc intersp(list S) … … 3017 3084 } 3018 3085 3086 // Auxiliary routine 3019 3087 // radicalmember 3020 3088 proc radicalmember(poly f,ideal ida) … … 3039 3107 } 3040 3108 3109 // Auxiliary routine 3041 3110 // NonNull: returns 1 if the poly f is nonnull on V(E)\V(N), 0 otherwise. 3042 3111 proc NonNull(poly f, ideal E, ideal N) … … 3059 3128 } 3060 3129 3130 // Auxiliary routine 3061 3131 // selectextendcoef 3062 3132 // input: … … 3117 3187 } 3118 3188 3189 // Auxiliary routine 3119 3190 // input: 3120 3191 // ideal E1: in some basering (depends only on the parameters) … … 3133 3204 } 3134 3205 3206 // Auxiliary routine 3135 3207 // reform 3136 3208 // input: … … 3216 3288 } 3217 3289 3290 // Auxiliary routine 3218 3291 // nonnullCrep 3219 3292 proc nonnullCrep(poly f0,ideal ida0,ideal idb0) … … 3238 3311 } 3239 3312 3313 // Auxiliary routine 3240 3314 // precombint 3241 3315 // input: L: list of ideals (works in @P) … … 3284 3358 } 3285 3359 3286 // precombinediscussion 3287 // not used, can be deleted 3288 // input: list L: the LCU segment with bases for each pi component 3289 // output: intvec vv: vv[1]=(1 if the generic polynomial of the vv[2] 3290 // component already specializes well, 3291 // 0 if combine is to be used) 3292 // vv[2]=selind, the index for which the generic basis 3293 // already specializes well if combine is not to be used (vv[1]=1). 3294 proc precombinediscussion(L,crep) 3295 { 3296 int tes=1; int selind; int i1; int j1; poly p; poly lcp; intvec vv; 3297 if (size(L)==1){vv=1,1; return(vv);} 3298 for (i1=1;i1<=size(L);i1++) 3299 { 3300 tes=1; 3301 p=L[i1][2]; 3302 lcp=leadcoef(p); 3303 3304 3305 if(nonnullCrep(lcp,crep[1],crep[2])) 3306 { 3307 for(j1=1;j1<=size(L);j1++) 3308 { 3309 if(i1!=j1) 3310 { 3311 if(specswellCrep(p,L[j1][2],L[j1][1])==0){tes=0; break;} 3312 } 3313 } 3314 } 3315 else{tes=0;} 3316 if(tes){selind=i1; break;} 3317 } 3318 vv=tes,selind; 3319 return(vv); 3320 } 3321 3360 3361 // Auxiliary routine 3322 3362 // minAssGTZ eliminating denominators 3323 3363 proc minGTZ(ideal N); … … 3337 3377 //********************* Begin KapurSunWang ************************* 3338 3378 3379 // Auxiliary routine 3339 3380 // inconsistent 3340 3381 // Input: … … 3372 3413 } 3373 3414 3415 // Auxiliary routine 3374 3416 // MDBasis: Minimal Dickson Basis 3375 3417 proc MDBasis(ideal G) … … 3397 3439 } 3398 3440 3441 // Auxiliary routine 3399 3442 // primepartZ 3400 3443 proc primepartZ(poly f); … … 3497 3540 } 3498 3541 3542 // Auxiliary routine 3499 3543 // sqf 3500 3544 // This is for releases of Singular before 3-5-1 … … 3516 3560 // } 3517 3561 3562 // Auxiliary routine 3518 3563 // sqf 3519 3564 proc sqf(poly f) … … 3529 3574 3530 3575 3576 // Auxiliary routine 3531 3577 // KSW0: Kapur-Sun-Wang algorithm for computing a CGS, called by KSW 3532 3578 // Input: … … 3575 3621 { 3576 3622 if(comment>1){"Basis 1 is found"; E; N;} 3577 return(E0,N0,ideal(1)); 3578 } 3623 list KK; KK[1]=list(E0,N0,ideal(1)); 3624 return(KK); 3625 } 3579 3626 ideal Gr; ideal Gm; ideal GM; 3580 3627 for (i=1;i<=size(G);i++) … … 3654 3701 } 3655 3702 3703 // Auxiliary routine 3656 3704 // KSWtocgsdr 3657 3705 proc KSWtocgsdr(list L) … … 3672 3720 } 3673 3721 3722 // Auxiliary routine 3674 3723 // KtoPrep 3675 3724 // Computes the P-representaion of a K-representation (N,W) of a set … … 3720 3769 } 3721 3770 3771 // Auxiliary routine 3722 3772 // groupKSWsegments 3723 3773 // input: the list of vertices of KSW … … 3754 3804 3755 3805 //******************** Begin locus ****************************** 3756 3757 3806 3758 3807 // indepparameters … … 3777 3826 } 3778 3827 3779 3780 // dimP0: Auxiliar routine 3828 // dimP0: Auxiliary routine 3781 3829 // if the dimension in @P of an ideal in the parameters has dimension 0 then it returns 0 3782 3830 // else it retuns 1 … … 3794 3842 } 3795 3843 3796 // Auxiliar routine.3844 // Auxiliary routine. 3797 3845 // input: ideals E and F (assumed in ring @P 3798 3846 // returns: 1 if ideal E is contained in ideal F (assumed F is std basis) … … 3817 3865 } 3818 3866 3819 // AddCons: given a set of locally closed components of a selection of 3820 // segments of the Grobner cover, it builds the canonical P-representation 3821 // of the corresponding constructible set, including levels it they are 3822 // input: a list L of a selection of segments of the Groebner cover 3823 // given a a set of components of the form 3824 // ( (p_1,(p_11,..,p_1k_1).. (p_s,(p_s1,..,p_sk_s)) 3825 // output: The canonical P-representation of adding the given components. 3826 proc AddCons(list L) 3827 { 3828 // First step: Selecting the top varieties 3829 list L1; list L2; list LL; int i; int j; int t; 3830 list Lend; 3867 // addcons: given a set of locally closed sets given in P-representation, 3868 // (particularly a subset of components of a selection of segments 3869 // of the Grobner cover), it builds the canonical P-representation 3870 // of the corresponding constructible set, of its union, including levels it they are. 3871 // input: a list L of disjoint segments (for exmple a selection of segments of the Groebner cover) 3872 // of the form 3873 // ( ( (p1_1,(p1_11,..,p1_1k_1).. (p1_s,(p1_s1,..,p1_sk_s)),.., 3874 // ( (pn_1,(pn_11,..,pn_1j_1).. (pn_s,(pn_s1,..,pn_sj_s)) ) 3875 // output: The canonical P-representation of the constructible set resulting by 3876 // adding the given components. 3877 // The first element of each component can be ignored. It is only for internal use. 3878 // The fifth element of each component is the level of the constructible set 3879 // of the component. 3880 // It is no need a previous call to setglobalrings() 3881 proc addcons(list L) 3882 "USAGE: addcons( ( ( (p1_1,(p1_11,..,p1_1k_1).. (p1_s,(p1_s1,..,p1_sk_s)),.., 3883 ( (pn_1,(pn_11,..,pn_1j_1).. (pn_s,(pn_s1,..,pn_sj_s)) ) ) 3884 a list L of locally closed sets in P-representation 3885 RETURN: the canonical P-representation of the constructible set of the union. 3886 NOTE: It is called internally by the routines locus, locusdg, 3887 3888 KEYWORDS: P-representation, constructible set 3889 EXAMPLE: adccons; shows an example" 3890 { 3891 int te; 3892 if(defined(@P)){te=1;} 3893 else{setglobalrings();} 3894 list notadded; list P0; 3895 int i; int j; int k; int l; 3896 intvec v; intvec v1; intvec v0; 3897 ideal J; list K; 3831 3898 for(i=1;i<=size(L);i++) 3832 3899 { 3833 t=1; 3834 for(j=1;j<=size(L);j++) 3835 { 3836 if(i!=j) 3837 { 3838 if(containedideal(L[j][1],L[i][1])==1) 3839 {t=0; 3840 // "the ideal "; L[j][1]; "is contained in ideal "; L[i][1]; 3841 j=size(L); 3842 } 3843 } 3844 } 3845 if(t==1){L1[size(L1)+1]=L[i];} 3846 else{L2[size(L2)+1]=L[i];} 3847 } 3848 // Second step: Adding segments to obtain a locally closed sets for each level 3849 int lev=1; 3850 if(size(L2)==0) 3851 { 3852 for(i=1;i<=size(L1);i++) 3900 for(j=1;j<=size(L[i]);j++) 3901 { 3902 v=i,j; 3903 notadded[size(notadded)+1]=v; 3904 } 3905 } 3906 //"T_notadded="; notadded; 3907 int level=1; 3908 list P=L; 3909 list LL; 3910 list Ln; 3911 //int cont=0; 3912 while(size(notadded)>0) 3913 { 3914 kill notadded; list notadded; 3915 for(i=1;i<=size(P);i++) 3916 { 3917 for(j=1;j<=size(P[i]);j++) 3918 { 3919 v=i,j; 3920 notadded[size(notadded)+1]=v; 3921 } 3922 } 3923 //"T_notadded="; notadded; 3924 //cont++; 3925 P0=P; 3926 Ln=LCUnion(P); 3927 //"T_Ln="; Ln; 3928 notadded=minuselements(notadded,@Q2); 3929 //"T_@Q2="; @Q2; 3930 //"T_notadded="; notadded; 3931 for(i=1;i<=size(Ln);i++) 3853 3932 { 3854 if(size(L1[i])>=3)3855 {L1[i][3]=string(string(L1[i][3]),",",lev);}3856 else{L1[i][3]=string(lev);}3933 //Ln[i][4]= ; JA HAURIA DE VENIR DE LCUnion 3934 Ln[i][5]=level; 3935 LL[size(LL)+1]=Ln[i]; 3857 3936 } 3858 return(L1); 3859 } 3860 while(size(L2)>0) 3861 { 3862 LL=addtolocalclosed(L1,L2); 3863 for(i=1;i<=size(LL[1]);i++) 3937 i=0;j=0; 3938 v=0,0; 3939 v0=0,0; 3940 kill P; list P; 3941 for(l=1;l<=size(notadded);l++) 3864 3942 { 3865 if(size(LL[1][i])>=3) 3866 {LL[1][i][3]=string(string(LL[1][i][3]),",",lev);} 3867 else{LL[1][i][3]=string(lev);} 3868 Lend[size(Lend)+1]=LL[1][i]; 3943 v1=notadded[l]; 3944 if(v1[1]<>v0[1]){i++;j=1; P[i]=K;} // list P[i]; 3945 else 3946 { 3947 if(v1[2]<>v0[2]) 3948 { 3949 j=j+1; 3950 } 3951 } 3952 v=i,j; 3953 //"T_v1="; v1; 3954 P[i][j]=K; P[i][j][1]=J; P[i][j][2]=K; 3955 P[i][j][1]=P0[v1[1]][v1[2]][1]; 3956 //"T_P0[v1[1]][v1[2]][2]="; P0[v1[1]][v1[2]][2]; 3957 //"T_size(P0[v1[1]][v1[2]][2])="; size(P0[v1[1]][v1[2]][2]); 3958 for(k=1;k<=size(P0[v1[1]][v1[2]][2]);k++) 3959 { 3960 P[i][j][2][k]=P0[v1[1]][v1[2]][2][k]; 3961 //string("T_P[",i,"][",j,"][2][",k,"]="); P[i][j][2][k]; 3962 } 3963 v0=v1; 3964 //"T_P_1="; P; 3869 3965 } 3870 L2=LL[2]; 3871 lev++; 3872 } 3873 return(Lend); 3874 } 3875 3876 // input: Two lists of P-components to be added. 3877 // L1 contains the top components, and L2 the remaining components 3878 // each of the form ( (p_1,(p_11,..,p_1k_1).. (p_s,(p_s1,..,p_sk_s)) 3879 // output: A list of two lists: 3880 // The first one contains the P-representation of the top components added 3881 // The second contains the components that have not yet been added when 3882 // the total subset is not locally closed. If so addtolocalclosed is to be called 3883 // at new after separating the new top and remaining components in order 3884 // to compute the next level of the constructible set. 3885 // The input and the output must be in the ring @P of parameters. 3886 proc addtolocalclosed(list L1,list L2) 3887 { 3888 // Second step: Adding segments to obtain a locally closed set 3889 // L1 contains the top components (ideals and descendants) 3890 // L2 contains the nontop components (ideals and descendants) 3891 list LL; int i; int j; int t; intvec Added; int mesvoltes=1; intvec alreadyadded; list LN; 3892 int k; int l; int m; ideal top; ideal hole; ideal nhole; intvec nottoadd; int t0; list h; 3893 LL=L1; 3894 LN=L2; 3895 while(mesvoltes) 3896 { 3897 //"volta"; 3898 for(i=1;i<=size(L1);i++) 3899 { 3900 Added=Added,alreadyadded; 3901 Added=sort(elimrepeatedvl(Added))[1]; 3902 kill alreadyadded; intvec alreadyadded; 3903 top=LL[i][1][1]; 3904 j=1; 3905 while(j<=size(LL[i][2])) 3906 { 3907 kill nottoadd; intvec nottoadd; 3908 hole=LL[i][2][j]; 3909 t0=1; 3910 k=1; 3911 while(t0 and k<=size(LN)) 3912 { 3913 if (equalideals(hole,LN[k][1])==1) 3914 { 3915 t0=0; 3916 if(alreadyadded==intvec(0)){alreadyadded[1]=k;} 3917 else{alreadyadded[size(alreadyadded)+1]=k;} 3918 LL[i][2]=elimfromlist(LL[i][2],j); 3919 j=j-1; 3920 for(l=1;l<=size(LN[k][2]);l++) 3921 { 3922 nhole=LN[k][2][l],LL[i][1]; 3923 nhole=std(nhole); 3924 t=1; m=1; 3925 while(t and m<=size(LL[i][2])) 3926 { 3927 if(containedideal(LL[i][2][m],nhole)==1) 3928 { 3929 t=0; 3930 } 3931 m++; 3932 } 3933 if(t==0){nottoadd[size(nottoadd)+1]=l;} 3934 } 3935 for(m=1;m<=size(LN[k][2]);m++) 3936 { 3937 if(memberpos(m,nottoadd)[1]==0) 3938 { 3939 LL[i][2][size(LL[i][2])+1]=LN[k][2][m]; 3940 } 3941 } 3942 } 3943 k++; 3944 3945 } 3946 j++; 3947 } 3948 if(size(LL[i][2])==0 and size(LL[i][1])>0){LL[i][2][1]=ideal(1);} 3949 } 3950 h=1,1; 3951 while((h[1]==1) and (alreadyadded!=intvec(0))) 3952 { 3953 h=memberpos(0,alreadyadded); 3954 if(h[1]==1){alreadyadded=elimfromlist(alreadyadded,h[2]);} 3955 } 3956 if(alreadyadded!=intvec(0)) 3957 {alreadyadded=sort(elimrepeatedvl(alreadyadded))[1];} 3958 if(Added==intvec(0)){Added=alreadyadded;} 3959 else{ 3960 Added=Added,alreadyadded; 3961 Added=sort(elimrepeatedvl(Added))[1]; 3962 } 3963 h=1,1; 3964 while((h[1]==1) and (Added!=intvec(0))) 3965 { 3966 h=memberpos(0,Added); 3967 if(h[1]==1){Added=elimfromlist(Added,h[2]);} 3968 } 3969 if (alreadyadded==intvec(0)) 3970 { 3971 mesvoltes=0; 3972 } 3973 } 3974 if(Added!=intvec(0)){Added=sort(elimrepeatedvl(Added))[1]; } 3975 if(Added!=intvec(0)) 3976 { 3977 for(i=1;i<=size(Added);i++) 3978 { 3979 if(size(LN)>0){LN=elimfromlist(LN,Added[size(Added)+1-i]);} 3980 } 3981 } 3982 for (i=1;i<=size(LL);i++) 3983 { 3984 for(j=1;j<=size(LL[i][2]);j++) 3985 { 3986 hole=LL[i][2][j]; 3987 for (k=1;k<=size(LL);k++) 3988 { 3989 if(k!=i) 3990 { 3991 if(containedideal(LL[k][1],hole)) 3992 { 3993 LL[i][2]=elimfromlist(LL[i][2],j); 3994 for(l=1;l<=size(LL[k][2]);l++) 3995 { 3996 nhole=hole,LL[k][2][l]; 3997 nhole=std(nhole); 3998 if(equalideals(nhole,ideal(1))==0) 3999 { 4000 m=1; t=1; 4001 while(t and m<size(LL[i][2])) 4002 { 4003 if(containedideal(LL[i][2][m],nhole)){t=0;} 4004 m++; 4005 } 4006 if(t==1){LL[i][2][size(LL[i][2])+1]=nhole;} 4007 } 4008 } 4009 } 4010 } 4011 } 4012 } 4013 } 4014 LL[1]=LL; LL[2]=LN; 3966 //"T_P="; P; 3967 level++; 3968 //if(cont>3){break;} 3969 //kill notadded; list notadded; 3970 } 3971 if(defined(@Q2)){kill @Q2;} 3972 if(te==0){kill @P; kill @R; kill @RP;} 3973 //"T_LL_sortida addcons="; LL; "Fi sortida"; 4015 3974 return(LL); 4016 3975 } 4017 4018 // locus(G): Special routine for determining the locus of points 4019 // of objects. Given a parametric ideal J with 4020 // parameters (a_1,..a_m) and variables (x_1,..,xn), 4021 // representing the system determining 4022 // the locus of points (a_1,..,a_m)) who verify certain 4023 // properties, computing the grobcov G of 4024 // J and applying to it locus, determines the different 4025 // classes of locus components. They can be 4026 // Normal, Special, Accumulation point, Degenerate. 4027 // The output are the components given in P-canonical form 4028 // of at most 4 constructible sets: Normal, Special, Accumulation, 4029 // Degenerate. 4030 // The description of the algorithm and definitions will be 4031 // given in a forthcoming paper by Abanades, Botana, Montes Recio. 4032 4033 // input: The output G of the grobcov (in generic representation, which is the default) 3976 example 3977 { 3978 "EXAMPLE:"; echo = 2; 3979 ring R=(0,a,b),(x1,y1,x2,y2,p,r),dp; 3980 ideal S93=(a+1)^2+b^2-(p+1)^2, 3981 (a-1)^2+b^2-(1-r)^2, 3982 a*y1-b*x1-y1+b, 3983 a*y2-b*x2+y2-b, 3984 -2*y1+b*x1-(a+p)*y1+b, 3985 2*y2+b*x2-(a+r)*y2-b, 3986 (x1+1)^2+y1^2-(x2-1)^2-y2^2; 3987 short=0; 3988 "System S93="; S93; " "; 3989 def GC93=grobcov(S93); 3990 "grobcov(S93)="; GC93; " "; 3991 int i; 3992 list H; 3993 for(i=1;i<=size(GC93);i++){H[i]=GC93[i][3];} 3994 "H="; H; 3995 "addcons(H)="; addcons(H); 3996 } 3997 3998 // Takes a list of intvec and sorts it and eliminates repeated elements. 3999 // Auxiliary routine used in addcons 4000 proc sortpairs(L) 4001 { 4002 def L1=sort(L); 4003 def L2=elimrepeated(L1[1]); 4004 return(L2); 4005 } 4006 4007 // Eliminates the pairs of L1 that are also in L2. 4008 // Auxiliary routine used in addcons 4009 proc minuselements(list L1,list L2) 4010 { 4011 int i; 4012 list L3; 4013 for (i=1;i<=size(L1);i++) 4014 { 4015 if(not(memberpos(L1[i],L2)[1])){L3[size(L3)+1]=L1[i];} 4016 } 4017 return(L3); 4018 } 4019 4020 // locus0(G): Private routine used by locus (the public routine), that 4021 // builds the diferent components. 4022 // input: The output G of the grobcov (in generic representation, which is the default option) 4034 4023 // output: 4035 4024 // list, the canonical P-representation of the Normal and Non-Normal locus: 4036 4025 // The Normal locus has two kind of components: Normal and Special. 4037 4026 // The Non-normal locus has two kind of components: Accumulation and Degenerate. 4038 // Normal components: for each point in the component, 4039 // the number of solutions in the variables is finite, and 4040 // the solutions depend on the point in the component if the component is not 0-dimensional. 4041 // Special components: for each point in the component, 4042 // the number of solutions in the variables is finite, 4043 // the component is not 0-dimensional, but the solutions do not depend on the 4044 // values of the parameters in the component. 4045 // Accumlation points: are 0-dimensional components for which it exist 4046 // an infinite number of solutions. 4047 // Degenerate components: are components of dimension greater than 0 for which 4048 // for every point in the component there exist infinite solutions. 4027 // This routine is compemented by locus that calls it in order to eliminate problems 4028 // with degenerate points of the mover. 4049 4029 // The output components are given as 4050 4030 // ((p1,(p11,..p1s_1),type_1,level_1),..,(pk,(pk1,..pks_k),type_k,level_k) … … 4052 4032 // If all levels of a class of locus are 1, then the set is locally closed. Otherwise the level 4053 4033 // gives the depth of the component. 4054 proc locus(list GG, list #) 4055 "USAGE: locus(G); 4056 The input must be the grobcov of a parametrical ideal 4057 RETURN: The locus. 4058 The output are the components of two constructible subsets of the locus 4059 of the parametrical system.: Normal and Non-normal. 4060 These components are 4061 given as a list of (pi,(pi1,..pis_i),type_i,level_i) varying i, 4062 where the p's are prime ideals, the type can be: Normal, Special, 4063 Accumulation, Degenerate. 4064 NOTE: It can only be called after computing the grobcov of the 4065 parametrical ideal in generic representation ('ext',0), 4066 which is the default. 4067 The basering R, must be of the form Q[a_1,..,a_m][x_1,..,x_n]. 4068 KEYWORDS: geometrical locus, locus, loci. 4069 EXAMPLE: locus; shows an example" 4034 proc locus0(list GG, list #) 4070 4035 { 4071 4036 int t1=1; int t2=1; 4072 4037 def R=basering; 4073 4038 int moverdim=nvars(R); 4039 list HHH; 4040 if (GG[1][1][1]==1 and GG[1][2][1]==1 and GG[1][3][1][1][1]==0 and GG[1][3][1][2][1]==1){return(HHH);} 4074 4041 list Lop=#; 4075 4042 if(size(Lop)>0){moverdim=Lop[1];} … … 4077 4044 list G1; list G2; 4078 4045 def G=GG; 4046 list Q1; list Q2; 4079 4047 int i; int d; int j; int k; 4080 4048 t1=1; … … 4082 4050 { 4083 4051 attrib(G[i][1],"IsSB",1); 4084 //d=dim(std(G[i][1]));4085 // ULL4086 4052 d=locusdim(G[i][2],moverdim); 4087 4053 if(d==0){G1[size(G1)+1]=G[i];} … … 4131 4097 P1[i][3][j]=P1[i][3][j]*h[k]; 4132 4098 } 4133 //P1[i][3][j]=normalize(P1[i][3][j]);4134 4099 } 4135 4100 } 4136 4101 } 4137 4102 else{list P1;} 4103 ideal BB; 4138 4104 for(i=1;i<=size(P1);i++) 4139 4105 { … … 4149 4115 } 4150 4116 } 4117 list l; 4118 for(i=1;i<=size(P1);i++){Q1[i]=l; Q1[i][1]=P1[i];} P1=Q1; 4119 for(i=1;i<=size(P2);i++){Q2[i]=l; Q2[i][1]=P2[i];} P2=Q2; 4120 4151 4121 setring @P; 4152 // CANVIAR4122 ideal J; 4153 4123 if(t1==1) 4154 4124 { 4155 4125 def C1=imap(R,P1); 4156 def L1= AddCons(C1);4126 def L1=addcons(C1); 4157 4127 } 4158 4128 else{list C1; list L1; kill P1; list P1;} … … 4160 4130 { 4161 4131 def C2=imap(R,P2); 4162 def L2= AddCons(C2);4132 def L2=addcons(C2); 4163 4133 } 4164 4134 else{list L2; list C2; kill P2; list P2;} 4165 4135 for(i=1;i<=size(L2);i++) 4166 4136 { 4167 d=dim(std(L2[i][1])); 4137 J=std(L2[i][2]); 4138 d=dim(J); // AQUI 4168 4139 if(d==0) 4169 4140 { 4170 L2[i][ 3]=string("Accumulation,",L2[i][3]);4171 } 4172 else{L2[i][ 3]=string("Degenerate,",L2[i][3]);}4141 L2[i][4]=string("Accumulation",L2[i][4]); 4142 } 4143 else{L2[i][4]=string("Degenerate",L2[i][4]);} 4173 4144 } 4174 4145 list LN; … … 4185 4156 for(i=1;i<=size(L);i++){if(size(L[i][2])==0){L[i][2]=ideal(1);}} 4186 4157 kill @R; kill @RP; kill @P; 4187 return(L); 4188 } 4189 example 4190 {"EXAMPLE:"; echo = 2; 4191 ring R=(0,a,b),(x,y),dp; 4192 short=0; 4193 "Concoid"; 4194 ideal S96=x^2+y^2-4,(b-2)*x-a*y+2*a,(a-x)^2+(b-y)^2-1; 4195 "System="; S96; " "; 4196 locus(grobcov(S96)); 4197 } 4198 4199 4200 // locusto: Transforms the output of locus to a string that 4201 // can be read by different computational systems. 4202 // input: 4203 // list L: The output of locus 4158 list LL; 4159 for(i=1;i<=size(L);i++) 4160 { 4161 LL[i]=l; 4162 LL[i]=elimfromlist(L[i],1); 4163 } 4164 return(LL); 4165 } 4166 4167 // locus0dg(G): Private routine used by locusdg (the public routine), that 4168 // builds the diferent components used in Dynamical Geometry 4169 // input: The output G of the grobcov (in generic representation, which is the default option) 4204 4170 // output: 4205 // string s: The output of locus converted to a string readable by other programs 4206 proc locusto(list L) 4207 "USAGE: locusto(G); 4208 The argument must be the output of locus of a parametrical ideal 4209 It transforms the output into a string in standard form 4210 readable in many languages (Geogebra). 4211 4212 RETURN: The locus in string standard form 4213 NOTE: It can only be called after computing the locus(grobcov(F)) of the 4214 parametrical ideal. 4215 The basering R, must be of the form Q[a,b,..][x,y,..]. 4216 KEYWORDS: geometrical locus, locus, loci. 4217 EXAMPLE: locusto; shows an example" 4218 { 4219 int i; int j; int k; 4220 string s; 4221 s="["; 4222 ideal p; 4223 ideal q; 4171 // list, the canonical P-representation of the Relevant components of the locus in Dynamical Geometry, 4172 // i.e. the Normal and Accumulation components. 4173 // This routine is compemented by locusdg that calls it in order to eliminate problems 4174 // with degenerate points of the mover. 4175 // The output components are given as 4176 // ((p1,(p11,..p1s_1),type_1,level_1),..,(pk,(pk1,..pks_k),type_k,level_k) 4177 // whwre type_i is always "Relevant". 4178 // The components are given in canonical P-representation of the subset. 4179 // If all levels of a class of locus are 1, then the set is locally closed. Otherwise the level 4180 // gives the depth of the component. 4181 proc locus0dg(list GG, list #) 4182 { 4183 int t1=1; int t2=1; int ojo; 4184 def R=basering; 4185 int moverdim=nvars(R); 4186 list HHH; 4187 if (GG[1][1][1]==1 and GG[1][2][1]==1 and GG[1][3][1][1][1]==0 and GG[1][3][1][2][1]==1){return(HHH);} 4188 list Lop=#; 4189 if(size(Lop)>0){moverdim=Lop[1];} 4190 setglobalrings(); 4191 list G1; list G2; 4192 def G=GG; 4193 list Q1; list Q2; 4194 int i; int d; int j; int k; 4195 t1=1; 4196 for(i=1;i<=size(G);i++) 4197 { 4198 attrib(G[i][1],"IsSB",1); 4199 d=locusdim(G[i][2],moverdim); 4200 if(d==0){G1[size(G1)+1]=G[i];} 4201 else 4202 { 4203 if(d>0){G2[size(G2)+1]=G[i];} 4204 } 4205 } 4206 if(size(G1)==0){t1=0;} 4207 if(size(G2)==0){t2=0;} 4208 setring(@RP); 4209 if(t1) 4210 { 4211 list G1RP=imap(R,G1); 4212 } 4213 else {list G1RP;} 4214 list P1RP; 4215 ideal B; 4216 for(i=1;i<=size(G1RP);i++) 4217 { 4218 kill B; 4219 ideal B; 4220 for(k=1;k<=size(G1RP[i][3]);k++) 4221 { 4222 attrib(G1RP[i][3][k][1],"IsSB",1); 4223 G1RP[i][3][k][1]=std(G1RP[i][3][k][1]); 4224 for(j=1;j<=size(G1RP[i][2]);j++) 4225 { 4226 B[j]=reduce(G1RP[i][2][j],G1RP[i][3][k][1]); 4227 } 4228 P1RP[size(P1RP)+1]=list(G1RP[i][3][k][1],G1RP[i][3][k][2],B); 4229 } 4230 } 4231 setring(R); 4232 ideal h; 4233 if(t1) 4234 { 4235 def P1=imap(@RP,P1RP); 4236 for(i=1;i<=size(P1);i++) 4237 { 4238 for(j=1;j<=size(P1[i][3]);j++) 4239 { 4240 h=factorize(P1[i][3][j],1); 4241 P1[i][3][j]=h[1]; 4242 for(k=2;k<=size(h);k++) 4243 { 4244 P1[i][3][j]=P1[i][3][j]*h[k]; 4245 } 4246 } 4247 } 4248 } 4249 else{list P1;} 4250 ideal BB; 4251 for(i=1;i<=size(P1);i++) 4252 { 4253 if (indepparameters(P1[i][3])==1){P1[i][3]="Special";} 4254 else{P1[i][3]="Relevant";} 4255 } 4256 list P2; 4257 for(i=1;i<=size(G2);i++) 4258 { 4259 for(k=1;k<=size(G2[i][3]);k++) 4260 { 4261 P2[size(P2)+1]=list(G2[i][3][k][1],G2[i][3][k][2]); 4262 } 4263 } 4264 list l; 4265 for(i=1;i<=size(P1);i++){Q1[i]=l; Q1[i][1]=P1[i];} P1=Q1; 4266 for(i=1;i<=size(P2);i++){Q2[i]=l; Q2[i][1]=P2[i];} P2=Q2; 4267 4268 setring @P; 4269 ideal J; 4270 if(t1==1) 4271 { 4272 def C1=imap(R,P1); 4273 def L1=addcons(C1); 4274 } 4275 else{list C1; list L1; kill P1; list P1;} 4276 if(t2==1) 4277 { 4278 def C2=imap(R,P2); 4279 def L2=addcons(C2); 4280 } 4281 else{list L2; list C2; kill P2; list P2;} 4282 for(i=1;i<=size(L2);i++) 4283 { 4284 J=std(L2[i][2]); 4285 d=dim(J); // AQUI 4286 if(d==0) 4287 { 4288 L2[i][4]=string("Relevant",L2[i][4]); 4289 } 4290 else{L2[i][4]=string("Degenerate",L2[i][4]);} 4291 } 4292 list LN; 4293 list ll; list l0; 4294 if(t1==1) 4295 { 4296 for(i=1;i<=size(L1);i++) 4297 { 4298 if(L1[i][4]=="Relevant") 4299 { 4300 LN[size(LN)+1]=l0; 4301 LN[size(LN)][1]=L1[i]; 4302 } 4303 } 4304 } 4305 if(t2==1) 4306 { 4307 for(i=1;i<=size(L2);i++) 4308 { 4309 if(L2[i][4]=="Relevant") 4310 { 4311 LN[size(LN)+1]=l0; 4312 LN[size(LN)][1]=L2[i]; 4313 } 4314 } 4315 } 4316 list LNN; 4317 kill ll; list ll; list lll; list llll; 4318 for(i=1;i<=size(LN);i++) 4319 { 4320 LNN[size(LNN)+1]=l0; 4321 ll=LN[i][1]; lll[1]=ll[2]; lll[2]=ll[3]; lll[3]=ll[4]; LNN[size(LNN)][1]=lll; 4322 } 4323 kill LN; list LN; 4324 LN=addcons(LNN); 4325 if(size(LN)==0){ojo=1;} 4326 setring(R); 4327 if(ojo==1){list L;} 4328 else 4329 { 4330 def L=imap(@P,LN); 4331 for(i=1;i<=size(L);i++){if(size(L[i][2])==0){L[i][2]=ideal(1);}} 4332 } 4333 kill @R; kill @RP; kill @P; 4334 list LL; 4224 4335 for(i=1;i<=size(L);i++) 4225 4336 { 4226 s=string(s,"[["); 4227 for (j=1;j<=size(L[i][1]);j++) 4228 { 4229 s=string(s,L[i][1][j],","); 4230 } 4231 s[size(s)]="]"; 4232 s=string(s,",["); 4233 for(j=1;j<=size(L[i][2]);j++) 4234 { 4235 s=string(s,"["); 4236 for(k=1;k<=size(L[i][2][j]);k++) 4237 { 4238 s=string(s,L[i][2][j][k],","); 4239 } 4240 s[size(s)]="]"; 4241 s=string(s,","); 4242 } 4243 s[size(s)]="]"; 4244 s=string(s,"]"); 4245 if(size(L[i])>=3) 4246 { 4247 s[size(s)]=","; 4248 s=string(s,string(L[i][3]),"]"); 4249 } 4250 if(size(L[i])>=4) 4251 { 4252 s[size(s)]=","; 4253 s=string(s,string(L[i][4]),"],"); 4254 } 4255 s[size(s)]="]"; 4256 s=string(s,","); 4257 } 4258 s[size(s)]="]"; 4259 return(s); 4260 } 4261 example 4262 {"EXAMPLE:"; echo = 2; 4263 ring R=(0,a,b),(x,y),dp; 4264 short=0; 4265 ideal S96=x^2+y^2-4,(b-2)*x-a*y+2*a,(a-x)^2+(b-y)^2-1; 4266 "System="; S96; " "; 4267 locusto(locus(grobcov(S96))); 4268 } 4269 4270 // locusdg is the routine for computing the locus in dinamical geometry. 4271 // It detects automatically a possible point that is to be avoided by the mover, 4272 // whose coordinates must be the last coordinates in the definition of the ring (2 last by default, 4273 // or the dd last if the option locusdg(G,dd) is specified). 4274 // If such a point is detected, then it eliminates the segments of the grobcov that 4275 // have this point as solution. 4276 // Then it calls locus. 4277 proc locusdg(list GG,list #) 4278 "USAGE: locusdg(GG) ; 4279 The argument must be the output of grobcov 4280 RETURN: The components of the locus of points in dinamical geometry 4281 NOTE: The basering R, must be of the form Q[a][x], a=parameters, 4282 x=variables, and the mover coordinates must be the two last variables in the 4283 definition of the ring. 4284 KEYWORDS: ring, locus, grobcov 4285 EXAMPLE: locusdg(GG); shows an example" 4337 LL[i]=l; 4338 LL[i]=elimfromlist(L[i],1); 4339 } 4340 return(LL); 4341 } 4342 4343 4344 // locus(G): Special routine for determining the locus of points 4345 // of geometrical constructions. Given a parametric ideal J with 4346 // parameters (a_1,..a_m) and variables (x_1,..,xn), 4347 // representing the system determining 4348 // the locus of points (a_1,..,a_m) who verify certain 4349 // properties, computing the grobcov G of 4350 // J and applying to it locus, determines the different 4351 // classes of locus components. The components can be 4352 // Normal, Special, Accumulation, Degenerate. 4353 // The output are the components given in P-canonical form 4354 // of at most 4 constructible sets: Normal, Special, Accumulation, 4355 // Degenerate. 4356 // The description of the algorithm and definitions is 4357 // given in a forthcoming paper by Abanades, Botana, Montes, Recio. 4358 // Usually locus problems have mover coordinates, variables and tracer coordinates. 4359 // The mover coordinates are to be placed as the last variables, and by default, 4360 // its number is 2. If one consider locus problems in higer dimensions, the number of 4361 // mover coordinates (placed as the last variables) is to be given as an option. 4362 // 4363 // input: The output G of the grobcov (in generic representation, which is the default option for grobcov) 4364 // output: 4365 // list, the canonical P-representation of the Normal and Non-Normal locus: 4366 // The Normal locus has two kind of components: Normal and Special. 4367 // The Non-normal locus has two kind of components: Accumulation and Degenerate. 4368 // Normal components: for each point in the component, 4369 // the number of solutions in the variables is finite, and 4370 // the solutions depend on the point in the component if the component is not 0-dimensional. 4371 // Special components: for each point in the component, 4372 // the number of solutions in the variables is finite, 4373 // the component is not 0-dimensional, but the solutions do not depend on the 4374 // values of the parameters in the component. 4375 // Accumlation points: are 0-dimensional components for which it exist 4376 // an infinite number of solutions. 4377 // Degenerate components: are components of dimension greater than 0 for which 4378 // for every point in the component there exist infinite solutions. 4379 // The output components are given as 4380 // ((p1,(p11,..p1s_1),type_1,level_1),..,(pk,(pk1,..pks_k),type_k,level_k) 4381 // The components are given in canonical P-representation of the subset. 4382 // If all levels of a class of locus are 1, then the set is locally closed. Otherwise the level 4383 // gives the depth of the component of the constructible set. 4384 proc locus(list GG, list #) 4385 "USAGE: locus(G); 4386 The input must be the grobcov of a parametrical ideal 4387 RETURN: The locus. 4388 The output are the components of four constructible subsets of the locus 4389 of the parametrical system: Normal , Special, Accumulation and Degenerate. 4390 These components are 4391 given as a list of (pi,(pi1,..pis_i),type_i,level_i) varying i, 4392 where the p's are prime ideals, the type can be: Normal, Special, 4393 Accumulation, Degenerate. 4394 NOTE: It can only be called after computing the grobcov of the 4395 parametrical ideal in generic representation ('ext',0), 4396 which is the default. 4397 The basering R, must be of the form Q[a_1,..,a_m][x_1,..,x_n]. 4398 KEYWORDS: geometrical locus, locus, loci. 4399 EXAMPLE: locus; shows an example" 4286 4400 { 4287 4401 def R=basering; … … 4294 4408 if (equalideals(B0,ideal(1))) 4295 4409 { 4296 return(locus (GG));4410 return(locus0(GG)); 4297 4411 } 4298 4412 else … … 4325 4439 if(te) 4326 4440 { 4327 string("locus dg detected that the mover must avoid point (",N,") in order to obtain thelocus");4328 // eliminate segments of GG where N is contained in the basis4441 string("locus detected that the mover must avoid point (",N,") in order to obtain the correct locus"); 4442 // eliminates segments of GG where N is contained in the basis 4329 4443 list nGP; 4330 4444 def GP=GG; … … 4343 4457 } 4344 4458 } 4345 //"T_nGP="; nGP;4346 4459 kill @RP; kill @P; kill @R; 4347 return(locus(nGP,dd)); 4348 } 4349 // // Now eliminate components for which the basis has dim>0, and all elements non reducing to 0 4350 // // modulo N do not contain the mover coordinates 4351 // list nnGP; poly r; 4352 // for(j=1; j<=size(nGP);j++) 4353 // { 4354 // if(not(indepparameters(nGP[j][2]))) 4355 // { 4356 // if(dim(std(nGP[j][1]))==0){nnGP[size(nnGP)+1]=nGP[j];} 4357 // else 4358 // { 4359 // te=1; k=1; 4360 // while(te and k<=size(nGP[2])) 4361 // { 4362 // r=pdivi(nGP[j][2][k],N)[1]; 4363 // if(r==0){k++;} 4364 // else 4365 // { 4366 // if(not(subset(variables(nGP[j][2][k]),vmov ))) 4367 // { 4368 // te=0; 4369 // } 4370 // else{k++;} 4371 // } 4372 // } 4373 // if(te==1){nnGP[size(nnGP)+1]=nGP[j];} 4374 // } 4375 // } 4376 // } 4377 // 4378 // } 4379 // kill @RP; kill @P; kill @R; 4380 // return(locus(nnGP)); 4381 // } 4382 //} 4460 return(locus0(nGP,dd)); 4461 } 4383 4462 example 4384 4463 {"EXAMPLE:"; echo = 2; … … 4390 4469 (a-x1)^2+(b-x2)^2-(x1-x3)^2-(x2-x4)^2; 4391 4470 short=0; 4392 locusdg(grobcov(S)); 4393 } 4394 4471 locus(grobcov(S)); " "; 4472 kill R; 4473 ring R=(0,a,b),(x,y),dp; 4474 short=0; 4475 "Concoid"; 4476 ideal S96=x^2+y^2-4,(b-2)*x-a*y+2*a,(a-x)^2+(b-y)^2-1; 4477 "System="; S96; " "; 4478 locus(grobcov(S96)); 4479 kill R; ring R=(0,x,y),(x1,x2),dp; 4480 ideal S=-(x - 5)*(x1 - 1) - (x2 - 2)*(y - 2), 4481 (x1 - 5)^2 + (x2 - 2)^2 - 4, 4482 -2*(x - 5)*(x2 - 2) + 2*(x1 - 5)*(y - 2); 4483 "System="; S; 4484 locus(grobcov(S)); " "; 4485 ideal S1=-(x - x1)*(x1 - 4) + (x2 - y)*(x2 - 4), 4486 (x1 - 4)^2 + (x2 - 2)^2 - 4, 4487 -2*(x1 - 4)*(2*x2 - y - 4) - 2*(x - 2*x1 + 4)*(x2 - 2); 4488 "System="; S1; 4489 locus(grobcov(S1)); 4490 } 4491 4492 // locusdg(G): Special routine for determining the locus of points 4493 // of geometrical constructions. Given a parametric ideal J with 4494 // parameters (a_1,..a_m) and variables (x_1,..,xn), 4495 // representing the system determining 4496 // the locus of points (a_1,..,a_m) who verify certain 4497 // properties, computing the grobcov G of 4498 // J and applying to it locus, determines the different 4499 // classes of locus components. The components can be 4500 // Normal, Special, Accumulation point, Degenerate. 4501 // The output are the components given in P-canonical form 4502 // of at most 4 constructible sets: Normal, Special, Accumulation, 4503 // Degenerate. 4504 // The description of the algorithm and definitions is 4505 // given in a forthcoming paper by Abanades, Botana, Montes, Recio. 4506 // Usually locus problems have mover coordinates, variables and tracer coordinates. 4507 // The mover coordinates are to be placed as the last variables, and by default, 4508 // its number is 2. If onw consider locus problems in higer dimensions, the number of 4509 // mover coordinates (placed as the last variables) is to be given as an option. 4510 // 4511 // input: The output G of the grobcov (in generic representation, which is the default option for grobcov) 4512 // output: 4513 // list, the canonical P-representation of the Normal and Non-Normal locus: 4514 // The Normal locus has two kind of components: Normal and Special. 4515 // The Non-normal locus has two kind of components: Accumulation and Degenerate. 4516 // Normal components: for each point in the component, 4517 // the number of solutions in the variables is finite, and 4518 // the solutions depend on the point in the component if the component is not 0-dimensional. 4519 // Special components: for each point in the component, 4520 // the number of solutions in the variables is finite, 4521 // the component is not 0-dimensional, but the solutions do not depend on the 4522 // values of the parameters in the component. 4523 // Accumlation points: are 0-dimensional components for which it exist 4524 // an infinite number of solutions. 4525 // Degenerate components: are components of dimension greater than 0 for which 4526 // for every point in the component there exist infinite solutions. 4527 // The output components are given as 4528 // ((p1,(p11,..p1s_1),type_1,level_1),..,(pk,(pk1,..pks_k),type_k,level_k) 4529 // The components are given in canonical P-representation of the subset. 4530 // If all levels of a class of locus are 1, then the set is locally closed. Otherwise the level 4531 // gives the depth of the component of the constructible set. 4532 proc locusdg(list GG, list #) 4533 "USAGE: locus(G); 4534 The input must be the grobcov of a parametrical ideal 4535 RETURN: The locus. 4536 The output are the components of two constructible subsets of the locus 4537 of the parametrical system.: Normal and Non-normal. 4538 These components are 4539 given as a list of (pi,(pi1,..pis_i),type_i,level_i) varying i, 4540 where the p's are prime ideals, the type can be: Normal, Special, 4541 Accumulation, Degenerate. 4542 NOTE: It can only be called after computing the grobcov of the 4543 parametrical ideal in generic representation ('ext',0), 4544 which is the default. 4545 The basering R, must be of the form Q[a_1,..,a_m][x_1,..,x_n]. 4546 KEYWORDS: geometrical locus, locus, loci. 4547 EXAMPLE: locusdg; shows an example" 4548 { 4549 def R=basering; 4550 int dd=2; int comment=0; 4551 list DD=#; 4552 if (size(DD)>1){comment=1;} 4553 if(size(DD)>0){dd=DD[1];} 4554 int i; int j; int k; 4555 def B0=GG[1][2]; 4556 if (equalideals(B0,ideal(1))) 4557 { 4558 return(locus0dg(GG)); 4559 } 4560 else 4561 { 4562 int n=nvars(R); 4563 ideal vmov=var(n-1),var(n); 4564 ideal N; 4565 intvec xw; intvec yw; 4566 for(i=1;i<=n-1;i++){xw[i]=0;} 4567 xw[n]=1; 4568 for(i=1;i<=n;i++){yw[i]=0;} 4569 yw[n-1]=1; 4570 poly px; poly py; 4571 int te=1; 4572 i=1; 4573 while( te and i<=size(B0)) 4574 { 4575 if((deg(B0[i],xw)==1) and (deg(B0[i])==1)){px=B0[i]; te=0;} 4576 i++; 4577 } 4578 i=1; te=1; 4579 while( te and i<=size(B0)) 4580 { 4581 if((deg(B0[i],yw)==1) and (deg(B0[i])==1)){py=B0[i]; te=0;} 4582 i++; 4583 } 4584 N=px,py; 4585 setglobalrings(); 4586 te=indepparameters(N); 4587 if(te) 4588 { 4589 string("locus detected that the mover must avoid point (",N,") in order to obtain the correct locus"); 4590 // eliminates segments of GG where N is contained in the basis 4591 list nGP; 4592 def GP=GG; 4593 ideal BP; 4594 for(j=1;j<=size(GP);j++) 4595 { 4596 te=1; k=1; 4597 BP=GP[j][2]; 4598 while((te==1) and (k<=size(N))) 4599 { 4600 if(pdivi(N[k],BP)[1]!=0){te=0;} 4601 k++; 4602 } 4603 if(te==0){nGP[size(nGP)+1]=GP[j];} 4604 } 4605 } 4606 } 4607 //"T_nGP="; nGP; 4608 kill @RP; kill @P; kill @R; 4609 return(locus0dg(nGP,dd)); 4610 } 4611 example 4612 {"EXAMPLE:"; echo = 2; 4613 ring R=(0,a,b),(x4,x3,x2,x1),dp; 4614 ideal S=(x1-3)^2+(x2-1)^2-9, 4615 (4-x2)*(x3-3)+(x1-3)*(x4-1), 4616 (3-x1)*(x3-x1)+(4-x2)*(x4-x2), 4617 (4-x4)*a+(x3-3)*b+3*x4-4*x3, 4618 (a-x1)^2+(b-x2)^2-(x1-x3)^2-(x2-x4)^2; 4619 short=0; 4620 locus(grobcov(S)); " "; 4621 kill R; 4622 ring R=(0,a,b),(x,y),dp; 4623 short=0; 4624 "Concoid"; 4625 ideal S96=x^2+y^2-4,(b-2)*x-a*y+2*a,(a-x)^2+(b-y)^2-1; 4626 "System="; S96; " "; 4627 locusdg(grobcov(S96)); 4628 kill R; ring R=(0,x,y),(x1,x2),dp; 4629 ideal S=-(x - 5)*(x1 - 1) - (x2 - 2)*(y - 2), 4630 (x1 - 5)^2 + (x2 - 2)^2 - 4, 4631 -2*(x - 5)*(x2 - 2) + 2*(x1 - 5)*(y - 2); 4632 "System="; S; 4633 locusdg(grobcov(S)); " "; 4634 ideal S1=-(x - x1)*(x1 - 4) + (x2 - y)*(x2 - 4), 4635 (x1 - 4)^2 + (x2 - 2)^2 - 4, 4636 -2*(x1 - 4)*(2*x2 - y - 4) - 2*(x - 2*x1 + 4)*(x2 - 2); 4637 "System="; S1; 4638 locusdg(grobcov(S1)); 4639 } 4640 4641 // locusto: Transforms the output of locus to a string that 4642 // can be read by different computational systems. 4643 // input: 4644 // list L: The output of locus 4645 // output: 4646 // string s: The output of locus converted to a string readable by other programs 4647 proc locusto(list L) 4648 "USAGE: locusto(L); 4649 The argument must be the output of locus of a parametrical ideal 4650 It transforms the output into a string in standard form 4651 readable in many languages (Geogebra). 4652 RETURN: The locus in string standard form 4653 NOTE: It can only be called after computing the locus(grobcov(F)) of the 4654 parametrical ideal. 4655 The basering R, must be of the form Q[a,b,..][x,y,..]. 4656 KEYWORDS: geometrical locus, locus, loci. 4657 EXAMPLE: locusto; shows an example" 4658 { 4659 int i; int j; int k; 4660 string s="["; string sf="]"; string st=s+sf; 4661 if(size(L)==0){return(st);} 4662 ideal p; 4663 ideal q; 4664 for(i=1;i<=size(L);i++) 4665 { 4666 s=string(s,"[["); 4667 for (j=1;j<=size(L[i][1]);j++) 4668 { 4669 s=string(s,L[i][1][j],","); 4670 } 4671 s[size(s)]="]"; 4672 s=string(s,",["); 4673 for(j=1;j<=size(L[i][2]);j++) 4674 { 4675 s=string(s,"["); 4676 for(k=1;k<=size(L[i][2][j]);k++) 4677 { 4678 s=string(s,L[i][2][j][k],","); 4679 } 4680 s[size(s)]="]"; 4681 s=string(s,","); 4682 } 4683 s[size(s)]="]"; 4684 s=string(s,"]"); 4685 if(size(L[i])>=3) 4686 { 4687 s[size(s)]=","; 4688 s=string(s,string(L[i][3]),"]"); 4689 } 4690 if(size(L[i])>=4) 4691 { 4692 s[size(s)]=","; 4693 s=string(s,string(L[i][4]),"],"); 4694 } 4695 s[size(s)]="]"; 4696 s=string(s,","); 4697 } 4698 s[size(s)]="]"; 4699 return(s); 4700 } 4701 example 4702 {"EXAMPLE:"; echo = 2; 4703 ring R=(0,a,b),(x,y),dp; 4704 short=0; 4705 ideal S96=x^2+y^2-4,(b-2)*x-a*y+2*a,(a-x)^2+(b-y)^2-1; 4706 "System="; S96; " "; 4707 locusto(locus(grobcov(S96))); 4708 } 4709 4710 // Auxiliary routione 4395 4711 // locusdim 4396 4712 // input: … … 4437 4753 } 4438 4754 4755 // locusdgto: Transforms the output of locus to a string that 4756 // can be read by different computational systems. 4757 // input: 4758 // list L: The output of locus 4759 // output: 4760 // string s: The output of locus converted to a string readable by other programs 4761 // Outputs only the relevant dynamical geometry components. 4762 // Without unnecessary parenthesis 4763 proc locusdgto(list LL) 4764 { 4765 def RR=basering; 4766 int i; int j; int k; int short0=short; int ojo; 4767 int te=0; 4768 if(defined(@P)){te=1;} 4769 else{setglobalrings();} 4770 setring @P; 4771 short=0; 4772 if(size(LL)==0){ojo=1; list L;} 4773 else 4774 { 4775 def L=imap(RR,LL); 4776 } 4777 string s="["; string sf="]"; string st=s+sf; 4778 if(size(L)==0){return(st);} 4779 ideal p; 4780 ideal q; 4781 for(i=1;i<=size(L);i++) 4782 { 4783 if(L[i][3]=="Relevant") 4784 { 4785 s=string(s,"[["); 4786 for (j=1;j<=size(L[i][1]);j++) 4787 { 4788 s=string(s,L[i][1][j],","); 4789 } 4790 s[size(s)]="]"; 4791 s=string(s,",["); 4792 for(j=1;j<=size(L[i][2]);j++) 4793 { 4794 s=string(s,"["); 4795 for(k=1;k<=size(L[i][2][j]);k++) 4796 { 4797 s=string(s,L[i][2][j][k],","); 4798 } 4799 s[size(s)]="]"; 4800 s=string(s,","); 4801 } 4802 s[size(s)]="]"; 4803 s=string(s,"]"); 4804 s[size(s)]="]"; 4805 s=string(s,","); 4806 } 4807 } 4808 if(s=="["){s="[]";} 4809 else{s[size(s)]="]";} 4810 setring(RR); 4811 short=short0; 4812 if(te==0){kill @P; kill @R; kill @RP;} 4813 return(s); 4814 } 4439 4815 4440 4816 //********************* End locus **************************** -
Singular/LIB/modnormal.lib
r4c1341 rce70e6 1 1 ////////////////////////////////////////////////////////////////////////////// 2 version="version modnormal.lib 4.0.0.0 Jun_2013 "; // $Id$2 version="version modnormal.lib 4.0.0.0 Dec_2013 "; // $Id$ 3 3 category = "Commutative Algebra"; 4 4 info=" … … 314 314 modarguments[j-(k-1)*n2-sh] = list(I, L[j], condu, printTimings, #); 315 315 } 316 modresults = parallelWaitAll("modpNormal", modarguments, 317 list(list(list(ncores)))); 316 modresults = parallelWaitAll("modpNormal", modarguments, 0, ncores); 318 317 for(j = (k-1)*n2+1+sh; j <= k*n2+1; j++) 319 318 { -
Singular/LIB/modstd.lib
r4c1341 rce70e6 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="version modstd.lib 4.0.0.0 Jun_2013 "; // $Id$2 version="version modstd.lib 4.0.0.0 Dec_2013 "; // $Id$ 3 3 category = "Commutative Algebra"; 4 4 info=" … … 33 33 static proc mod_init() 34 34 { 35 newstruct("ideal _primeTest", "ideal Ideal");35 newstruct("idealPrimeTest", "ideal Ideal"); 36 36 } 37 37 … … 487 487 list arguments; 488 488 int neededPrimes = neededSize-size(L); 489 ideal _primeTest Id;489 idealPrimeTest Id; 490 490 Id.Ideal = I; 491 491 export(Id); … … 500 500 arguments[i] = list("Id", p); 501 501 } 502 parallelResults = parallelWaitAll("primeTest", arguments, 503 list(list(list(ncores)))); 502 parallelResults = parallelWaitAll("primeTest", arguments, 0, ncores); 504 503 for(i = size(arguments); i > 0; i--) 505 504 { … … 511 510 neededPrimes = neededSize-size(L); 512 511 } 512 kill Id; 513 513 if(size(L) > neededSize) 514 514 { … … 1239 1239 arguments_farey[i] = list(ideal(H[i]), N); 1240 1240 } 1241 results_farey = parallelWaitAll("farey", arguments_farey, 1242 list(list(list(n1)))); 1241 results_farey = parallelWaitAll("farey", arguments_farey, 0, n1); 1243 1242 for(i = ncols(H); i > 0; i--) 1244 1243 { -
Singular/LIB/normal.lib
r4c1341 rce70e6 2156 2156 2157 2157 proc genus(ideal I,list #) 2158 "USAGE: genus( i) or genus(i,1); I a 1-dimensional ideal2158 "USAGE: genus(I) or genus(I,<option>); I a 1-dimensional ideal 2159 2159 RETURN: an integer, the geometric genus p_g = p_a - delta of the projective 2160 2160 curve defined by i, where p_a is the arithmetic genus. … … 2162 2162 i.e. dim(R'/R), R' the normalization of the local ring R of the 2163 2163 singularity. @* 2164 genus(i,1) uses the normalization to compute delta. Usually genus(i,1) 2165 is slower than genus(i) but sometimes not. 2164 genus(I,"nor") uses the normalization to compute delta. Usually genus(I,"nor") 2165 is slower than genus(I) but sometimes not. @* 2166 genus(I,"pri") starts with a primary decompsition. 2166 2167 EXAMPLE: example genus; shows an example 2167 2168 " … … 2169 2170 int w = printlevel-voice+2; // w=printlevel (default: w=0) 2170 2171 2172 int ono,rpr,ll; 2173 if(size(#)>0) 2174 { 2175 if(typeof(#[1])=="string") 2176 { 2177 if(#[1]=="nor"){ono=1;} 2178 if(#[1]=="pri"){rpr=1;} 2179 } 2180 else { ERROR("invalid option for genus");} 2181 } 2171 2182 def R0=basering; 2172 if( char(basering)>0)2183 if((char(basering)>0)||(ono)) 2173 2184 { 2174 2185 def R1=changeord(list(list("dp",1:nvars(basering)))); … … 2198 2209 J=std(J); 2199 2210 } 2200 int pa=1-hilbPoly(J)[1]; 2201 pa=pa-deltaP(J); 2211 2212 list LL=normal(J,"prim"); 2213 int pa,i; 2214 for(i=1;i<=size(LL[1]);i++) 2215 { 2216 def T=LL[1][i]; 2217 setring T; 2218 pa=pa-hilbPoly(std(norid))[1]; 2219 setring S; 2220 kill T; 2221 } 2222 pa=pa+1; 2202 2223 setring R0; 2203 2224 return(pa); 2225 } 2226 if(!rpr) 2227 { 2228 list LZ=minAssGTZ(I); 2229 if(size(LZ)>1) 2230 { 2231 int p_g; 2232 for(ll=1;ll<=size(LZ);ll++) 2233 { 2234 p_g=p_g+genus(LZ[ll],"pri")-1; 2235 } 2236 return(p_g+1); 2237 } 2238 else 2239 { 2240 I=LZ[1]; 2241 } 2204 2242 } 2205 2243 I=std(I); … … 2432 2470 map sigma=S,var(1),var(2),1; 2433 2471 ideal I=sigma(F); 2434 2435 if(size(#)!=0)2436 { //uses the normalization to compute delta2437 list nor=normal(I);2438 delt=nor[size(nor)][2];2439 genus=genus-delt-deltainf;2440 setring R0;2441 return(genus);2442 }2443 2472 2444 2473 ideal I1=jacob(I); … … 4416 4445 printlevel = printlevel + 1; 4417 4446 ideal JDefault = 0; // Now it uses the default J; 4418 list nor1 = normalM(Id1, decomp, withDelta, denomOption, JDefault, JDefault) [1];4419 list nor2 = normalM(Id2, decomp, withDelta, denomOption, JDefault, JDefault) [1];4447 list nor1 = normalM(Id1, decomp, withDelta, denomOption, JDefault, JDefault); 4448 list nor2 = normalM(Id2, decomp, withDelta, denomOption, JDefault, JDefault); 4420 4449 printlevel = printlevel - 1; 4421 4450 option(set,save_opt); 4422 return(list(nor1, nor2)); 4451 list res = nor1 + nor2; 4452 return(res); 4423 4453 } 4424 4454 } … … 4539 4569 4540 4570 ideal JDefault = 0; // Now it uses the default J; 4541 list nor1 = normalM(Id1, decomp, withDelta, denomOption, JDefault, JDefault) [1];4542 list nor2 = normalM(Id2, decomp, withDelta, denomOption, JDefault, JDefault) [1];4571 list nor1 = normalM(Id1, decomp, withDelta, denomOption, JDefault, JDefault); 4572 list nor2 = normalM(Id2, decomp, withDelta, denomOption, JDefault, JDefault); 4543 4573 printlevel = printlevel - 1; 4544 4574 option(set,save_opt); 4545 return(list(nor1, nor2)); 4575 list res = nor1 + nor2; 4576 return(res); 4546 4577 } 4547 4578 } -
Singular/LIB/parallel.lib
r4c1341 rce70e6 1 /////////////////////////////////////////////////////////////////// 2 version="version parallel.lib 4.0.0.0 Jun_2013 "; // $Id$1 //////////////////////////////////////////////////////////////////// 2 version="version parallel.lib 4.0.0.0 Dec_2013 "; // $Id$ 3 3 category="General purpose"; 4 4 info=" 5 LIBRARY: parallel.lib Tools for Parallelization 5 LIBRARY: parallel.lib An abstraction layer for parallel skeletons 6 6 7 AUTHOR: Andreas Steenpass, e-mail: steenpass@mathematik.uni-kl.de 7 8 8 9 OVERVIEW: 9 This library provides tools to do several computations in parallel. They 10 are aimed at ordinary Singular users as well as authors of Singular 11 libraries. 12 @* Even without this library, it is possible to do execute self-defined 13 Singular commands in parallel using @ref{link}, but the handling of 14 such links can be quite tedious. With the pocedures described below, 15 this can be done by one-line commands. 16 @* There are many parallel 'skeletons' (i.e. ways in which parallel 17 tasks rely upon and interact with each other). A few of them are already 18 implemented. Future plans include an abstraction layer for modular 19 techniques, 'worker farms', and parallel tests. 20 21 SEE ALSO: link, modstd_lib, assprimeszerodim_lib 22 23 KEYWORDS: parallel.lib; Parallelization; Links, user interface; 24 Skeletons for parallelization; Distributed computing 10 This library provides implementations of several parallel 'skeletons' (i.e. 11 ways in which parallel tasks rely upon and interact with each other). It is 12 based on the library tasks.lib and aims at both ordinary Singular users as well 13 as authors of Singular libraries. 14 15 KEYWORDS: parallelization; parallel skeletons; distributed computing 16 17 SEE ALSO: resources_lib, tasks_lib, modstd_lib, modnormal_lib 25 18 26 19 PROCEDURES: 27 parallelWaitN(...) execute several jobs in parallel, 28 wait for N of them to finish 29 parallelWaitFirst(...) execute several jobs in parallel, 30 wait for the first to finish 31 parallelWaitAll(...) execute several jobs in parallel, 32 wait for all of them to finish 20 parallelWaitN(); execute several jobs in parallel 21 and wait for N of them to finish 22 parallelWaitFirst(); execute several jobs in parallel 23 and wait for the first to finish 24 parallelWaitAll(); execute several jobs in parallel 25 and wait for all of them to finish 26 parallelTestAND(); run several tests in parallel 27 and determine if they all succeed 28 parallelTestOR(); run several tests in parallel 29 and determine if any of them succeeds 33 30 "; 34 31 35 proc parallelWaitN(list commands, list args, int N, list #) 36 "USAGE: parallelWaitN(commands, args, N[, timeout, linktype, servers, 37 maxmemory]); commands list, args list, N int, timeout int, 38 linktype string, servers list, maxmemory intvec 39 RETURN: a list, containing the results of commands[i] applied to arg[i], 40 i = 1, ..., size(commands). 41 @* The procedure waits for N jobs to finish. 42 43 @* OPTIONAL PARAMETERS: 44 45 An optional timeout in ms can be provided. Default is 0 which 46 disables the timeout. 47 48 Supported linktypes are up to now \"ssi\" and \"mp\", see 49 @ref{Ssi links}. 50 51 Servers: 52 @* Each server is given by a list containing the address of the server, 53 the number of cores to use on this server and the command to start 54 Singular. 55 @* If the address is \"localhost\", the processes will be generated on 56 the same machine using forks. If the command to start Singular is 57 \"\" (the empty string), \"Singular\" will be used. 58 @* Default is @code{list(\"localhost\", system(\"cpu\"), \"\")}. 59 @* There are some obvious shortcuts for servers, e.g. \"myserver\" is 60 a shortcut for 61 @code{list(\"myserver\", [nb. of cores on myserver], \"\")}, or 3 62 for @code{list(\"localhost\", 3, \"\")}. 63 64 Memory limits: 65 @* If an intvec maxmemory of size @code{size(commands)} is given, the 66 i-th job will be killed if it uses more than maxmemory[i] MB of 67 memory. If maxmemory[i] is 0, there will be no restraint for the 68 i-th job. Default is @code{0:size(commands)}. 69 NOTE: The entries of the list commands must be strings. 70 @* The entries of the list args must be lists. 71 @* The returned list may contain more than N results if several jobs 72 finished \"at the same time\". It may contain less than N results in 73 the case of timeout or errors occurring. 74 @* The check whether the jobs exceed the memory sizes given by 75 maxmemory is only done from time to time. This feature is 76 experimental and should be used with care. 77 SEE ALSO: Ssi links, waitfirst, waitall 78 KEYWORDS: parallelWaitN; Parallelization; Links, user interface; 79 Skeletons for parallelization; Distributed computing 80 EXAMPLE: @code{example parallelWaitN;} shows an example." 81 { 82 // initialize the timer 83 int oldtimerresolution = system("--ticks-per-sec"); 84 system("--ticks-per-sec", 1000); 85 int t = rtimer; 86 87 // auxiliary variables 88 int i, j, m, tt; 89 90 // read optional parameters 91 list defaultserver = list("localhost", system("cpu"), ""); 92 list defaults = list(0, "ssi", list(defaultserver), 0:size(commands)); 93 for(i = 1; i <= size(defaults); i++) 94 { 95 if(typeof(#[i]) != typeof(defaults[i])) 96 { 97 # = insert(#, defaults[i], i-1); 98 } 99 } 100 if(size(#) != size(defaults)) 101 { 102 ERROR("wrong optional parameters"); 103 } 104 for(j = size(#[3]); j > 0; j--) 105 { 106 if(typeof(#[3][j][1]) != typeof(defaultserver[1])) 107 { 108 #[3][j] = insert(#[3][j], defaultserver[1], 0); 109 } 110 defaultserver[3] = ""; 111 // only for ssi:tcp links, the default program is system("Singular") 112 if(#[2] == "ssi" && #[3][j][1] != "localhost") 113 { 114 defaultserver[3] = system("Singular"); 115 } 116 for(i = 2; i <= size(defaultserver); i++) 117 { 118 if(typeof(#[3][j][i]) != typeof(defaultserver[i])) 119 { 120 #[3][j] = insert(#[3][j], defaultserver[i], i-1); 121 } 122 } 123 if(size(#[3][j]) != size(defaultserver)) 124 { 125 ERROR("wrong declaration for server no. "+string(j)); 126 } 127 } 128 int timeout = #[1]; 129 string linktype = #[2]; 130 list servers = #[3]; 131 intvec maxmems = #[4]; 132 133 // error checking 134 int njobs = size(commands); 135 if(njobs != size(args)) 136 { 137 ERROR("The number of commands does not match the number of lists" 138 +newline+"of arguments."); 139 } 140 if(njobs == 0) 141 { 142 ERROR("no commands specified"); 143 } 144 for(i = 1; i <= njobs; i++) 145 { 146 if(typeof(commands[i]) != "string") 147 { 148 ERROR("The first argument is not a list of strings."); 149 } 150 if(typeof(args[i]) != "list") 151 { 152 ERROR("The second argument is not a list of lists."); 153 } 154 } 155 if(N < 0) 156 { 157 ERROR("The number of jobs which you want to wait for is negative."); 158 } 159 if(N > njobs) 160 { 161 ERROR("The number of jobs which you wnat to wait for is greater" 162 +newline+"than the number of jobs itself."); 163 } 164 if(timeout < 0) 165 { 166 ERROR("The given timeout is negative."); 167 } 168 if(linktype != "ssi" && linktype != "mp") 169 { 170 ERROR("The given linktype is not recognized."); 171 } 172 int nservers = size(servers); 173 if(nservers <= 0) 174 { 175 ERROR("no server specified"); 176 } 177 for(i = 1; i <= nservers; i++) 178 { 179 if(servers[i][1] != "localhost") 180 { 181 if(system("sh", "ssh "+servers[i][1]+" exit")) 182 { 183 ERROR("Could not connect to server \""+servers[i][1]+"\""); 184 } 185 } 186 if(servers[i][2] < 0) 187 { 188 ERROR("The number of cores to be used on server \""+servers[i][1]+"\"" 189 +newline+" is negative."); 190 } 191 if(servers[i][1] == "localhost") 192 { 193 int ncpus(i) = system("cpu"); 194 } 195 else 196 { 197 //if(linktype == "ssi") 198 //{ 199 link lcpu(i) = "ssi:tcp "+servers[i][1]+":"+servers[i][3]; 200 //} 201 open(lcpu(i)); 202 write(lcpu(i), quote(system("cpu"))); 203 int ncpus(i) = read(lcpu(i)); 204 close(lcpu(i)); 205 kill lcpu(i); 206 } 207 if(servers[i][2] == 0) 208 { 209 servers[i][2] = ncpus(i); 210 } 211 else 212 { 213 if(servers[i][2] > ncpus(i)) 214 { 215 ERROR("The number of cores to use on server \""+servers[i][1]+"\"" 216 +newline+"is greater than the number of available cores"); 217 } 218 } 219 if(servers[i][1] != "localhost") 220 { 221 if(system("sh", "ssh "+servers[i][1]+ 222 " 'test -e `which "+servers[i][3]+"`'")) 223 { 224 ERROR("\""+servers[i][3]+"\" was not found on" 225 +"\""+servers[i][1]+"\"."); 226 } 227 } 228 } 229 if(size(maxmems) != njobs) 230 { 231 ERROR("The size of the intvec which specifies the maximal amount of memory" 232 +newline+"to be used for each job does not match the number of jobs."); 233 } 234 int havemaxmem; 235 for(i = 1; i <= njobs; i++) 236 { 237 if(maxmems[i] < 0) 238 { 239 ERROR("The maximal amount of memory to be used for job no. "+string(i) 240 +"is negative."); 241 } 242 havemaxmem = havemaxmem+maxmems[i]; 243 } 244 245 // skip those cores which won't be needed 246 int nlinks; 247 for(i = 1; i <= nservers; i++) 248 { 249 if(nlinks+servers[i][2] <= njobs) 250 { 251 nlinks = nlinks+servers[i][2]; 252 } 253 else 254 { 255 if(nlinks == njobs) 256 { 257 servers = list(servers[1..(i-1)]); 258 } 259 else 260 { 261 servers = list(servers[1..i]); 262 servers[i][2] = njobs-nlinks; 263 nlinks = njobs; 264 } 265 nservers = size(servers); 266 } 267 } 268 269 // open the links 270 string server; 271 int ncores; 272 string program; 273 int k = 1; // the index of the link 274 for(i = 1; i <= nservers; i++) 275 { 276 server = servers[i][1]; 277 ncores = servers[i][2]; 278 program = servers[i][3]; 279 for(j = 1; j <= ncores; j++) 280 { 281 if(server == "localhost") 282 { 283 //if(linktype == "ssi") 284 //{ 285 link l(k) = "ssi:fork"; 286 //} 287 } 288 else 289 { 290 //if(linktype == "ssi") 291 //{ 292 link l(k) = "ssi:tcp "+server+":"+program; 293 //} 294 } 295 open(l(k)); 296 k++; 297 } 298 } 299 list links = list(l(1..nlinks)); 300 301 // start a memory watchdog if needed 302 if(havemaxmem) 303 { 304 //if(linktype == "ssi") 305 //{ 306 link mempatrol = "ssi:fork"; 307 //} 308 open(mempatrol); 309 write(mempatrol, quote(watchlinks())); 310 links = insert(links, mempatrol, nlinks); 311 } 312 int nkilled; // the number of jobs killed by the mempatrol 313 314 // distribute work to the links 315 k = 1; // from here on, k is the index of the next job which must be 316 // distributed to some link 317 intvec assignment = 0:nlinks; // link number i is currently doing 318 // job number assignment[i] 319 int pid; 320 for(i = 1; i <= nlinks; i++) 321 { 322 write(l(i), quote(execute("option(noredefine);"))); 323 read(l(i)); 324 write(l(i), quote(execute("def result;"))); 325 read(l(i)); 326 write(l(i), quote(execute("list currentargs;"))); 327 read(l(i)); 328 if(status(l(i), "mode", "fork")) 329 { 330 write(l(i), quote(currentargs = args[eval(k)])); 331 } 332 else 333 { 334 write(l(i), quote(currentargs = eval(args[k]))); 335 } 336 read(l(i)); 337 if(maxmems[k] > 0) 338 { 339 m = i; 340 for(j = 1; j <= nservers; j++) 341 { 342 if(servers[j][2] > m) 343 { 344 server = servers[j][1]; 345 break; 346 } 347 else 348 { 349 m = m-servers[j][2]; 350 } 351 } 352 write(l(i), quote(system("pid"))); 353 pid = read(l(i)); 354 write(mempatrol, list(server, pid, i, maxmems[k])); 355 } 356 write(l(i), quote(execute("result = "+eval(commands[k]) 357 +"("+argsToString("currentargs", size(currentargs))+");"))); 358 assignment[i] = k; 359 k++; 360 } 361 362 // distribute the rest of the work 363 list results; 364 for(i = njobs; i > 0; i--) 365 { 366 results[i] = list(); // TODO: What if the result of one of the commands is 367 // list()? 368 } 369 int nfinished; // the number of finished jobs 370 int wait; // the index of the link which is finished, or 0 for timeout 371 while(k <= njobs && nfinished < N-1) 372 { 373 if(timeout == 0) 374 { 375 wait = waitfirst(links); 376 } 377 else 378 { 379 tt = timeout-(rtimer-t); 380 if(tt < 0) 381 { 382 wait = waitfirst(links, 0); 383 wait = 0; 384 } 385 else 386 { 387 wait = waitfirst(links, tt); 388 } 389 } 390 if(wait == -1) 391 { 392 ERROR("All links crashed."); 393 } 394 if(wait) 395 { 396 if(wait == nlinks+1) 397 { 398 wait = read(mempatrol); 399 close(l(wait)); 400 open(l(wait)); 401 results[assignment[wait]] = "out of memory"; 402 nkilled++; 403 } 404 else 405 { 406 read(l(wait)); 407 write(l(wait), quote(result)); 408 results[assignment[wait]] = read(l(wait)); 409 if(maxmems[assignment[wait]] > 0) 410 { 411 write(mempatrol, assignment[wait]); 412 } 413 nfinished++; 414 } 415 if(status(l(wait), "mode", "fork")) 416 { 417 write(l(wait), quote(currentargs = args[eval(k)])); 418 } 419 else 420 { 421 write(l(wait), quote(currentargs = eval(args[k]))); 422 } 423 read(l(wait)); 424 if(maxmems[k] > 0) 425 { 426 m = wait; 427 for(j = 1; j <= nservers; j++) 428 { 429 if(servers[j][2] > m) 430 { 431 server = servers[j][1]; 432 break; 433 } 434 else 435 { 436 m = m-servers[j][2]; 437 } 438 } 439 write(l(wait), quote(system("pid"))); 440 pid = read(l(wait)); 441 write(mempatrol, list(server, pid, wait, maxmems[k])); 442 } 443 write(l(wait), quote(execute("def result = "+eval(commands[k]) 444 +"("+argsToString("currentargs", size(currentargs))+");"))); 445 assignment[wait] = k; 446 k++; 447 } 448 else 449 { 450 break; 451 } 452 } 453 454 // collect the rest of the results 455 while(nfinished < N && nfinished+nkilled < njobs) 456 { 457 if(timeout == 0) 458 { 459 wait = waitfirst(links); 460 } 461 else 462 { 463 tt = timeout-(rtimer-t); 464 if(tt < 0) 465 { 466 wait = waitfirst(links, 0); 467 wait = 0; 468 } 469 else 470 { 471 wait = waitfirst(links, tt); 472 } 473 } 474 if(wait == -1) 475 { 476 ERROR("All links crashed."); 477 } 478 if(wait) 479 { 480 if(wait == nlinks+1) 481 { 482 wait = read(mempatrol); 483 close(l(wait)); 484 results[assignment[wait]] = "out of memory"; 485 nkilled++; 486 } 487 else 488 { 489 read(l(wait)); 490 write(l(wait), quote(result)); 491 results[assignment[wait]] = read(l(wait)); 492 if(maxmems[assignment[wait]] > 0) 493 { 494 write(mempatrol, assignment[wait]); 495 } 496 nfinished++; 497 } 498 } 499 else 500 { 501 break; 502 } 503 } 504 505 //close all links 506 for(i = 1; i <= nlinks; i++) 507 { 508 if(status(l(i), "read", "ready")) 509 { 510 read(l(i)); 511 write(l(i), quote(result)); 512 results[assignment[i]] = read(l(i)); 513 } 514 close(l(i)); 515 } 516 if(havemaxmem) 517 { 518 close(mempatrol); 519 } 520 521 system("--ticks-per-sec", oldtimerresolution); 522 return(results); 523 } 524 example 525 { 526 "EXAMPLE:"; echo = 2; 527 LIB "primdec.lib"; 528 ring r = 0, (x,y,z), lp; 529 ideal i = z8+z6+4z5+4z3+4z2+4, y-z2; 530 ideal j = 3x3y+x3+xy3+y2z2, 2x3z-xy-xz3-y4-z2, 2x2yz-2xy2+xz2-y4; 531 list commands = list("std", "primdecGTZ", "primdecSY", 532 "std", "primdecGTZ", "primdecSY"); 533 list args = list(list(i), list(i), list(i), list(j), list(j), list(j)); 534 parallelWaitN(commands, args, 3); 535 } 536 537 proc parallelWaitFirst(list commands, list args, list #) 538 "USAGE: parallelWaitFirst(commands, args[, timeout, linktype, servers, 539 maxmemory]); commands list, args list, timeout int, linktype string, 540 servers list, maxmemory intvec 541 RETURN: a list, containing at least one (if no timeout occurs) of the results 542 of commands[i] applied to arg[i], i = 1, ..., size(commands). 543 @* The command 544 @code{parallelWaitFirst(list commands, list args, list #)} is 545 synonymous to 546 @code{parallelWaitN(list commands, list args, 1, list #)}. See 547 @ref{parallelWaitN} for details on optional arguments and other 548 remarks. 549 SEE ALSO: Ssi links, waitfirst 550 KEYWORDS: parallelWaitFirst; Parallelization; Links, user interface; 551 Skeletons for parallelization; Distributed computing 552 EXAMPLE: @code{example parallelWaitFirst;} shows an example." 553 { 554 return(parallelWaitN(commands, args, 1, #)); 555 } 556 example 557 { 558 "EXAMPLE:"; echo = 2; 559 LIB "primdec.lib"; 560 ring r = 0, (x,y,z), lp; 561 ideal i = z8+z6+4z5+4z3+4z2+4, y-z2; 562 list commands = list("primdecGTZ", "primdecSY"); 563 list args = list(list(i), list(i)); 564 parallelWaitFirst(commands, args); 565 } 566 567 proc parallelWaitAll(def commands, list args, list #) 568 "USAGE: parallelWaitAll(commands, args[, timeout, linktype, servers, 569 maxmemory]); commands list or string, args list, timeout int, 570 linktype string, servers list, maxmemory intvec 571 RETURN: a list, containing the results of commands[i] applied to arg[i], 572 i = 1, ..., size(commands). 573 @* The command 574 @code{parallelWaitAll(list commands, list args, list #)} is 575 synonymous to 576 @code{parallelWaitN(list commands, list args, size(args), list #)}. See 577 @ref{parallelWaitN} for details on optional arguments and other 578 remarks. 579 If commands is of type string, this is a shortcut for a list of size 580 @code{size(args)} whose entries are just this string. 581 SEE ALSO: Ssi links, waitall 582 KEYWORDS: parallelWaitAll; Parallelization; Links, user interface; 583 Skeletons for parallelization; Distributed computing 584 EXAMPLE: @code{example parallelWaitAll;} shows an example." 585 { 586 if(typeof(commands) != "list" && typeof(commands) != "string") 587 { 588 ERROR("invalid type of first argument"); 589 } 590 if(typeof(commands) == "list") 591 { 592 return(parallelWaitN(commands, args, size(args), #)); 593 } 594 else 595 { 596 list cmds; 597 for(int i = size(args); i > 0; i--) 598 { 599 cmds[i] = commands; 600 } 601 return(parallelWaitN(cmds, args, size(args), #)); 602 } 603 } 604 example 605 { 606 "EXAMPLE:"; echo = 2; 607 ring r = 0, (x,y,z), dp; 608 ideal i1 = z8+z6+4z5+4z3+4z2+4, y-z2; 609 ideal i2 = x10+x9y2, y8-x2y7; 610 ideal i3 = x3-2xy, x2y-2y2+x; 611 string command = "std"; 612 list args = list(list(i1), list(i2), list(i3)); 613 parallelWaitAll(command, args); 614 } 615 616 // TODO 617 /// http://arxiv.org/abs/1005.5663v2 618 static proc doModular(command, args, proc deleteUnlucksPrimes, proc testInChar0) 619 { 620 } 621 622 // TODO 623 /* worker farm */ 624 static proc Create() {} 625 626 /* auxiliary procedures */ 627 static proc watchlinks() 628 { 629 list parent = list(mempatrol); 630 list watchedlinks; 631 int wait; 632 int i, sys; 633 while(1) 634 { 635 if(size(watchedlinks) == 0) 636 { 637 wait = waitall(parent); 638 } 639 else 640 { 641 wait = waitall(parent, 10000); 642 } 643 if(wait == -1) 644 { 645 ERROR("The main process crashed."); 646 } 647 if(wait) 648 { 649 def query = read(mempatrol); 650 if(typeof(query) == "list") 651 { 652 watchedlinks = insert(watchedlinks, query); 653 } 654 else // in this case, typeof(query) is assumed to be "int", the 655 // index of the link 656 { 657 for(i = size(watchedlinks); i > 0; i--) 658 { 659 if(watchedlinks[i][3] == query) 660 { 661 watchedlinks = delete(watchedlinks, i); 662 break; 663 } 664 } 665 } 666 } 667 for(i = size(watchedlinks); i > 0; i--) 668 { 669 if(getusedmemory(watchedlinks[i][1], watchedlinks[i][2]) 670 > watchedlinks[i][4]) 671 { 672 if(watchedlinks[i][1] == "localhost") 673 { 674 sys = system("sh", "kill "+string(watchedlinks[i][2])); 675 } 676 else 677 { 678 sys = system("sh", "ssh "+watchedlinks[i][1]+" kill " 679 +string(watchedlinks[i][2])); 680 } 681 write(mempatrol, watchedlinks[i][3]); 682 watchedlinks = delete(watchedlinks, i); 683 } 684 } 685 } 686 } 687 688 static proc getusedmemory(string server, int pid) 689 { 690 string s; 691 if(server == "localhost") 692 { 693 s = read("|: grep VmSize /proc/"+string(pid)+"/status "+ 694 "| awk '{ print $2; }'"); 695 } 696 else 697 { 698 s = read("|: ssh "+server+" grep VmSize /proc/"+string(pid)+"/status "+ 699 "| awk '{ print $2; }'"); 700 } 701 bigint b; 702 execute("b = "+s+";"); 703 int i = int(b/1000); 704 return(i); 705 } 706 707 static proc argsToString(string name, int length) 708 { 709 string arglist; 710 if(length > 0) { 711 arglist = name+"[1]"; 712 } 713 int i; 714 for(i = 2; i <= length; i++) { 715 arglist = arglist+", "+name+"["+string(i)+"]"; 716 } 717 return(arglist); 718 } 32 LIB "tasks.lib"; 33 34 proc parallelWaitN(alias list commands, alias list args, int N, list #) 35 "USAGE: parallelWaitN(commands, arguments, N[, timeout]); commands list, 36 arguments list, N int, timeout int 37 RETURN: a list, containing the results of commands[i] applied to 38 arguments[i], i = 1, ..., size(arguments). 39 @* The procedure waits for N jobs to finish. 40 @* An optional timeout in ms can be provided. Default is 0 which 41 disables the timeout. 42 NOTE: The entries of the list commands must be strings. The entries of the 43 list arguments must be lists. 44 @* The type of any entry of the returned list whose corresponding task 45 did not finish (due to timeout or error) is \"none\". 46 @* The returned list may contain more than N results if several jobs 47 finished \"at the same time\". It may contain less than N results in 48 the case of timeout or errors occurring. 49 SEE ALSO: parallelWaitAll, parallelWaitFirst, tasks_lib 50 EXAMPLE: example parallelWaitN; shows an example" 51 { 52 // auxiliary variables 53 int i; 54 55 // read optional parameters 56 int timeout; 57 int ncores; // obsolete, but kept for compatibility with old libraries 58 if (size(#) > 0) { 59 if (typeof(#[1]) != "int") { 60 ERROR("wrong optional parameters"); 61 } 62 timeout = #[1]; 63 if (size(#) > 1) { 64 if (size(#) > 2 || typeof(#[2]) != "int") { 65 ERROR("wrong optional parameters"); 66 } 67 ncores = #[2]; 68 } 69 } 70 71 // apply wrapper for obsolete optional parameter ncores 72 if (ncores) { 73 list semaphore_save = Resources::setcores_subtree(ncores); 74 } 75 76 // error checking 77 int njobs = size(commands); 78 if (njobs != size(args)) { 79 ERROR("The number of commands does not match the number of lists" 80 +newline+"of arguments."); 81 } 82 if (njobs == 0) { 83 ERROR("no commands specified"); 84 } 85 for (i = 1; i <= njobs; i++) { 86 if (typeof(commands[i]) != "string") { 87 ERROR("The first argument is not a list of strings."); 88 } 89 if (typeof(args[i]) != "list") { 90 ERROR("The second argument is not a list of lists."); 91 } 92 } 93 94 // compute the tasks 95 for (i = 1; i <= njobs; i++) { 96 task t(i) = commands[i], args[i]; 97 } 98 startTasks(t(1..njobs)); 99 list indices = waitTasks(list(t(1..njobs)), N, timeout); 100 101 // wrap back to saved semaphore 102 if (ncores) { 103 Resources::resetcores_subtree(semaphore_save); 104 } 105 106 // return results 107 list results; 108 for (i = size(indices); i > 0; i--) { 109 results[indices[i]] = getResult(t(indices[i])); 110 } 111 for (i = 1; i <= njobs; i++) { 112 killTask(t(i)); 113 } 114 return(results); 115 } 116 example 117 { 118 "EXAMPLE:"; 119 echo = 2; 120 ring R = 0, (x,y,z), lp; 121 ideal I = 3x3y+x3+xy3+y2z2, 2x3z-xy-xz3-y4-z2, 2x2yz-2xy2+xz2-y4; 122 ideal J = x10+x9y2, x2y7-y8; 123 list commands = list("std", "std"); 124 list arguments = list(list(I), list(J)); 125 parallelWaitN(commands, arguments, 1); 126 } 127 128 proc parallelWaitFirst(alias list commands, alias list args, list #) 129 "USAGE: parallelWaitFirst(commands, args[, timeout]); commands list, 130 arguments list, timeout int 131 RETURN: a list, containing at least one (if no timeout occurs) of the results 132 of commands[i] applied to arguments[i], i = 1, ..., size(arguments). 133 @* The command @code{parallelWaitFirst(commands, arguments[, timeout])} 134 is synonymous to 135 @code{parallelWaitN(commands, arguments, 1[, timeout])}. See 136 @ref{parallelWaitN} for details on optional arguments and other 137 remarks. 138 SEE ALSO: parallelWaitN, parallelWaitAll, tasks_lib 139 EXAMPLE: example parallelWaitFirst; shows an example" 140 { 141 return(parallelWaitN(commands, args, 1, #)); 142 } 143 example 144 { 145 "EXAMPLE:"; 146 echo = 2; 147 ring R = 0, (x,y,z), lp; 148 ideal I = 3x3y+x3+xy3+y2z2, 2x3z-xy-xz3-y4-z2, 2x2yz-2xy2+xz2-y4; 149 ideal J = x10+x9y2, x2y7-y8; 150 list commands = list("std", "std"); 151 list arguments = list(list(I), list(J)); 152 parallelWaitFirst(commands, arguments); 153 } 154 155 proc parallelWaitAll(def commands, alias list args, list #) 156 "USAGE: parallelWaitAll(commands, arguments[, timeout]); commands list or 157 string, arguments list, timeout int 158 RETURN: a list, containing the results of commands[i] applied to 159 arguments[i], i = 1, ..., size(arguments). 160 @* The command @code{parallelWaitAll(commands, arguments[, timeout])} is 161 synonymous to @code{parallelWaitN(commands, arguments, 162 size(arguments)[, timeout])}. See @ref{parallelWaitN} for details on 163 optional arguments and other remarks. 164 NOTE: As a shortcut, @code{commands} can be a string. This is synonymous to 165 providing a list of @code{size(arguments)} copies of this string. 166 SEE ALSO: parallelWaitFirst, parallelWaitN, tasks_lib 167 EXAMPLE: example parallelWaitAll; shows an example" 168 { 169 if (typeof(commands) != "list" && typeof(commands) != "string") { 170 ERROR("invalid type of first argument"); 171 } 172 if (typeof(commands) == "list") { 173 return(parallelWaitN(commands, args, size(args), #)); 174 } 175 else { 176 list cmds; 177 for (int i = size(args); i > 0; i--) { 178 cmds[i] = commands; 179 } 180 return(parallelWaitN(cmds, args, size(args), #)); 181 } 182 } 183 example 184 { 185 "EXAMPLE:"; 186 echo = 2; 187 ring R = 0, (x,y,z), dp; 188 ideal I1 = z8+z6+4z5+4z3+4z2+4, -z2+y; 189 ideal I2 = x9y2+x10, x2y7-y8; 190 ideal I3 = x3-2xy, x2y-2y2+x; 191 string command = "std"; 192 list arguments = list(list(I1), list(I2), list(I3)); 193 parallelWaitAll(command, arguments); 194 } 195 196 proc parallelTestAND(def commands, alias list args, list #) 197 "USAGE: parallelTestAND(commands, arguments[, timeout]); commands list or 198 string, arguments list, timeout int 199 RETURN: 1, if commands[i] applied to arguments[i] is not equal to zero for 200 all i = 1, ..., size(arguments); 201 0, otherwise. 202 @* An optional timeout in ms can be provided. Default is 0 which 203 disables the timeout. In case of timeout, -1 is returned. 204 NOTE: The entries of the list commands must be strings. The entries of the 205 list arguments must be lists. 206 @* commands[i] applied to arguments[i] must evaluate to an integer for 207 i = 1, ..., size(arguments). 208 @* As a shortcut, @code{commands} can be a string. This is synonymous to 209 providing a list of @code{size(arguments)} copies of this string. 210 SEE ALSO: parallelTestOR, tasks_lib 211 EXAMPLE: example parallelTestAND; shows an example" 212 { 213 // note: this can be improved 214 list results = parallelWaitAll(commands, args, #); 215 int i; 216 for (i = size(args); i > 0; i--) { 217 if (typeof(results[i]) != "int" && typeof(results[i]) != "none") { 218 ERROR("result no. "+string(i)+" not of type int"); 219 } 220 } 221 for (i = size(args); i > 0; i--) { 222 if (typeof(results[i]) == "none") { // timeout 223 return(-1); 224 } 225 } 226 for (i = size(results); i > 0; i--) { 227 if (!results[i]) { 228 return(0); 229 } 230 } 231 return(1); 232 } 233 example 234 { 235 "EXAMPLE:"; 236 echo = 2; 237 ring R = 0, (x,y,z), dp; 238 ideal I = x, y, z; 239 intvec v = 0:3; 240 list l = list(I, v); 241 module m1 = x*gen(1); 242 module m2; 243 string command = "size"; 244 list arguments1 = list(list(I), list(v), list(l), list(m1)); 245 list arguments2 = list(list(I), list(v), list(l), list(m2)); 246 // test if all the arguments have non-zero size 247 parallelTestAND(command, arguments1); 248 parallelTestAND(command, arguments2); 249 } 250 251 proc parallelTestOR(def commands, alias list args, list #) 252 "USAGE: parallelTestOR(commands, arguments[, timeout]); commands list or 253 string, arguments list, timeout int 254 RETURN: 1, if commands[i] applied to arguments[i] is not equal to zero for 255 any i = 1, ..., size(arguments); 256 0, otherwise. 257 @* An optional timeout in ms can be provided. Default is 0 which 258 disables the timeout. In case of timeout, -1 is returned. 259 NOTE: The entries of the list commands must be strings. The entries of the 260 list arguments must be lists. 261 @* commands[i] applied to arguments[i] must evaluate to an integer for 262 i = 1, ..., size(arguments). 263 @* As a shortcut, @code{commands} can be a string. This is synonymous to 264 providing a list of @code{size(arguments)} copies of this string. 265 SEE ALSO: parallelTestAND, tasks_lib 266 EXAMPLE: example parallelTestAND; shows an example" 267 { 268 // note: this can be improved 269 list results = parallelWaitAll(commands, args, #); 270 int i; 271 for (i = size(args); i > 0; i--) { 272 if (typeof(results[i]) != "int" && typeof(results[i]) != "none") { 273 ERROR("result no. "+string(i)+" not of type int"); 274 } 275 } 276 for (i = size(args); i > 0; i--) { 277 if (typeof(results[i]) == "none") { // timeout 278 return(-1); 279 } 280 } 281 for (i = size(results); i > 0; i--) { 282 if (results[i]) { 283 return(1); 284 } 285 } 286 return(0); 287 } 288 example 289 { 290 "EXAMPLE:"; 291 echo = 2; 292 ring R = 0, (x,y,z), dp; 293 ideal I; 294 string s; 295 list l; 296 module m1 = x*gen(1); 297 module m2; 298 string command = "size"; 299 list arguments1 = list(list(I), list(s), list(l), list(m1)); 300 list arguments2 = list(list(I), list(s), list(l), list(m2)); 301 // test if any of the arguments has non-zero size 302 parallelTestOR(command, arguments1); 303 parallelTestOR(command, arguments2); 304 } 305 -
Singular/LIB/polymake.lib
r4c1341 rce70e6 1 //// 2 version="version oldpolymake.lib 4.0.0.0 Jun_2013 "; // $Id$ 1 version="version polymake.lib 4.0.0.0 Jun_2013 "; 3 2 category="Tropical Geometry"; 4 3 info=" 5 LIBRARY: oldpolymake.libComputations with polytopes and fans,6 4 LIBRARY: polymake.lib Computations with polytopes and fans, 5 interface to polymake and TOPCOM 7 6 AUTHOR: Thomas Markwig, email: keilen@mathematik.uni-kl.de 8 7 … … 10 9 Most procedures will not work unless polymake or topcom is installed and 11 10 if so, they will only work with the operating system LINUX! 12 For more detailed information see the following note orconsult the11 For more detailed information see IMPORTANT NOTE respectively consult the 13 12 help string of the procedures. 14 13 15 NOTE: 14 The conventions used in this library for polytopes and fans, e.g. the 15 length and labeling of their vertices resp. rays, differs from the conventions 16 used in polymake and thus from the conventions used in the polymake 17 extension polymake.so of Singular. We recommend to use the newer polymake.so 18 whenever possible. 19 20 IMPORTANT NOTE: 16 21 Even though this is a Singular library for computing polytopes and fans 17 22 such as the Newton polytope or the Groebner fan of a polynomial, most of … … 19 24 @* - polymake by Ewgenij Gawrilow, TU Berlin and Michael Joswig, TU Darmstadt 20 25 @* (see http://www.math.tu-berlin.de/polymake/), 21 @* respectively (only in the procedure triangula rions) by the program22 @* - topcom by Joerg Rambau, Universitaet Bayreuth (see http://www.uni-bayreuth.de/23 24 @* This library should rather be seen as an interface which allows to use a26 @* respectively (only in the procedure triangulations) by the program 27 @* - topcom by Joerg Rambau, Universitaet Bayreuth (see 28 @* http://www.uni-bayreuth.de/departments/wirtschaftsmathematik/rambau/TOPCOM); 29 @* this library should rather be seen as an interface which allows to use a 25 30 (very limited) number of options which polymake respectively topcom offers 26 31 to compute with polytopes and fans and to make the results available in … … 32 37 independent of both, polymake and topcom. 33 38 34 PROCEDURES: 35 polymakePolytope() computes the vertices of a polytope using polymake 36 newtonPolytopeP() computes the Newton polytope of a polynomial 37 newtonPolytopeLP() computes the lattice points of the Newton polytope 38 normalFan() computes the normal fan of a polytope 39 groebnerFan() computes the Groebner fan of a polynomial 40 intmatToPolymake() transforms an integer matrix into polymake format 41 polymakeToIntmat() transforms polymake output into an integer matrix 42 43 triangulations() computes all triangulations of a marked polytope 44 secondaryPolytope() computes the secondary polytope of a marked polytope 45 46 secondaryFan() computes the secondary fan of a marked polytope 47 48 cycleLength() computes the cycleLength of cycle 49 splitPolygon() splits a marked polygon into vertices, facets, interior points 50 eta() computes the eta-vector of a triangulation 51 findOrientedBoundary() computes the boundary of a convex hull 52 cyclePoints() computes lattice points connected to some lattice point 53 latticeArea() computes the lattice area of a polygon 54 picksFormula() computes the ingrediants of Pick's formula for a polygon 55 ellipticNF() computes the normal form of an elliptic polygon 56 ellipticNFDB() displays the 16 normal forms of elliptic polygons 57 58 polymakeKeepTmpFiles() determines if the files created in /tmp should be kept 39 PROCEDURES USING POLYMAKE: 40 polymakePolytope() computes the vertices of a polytope using polymake 41 newtonPolytopeP() computes the Newton polytope of a polynomial 42 newtonPolytopeLP() computes the lattice points of the Newton polytope 43 normalFanL() computes the normal fan of a polytope 44 groebnerFan() computes the Groebner fan of a polynomial 45 46 PROCEDURES USING TOPCOM: 47 triangulations() computes all triangulations of a marked polytope 48 secondaryPolytope() computes the secondary polytope of a marked polytope 49 50 PROCEDURES USING POLYMAKE AND TOPCOM: 51 secondaryFan() computes the secondary fan of a marked polytope 52 53 PROCEDURES CONERNED WITH PLANAR POLYGONS: 54 cycleLength() computes the cycleLength of cycle 55 splitPolygon() splits a marked polygon into vertices, facets, interior points 56 eta() computes the eta-vector of a triangulation 57 findOrientedBoundary() computes the boundary of a convex hull 58 cyclePoints() computes lattice points connected to some lattice point 59 latticeArea() computes the lattice area of a polygon 60 picksFormula() computes the ingrediants of Pick's formula for a polygon 61 ellipticNF() computes the normal form of an elliptic polygon 62 ellipticNFDB() displays the 16 normal forms of elliptic polygons 59 63 60 64 KEYWORDS: polytope; fan; secondary fan; secondary polytope; polymake; … … 85 89 //////////////////////////////////////////////////////////////////////////////// 86 90 91 static proc mod_init () 92 { 93 LIB "gfanlib.so"; 94 LIB "polymake.so"; 95 } 87 96 88 97 ///////////////////////////////////////////////////////////////////////////// … … 90 99 ///////////////////////////////////////////////////////////////////////////// 91 100 92 proc polymakePolytope (intmat po lytop,list #)93 "USAGE: polymakePolytope(po lytope[,#]); polytope list, # string94 ASSUME: each row of po lytopegives the coordinates of a lattice point of a101 proc polymakePolytope (intmat points) 102 "USAGE: polymakePolytope(points); polytope intmat 103 ASSUME: each row of points gives the coordinates of a lattice point of a 95 104 polytope with their affine coordinates as given by the output of 96 105 secondaryPolytope 97 106 PURPOSE: the procedure calls polymake to compute the vertices of the polytope 98 107 as well as its dimension and information on its facets 99 RETURN: list L with four entries108 RETURN: list, L with four entries 100 109 @* L[1] : an integer matrix whose rows are the coordinates of vertices 101 110 of the polytope 102 111 @* L[2] : the dimension of the polytope 103 @* L[3] : a list whose i -th entry explains to which vertices the112 @* L[3] : a list whose ith entry explains to which vertices the 104 113 ith vertex of the Newton polytope is connected 105 114 -- i.e. L[3][i] is an integer vector and an entry k in 106 115 there means that the vertex L[1][i] is connected to the 107 116 vertex L[1][k] 108 @* L[4] : an integer matrixwhose rows mulitplied by117 @* L[4] : an matrix of type bigintmat whose rows mulitplied by 109 118 (1,var(1),...,var(nvar)) give a linear system of equations 110 119 describing the affine hull of the polytope, … … 118 127 convention which starts indexing its vertices by zero while we start 119 128 with one ! 120 @* - the procedure creates the file /tmp/polytope.polymake which contains121 the polytope in polymake format; if you wish to use this for further122 computations with polymake, you have to use the procedure123 polymakeKeepTmpFiles in before124 @* - moreover, the procedure creates the file /tmp/polytope.output which125 it deletes again before ending126 @* - it is possible to provide an optional second argument a string127 which then will be used instead of 'polytope' in the name of the128 polymake output file129 129 EXAMPLE: example polymakePolytope; shows an example" 130 130 { 131 // the header for the file secendarypolytope.polymake 132 string sp="_application polytope 133 _version 2.2 134 _type RationalPolytope 135 136 POINTS 137 "; 131 // add a first column to polytope as homogenising coordinate 132 points=intmatAddFirstColumn(points,"points"); 133 polytope polytop=polytopeViaPoints(points); 134 list graph=vertexAdjacencyGraph(polytop)[2]; 138 135 int i,j; 139 // set the name for the polymake output file 140 if (size(#)>0) 141 { 142 if (typeof(#[1])=="string") 143 { 144 string dateiname=#[1]; 145 } 146 else 147 { 148 string dateiname="polytope"; 149 } 150 } 151 else 152 { 153 string dateiname="polytope"; 154 } 155 // create the lattice point list for polymake 156 sp=sp+intmatToPolymake(polytop,"points"); 157 // initialise dateiname.polymake and compute the vertices 158 write(":w /tmp/"+dateiname+".polymake",sp); 159 system("sh","cd /tmp; polymake "+dateiname+".polymake VERTICES > "+dateiname+".output"); 160 string vertices=read("/tmp/"+dateiname+".output"); 161 system("sh","/bin/rm /tmp/"+dateiname+".output"); 162 intmat np=polymakeToIntmat(vertices,"affine"); 163 // compute the dimension 164 system("sh","cd /tmp; polymake "+dateiname+".polymake DIM > "+dateiname+".output"); 165 string pdim=read("/tmp/"+dateiname+".output"); 166 system("sh","/bin/rm /tmp/"+dateiname+".output"); 167 pdim=pdim[5,size(pdim)-6]; 168 execute("int nd="+pdim+";"); 169 // compute the vertex-edge graph 170 system("sh","cd /tmp; polymake "+dateiname+".polymake GRAPH > "+dateiname+".output"); 171 string vertexedgegraph=read("/tmp/"+dateiname+".output"); 172 system("sh","/bin/rm /tmp/"+dateiname+".output"); 173 vertexedgegraph=vertexedgegraph[7,size(vertexedgegraph)-8]; 174 string newveg; 175 for (i=1;i<=size(vertexedgegraph);i++) 176 { 177 if (vertexedgegraph[i]=="{") 178 { 179 newveg=newveg+"intvec("; 180 } 181 else 182 { 183 if (vertexedgegraph[i]=="}") 184 { 185 newveg=newveg+"),"; 186 } 187 else 188 { 189 if (vertexedgegraph[i]==" ") 190 { 191 newveg=newveg+","; 192 } 193 else 194 { 195 newveg=newveg+vertexedgegraph[i]; 196 } 197 } 198 } 199 } 200 newveg=newveg[1,size(newveg)-1]; 201 execute("list nveg="+newveg+";"); 202 // raise each entry in nveg by one 203 for (i=1;i<=size(nveg);i++) 204 { 205 for (j=1;j<=size(nveg[i]);j++) 206 { 207 nveg[i][j]=nveg[i][j]+1; 208 } 209 } 210 // compute the affine hull 211 system("sh","cd /tmp; polymake "+dateiname+".polymake AFFINE_HULL > "+dateiname+".output"); 212 string equations=read("/tmp/"+dateiname+".output"); 213 system("sh","/bin/rm /tmp/"+dateiname+".output"); 214 if (size(equations)>14) 215 { 216 intmat neq=polymakeToIntmat(equations,"cleardenom"); 217 } 218 else 219 { 220 intmat neq[1][ncols(polytop)+1]; 221 } 222 // delete the tmp-files, if polymakekeeptmpfiles is not set 223 if (defined(polymakekeeptmpfiles)==0) 224 { 225 system("sh","/bin/rm /tmp/"+dateiname+".polymake"); 226 } 227 // return the files 228 return(list(np,nd,nveg,neq)); 136 for (i=1;i<=size(graph);i++) 137 { 138 for (j=1;j<=size(graph[i]);j++) 139 { 140 graph[i][j]=graph[i][j]+1; 141 } 142 } 143 return(list(intmatcoldelete(vertices(polytop),1),dimension(polytop),graph,equations(polytop))); 229 144 } 230 145 example … … 247 162 ring r=0,x(1..4),dp; 248 163 matrix M[5][1]=1,x(1),x(2),x(3),x(4); 249 np[4]*M;164 intmat(np[4])*M; 250 165 } 251 166 252 167 ///////////////////////////////////////////////////////////////////////////// 253 168 254 proc newtonPolytopeP (poly f ,list #)255 "USAGE: newtonPolytopeP(f [,#]); f poly, # string256 RETURN: list L with four entries169 proc newtonPolytopeP (poly f) 170 "USAGE: newtonPolytopeP(f); f poly 171 RETURN: list, L with four entries 257 172 @* L[1] : an integer matrix whose rows are the coordinates of vertices 258 173 of the Newton polytope of f … … 263 178 there means that the vertex L[1][i] is 264 179 connected to the vertex L[1][k] 265 @* L[4] : an integer matrixwhose rows mulitplied by180 @* L[4] : an matrix of type bigintmat whose rows mulitplied by 266 181 (1,var(1),...,var(nvar)) give a linear system of equations 267 182 describing the affine hull of the Newton polytope, i.e. the … … 269 184 NOTE: - if we replace the first column of L[4] by zeros, i.e. if we move 270 185 the affine hull to the origin, then we get the equations for the 271 orthogonal compl oment of the linearity space of the normal fan dual186 orthogonal complement of the linearity space of the normal fan dual 272 187 to the Newton polytope, i.e. we get the EQUATIONS that 273 188 we need as input for polymake when computing the normal fan … … 275 190 TU Berlin and Michael Joswig, so it only works if polymake is installed; 276 191 see http://www.math.tu-berlin.de/polymake/ 277 @* - the procedure creates the file /tmp/newtonPolytope.polymake which278 contains the polytope in polymake format and which can be used for279 further computations with polymake280 @* - moreover, the procedure creates the file /tmp/newtonPolytope.output281 and deletes it again before ending282 @* - it is possible to give as an optional second argument a string283 which then will be used instead of 'newtonPolytope' in the name of284 the polymake output file285 192 EXAMPLE: example newtonPolytopeP; shows an example" 286 193 { … … 296 203 f=f-lead(f); 297 204 } 298 if (size(#)==0)299 {300 #[1]="newtonPolytope";301 }302 205 // call polymakePolytope with exponents 303 return(polymakePolytope(exponents ,#));206 return(polymakePolytope(exponents)); 304 207 } 305 208 example … … 330 233 // the Newton polytope is contained in the affine space given 331 234 // by the equations 332 np[4]*M;235 intmat(np[4])*M; 333 236 } 334 237 … … 339 242 RETURN: list, the exponent vectors of the monomials occuring in f, 340 243 i.e. the lattice points of the Newton polytope of f 341 EXAMPLE: example n ormalFan; shows an example"244 EXAMPLE: example newtonPolytopeLP; shows an example" 342 245 { 343 246 list np; … … 363 266 ///////////////////////////////////////////////////////////////////////////// 364 267 365 proc normalFan (intmat vertices,intmataffinehull,list graph,int er,list #)366 "USAGE: normalFan (vert,aff,graph,rays,[,#]); vert,aff intmat, graph list, rays int, # string268 proc normalFanL (def vertices, def affinehull,list graph,int er,list #) 269 "USAGE: normalFanL (vert,aff,graph,rays,[,#]); vert,aff intmat, graph list, rays int, # string 367 270 ASSUME: - vert is an integer matrix whose rows are the coordinate of 368 271 the vertices of a convex lattice polytope; … … 396 299 @* - in the optional argument # it is possible to hand over other names 397 300 for the variables to be used -- be careful, the format must be correct 398 which is not tested, e.g. if you want the variable names to be 399 u00,u10,u01,u11 then you must hand over the string 'u11,u10,u01,u11' 400 EXAMPLE: example normalFan; shows an example" 401 { 301 and that is not tested, e.g. if you want the variable names to be 302 u00,u10,u01,u11 then you must hand over the string u11,u10,u01,u11 303 EXAMPLE: example normalFanL; shows an example" 304 { 305 if (typeof(affinehull) != "intmat" && typeof (affinehull) != "bigintmat") 306 { 307 ERROR("normalFanL: input affinehull has to be either intmat or bigintmat"); 308 list L; 309 return (L); 310 } 402 311 list ineq; // stores the inequalities of the cones 403 312 int i,j,k; … … 431 340 list pp; // contain strings representing the inequalities 432 341 // describing the normal cone 433 intmat ie[size(graph[i])][ncols(vertices)]; // contains the inequalities 434 // as rows 342 if (typeof (vertices) == "intmat") 343 { 344 intmat ie[size(graph[i])][ncols(vertices)]; // contains the inequalities 345 } // as rows 346 if (typeof (vertices) == "bigintmat") 347 { 348 bigintmat ie[size(graph[i])][ncols(vertices)]; // contains the inequalities 349 } // as rows 435 350 // consider all the vertices to which the ith vertex in the 436 351 // polytope is connected by an edge … … 469 384 } 470 385 // remove the first column of affine hull to compute the linearity space 471 intmat linearity=intmatcoldelete(affinehull,1); 386 bigintmat linearity[1][ncols(vertices)]; 387 if (nrows(affinehull)>0) 388 { 389 linearity=intmatcoldelete(affinehull,1); 390 } 472 391 ////////////////////////////////////////////////////////////////// 473 392 // Compute next the extreme rays of the cones … … 476 395 { 477 396 list extremerays; // keeps the result 478 string polymake; // keeps polymake output 479 // the header for ineq.polymake 480 string head="_application polytope 481 _version 2.2 482 _type RationalPolytope 483 484 INEQUALITIES 485 "; 486 // the tail for both polymake files 487 string tail=" 488 EQUATIONS 489 "; 490 tail=tail+intmatToPolymake(linearity,"rays"); 491 string ungleichungen; // keeps the inequalities for the polymake code 397 cone kegel; 398 bigintmat linearspan=intmatAddFirstColumn(linearity,"rays"); 492 399 intmat M; // the matrix keeping the inequalities 493 // create the file ineq.output494 write(":w /tmp/ineq.output","");495 int dimension; // keeps the dimension of the intersection the496 // bad cones with the u11tobeseencone497 400 for (i=1;i<=size(ineq);i++) 498 401 { 499 i,". Cone of ",nrows(vertices); // indicate how many 500 // vertices have been dealt with 501 ungleichungen=intmatToPolymake(ineq[i][1],"rays"); 502 // write the inequalities to ineq.polymake and call polymake 503 write(":w /tmp/ineq.polymake",head+ungleichungen+tail); 504 ungleichungen=""; // clear ungleichungen 505 system("sh","cd /tmp; /bin/rm ineq.output; polymake ineq.polymake VERTICES > ineq.output"); 506 // read the result of polymake 507 polymake=read("/tmp/ineq.output"); 508 intmat VERT=polymakeToIntmat(polymake,"affine"); 509 extremerays[i]=VERT; 510 kill VERT; 402 kegel=coneViaInequalities(intmatAddFirstColumn(ineq[i][1],"rays"),linearspan); 403 extremerays[i]=intmatcoldelete(rays(kegel),1); 511 404 } 512 405 for (i=1;i<=size(ineq);i++) … … 514 407 ineq[i]=ineq[i]+list(extremerays[i]); 515 408 } 516 }517 // delete the tmp-files, if polymakekeeptmpfiles is not set518 if (defined(polymakekeeptmpfiles)==0)519 {520 system("sh","/bin/rm /tmp/ineq.polymake");521 system("sh","/bin/rm /tmp/ineq.output");522 409 } 523 410 // get the linearity space … … 534 421 list np=newtonPolytopeP(f); 535 422 // the Groebner fan of f, i.e. the normal fan of the Newton polytope 536 list gf=normalFan (np[1],np[4],np[3],1,"x,y,z");423 list gf=normalFanL(np[1],np[4],np[3],1,"x,y,z"); 537 424 // the number of cones in the Groebner fan of f is: 538 425 size(gf[1]); … … 549 436 ///////////////////////////////////////////////////////////////////////////// 550 437 551 proc groebnerFan (poly f ,list #)552 "USAGE: groebnerFan(f [,#]); f poly, # string438 proc groebnerFan (poly f) 439 "USAGE: groebnerFan(f); f poly 553 440 RETURN: list, the ith entry of L[1] contains information about the ith cone 554 441 in the Groebner fan dual to the ith vertex in the Newton … … 564 451 in each cone 565 452 @* L[3] = the Newton polytope of f in the format of the procedure 566 newtonPolytope 567 @* L[4] = integer matrix where each row represents the expone t453 newtonPolytopeP 454 @* L[4] = integer matrix where each row represents the exponent 568 455 vector of one monomial occuring in the input polynomial 569 456 NOTE: - if you have already computed the Newton polytope of f then you might want 570 to use the procedure normalFan instead in order to avoid doing costly457 to use the procedure normalFanL instead in order to avoid doing costly 571 458 computation twice 572 459 @* - the procedure calls for its computation polymake by Ewgenij Gawrilow, 573 460 TU Berlin and Michael Joswig, so it only works if polymake is installed; 574 461 see http://www.math.tu-berlin.de/polymake/ 575 @* - the procedure creates the file /tmp/newtonPolytope.polymake which576 contains the Newton polytope of f in polymake format and which can577 be used for further computations with polymake578 @* - it is possible to give as an optional second argument as string which579 then will be used instead of 'newtonPolytope' in the name of the580 polymake output file581 462 EXAMPLE: example groebnerFan; shows an example" 582 463 { … … 591 472 f=f-lead(f); 592 473 } 593 if (size(#)==0)594 {595 #[1]="newtonPolytope";596 }597 474 // call polymakePolytope with exponents 598 list newtonp=polymakePolytope(exponents ,"newtonPolytope");475 list newtonp=polymakePolytope(exponents); 599 476 // get the variables as string 600 477 string variablen; … … 604 481 } 605 482 variablen=variablen[1,size(variablen)-1]; 606 // call normalFan in order to compute the Groebner fan607 list gf=normalFan (newtonp[1],newtonp[4],newtonp[3],1,variablen);483 // call normalFanL in order to compute the Groebner fan 484 list gf=normalFanL(newtonp[1],newtonp[4],newtonp[3],1,variablen); 608 485 // append newtonp to gf 609 486 gf[3]=newtonp; … … 642 519 643 520 644 /////////////////////////////////////////////////////////////////////////////645 646 proc intmatToPolymake (intmat M,string art)647 "USAGE: intmatToPolymake(M,art); M intmat, art string648 ASSUME: - M is an integer matrix which should be transformed into polymake649 format;650 @* - art is one of the following strings:651 @* + 'rays' : indicating that a first column of 0's should be added652 @* + 'points' : indicating that a first column of 1's should be added653 RETURN: string, the matrix is transformed in a string and a first column has654 been added655 EXAMPLE: example intmatToPolymake; shows an example"656 {657 if (art=="rays")658 {659 string anf="0 ";660 }661 else662 {663 string anf="1 ";664 }665 string sp;666 int i,j;667 // create the lattice point list for polymake668 for (i=1;i<=nrows(M);i++)669 {670 sp=sp+anf;671 for (j=1;j<=ncols(M);j++)672 {673 sp=sp+string(M[i,j])+" ";674 if (j==ncols(M))675 {676 sp=sp+"677 ";678 }679 }680 }681 return(sp);682 }683 example684 {685 "EXAMPLE:";686 echo=2;687 intmat M[3][4]=1,2,3,4,5,6,7,8,9,10,11,12;688 intmatToPolymake(M,"rays");689 intmatToPolymake(M,"points");690 }691 692 /////////////////////////////////////////////////////////////////////////////693 694 proc polymakeToIntmat (string pm,string art)695 "USAGE: polymakeToIntmat(pm,art); pm, art string696 ASSUME: pm is the result of calling polymake with one 'argument' like697 VERTICES, AFFINE_HULL, etc., so that the first row of the string is698 the name of the corresponding 'argument' and the further rows contain699 the result which consists of vectors either over the integers700 or over the rationals701 RETURN: intmat, the rows of the matrix are basically the vectors in pm, starting702 from the second row, where each row has been multiplied with the703 lowest common multiple of the denominators of its entries as if704 it is an integer matrix; moreover, if art=='affine', then705 the first column is omitted since we only want affine706 coordinates707 EXAMPLE: example polymakeToIntmat; shows an example"708 {709 // we need a line break710 string zeilenumbruch="711 ";712 // remove the 'argment' name, i.e. the first row of pm713 while (pm[1]!=zeilenumbruch)714 {715 pm=stringdelete(pm,1);716 }717 pm=stringdelete(pm,1);718 // find out how many entries each vector has, namely one more719 // than 'spaces' in a row720 int i=1;721 int s=1;722 int z=1;723 while (pm[i]!=zeilenumbruch)724 {725 if (pm[i]==" ")726 {727 s++;728 }729 i++;730 }731 // if we want to have affine coordinates732 if (art=="affine")733 {734 s--; // then there is one column less735 // and the entry of the first column (in the first row) has to be removed736 while (pm[1]!=" ")737 {738 pm=stringdelete(pm,1);739 }740 pm=stringdelete(pm,1);741 }742 // we add two line breaks at the end in order to have this as743 // a stopping criterion744 pm=pm+zeilenumbruch+zeilenumbruch;745 // we now have to work through each row746 for (i=1;i<=size(pm);i++)747 {748 // if there are two consecutive line breaks we are done749 if ((pm[i]==zeilenumbruch) and (pm[i+1]==zeilenumbruch))750 {751 i=size(pm)+1;752 }753 else754 {755 // a line break has to be replaced by a comma756 if (pm[i]==zeilenumbruch)757 {758 z++;759 pm[i]=",";760 // if we want to have affine coordinates,761 // then we have to delete the first entry in each row762 if (art=="affine")763 {764 while (pm[i+1]!=" ")765 {766 pm=stringdelete(pm,i+1);767 }768 pm=stringdelete(pm,i+1);769 }770 }771 // a space has to be replaced by a comma772 if (pm[i]==" ")773 {774 pm[i]=",";775 }776 }777 }778 // if we have introduced superflous commata at the end, they should be removed779 while (pm[size(pm)]==",")780 {781 pm=stringdelete(pm,size(pm));782 }783 // since the matrix could be over the rationals,784 // we need a ring with rational coefficients785 ring zwischering=0,x,lp;786 // create the matrix with the elements of pm as entries787 execute("matrix mm["+string(z)+"]["+string(s)+"]="+pm+";");788 // transform this into an integer matrix789 matrix M[1][ncols(mm)]; // takes a row of mm790 int cm; // takes a lowest common multiple791 // multiply each row by an integer such that its entries are integers792 for (int j=1;j<=nrows(mm);j++)793 {794 M=mm[j,1..ncols(mm)];795 cm=commondenominator(M);796 for (i=1;i<=ncols(mm);i++)797 {798 mm[j,i]=cm*mm[j,i];799 }800 }801 // transform the matrix mm into an integer matrix802 execute("intmat im["+string(z)+"]["+string(s)+"]="+string(mm)+";");803 return(im);804 }805 example806 {807 "EXAMPLE:";808 echo=2;809 // this is the usual output of some polymake computation810 string pm="VERTICES811 0 1 3 5/3 1/3 -1 -23/3 -1/3 5/3 1/3 1812 0 1 3 -23/3 5/3 1 5/3 1/3 1/3 -1/3 -1813 0 1 1 1/3 -1/3 -1 5/3 1/3 -23/3 5/3 3814 0 1 1 5/3 -23/3 3 1/3 5/3 -1/3 1/3 -1815 0 1 -1 1/3 5/3 3 -1/3 -23/3 1/3 5/3 1816 0 1 -1 -1/3 1/3 1 1/3 5/3 5/3 -23/3 3817 0 1 -1 1 3 -5 -1 3 -1 1 -1818 0 1 -1 -1 -1 -1 1 1 3 3 -5819 0 1 -5 3 1 -1 3 -1 1 -1 -1820 821 ";822 intmat PM=polymakeToIntmat(pm,"affine");823 // note that the first column has been removed, since we asked for824 // affine coordinates, and the denominators have been cleared825 print(PM);826 }827 828 521 /////////////////////////////////////////////////////////////////////////////// 829 522 /// PROCEDURES USING TOPCOM 830 523 /////////////////////////////////////////////////////////////////////////////// 831 524 832 proc triangulations (list polygon )833 "USAGE: triangulations(polygon ); list polygon525 proc triangulations (list polygon,list #) 526 "USAGE: triangulations(polygon[,#]); list polygon, list # 834 527 ASSUME: polygon is a list of integer vectors of the same size representing 835 528 the affine coordinates of the lattice points … … 846 539 this procedure; see 847 540 @* http://www.uni-bayreuth.de/departments/wirtschaftsmathematik/rambau/TOPCOM 541 @* - if you only want to have the regular triangulations the procedure should 542 be called with the string 'regular' as optional argument 848 543 @* - the procedure creates the files /tmp/triangulationsinput and 849 544 /tmp/triangulationsoutput; … … 851 546 output containing the triangulations of corresponding to points in the 852 547 format of points2triangs; if you wish to use this for further 853 computations with topcom, you have to use the procedure854 polymakeKeepTmpFiles in before548 computations with topcom, you have to call the procedure with the 549 string 'keepfiles' as optional argument 855 550 @* - note that an integer i in an integer vector representing a triangle 856 551 refers to the ith lattice point, i.e. polygon[i]; this convention is … … 860 555 { 861 556 int i,j; 557 // check for optional arguments 558 int regular,keepfiles; 559 if (size(#)>0) 560 { 561 for (i=1;i<=size(#);i++) 562 { 563 if (typeof(#[i])=="string") 564 { 565 if (#[i]=="keepfiles") 566 { 567 keepfiles=1; 568 } 569 if (#[i]=="regular") 570 { 571 regular=1; 572 } 573 } 574 } 575 } 862 576 // prepare the input for points2triangs by writing the input polygon in the 863 577 // necessary format … … 875 589 write(":w /tmp/triangulationsinput",spi); 876 590 // call points2triangs 877 system("sh","cd /tmp; points2triangs < triangulationsinput > triangulationsoutput"); 591 if (regular==1) // compute only regular triangulations 592 { 593 system("sh","cd /tmp; points2triangs --regular < triangulationsinput > triangulationsoutput"); 594 } 595 else // compute all triangulations 596 { 597 system("sh","cd /tmp; points2triangs < triangulationsinput > triangulationsoutput"); 598 } 878 599 string p2t=read("/tmp/triangulationsoutput"); // takes result of points2triangs 879 // delete the tmp-files, if polymakekeeptmpfiles is not set880 if ( defined(polymakekeeptmpfiles)==0)600 // delete the tmp-files, if no second argument is given 601 if (keepfiles==0) 881 602 { 882 603 system("sh","cd /tmp; rm -f triangulationsinput; rm -f triangulationsoutput"); … … 953 674 else 954 675 { 955 np2t=np2t+p2t[i]; 676 if (p2t[i]=="[") 677 { 678 // in Topcom version 17.4 (and maybe also in earlier versions) the list 679 // of triangulations is indexed starting with index 0, in Singular 680 // we have to start with index 1 681 np2t=np2t+p2t[i]+"1+"; 682 } 683 else 684 { 685 np2t=np2t+p2t[i]; 686 } 956 687 } 957 688 } … … 962 693 list T; 963 694 execute(np2t); 695 // depending on the version of Topcom, the list T has or has not an entry T[1] 696 // if it has none, the entry should be removed 697 while (typeof(T[1])=="none") 698 { 699 T=delete(T,1); 700 } 964 701 // raise each index by one 965 702 for (i=1;i<=size(T);i++) … … 1000 737 RETURN: list, say L, such that: 1001 738 @* L[1] = intmat, each row gives the affine coordinates of a lattice 1002 point in the secondary polytope given by the marked polytope1003 corresponding to polygon739 point in the secondary polytope given by the marked 740 polytope corresponding to polygon 1004 741 @* L[2] = the list of corresponding triangulations 1005 742 NOTE: if the triangluations are not handed over as optional argument the … … 1114 851 see http://www.math.tu-berlin.de/polymake/ 1115 852 @* - in the optional argument # it is possible to hand over other names for 1116 the variables to be used -- be careful, the format must be correct 1117 whichis not tested, e.g. if you want the variable names to be853 the variables to be used -- be careful, the format must be correct and 854 that is not tested, e.g. if you want the variable names to be 1118 855 u00,u10,u01,u11 then you must hand over the string 'u11,u10,u01,u11' 1119 856 @* - if the triangluations are not handed over as optional argument the … … 1135 872 list sp=secondaryPolytope(polygon,triang); 1136 873 list spp=polymakePolytope(sp[1]); 1137 list sf=normalFan (spp[1],spp[4],spp[3],1);874 list sf=normalFanL(spp[1],spp[4],spp[3],1); 1138 875 return(list(sf[1],sf[2],spp,triang)); 1139 876 } … … 1378 1115 @* triang is a list of integer vectors all of size three describing a 1379 1116 triangulation of the polygon described by polygon; if an entry of 1380 triang is the vector (i,j,k) then the triangle is built fromthe vertices1117 triang is the vector (i,j,k) then the triangle is built by the vertices 1381 1118 with indices i, j and k 1382 1119 RETURN: intvec, the integer vector eta describing that vertex of the Newton … … 1948 1685 // points and 1949 1686 // the number b of boundary points are connected by the formula: A=b+2g-2 1950 return(list(area,bdpts,(area-bdpts+2) /2));1687 return(list(area,bdpts,(area-bdpts+2) div 2)); 1951 1688 } 1952 1689 example … … 1973 1710 "USAGE: ellipticNF(polygon); polygon list 1974 1711 ASSUME: polygon is a list of integer vectors in the plane such that their 1975 convex hull C has precisely one interior lattice point ,i.e. C is the1712 convex hull C has precisely one interior lattice point; i.e. C is the 1976 1713 Newton polygon of an elliptic curve 1977 1714 PURPOSE: compute the normal form of the polygon with respect to the unimodular … … 1991 1728 int i; // index 1992 1729 intvec edge; // stores the vector of an edge 1993 intvec boundary; // stores lattice lengths of the edges of the Newton cy lce1730 intvec boundary; // stores lattice lengths of the edges of the Newton cycle 1994 1731 // find the vertices of the Newton cycle and order it clockwise 1995 1732 list pg=findOrientedBoundary(polygon)[2]; … … 2302 2039 2303 2040 ///////////////////////////////////////////////////////////////////////////////// 2304 /// AUXILARY PROCEDURES2305 /////////////////////////////////////////////////////////////////////////////////2306 2307 proc polymakeKeepTmpFiles (int i)2308 "USAGE: polymakeKeepTmpFiles(int i); i int2309 PURPOSE: some procedures create files in the directory /tmp which are used for2310 computations with polymake respectively topcom; these will be removed2311 when the corresponding procedure is left; however, it might be2312 desireable to keep them for further computations with either polymake or2313 topcom; this can be achieved by this procedure; call the procedure as:2314 @* - polymakeKeepTmpFiles(1); - then the files will be kept2315 @* - polymakeKeepTmpFiles(0); - then files will be removed in the future2316 RETURN: none"2317 {2318 if ((i==1) and (defined(polymakekeeptmpfiles)==0))2319 {2320 int polymakekeeptmpfiles;2321 export(polymakekeeptmpfiles);2322 }2323 if (i!=1)2324 {2325 if (defined(polymakekeeptmpfiles))2326 {2327 kill polymakekeeptmpfiles;2328 }2329 }2330 }2331 2332 2333 /////////////////////////////////////////////////////////////////////////////////2334 2041 ///////////////////////////////////////////////////////////////////////////////// 2335 2042 /// AUXILARY PROCEDURES, WHICH ARE DECLARED STATIC … … 2364 2071 } 2365 2072 2366 static proc intmatcoldelete ( intmatw,int i)2073 static proc intmatcoldelete (def w,int i) 2367 2074 "USAGE: intmatcoldelete(w,i); w intmat, i int 2368 2075 RETURN: intmat, the integer matrix w with the ith comlumn deleted 2369 NOTE: the procedure is called by intmatsort and normalFan" 2370 { 2371 if ((i<1) or (i>ncols(w)) or (ncols(w)==1)) 2372 { 2373 return(w); 2374 } 2375 if (i==1) 2376 { 2377 intmat M[nrows(w)][ncols(w)-1]=w[1..nrows(w),2..ncols(w)]; 2378 return(M); 2379 } 2380 if (i==ncols(w)) 2381 { 2382 intmat M[nrows(w)][ncols(w)-1]=w[1..nrows(w),1..ncols(w)-1]; 2383 return(M); 2384 } 2385 else 2386 { 2387 intmat M[nrows(w)][i-1]=w[1..nrows(w),1..i-1]; 2388 intmat N[nrows(w)][ncols(w)-i]=w[1..nrows(w),i+1..ncols(w)]; 2389 return(intmatconcat(M,N)); 2076 NOTE: the procedure is called by intmatsort and normalFanL" 2077 { 2078 if (typeof(w)=="intmat") 2079 { 2080 if ((i<1) or (i>ncols(w)) or (ncols(w)==1)) 2081 { 2082 return(w); 2083 } 2084 if (i==1) 2085 { 2086 intmat M[nrows(w)][ncols(w)-1]=w[1..nrows(w),2..ncols(w)]; 2087 return(M); 2088 } 2089 if (i==ncols(w)) 2090 { 2091 intmat M[nrows(w)][ncols(w)-1]=w[1..nrows(w),1..ncols(w)-1]; 2092 return(M); 2093 } 2094 else 2095 { 2096 intmat M[nrows(w)][i-1]=w[1..nrows(w),1..i-1]; 2097 intmat N[nrows(w)][ncols(w)-i]=w[1..nrows(w),i+1..ncols(w)]; 2098 return(intmatconcat(M,N)); 2099 } 2100 } 2101 if (typeof(w)=="bigintmat") 2102 { 2103 if ((i<1) or (i>ncols(w)) or (ncols(w)==1)) 2104 { 2105 return(w); 2106 } 2107 if (i==1) 2108 { 2109 bigintmat M[nrows(w)][ncols(w)-1]=w[1..nrows(w),2..ncols(w)]; 2110 return(M); 2111 } 2112 if (i==ncols(w)) 2113 { 2114 bigintmat M[nrows(w)][ncols(w)-1]=w[1..nrows(w),1..ncols(w)-1]; 2115 return(M); 2116 } 2117 else 2118 { 2119 bigintmat MN[nrows(w)][ncols(w)-1]; 2120 MN[1..nrows(w),1..i-1]=w[1..nrows(w),1..i-1]; 2121 MN[1..nrows(w),i..ncols(w)-1]=w[1..nrows(w),i+1..ncols(w)]; 2122 return(MN); 2123 } 2124 } else 2125 { 2126 ERROR("intmatcoldelete: input matrix has to be of type intmat or bigintmat"); 2127 intmat M; return(M); 2390 2128 } 2391 2129 } … … 2683 2421 return(list(coord,coords,latex)); 2684 2422 } 2423 2424 static proc intmatAddFirstColumn (def M,string art) 2425 "USAGE: intmatAddFirstColumn(M,art); M intmat, art string 2426 ASSUME: - M is an integer matrix where a first column of 0's or 1's should be added 2427 @* - art is one of the following strings: 2428 @* + 'rays' : indicating that a first column of 0's should be added 2429 @* + 'points' : indicating that a first column of 1's should be added 2430 RETURN: intmat, a first column has been added to the matrix" 2431 { 2432 if (typeof (M) == "intmat") 2433 { 2434 intmat N[nrows(M)][ncols(M)+1]; 2435 int i,j; 2436 for (i=1;i<=nrows(M);i++) 2437 { 2438 if (art=="rays") 2439 { 2440 N[i,1]=0; 2441 } 2442 else 2443 { 2444 N[i,1]=1; 2445 } 2446 for (j=1;j<=ncols(M);j++) 2447 { 2448 N[i,j+1]=M[i,j]; 2449 } 2450 } 2451 return(N); 2452 } 2453 if (typeof (M) == "bigintmat") 2454 { 2455 bigintmat N[nrows(M)][ncols(M)+1]; 2456 int i,j; 2457 for (i=1;i<=nrows(M);i++) 2458 { 2459 if (art=="rays") 2460 { 2461 N[i,1]=0; 2462 } 2463 else 2464 { 2465 N[i,1]=1; 2466 } 2467 for (j=1;j<=ncols(M);j++) 2468 { 2469 N[i,j+1]=M[i,j]; 2470 } 2471 } 2472 return(N); 2473 } 2474 else 2475 { 2476 ERROR ("intmatAddFirstColumn: input matrix has to be either intmat or bigintmat"); 2477 intmat N; 2478 return (N); 2479 } 2480 } 2481 2482 2483 -
Singular/LIB/primdec.lib
r81f4bd5 rce70e6 709 709 return(l); 710 710 } 711 def op = option(get); 711 712 def P=basering; 712 713 int i,j,k,m,q,d,o; 713 int n =nvars(basering);714 int n = nvars(basering); 714 715 ideal s,t,u,sact; 715 716 poly ni; … … 769 770 { 770 771 setring RL; 772 771 773 option(redSB); 772 774 t=std(t); … … 785 787 rp=delete(rp,1); 786 788 keep1=keep1+rp; 789 787 790 option(noredSB); 788 791 } … … 803 806 } 804 807 l=l+keep1; 808 option(set,op); 805 809 return(l); 806 810 } … … 1898 1902 list @res,empty; 1899 1903 ideal ser; 1900 option(redSB); 1904 def op = option( get ); 1905 option( redSB ); 1901 1906 list @pr=facstd(i); 1902 1907 //if(size(@pr)==1) … … 1923 1928 // } 1924 1929 // } 1925 option(noredSB); 1930 // option( noredSB ); 1931 option( set, op ); 1926 1932 int j,k,odim,ndim,count; 1927 1933 attrib(@pr[1],"isSB",1); … … 2096 2102 } 2097 2103 2098 if(dim(i) == -1){setring P0;return(ideal(1));} 2099 if((dim(i) == 0) && (npars(P) == 0)) 2104 if( dim(i) == -1 ) 2105 { 2106 option( set,op ); 2107 setring P0; 2108 return( ideal(1) ); 2109 } 2110 if( (dim(i) == 0 ) && ( npars(P) == 0) ) 2100 2111 { 2101 2112 int di = vdim(i); … … 2546 2557 int n=nvars(R); 2547 2558 2559 def op = option(get); 2560 2548 2561 //---Anfang Provisorium 2549 2562 if((size(i)==2) && (w==2)) 2550 2563 { 2551 option( redSB);2552 ideal J =std(i);2553 option( noredSB);2554 if ((size(J)==2)&&(deg(J[1])==1))2564 option( redSB ); 2565 ideal J = std(i); 2566 option( noredSB ); 2567 if ((size(J)==2)&&(deg(J[1])==1)) 2555 2568 { 2556 2569 ideal keep; … … 2577 2590 resu[j]=L; 2578 2591 } 2592 option( set, op ); 2579 2593 return(resu); 2580 2594 } … … 2652 2666 re=convList(pr); 2653 2667 } 2654 return(re); 2668 option( set, op ); 2669 return( re ); 2655 2670 } 2656 2671 /////////////////////////////////////////////////////////////////////////////// … … 7009 7024 primary=resu; 7010 7025 } 7026 option(set,op); 7011 7027 if (intersectOption == "intersect") 7012 7028 { -
Singular/LIB/primdecint.lib
r4c1341 rce70e6 1203 1203 //=== this is needed because quotient(I,f) does not work properly, should be 1204 1204 //=== replaced by quotient later 1205 if ( f==0 ) { return( ideal(1) ); } 1205 1206 def R=basering; 1206 1207 int i; … … 1227 1228 //=== this is needed because quotient(I,J) does not work properly, should be 1228 1229 //=== replaced by quotient later 1230 if ( size(J)==0 ) { return( ideal(1) ); } 1229 1231 int i; 1230 1232 ideal K=quotientOneZ(I,J[1]); -
Singular/LIB/symodstd.lib
r4c1341 rce70e6 1 1 //////////////////////////////////////////////////////////////////////////// 2 version="version symodstd.lib 4.0.0.0 Dec_2013 "; // $Id$ 2 3 category = "Commutative Algebra"; 3 4 info=" … … 723 724 arguments[i] = list("I", p, k); 724 725 } 725 parallelResults = parallelWaitAll("divPrimeTest", arguments, 726 list(list(list(ncores))));726 parallelResults = parallelWaitAll("divPrimeTest", arguments, 0, 727 ncores); 727 728 for(i = size(arguments); i > 0; i--) 728 729 { … … 1436 1437 arguments_farey[i] = list(ideal(H[i]), N); 1437 1438 } 1438 results_farey = parallelWaitAll("farey", arguments_farey, 1439 list(list(list(n1)))); 1439 results_farey = parallelWaitAll("farey", arguments_farey, 0, n1); 1440 1440 for(i = ncols(H); i > 0; i--) 1441 1441 { -
Singular/LIB/tropical.lib
r4c1341 rce70e6 1 // /////////////////////////////////////////////////////////2 version="version tropical.lib 4.0.0.0 Jun_2013 "; // $Id$1 // 2 version="version tropical.lib 4.0.0.0 Dec_2013 "; 3 3 category="Tropical Geometry"; 4 4 info=" … … 204 204 LIB "elim.lib"; 205 205 LIB "linalg.lib"; 206 LIB " oldpolymake.lib";206 LIB "polymake.lib"; 207 207 LIB "primdec.lib"; 208 208 LIB "absfact.lib"; … … 650 650 // pass first to a ring where a and @a 651 651 // are variables in order to use maps 652 string @mp= string(minpoly);652 poly mp=minpoly; 653 653 ring INTERRING=char(LIFTRING),(t,@a,a),dp; 654 execute("poly mp=" + @mp + ";");654 poly mp=imap(LIFTRING,mp); 655 655 ideal LIFT=imap(LIFTRING,LIFT); 656 656 kill LIFTRING; … … 1012 1012 { 1013 1013 def GLOBALRING=basering; 1014 string @mp= string(minpoly);1014 number mp=minpoly; 1015 1015 execute("ring LOCALRING=("+charstr(basering)+"),("+varstr(basering)+"),ds;"); 1016 execute("minpoly= " + @mp + ";");1017 1016 poly f=imap(GLOBALRING,f); 1017 minpoly=imap(GLOBALRING,mp); 1018 1018 } 1019 1019 // check if a substitution is necessary … … 1049 1049 if (minpoly!=0) 1050 1050 { 1051 string @mp= string(minpoly);1051 poly mp=minpoly; 1052 1052 def OLDRING=basering; 1053 1053 execute("ring NEWRING=0,("+varstr(basering)+","+parstr(basering)+"),ds;"); 1054 execute("ideal I = " + @mp + ";"); 1055 I = I,imap(OLDRING,f); 1054 ideal I=imap(OLDRING,mp),imap(OLDRING,f); 1056 1055 } 1057 1056 else … … 1065 1064 w=NewtP[jj]-NewtP[jj+1]; 1066 1065 ggteiler=gcd(w[1],w[2]); 1067 zw=w[1] /ggteiler;1068 w[1]=w[2] /ggteiler;1066 zw=w[1] div ggteiler; 1067 w[1]=w[2] div ggteiler; 1069 1068 w[2]=zw; 1070 1069 // if we have introduced a third variable for the parameter, then w needs a third component … … 1134 1133 else 1135 1134 { 1136 string @mp= string(minpoly);1135 poly mp=minpoly; 1137 1136 ring degreering=0,a,dp; 1138 execute("poly mp=" + @mp + ";");1137 poly mp=imap(countring,mp); 1139 1138 numberofbranchesfound=numberofbranchesfound+deg(mp); 1140 1139 setring countring; … … 1158 1157 ring r=0,(x,y),ds; 1159 1158 poly f=x2-y4+x5y7; 1160 puiseuxExpansion(puiseuxExpansion(f,3)); 1159 puiseuxExpansion(f,3,"subst"); 1160 displayPuiseuxExpansion(puiseuxExpansion(f,3)); 1161 1161 } 1162 1162 … … 1540 1540 ggt=gcd(normalvector[1],normalvector[2]); // the gcd of the entries 1541 1541 zw=normalvector[2]; // create the outward pointing normal vector 1542 normalvector[2]=-normalvector[1] /ggt;1543 normalvector[1]=zw /ggt;1542 normalvector[2]=-normalvector[1] div ggt; 1543 normalvector[1]=zw div ggt; 1544 1544 if (size(#)==0) // we are computing w.r.t. minimum 1545 1545 { … … 2718 2718 if(k<>j) // except the unit vector of the non-zero component 2719 2719 { 2720 intvec u; u[size(w)]=0; u[k]=1; 2721 O[r,1..size(w)]=u; r=r+1; 2720 intvec u; 2721 u[size(w)]=0; 2722 u[k]=1; 2723 O[r,1..size(w)]=u; 2724 r=r+1; 2725 kill u; 2722 2726 } 2723 2727 } … … 4708 4712 wneu=NewtP[1]-NewtP[2]; 4709 4713 int ggteiler=gcd(wneu[1],wneu[2]); 4710 wneu[1]=-wneu[1] /ggteiler;4711 wneu[2]=wneu[2] /ggteiler;4714 wneu[1]=-wneu[1] div ggteiler; 4715 wneu[2]=wneu[2] div ggteiler; 4712 4716 if (wneu[1]>0) 4713 4717 { … … 4807 4811 for (jj=1;jj<=anzahlvariablen+numberdeletedvariables-1;jj++) 4808 4812 { 4809 PARA[jj]=(PARA[jj]+a[jj+1])*t^(tw[jj+1]*tweight /ww[1]);4813 PARA[jj]=(PARA[jj]+a[jj+1])*t^(tw[jj+1]*tweight div ww[1]); 4810 4814 } 4811 4815 // if we have reached the stop-level, i.e. either … … 5353 5357 if (koeffizienten[j-ord(p)+1]!=0) 5354 5358 { 5355 if ((j-(N*wj) /w1)==0)5359 if ((j-(N*wj) div w1)==0) 5356 5360 { 5357 5361 dp=dp+displaycoef(koeffizienten[j-ord(p)+1]); 5358 5362 } 5359 if (((j-(N*wj) /w1)==1) and (N!=1))5363 if (((j-(N*wj) div w1)==1) and (N!=1)) 5360 5364 { 5361 5365 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*t^(1/"+string(N)+")"; 5362 5366 } 5363 if (((j-(N*wj) /w1)==1) and (N==1))5367 if (((j-(N*wj) div w1)==1) and (N==1)) 5364 5368 { 5365 5369 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*t"; 5366 5370 } 5367 if (((j-(N*wj) /w1)==-1) and (N==1))5371 if (((j-(N*wj) div w1)==-1) and (N==1)) 5368 5372 { 5369 5373 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*1/t"; 5370 5374 } 5371 if (((j-(N*wj) /w1)==-1) and (N!=1))5375 if (((j-(N*wj) div w1)==-1) and (N!=1)) 5372 5376 { 5373 5377 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*1/t^(1/"+string(N)+")"; 5374 5378 } 5375 if (((j-(N*wj) /w1)>1) and (N==1))5376 { 5377 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*t^"+string(j-(N*wj) /w1);5378 } 5379 if (((j-(N*wj) /w1)>1) and (N!=1))5380 { 5381 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*t^("+string(j-(N*wj) /w1)+"/"+string(N)+")";5382 } 5383 if (((j-(N*wj) /w1)<-1) and (N==1))5379 if (((j-(N*wj) div w1)>1) and (N==1)) 5380 { 5381 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*t^"+string(j-(N*wj) div w1); 5382 } 5383 if (((j-(N*wj) div w1)>1) and (N!=1)) 5384 { 5385 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*t^("+string(j-(N*wj) div w1)+"/"+string(N)+")"; 5386 } 5387 if (((j-(N*wj) div w1)<-1) and (N==1)) 5384 5388 { 5385 5389 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*1/t^"+string(wj-j); 5386 5390 } 5387 if (((j-(N*wj) /w1)<-1) and (N!=1))5388 { 5389 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*1/t^("+string((N*wj) /w1-j)+"/"+string(N)+")";5391 if (((j-(N*wj) div w1)<-1) and (N!=1)) 5392 { 5393 dp=dp+displaycoef(koeffizienten[j-ord(p)+1])+"*1/t^("+string((N*wj) div w1-j)+"/"+string(N)+")"; 5390 5394 } 5391 5395 if (j<deg(p)) … … 5495 5499 { 5496 5500 setring LIFTRing; 5497 string @mp= string(minpoly);5501 poly mp=minpoly; 5498 5502 execute("ring TESTRing=("+charstr(LIFTRing)+"),("+varstr(BASERING)+"),dp;"); 5499 execute("minpoly= " + @mp + ";");5503 minpoly=number(imap(LIFTRing,mp)); 5500 5504 ideal i=imap(BASERING,i); 5501 5505 } … … 5769 5773 wneu=NewtP[jjj]-NewtP[jjj+1]; 5770 5774 int ggteiler=gcd(wneu[1],wneu[2]); 5771 wneu[1]=-wneu[1] /ggteiler;5772 wneu[2]=wneu[2] /ggteiler;5775 wneu[1]=-wneu[1] div ggteiler; 5776 wneu[2]=wneu[2] div ggteiler; 5773 5777 if (wneu[1]>0) 5774 5778 { … … 5869 5873 { 5870 5874 execute("ring PARARing=("+string(char(basering))+",@a),t,ls;"); 5871 minpoly=number(imap(PREGFANRING,m)); // ?5875 minpoly=number(imap(PREGFANRING,m)); 5872 5876 } 5873 5877 else … … 5908 5912 for (jjj=1;jjj<=anzahlvariablen+numberdeletedvariables-1;jjj++) 5909 5913 { 5910 PARA[jjj]=(PARA[jjj]+zeros[size(zeros)][jjj+1])*t^(ww[jjj+1]*tweight /ww[1]);5914 PARA[jjj]=(PARA[jjj]+zeros[size(zeros)][jjj+1])*t^(ww[jjj+1]*tweight div ww[1]); 5911 5915 } 5912 5916 // delete the last entry in zero, since that one has … … 6033 6037 { 6034 6038 I=subst(i,var(lastvar),0); 6035 while ( subst(I[1],t,0)==0)6039 while ((I[1]!=0) and (subst(I[1],t,0)==0)) 6036 6040 { 6037 6041 I[1]=I[1]/t; … … 7814 7818 poly denom=delta*hn^5; 7815 7819 poly ggt=gcd(num,denom); 7816 num=num /ggt;7817 denom=denom /ggt;7820 num=num div ggt; 7821 denom=denom div ggt; 7818 7822 setring BASERING; 7819 7823 poly num=imap(TRING,num); -
Singular/Makefile.am
r4c1341 rce70e6 248 248 Singulard_LDFLAGS = ${AM_LDFLAGS} ${EMBED_PYOBJECT} 249 249 250 dist_bin_SCRIPTS = singularsurf 250 251 251 252 #### ESingular -
Singular/checklibs.c
r4c1341 rce70e6 219 219 { 220 220 p=buf; 221 while(*p==' ') p++;222 if (*p=='@') { p++; texinfo+=(isalpha(*p)); }221 if (strchr(buf,'@')!=NULL) 222 { texinfo++; printf("%s",buf); } 223 223 } 224 224 get_next(); (*l)++; … … 253 253 if (texinfo>0) 254 254 { 255 printf("warning: %d texinfo commands %d header lines: should be used very rarely!\n",texinfo,header);255 printf("warning: %d texinfo commands in %d header lines: should be used very rarely!\n",texinfo,header); 256 256 } 257 257 } -
Singular/grammar.cc
r4c1341 rce70e6 245 245 246 246 /* Line 189 of yacc.c */ 247 #line 2 52"grammar.cc"247 #line 248 "grammar.cc" 248 248 249 249 /* Enabling traces. */ … … 387 387 PROC_DEF = 371, 388 388 APPLY = 372, 389 BREAK_CMD = 373, 390 CONTINUE_CMD = 374, 391 ELSE_CMD = 375, 392 EVAL = 376, 393 QUOTE = 377, 394 FOR_CMD = 378, 395 IF_CMD = 379, 396 SYS_BREAK = 380, 397 WHILE_CMD = 381, 398 RETURN = 382, 399 PARAMETER = 383, 400 SYSVAR = 384, 401 UMINUS = 385 389 ASSUME_CMD = 373, 390 BREAK_CMD = 374, 391 CONTINUE_CMD = 375, 392 ELSE_CMD = 376, 393 EVAL = 377, 394 QUOTE = 378, 395 FOR_CMD = 379, 396 IF_CMD = 380, 397 SYS_BREAK = 381, 398 WHILE_CMD = 382, 399 RETURN = 383, 400 PARAMETER = 384, 401 SYSVAR = 385, 402 UMINUS = 386 402 403 }; 403 404 #endif … … 416 417 417 418 /* Line 264 of yacc.c */ 418 #line 42 3"grammar.cc"419 #line 420 "grammar.cc" 419 420 420 421 #ifdef short … … 631 632 #define YYFINAL 2 632 633 /* YYLAST -- Last index in YYTABLE. */ 633 #define YYLAST 2 454634 #define YYLAST 2536 634 635 635 636 /* YYNTOKENS -- Number of terminals. */ 636 #define YYNTOKENS 1 49637 #define YYNTOKENS 150 637 638 /* YYNNTS -- Number of nonterminals. */ 638 #define YYNNTS 4 4639 #define YYNNTS 45 639 640 /* YYNRULES -- Number of rules. */ 640 #define YYNRULES 17 0641 #define YYNRULES 172 641 642 /* YYNRULES -- Number of states. */ 642 #define YYNSTATES 3 86643 #define YYNSTATES 393 643 644 644 645 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 645 646 #define YYUNDEFTOK 2 646 #define YYMAXUTOK 38 5647 #define YYMAXUTOK 386 647 648 648 649 #define YYTRANSLATE(YYX) \ … … 655 656 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 656 657 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 657 2, 2, 2, 2, 2, 2, 2, 2, 14 1, 2,658 14 5, 146, 143, 133, 139, 134, 147, 135, 2, 2,659 2, 2, 2, 2, 2, 2, 2, 2, 14 2, 140,660 13 1, 130, 132, 2, 2, 2, 2, 2, 2, 2,658 2, 2, 2, 2, 2, 2, 2, 2, 142, 2, 659 146, 147, 144, 134, 140, 135, 148, 136, 2, 2, 660 2, 2, 2, 2, 2, 2, 2, 2, 143, 141, 661 132, 131, 133, 2, 2, 2, 2, 2, 2, 2, 661 662 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 662 663 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 663 2, 13 6, 2, 137, 138, 2, 148, 2, 2, 2,664 2, 137, 2, 138, 139, 2, 149, 2, 2, 2, 664 665 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 665 666 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, … … 690 691 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 691 692 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 692 125, 126, 127, 128, 129, 1 44693 125, 126, 127, 128, 129, 130, 145 693 694 }; 694 695 … … 706 707 216, 221, 230, 235, 244, 249, 253, 255, 257, 259, 707 708 263, 270, 275, 282, 289, 296, 303, 310, 317, 321, 708 327, 3 28, 334, 337, 339, 342, 345, 349, 353, 357,709 36 1, 365, 369, 373, 377, 381, 385, 388, 391, 394,710 397, 399, 403, 406, 409, 412, 415, 424, 427, 431,711 43 4, 436, 438, 444, 446, 448, 453, 455, 459, 461,712 46 5, 467, 469, 471, 473, 474, 479, 483, 486, 490,713 49 3, 496, 500, 505, 510, 515, 520, 525, 530, 535,714 5 40, 547, 554, 561, 568, 575, 582, 589, 593, 595,715 60 4, 607, 610, 612, 614, 617, 620, 622, 628, 631,716 637, 6 39, 641, 645, 651, 655, 659, 664, 667, 670,717 67 5709 327, 333, 334, 340, 343, 346, 348, 351, 354, 358, 710 362, 366, 370, 374, 378, 382, 386, 390, 394, 397, 711 400, 403, 406, 408, 412, 415, 418, 421, 424, 433, 712 436, 440, 443, 445, 447, 453, 455, 457, 462, 464, 713 468, 470, 474, 476, 478, 480, 482, 483, 488, 492, 714 495, 499, 502, 505, 509, 514, 519, 524, 529, 534, 715 539, 544, 549, 556, 563, 570, 577, 584, 591, 598, 716 602, 604, 613, 616, 619, 621, 623, 626, 629, 631, 717 637, 640, 646, 648, 650, 654, 660, 664, 668, 673, 718 676, 679, 684 718 719 }; 719 720 … … 721 722 static const yytype_int16 yyrhs[] = 722 723 { 723 150, 0, -1, -1, 150, 151, -1, 152, -1, 154, 724 140, -1, 165, 140, -1, 192, -1, 125, -1, 140, 725 -1, 1, 140, -1, 187, -1, 188, -1, 153, -1, 726 189, -1, 190, -1, 174, -1, 176, -1, 177, -1, 727 103, 112, -1, 155, -1, 178, -1, 179, -1, 180, 728 -1, 191, -1, 182, -1, 183, -1, 185, -1, 186, 729 -1, 163, 157, -1, 115, -1, 164, -1, 156, 11, 730 156, -1, 158, 147, 156, -1, 156, 145, 146, -1, 731 156, 145, 157, 146, -1, 136, 157, 137, -1, 113, 732 -1, 129, -1, 166, -1, 15, 145, 158, 146, -1, 733 99, 145, 158, 146, -1, 100, 145, 157, 146, -1, 734 100, 145, 146, -1, 101, 145, 158, 146, -1, 102, 735 145, 157, 146, -1, 102, 145, 146, -1, 91, 145, 736 158, 146, -1, 94, 145, 158, 146, -1, 95, 145, 737 158, 146, -1, 97, 145, 158, 146, -1, 92, 145, 738 158, 139, 158, 146, -1, 94, 145, 158, 139, 158, 739 146, -1, 96, 145, 158, 139, 158, 146, -1, 97, 740 145, 158, 139, 158, 146, -1, 93, 145, 158, 139, 741 158, 139, 158, 146, -1, 95, 145, 158, 139, 158, 742 139, 158, 146, -1, 96, 145, 158, 139, 158, 139, 743 158, 146, -1, 97, 145, 158, 139, 158, 139, 158, 744 146, -1, 98, 145, 146, -1, 98, 145, 157, 146, 745 -1, 173, 145, 158, 139, 158, 139, 158, 146, -1, 746 173, 145, 158, 146, -1, 16, 145, 167, 139, 167, 747 139, 171, 146, -1, 16, 145, 158, 146, -1, 157, 748 139, 158, -1, 158, -1, 162, -1, 156, -1, 145, 749 157, 146, -1, 158, 136, 158, 139, 158, 137, -1, 750 158, 136, 158, 137, -1, 117, 145, 158, 139, 91, 751 146, -1, 117, 145, 158, 139, 94, 146, -1, 117, 752 145, 158, 139, 95, 146, -1, 117, 145, 158, 139, 753 97, 146, -1, 117, 145, 158, 139, 98, 146, -1, 754 117, 145, 158, 139, 158, 146, -1, 160, 158, 161, 755 -1, 160, 158, 130, 158, 161, -1, -1, 121, 145, 756 159, 158, 146, -1, 122, 145, -1, 146, -1, 158, 757 10, -1, 158, 7, -1, 158, 133, 158, -1, 158, 758 134, 158, -1, 158, 135, 158, -1, 158, 138, 158, 759 -1, 158, 131, 158, -1, 158, 141, 158, -1, 158, 760 9, 158, -1, 158, 4, 158, -1, 158, 3, 158, 761 -1, 158, 142, 158, -1, 8, 158, -1, 134, 158, 762 -1, 165, 172, -1, 157, 130, -1, 114, -1, 148, 763 158, 148, -1, 99, 156, -1, 100, 156, -1, 101, 764 156, -1, 102, 156, -1, 173, 156, 136, 158, 137, 765 136, 158, 137, -1, 173, 156, -1, 165, 139, 156, 766 -1, 15, 156, -1, 111, -1, 158, -1, 145, 158, 767 139, 157, 146, -1, 114, -1, 168, -1, 168, 145, 768 157, 146, -1, 169, -1, 169, 139, 170, -1, 169, 769 -1, 145, 170, 146, -1, 130, -1, 20, -1, 14, 770 -1, 13, -1, -1, 131, 166, 175, 140, -1, 105, 771 111, 140, -1, 105, 140, -1, 103, 111, 140, -1, 772 104, 157, -1, 106, 156, -1, 179, 139, 156, -1, 773 108, 145, 99, 146, -1, 108, 145, 100, 146, -1, 774 108, 145, 101, 146, -1, 108, 145, 102, 146, -1, 775 108, 145, 16, 146, -1, 108, 145, 173, 146, -1, 776 108, 145, 15, 146, -1, 108, 145, 156, 146, -1, 777 108, 145, 156, 139, 99, 146, -1, 108, 145, 156, 778 139, 100, 146, -1, 108, 145, 156, 139, 101, 146, 779 -1, 108, 145, 156, 139, 102, 146, -1, 108, 145, 780 156, 139, 16, 146, -1, 108, 145, 156, 139, 173, 781 146, -1, 108, 145, 156, 139, 15, 146, -1, 108, 782 145, 146, -1, 16, -1, 181, 156, 172, 167, 139, 783 167, 139, 171, -1, 181, 156, -1, 129, 166, -1, 784 109, -1, 40, -1, 184, 158, -1, 110, 158, -1, 785 157, -1, 124, 145, 158, 146, 112, -1, 120, 112, 786 -1, 124, 145, 158, 146, 118, -1, 118, -1, 119, 787 -1, 126, 111, 112, -1, 123, 111, 111, 111, 112, 788 -1, 15, 164, 112, -1, 116, 111, 112, -1, 116, 789 111, 111, 112, -1, 128, 165, -1, 128, 158, -1, 790 127, 145, 157, 146, -1, 127, 145, 146, -1 724 151, 0, -1, -1, 151, 152, -1, 153, -1, 155, 725 141, -1, 167, 141, -1, 194, -1, 126, -1, 141, 726 -1, 1, 141, -1, 189, -1, 190, -1, 154, -1, 727 191, -1, 192, -1, 176, -1, 178, -1, 179, -1, 728 103, 112, -1, 156, -1, 180, -1, 181, -1, 182, 729 -1, 193, -1, 184, -1, 185, -1, 187, -1, 188, 730 -1, 165, 158, -1, 115, -1, 166, -1, 157, 11, 731 157, -1, 159, 148, 157, -1, 157, 146, 147, -1, 732 157, 146, 158, 147, -1, 137, 158, 138, -1, 113, 733 -1, 130, -1, 168, -1, 15, 146, 159, 147, -1, 734 99, 146, 159, 147, -1, 100, 146, 158, 147, -1, 735 100, 146, 147, -1, 101, 146, 159, 147, -1, 102, 736 146, 158, 147, -1, 102, 146, 147, -1, 91, 146, 737 159, 147, -1, 94, 146, 159, 147, -1, 95, 146, 738 159, 147, -1, 97, 146, 159, 147, -1, 92, 146, 739 159, 140, 159, 147, -1, 94, 146, 159, 140, 159, 740 147, -1, 96, 146, 159, 140, 159, 147, -1, 97, 741 146, 159, 140, 159, 147, -1, 93, 146, 159, 140, 742 159, 140, 159, 147, -1, 95, 146, 159, 140, 159, 743 140, 159, 147, -1, 96, 146, 159, 140, 159, 140, 744 159, 147, -1, 97, 146, 159, 140, 159, 140, 159, 745 147, -1, 98, 146, 147, -1, 98, 146, 158, 147, 746 -1, 175, 146, 159, 140, 159, 140, 159, 147, -1, 747 175, 146, 159, 147, -1, 16, 146, 169, 140, 169, 748 140, 173, 147, -1, 16, 146, 159, 147, -1, 158, 749 140, 159, -1, 159, -1, 164, -1, 157, -1, 146, 750 158, 147, -1, 159, 137, 159, 140, 159, 138, -1, 751 159, 137, 159, 138, -1, 117, 146, 159, 140, 91, 752 147, -1, 117, 146, 159, 140, 94, 147, -1, 117, 753 146, 159, 140, 95, 147, -1, 117, 146, 159, 140, 754 97, 147, -1, 117, 146, 159, 140, 98, 147, -1, 755 117, 146, 159, 140, 159, 147, -1, 161, 159, 163, 756 -1, 161, 159, 131, 159, 163, -1, 162, 159, 140, 757 159, 163, -1, -1, 122, 146, 160, 159, 147, -1, 758 123, 146, -1, 118, 146, -1, 147, -1, 159, 10, 759 -1, 159, 7, -1, 159, 134, 159, -1, 159, 135, 760 159, -1, 159, 136, 159, -1, 159, 139, 159, -1, 761 159, 132, 159, -1, 159, 142, 159, -1, 159, 9, 762 159, -1, 159, 4, 159, -1, 159, 3, 159, -1, 763 159, 143, 159, -1, 8, 159, -1, 135, 159, -1, 764 167, 174, -1, 158, 131, -1, 114, -1, 149, 159, 765 149, -1, 99, 157, -1, 100, 157, -1, 101, 157, 766 -1, 102, 157, -1, 175, 157, 137, 159, 138, 137, 767 159, 138, -1, 175, 157, -1, 167, 140, 157, -1, 768 15, 157, -1, 111, -1, 159, -1, 146, 159, 140, 769 158, 147, -1, 114, -1, 170, -1, 170, 146, 158, 770 147, -1, 171, -1, 171, 140, 172, -1, 171, -1, 771 146, 172, 147, -1, 131, -1, 20, -1, 14, -1, 772 13, -1, -1, 132, 168, 177, 141, -1, 105, 111, 773 141, -1, 105, 141, -1, 103, 111, 141, -1, 104, 774 158, -1, 106, 157, -1, 181, 140, 157, -1, 108, 775 146, 99, 147, -1, 108, 146, 100, 147, -1, 108, 776 146, 101, 147, -1, 108, 146, 102, 147, -1, 108, 777 146, 16, 147, -1, 108, 146, 175, 147, -1, 108, 778 146, 15, 147, -1, 108, 146, 157, 147, -1, 108, 779 146, 157, 140, 99, 147, -1, 108, 146, 157, 140, 780 100, 147, -1, 108, 146, 157, 140, 101, 147, -1, 781 108, 146, 157, 140, 102, 147, -1, 108, 146, 157, 782 140, 16, 147, -1, 108, 146, 157, 140, 175, 147, 783 -1, 108, 146, 157, 140, 15, 147, -1, 108, 146, 784 147, -1, 16, -1, 183, 157, 174, 169, 140, 169, 785 140, 173, -1, 183, 157, -1, 130, 168, -1, 109, 786 -1, 40, -1, 186, 159, -1, 110, 159, -1, 158, 787 -1, 125, 146, 159, 147, 112, -1, 121, 112, -1, 788 125, 146, 159, 147, 119, -1, 119, -1, 120, -1, 789 127, 111, 112, -1, 124, 111, 111, 111, 112, -1, 790 15, 166, 112, -1, 116, 111, 112, -1, 116, 111, 791 111, 112, -1, 129, 167, -1, 129, 159, -1, 128, 792 146, 158, 147, -1, 128, 146, 147, -1 791 793 }; 792 794 … … 794 796 static const yytype_uint16 yyrline[] = 795 797 { 796 0, 3 70, 370, 372, 406, 407, 409, 411, 415, 420,797 4 22, 473, 474, 475, 476, 477, 478, 479, 480, 484,798 48 7, 488, 489, 490, 491, 492, 493, 494, 495, 498,799 50 5, 510, 514, 518, 522, 526, 539, 567, 591, 597,800 60 3, 607, 611, 615, 619, 623, 627, 631, 635, 639,801 64 3, 647, 651, 655, 659, 663, 667, 671, 675, 679,802 68 3, 687, 691, 695, 699, 706, 717, 723, 728, 729,803 7 30, 734, 738, 742, 746, 750, 754, 758, 762, 766,804 78 4, 783, 801, 809, 818, 822, 826, 830, 834, 838,805 84 2, 846, 850, 854, 858, 862, 866, 873, 880, 881,806 900, 901, 913, 918, 923, 927, 931, 971, 997, 1018,807 10 26, 1030, 1031, 1045, 1053, 1062, 1107, 1108, 1117, 1118,808 112 4, 1131, 1133, 1135, 1145, 1144, 1152, 1157, 1164, 1172,809 11 84, 1200, 1219, 1223, 1227, 1232, 1236, 1240, 1244, 1248,810 125 3, 1259, 1265, 1271, 1277, 1283, 1289, 1301, 1308, 1312,811 13 49, 1359, 1365, 1365, 1368, 1440, 1444, 1473, 1486, 1503,812 1 512, 1517, 1525, 1537, 1556, 1566, 1585, 1608, 1614, 1626,813 16 32798 0, 367, 367, 369, 403, 404, 406, 408, 412, 417, 799 419, 470, 471, 472, 473, 474, 475, 476, 477, 481, 800 484, 485, 486, 487, 488, 489, 490, 491, 492, 495, 801 502, 507, 511, 515, 519, 523, 536, 564, 588, 594, 802 600, 604, 608, 612, 616, 620, 624, 628, 632, 636, 803 640, 644, 648, 652, 656, 660, 664, 668, 672, 676, 804 680, 684, 688, 692, 696, 703, 714, 720, 725, 726, 805 727, 731, 735, 739, 743, 747, 751, 755, 759, 763, 806 780, 787, 786, 804, 812, 820, 829, 833, 837, 841, 807 845, 849, 853, 857, 861, 865, 869, 873, 877, 884, 808 891, 892, 911, 912, 924, 929, 934, 938, 942, 982, 809 1008, 1029, 1037, 1041, 1042, 1056, 1064, 1073, 1118, 1119, 810 1128, 1129, 1135, 1142, 1144, 1146, 1156, 1155, 1163, 1168, 811 1175, 1183, 1195, 1211, 1230, 1234, 1238, 1243, 1247, 1251, 812 1255, 1259, 1264, 1270, 1276, 1282, 1288, 1294, 1300, 1312, 813 1319, 1323, 1360, 1370, 1376, 1376, 1379, 1451, 1455, 1484, 814 1497, 1514, 1523, 1528, 1536, 1548, 1567, 1577, 1596, 1619, 815 1625, 1637, 1643 814 816 }; 815 817 #endif … … 842 844 "EXPORT_CMD", "HELP_CMD", "KILL_CMD", "LIB_CMD", "LISTVAR_CMD", 843 845 "SETRING_CMD", "TYPE_CMD", "STRINGTOK", "BLOCKTOK", "INT_CONST", 844 "UNKNOWN_IDENT", "RINGVAR", "PROC_DEF", "APPLY", " BREAK_CMD",845 " CONTINUE_CMD", "ELSE_CMD", "EVAL", "QUOTE", "FOR_CMD", "IF_CMD",846 " SYS_BREAK", "WHILE_CMD", "RETURN", "PARAMETER", "SYSVAR", "'='", "'<'",847 "' >'", "'+'", "'-'", "'/'", "'['", "']'", "'^'", "','", "';'", "'&'",848 "' :'", "'*'", "UMINUS", "'('", "')'", "'.'", "'`'", "$accept", "lines",849 " pprompt", "flowctrl", "example_dummy", "command", "assign", "elemexpr",850 " exprlist", "expr", "$@1", "quote_start", "quote_end", "expr_arithmetic",851 " left_value", "extendedid", "declare_ip_variable", "stringexpr", "rlist",852 " ordername", "orderelem", "OrderingList", "ordering", "cmdeq", "mat_cmd",853 " filecmd", "$@2", "helpcmd", "examplecmd", "exportcmd", "killcmd",854 " listcmd", "ringcmd1", "ringcmd", "scriptcmd", "setrings", "setringcmd",855 " typecmd", "ifcmd", "whilecmd", "forcmd", "proccmd", "parametercmd",856 " returncmd", 0846 "UNKNOWN_IDENT", "RINGVAR", "PROC_DEF", "APPLY", "ASSUME_CMD", 847 "BREAK_CMD", "CONTINUE_CMD", "ELSE_CMD", "EVAL", "QUOTE", "FOR_CMD", 848 "IF_CMD", "SYS_BREAK", "WHILE_CMD", "RETURN", "PARAMETER", "SYSVAR", 849 "'='", "'<'", "'>'", "'+'", "'-'", "'/'", "'['", "']'", "'^'", "','", 850 "';'", "'&'", "':'", "'*'", "UMINUS", "'('", "')'", "'.'", "'`'", 851 "$accept", "lines", "pprompt", "flowctrl", "example_dummy", "command", 852 "assign", "elemexpr", "exprlist", "expr", "$@1", "quote_start", 853 "assume_start", "quote_end", "expr_arithmetic", "left_value", 854 "extendedid", "declare_ip_variable", "stringexpr", "rlist", "ordername", 855 "orderelem", "OrderingList", "ordering", "cmdeq", "mat_cmd", "filecmd", 856 "$@2", "helpcmd", "examplecmd", "exportcmd", "killcmd", "listcmd", 857 "ringcmd1", "ringcmd", "scriptcmd", "setrings", "setringcmd", "typecmd", 858 "ifcmd", "whilecmd", "forcmd", "proccmd", "parametercmd", "returncmd", 0 857 859 }; 858 860 #endif … … 876 878 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 877 879 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 878 61, 60, 62, 43, 45, 47, 91, 93, 94, 44,879 59, 38, 58, 42, 385, 40, 41, 46, 96880 385, 61, 60, 62, 43, 45, 47, 91, 93, 94, 881 44, 59, 38, 58, 42, 386, 40, 41, 46, 96 880 882 }; 881 883 # endif … … 884 886 static const yytype_uint8 yyr1[] = 885 887 { 886 0, 1 49, 150, 150, 151, 151, 151, 151, 151, 151,887 15 1, 152, 152, 152, 152, 152, 152, 152, 152, 153,888 15 4, 154, 154, 154, 154, 154, 154, 154, 154, 155,889 15 6, 156, 156, 156, 156, 156, 156, 156, 156, 156,890 15 6, 156, 156, 156, 156, 156, 156, 156, 156, 156,891 15 6, 156, 156, 156, 156, 156, 156, 156, 156, 156,892 15 6, 156, 156, 156, 156, 157, 157, 158, 158, 158,893 15 8, 158, 158, 158, 158, 158, 158, 158, 158, 158,894 159, 1 58, 160, 161, 162, 162, 162, 162, 162, 162,895 16 2, 162, 162, 162, 162, 162, 162, 162, 163, 163,896 16 4, 164, 165, 165, 165, 165, 165, 165, 165, 165,897 16 6, 167, 167, 168, 169, 169, 170, 170, 171, 171,898 17 2, 173, 173, 173, 175, 174, 176, 176, 177, 178,899 179, 1 79, 180, 180, 180, 180, 180, 180, 180, 180,900 18 0, 180, 180, 180, 180, 180, 180, 180, 181, 182,901 18 2, 183, 184, 184, 185, 186, 186, 187, 187, 187,902 18 7, 187, 188, 189, 190, 190, 190, 191, 191, 192,903 19 2888 0, 150, 151, 151, 152, 152, 152, 152, 152, 152, 889 152, 153, 153, 153, 153, 153, 153, 153, 153, 154, 890 155, 155, 155, 155, 155, 155, 155, 155, 155, 156, 891 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 892 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 893 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 894 157, 157, 157, 157, 157, 158, 158, 159, 159, 159, 895 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 896 159, 160, 159, 161, 162, 163, 164, 164, 164, 164, 897 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 898 165, 165, 166, 166, 167, 167, 167, 167, 167, 167, 899 167, 167, 168, 169, 169, 170, 171, 171, 172, 172, 900 173, 173, 174, 175, 175, 175, 177, 176, 178, 178, 901 179, 180, 181, 181, 182, 182, 182, 182, 182, 182, 902 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 903 183, 184, 184, 185, 186, 186, 187, 188, 188, 189, 904 189, 189, 189, 189, 190, 191, 192, 192, 192, 193, 905 193, 194, 194 904 906 }; 905 907 … … 915 917 4, 8, 4, 8, 4, 3, 1, 1, 1, 3, 916 918 6, 4, 6, 6, 6, 6, 6, 6, 3, 5, 917 0, 5, 2, 1, 2, 2, 3, 3, 3, 3,918 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,919 1, 3, 2, 2, 2, 2, 8, 2, 3, 2,920 1, 1, 5, 1, 1, 4, 1, 3, 1, 3,921 1, 1, 1, 1, 0, 4, 3, 2, 3, 2,922 2, 3, 4, 4, 4, 4, 4, 4, 4, 4,923 6, 6, 6, 6, 6, 6, 6, 3, 1, 8,924 2, 2, 1, 1, 2, 2, 1, 5, 2, 5,925 1, 1, 3, 5, 3, 3, 4, 2, 2, 4,926 3919 5, 0, 5, 2, 2, 1, 2, 2, 3, 3, 920 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 921 2, 2, 1, 3, 2, 2, 2, 2, 8, 2, 922 3, 2, 1, 1, 5, 1, 1, 4, 1, 3, 923 1, 3, 1, 1, 1, 1, 0, 4, 3, 2, 924 3, 2, 2, 3, 4, 4, 4, 4, 4, 4, 925 4, 4, 6, 6, 6, 6, 6, 6, 6, 3, 926 1, 8, 2, 2, 1, 1, 2, 2, 1, 5, 927 2, 5, 1, 1, 3, 5, 3, 3, 4, 2, 928 2, 4, 3 927 929 }; 928 930 … … 932 934 static const yytype_uint8 yydefact[] = 933 935 { 934 2, 0, 1, 0, 0, 123, 122, 0, 148, 121, 935 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 936 0, 0, 0, 0, 0, 0, 0, 0, 152, 0, 937 110, 37, 100, 30, 0, 0, 160, 161, 0, 0, 938 0, 0, 0, 8, 0, 0, 0, 38, 0, 0, 939 0, 9, 0, 0, 3, 4, 13, 0, 20, 68, 940 156, 66, 0, 67, 0, 31, 0, 39, 0, 16, 941 17, 18, 21, 22, 23, 0, 25, 26, 0, 27, 942 28, 11, 12, 14, 15, 24, 7, 10, 0, 0, 943 0, 0, 0, 0, 38, 96, 0, 0, 68, 0, 944 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 945 0, 68, 0, 68, 0, 68, 0, 68, 0, 19, 946 129, 0, 127, 68, 0, 155, 0, 0, 158, 80, 947 82, 0, 0, 0, 0, 0, 168, 167, 151, 124, 948 97, 0, 0, 0, 5, 0, 0, 99, 0, 0, 949 0, 85, 0, 84, 0, 0, 0, 0, 0, 0, 950 0, 0, 0, 0, 29, 120, 0, 6, 98, 0, 951 68, 0, 68, 154, 0, 0, 0, 0, 0, 0, 952 66, 164, 0, 111, 0, 0, 0, 0, 0, 0, 953 0, 0, 59, 0, 66, 43, 0, 66, 46, 0, 954 128, 126, 0, 0, 0, 0, 0, 0, 147, 68, 955 0, 0, 165, 0, 0, 0, 0, 162, 170, 0, 956 0, 36, 69, 101, 32, 34, 0, 65, 94, 93, 957 92, 90, 86, 87, 88, 0, 89, 91, 95, 33, 958 0, 83, 78, 68, 0, 0, 68, 0, 0, 0, 959 0, 0, 0, 0, 40, 66, 64, 0, 47, 0, 960 0, 0, 48, 0, 49, 0, 0, 50, 60, 41, 961 42, 44, 45, 138, 136, 132, 133, 134, 135, 0, 962 139, 137, 166, 0, 0, 0, 0, 169, 125, 35, 963 71, 0, 0, 0, 62, 0, 111, 0, 42, 45, 936 2, 0, 1, 0, 0, 125, 124, 0, 150, 123, 937 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 938 0, 0, 0, 0, 0, 0, 0, 0, 154, 0, 939 112, 37, 102, 30, 0, 0, 0, 162, 163, 0, 940 0, 0, 0, 0, 8, 0, 0, 0, 38, 0, 941 0, 0, 9, 0, 0, 3, 4, 13, 0, 20, 942 68, 158, 66, 0, 0, 67, 0, 31, 0, 39, 943 0, 16, 17, 18, 21, 22, 23, 0, 25, 26, 944 0, 27, 28, 11, 12, 14, 15, 24, 7, 10, 945 0, 0, 0, 0, 0, 0, 38, 98, 0, 0, 946 68, 0, 31, 0, 0, 0, 0, 0, 0, 0, 947 0, 0, 0, 68, 0, 68, 0, 68, 0, 68, 948 0, 19, 131, 0, 129, 68, 0, 157, 0, 0, 949 84, 160, 81, 83, 0, 0, 0, 0, 0, 170, 950 169, 153, 126, 99, 0, 0, 0, 5, 0, 0, 951 101, 0, 0, 0, 87, 0, 86, 0, 0, 0, 952 0, 0, 0, 0, 0, 0, 0, 0, 29, 122, 953 0, 6, 100, 0, 68, 0, 68, 156, 0, 0, 954 0, 0, 0, 0, 66, 166, 0, 113, 0, 0, 955 0, 0, 0, 0, 0, 0, 59, 0, 66, 43, 956 0, 66, 46, 0, 130, 128, 0, 0, 0, 0, 957 0, 0, 149, 68, 0, 0, 167, 0, 0, 0, 958 0, 164, 172, 0, 0, 36, 69, 103, 32, 34, 959 0, 65, 96, 95, 94, 92, 88, 89, 90, 0, 960 91, 93, 97, 33, 0, 85, 78, 0, 68, 0, 961 0, 68, 0, 0, 0, 0, 0, 0, 0, 40, 962 66, 64, 0, 47, 0, 0, 0, 48, 0, 49, 963 0, 0, 50, 60, 41, 42, 44, 45, 140, 138, 964 134, 135, 136, 137, 0, 141, 139, 168, 0, 0, 965 0, 0, 171, 127, 35, 71, 0, 0, 0, 0, 966 62, 0, 113, 0, 42, 45, 0, 0, 0, 0, 964 967 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 965 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,966 0, 81, 163, 157, 159, 0, 79, 0, 0, 0,967 0, 0, 51, 0, 52, 0, 0, 53, 0, 54,968 14 6, 144, 140, 141, 142, 143, 145, 72, 73, 74,969 7 5, 76, 77, 70, 0, 0, 0, 112, 113, 0,970 114, 118, 0, 0, 0, 0, 0, 0, 0, 0,971 116, 0, 0, 63, 55, 56, 57, 58, 61, 106,972 149, 0, 119, 0, 117, 115968 0, 0, 0, 0, 0, 0, 0, 82, 165, 159, 969 161, 0, 79, 80, 0, 0, 0, 0, 0, 51, 970 0, 52, 0, 0, 53, 0, 54, 148, 146, 142, 971 143, 144, 145, 147, 72, 73, 74, 75, 76, 77, 972 70, 0, 0, 0, 114, 115, 0, 116, 120, 0, 973 0, 0, 0, 0, 0, 0, 0, 118, 0, 0, 974 63, 55, 56, 57, 58, 61, 108, 151, 0, 121, 975 0, 119, 117 973 976 }; 974 977 … … 976 979 static const yytype_int16 yydefgoto[] = 977 980 { 978 -1, 1, 5 4, 55, 56, 57, 58, 59, 142, 61,979 21 4, 62, 242, 63, 64, 65, 66, 67, 184, 360,980 36 1, 371, 362, 168, 96, 69, 220, 70, 71, 72,981 7 3, 74, 75, 76, 77, 78, 79, 80, 81, 82,982 8 3, 84, 85, 86981 -1, 1, 55, 56, 57, 58, 59, 60, 145, 62, 982 218, 63, 64, 246, 65, 66, 67, 68, 69, 188, 983 367, 368, 378, 369, 172, 98, 71, 224, 72, 73, 984 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 985 84, 85, 86, 87, 88 983 986 }; 984 987 985 988 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 986 989 STATE-NUM. */ 987 #define YYPACT_NINF -35 7990 #define YYPACT_NINF -359 988 991 static const yytype_int16 yypact[] = 989 992 { 990 -357, 296, -357, -118, 1780, -357, -357, 1838, -94, -357, 991 -357, -89, -76, -67, -48, -38, -31, -28, -25, 1897, 992 1955, 2014, 2072, -103, 1780, -106, 1780, -21, -357, 1780, 993 -357, -357, -357, -357, 41, 20, -357, -357, -46, 23, 994 25, 60, 42, -357, 77, 44, 2131, 80, 80, 1780, 995 1780, -357, 1780, 1780, -357, -357, -357, -69, -357, -10, 996 -109, 1287, 1780, -357, 1780, -357, -120, -357, 2189, -357, 997 -357, -357, -357, 53, -357, 1780, -357, -357, 1780, -357, 998 -357, -357, -357, -357, -357, -357, -357, -357, 51, -94, 999 55, 59, 69, 78, -357, 130, 79, 1780, 210, 1287, 1000 115, 2248, 1780, 1780, 1780, 1780, 1780, 1780, 1780, 1422, 1001 1780, 347, 1487, 373, 1780, 417, 1546, 443, 88, -357, 1002 90, 93, -357, 18, 1604, 1287, -75, 1780, -357, -357, 1003 -357, 119, 1780, 122, 1663, 1838, 1287, 96, -357, -357, 1004 130, -133, -132, 84, -357, 1780, 1721, -357, 1780, 1780, 1005 1780, -357, 1780, -357, 1780, 1780, 1780, 1780, 1780, 1780, 1006 1780, 1780, 1780, 109, 90, -357, 1780, -357, -357, 1780, 1007 183, 1780, 449, 1287, 1780, 1780, 1487, 1780, 1546, 1780, 1008 518, -357, 1780, 535, 97, 571, 588, 616, 8, 317, 1009 676, 334, -357, -104, 691, -357, -99, 729, -357, -98, 1010 -357, -357, -107, -70, -65, -63, -61, -56, -357, 21, 1011 -50, 125, -357, 757, 1780, 137, 772, -357, -357, -87, 1012 101, -357, -357, -357, -357, -357, -85, 1287, 1337, 1060, 1013 1060, 239, 195, 195, 130, 360, 17, 1352, 195, -357, 1014 1780, -357, -357, 460, 430, 1780, 68, 2248, 518, 691, 1015 -84, 729, -82, 430, -357, 789, -357, 2248, -357, 1780, 1016 1780, 1780, -357, 1780, -357, 1780, 1780, -357, -357, -357, 1017 -357, -357, -357, -357, -357, -357, -357, -357, -357, 1200, 1018 -357, -357, -357, 2306, 832, 140, -44, -357, -357, -357, 1019 -357, 1780, 849, 1780, -357, 870, 1287, 118, -357, -357, 1020 1780, 120, 930, 947, 990, 1011, 475, 501, 107, 108, 1021 116, 117, 121, 124, 126, -45, -42, -40, -36, -23, 1022 1026, -357, -357, -357, -357, 1043, -357, 1088, 138, 2248, 1023 -79, -112, -357, 1780, -357, 1780, 1780, -357, 1780, -357, 1024 -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, 1025 -357, -357, -357, -357, 1780, 1780, 134, -357, -357, 146, 1026 131, -357, 129, 1103, 1131, 1179, 1196, 1244, 1272, -112, 1027 139, 133, 1780, -357, -357, -357, -357, -357, -357, -357, 1028 -357, 146, -357, -74, -357, -357 993 -359, 303, -359, -115, 1827, -359, -359, 1887, -107, -359, 994 -359, -103, -72, -68, -62, -42, -35, -30, -21, 1952, 995 2012, 2077, 2137, -90, 1827, -104, 1827, -3, -359, 1827, 996 -359, -359, -359, -359, 50, 21, 53, -359, -359, 44, 997 56, 63, 60, 64, -359, 114, 85, 2202, 125, 125, 998 1827, 1827, -359, 1827, 1827, -359, -359, -359, 108, -359, 999 -6, -113, 1316, 1827, 1827, -359, 1827, -359, -125, -359, 1000 2262, -359, -359, -359, -359, 110, -359, 1827, -359, -359, 1001 1827, -359, -359, -359, -359, -359, -359, -359, -359, -359, 1002 111, -107, 113, 116, 117, 119, -359, 18, 120, 1827, 1003 115, 1316, 139, 2327, 1827, 1827, 1827, 1827, 1827, 1827, 1004 1827, 1452, 1827, 127, 1512, 206, 1827, 404, 1577, 425, 1005 129, -359, 134, 135, -359, 24, 1637, 1316, -54, 1827, 1006 -359, -359, -359, -359, 143, 1827, 148, 1702, 1887, 1316, 1007 138, -359, -359, 18, -100, -137, 10, -359, 1827, 1762, 1008 -359, 1827, 1827, 1827, -359, 1827, -359, 1827, 1827, 1827, 1009 1827, 1827, 1827, 1827, 1827, 1827, 87, 529, 134, -359, 1010 1827, -359, -359, 1827, 161, 1827, 66, 1316, 1827, 1827, 1011 1512, 1827, 1577, 1827, 544, -359, 1827, 580, 140, 597, 1012 625, 686, 105, 324, 701, 341, -359, -116, 739, -359, 1013 -106, 767, -359, -98, -359, -359, -76, -66, -64, -60, 1014 -48, -46, -359, 22, -40, 167, -359, 784, 1827, 170, 1015 799, -359, -359, -88, 141, -359, -359, -359, -359, -359, 1016 -87, 1316, 1356, 1550, 1550, 918, 57, 57, 18, 370, 1017 2, 1371, 57, -359, 1827, -359, -359, 1827, 451, 438, 1018 1827, 92, 2327, 544, 739, -85, 767, -84, 438, -359, 1019 843, -359, 2327, -359, 1827, 1827, 1827, -359, 1827, -359, 1020 1827, 1827, -359, -359, -359, -359, -359, -359, -359, -359, 1021 -359, -359, -359, -359, 510, -359, -359, -359, 2387, 858, 1022 171, -51, -359, -359, -359, -359, 1827, 881, 881, 1827, 1023 -359, 941, 1316, 144, -359, -359, 1827, 146, 956, 1000, 1024 1023, 1040, 483, 512, 147, 150, 152, 153, 159, 162, 1025 163, -28, -26, -24, 28, 45, 1055, -359, -359, -359, 1026 -359, 1098, -359, -359, 1113, 151, 2327, -74, -110, -359, 1027 1827, -359, 1827, 1827, -359, 1827, -359, -359, -359, -359, 1028 -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, 1029 -359, 1827, 1827, 168, -359, -359, 198, 169, -359, 175, 1030 1142, 1197, 1214, 1255, 1284, 1301, -110, 174, 178, 1827, 1031 -359, -359, -359, -359, -359, -359, -359, -359, 198, -359, 1032 -71, -359, -359 1029 1033 }; 1030 1034 … … 1032 1036 static const yytype_int16 yypgoto[] = 1033 1037 { 1034 -35 7, -357, -357, -357, -357, -357, -357, 190, -1, 24,1035 -35 7, -357, -12, -357, -357, 254, 236, 114, -231, -357,1036 -35 6, -95, -81, 123, 12, -357, -357, -357, -357, -357,1037 -35 7, -357, -357, -357, -357, -357, -357, -357, -357, -357,1038 -35 7, -357, -357, -3571038 -359, -359, -359, -359, -359, -359, -359, 194, -1, 25, 1039 -359, -359, -359, -205, -359, -359, 319, 282, 179, -251, 1040 -359, -358, -58, -41, 160, 1, -359, -359, -359, -359, 1041 -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, 1042 -359, -359, -359, -359, -359 1039 1043 }; 1040 1044 … … 1043 1047 number is the opposite. If zero, do what YYDEFACT says. 1044 1048 If YYTABLE_NINF, syntax error. */ 1045 #define YYTABLE_NINF -15 11049 #define YYTABLE_NINF -153 1046 1050 static const yytype_int16 yytable[] = 1047 1051 { 1048 60, 145, 358, 370, 221, 121, 148, 148, 118, 119, 1049 165, 149, 150, 68, 222, 151, 297, 152, 153, 166, 1050 167, 147, 87, 120, 151, 370, 301, 153, 95, 145, 1051 148, 99, 145, 359, 122, 148, 211, 212, 174, 273, 1052 148, 148, 268, 99, 99, 99, 99, 270, 272, 141, 1053 99, 101, 148, 125, 148, 148, 102, 148, 68, 287, 1054 148, 289, 298, 164, 299, 148, 128, 357, 323, 103, 1055 136, 144, 385, 140, 324, 101, 274, 143, 104, 145, 1056 175, 275, 176, 276, 177, 277, 163, 149, 150, 178, 1057 278, 151, 99, 152, 153, 179, 281, 105, 356, 99, 1058 102, 347, 173, 105, 348, 106, 349, 106, 193, 108, 1059 350, 196, 149, 150, 107, 199, 151, 108, 152, 153, 1060 109, 180, 109, 351, 124, 183, 185, 186, 187, 188, 1061 189, 190, 191, 219, 194, 146, 210, 151, 197, 154, 1062 153, 155, 156, 157, 158, 226, 159, 261, 99, 160, 1063 161, 213, 126, 158, 262, 162, 216, -130, -130, 99, 1064 279, 138, 139, 146, 162, 127, 146, 280, 129, 99, 1065 130, 131, 227, 228, 229, 250, 230, 252, 231, 232, 1066 233, 234, 235, 236, 237, 238, 99, 132, 133, 134, 1067 99, 30, 171, 244, 145, 99, 174, 98, 248, 249, 1068 175, 251, 151, 253, 176, 153, 255, -131, -131, 111, 1069 113, 115, 117, 146, 177, 154, 123, 155, 156, 157, 1070 158, 145, 159, 178, 179, 160, 161, 181, 200, 148, 1071 215, 162, 223, 201, 217, 166, 257, 282, 284, 240, 1072 154, 288, 155, 156, 157, 158, 151, 159, 285, 153, 1073 160, 161, 322, 340, 341, 241, 162, 329, 170, 331, 1074 358, 100, 342, 343, 292, 172, 158, 344, 159, 295, 1075 345, 296, 346, 369, 355, 373, 372, 162, 381, 382, 1076 326, 296, 137, 302, 303, 304, 384, 305, 380, 306, 1077 307, 314, 0, 0, 0, 247, 2, 3, 0, 330, 1078 0, 0, 0, 0, 4, 0, 0, 320, 0, 5, 1079 6, 7, 8, -107, 209, 325, 9, 327, 0, 245, 1080 149, 150, -107, -107, 151, 98, 152, 153, 146, 0, 1081 157, 158, 0, 159, 0, 224, 10, 149, 150, 0, 1082 -109, 151, 162, 152, 153, 0, 0, 0, 0, -109, 1083 -109, 0, 239, 296, 0, 146, 243, 363, 145, 364, 1084 365, 246, 366, 149, 150, 0, 0, 151, 0, 152, 1085 153, 383, 155, 156, 157, 158, 0, 159, 367, 368, 1086 0, 161, 0, 0, 145, 0, 162, 11, 12, 13, 1087 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 1088 24, 25, 26, 0, 27, 28, 29, 30, 0, 31, 1089 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 1090 42, 43, 44, 45, 46, 47, 0, 48, 145, 0, 1091 49, 0, 50, 149, 150, 0, 51, 151, 0, 152, 1092 153, 52, 0, 0, 53, 0, 0, 0, 154, 0, 1093 155, 156, 157, 158, 145, 159, 263, 0, 160, 161, 1094 145, 0, 0, 264, 162, 154, 0, 155, 156, 157, 1095 158, 145, 159, 266, 0, 160, 161, -102, 149, 150, 1096 267, 162, 151, 0, 152, 153, -102, -102, 0, 0, 1097 0, 154, 146, 155, 156, 157, 158, 290, 159, 291, 1098 0, 160, 161, -103, 149, 150, 0, 162, 151, 0, 1099 152, 153, -103, -103, 0, 0, 0, 0, 146, 0, 1100 0, 149, 150, 0, 0, 151, 0, 152, 153, 0, 1101 0, 0, 0, 0, 0, 0, 0, 0, 149, 150, 1102 0, 0, 151, 0, 152, 153, 0, -104, 0, 0, 1103 0, 0, 0, 0, 0, 0, -104, -104, 0, 0, 1104 0, 154, 146, 155, 156, 157, 158, 0, 159, 293, 1105 0, 160, 161, -105, 149, 150, 294, 162, 151, 165, 1106 152, 153, -105, -105, 0, 0, 0, 0, 146, -150, 1107 -108, 149, 150, 0, 146, 151, 0, 152, 153, -108, 1108 -108, 0, 0, 0, 0, 146, 154, 0, 155, 156, 1109 157, 158, 0, 159, 336, 0, 160, 161, 0, 149, 1110 150, 337, 162, 151, 0, 152, 153, 0, 0, 0, 1111 0, 0, 154, 0, 155, 156, 157, 158, 0, 159, 1112 338, 0, 160, 161, 0, 0, 0, 339, 162, 154, 1113 0, 155, 156, 157, 158, 0, 159, 0, 0, 160, 1114 161, 0, 0, 0, 254, 162, 154, 0, 155, 156, 1115 157, 158, 0, 159, 0, 0, 160, 161, 0, 149, 1116 150, 256, 162, 151, 0, 152, 153, 0, 0, 0, 1117 0, 0, 0, 0, 149, 150, 0, 0, 151, 0, 1118 152, 153, 154, 0, 155, 156, 157, 158, 0, 159, 1119 0, 0, 160, 161, 0, 0, 0, 258, 162, 154, 1120 0, 155, 156, 157, 158, 0, 159, 259, 0, 160, 1121 161, 0, 149, 150, 0, 162, 151, 0, 152, 153, 1122 0, 0, 0, 0, 0, 0, 0, 154, 0, 155, 1123 156, 157, 158, 0, 159, 260, 0, 160, 161, 0, 1124 149, 150, 0, 162, 151, 0, 152, 153, 0, 0, 1125 0, 0, 0, 0, 0, 149, 150, 0, 0, 151, 1126 0, 152, 153, 0, 0, 0, 0, 0, 0, 0, 1127 0, 0, 149, 150, 0, 0, 151, 0, 152, 153, 1128 0, 0, 0, 0, 0, 0, 0, 154, 0, 155, 1129 156, 157, 158, 0, 159, 265, 0, 160, 161, 0, 1130 0, 0, 154, 162, 155, 156, 157, 158, 0, 159, 1131 0, 0, 160, 161, 0, 149, 150, 269, 162, 151, 1132 0, 152, 153, 0, 0, 0, 0, 0, 0, 0, 1133 0, 0, 149, 150, 0, 0, 151, 0, 152, 153, 1134 154, 0, 155, 156, 157, 158, 0, 159, 0, 0, 1135 160, 161, 0, 149, 150, 271, 162, 151, 0, 152, 1136 153, 0, 0, 0, 0, 0, 0, 0, 154, 0, 1137 155, 156, 157, 158, 0, 159, 283, 0, 160, 161, 1138 0, 0, 0, 154, 162, 155, 156, 157, 158, 0, 1139 159, 0, 0, 160, 161, 0, 0, 0, 286, 162, 1140 154, 0, 155, 156, 157, 158, 0, 159, 300, 0, 1141 160, 161, 0, 149, 150, 0, 162, 151, 0, 152, 1142 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1143 149, 150, 0, 0, 151, 0, 152, 153, 0, 0, 1144 0, 0, 0, 154, 0, 155, 156, 157, 158, 0, 1145 159, 0, 0, 160, 161, 0, 0, 0, 321, 162, 1146 154, 0, 155, 156, 157, 158, 0, 159, 0, 0, 1147 160, 161, 0, 149, 150, 241, 162, 151, 0, 152, 1148 153, 154, 0, 155, 156, 157, 158, 328, 159, 0, 1149 0, 160, 161, 0, 149, 150, 0, 162, 151, 0, 1150 152, 153, 0, 0, 0, 0, 0, 0, 0, 149, 1151 150, 0, 0, 151, 0, 152, 153, 0, 0, 0, 1152 0, 0, 0, 0, 0, 0, 149, 150, 0, 0, 1153 151, 0, 152, 153, 0, 0, 0, 0, 0, 0, 1154 0, 154, 0, 155, 156, 157, 158, 151, 159, 0, 1155 153, 160, 161, 0, 0, 0, 332, 162, 154, 0, 1156 155, 156, 157, 158, 0, 159, 333, 0, 160, 161, 1157 0, 149, 150, 0, 162, 151, 0, 152, 153, 0, 1158 0, 0, 0, 0, 0, 0, 149, 150, 0, 0, 1159 151, 0, 152, 153, 0, 0, 0, 0, 0, 0, 1160 0, 154, 0, 155, 156, 157, 158, 0, 159, 0, 1161 0, 160, 161, 0, 149, 150, 334, 162, 151, 0, 1162 152, 153, 154, 0, 155, 156, 157, 158, 0, 159, 1163 335, 0, 160, 161, 0, 0, 0, 154, 162, 155, 1164 156, 157, 158, 0, 159, 0, 0, 160, 161, 0, 1165 0, 0, 352, 162, 154, 0, 155, 156, 157, 158, 1166 353, 159, 149, 150, 160, 161, 151, 0, 152, 153, 1167 162, 154, 0, 155, 156, 157, 158, 0, 159, 149, 1168 150, 0, 161, 151, 0, 152, 153, 162, 0, 0, 1169 0, 0, 0, 5, 6, 308, 309, 0, 0, 154, 1170 9, 155, 156, 157, 158, 0, 159, 354, 0, 160, 1171 161, 0, 0, 0, 154, 162, 155, 156, 157, 158, 1172 0, 159, 0, 0, 160, 161, 0, 149, 150, 374, 1173 162, 151, 0, 152, 153, 0, 0, 0, 0, 0, 1174 0, 0, 154, 0, 155, 156, 157, 158, 0, 159, 1175 0, 0, 160, 161, 0, 149, 150, 375, 162, 151, 1176 0, 152, 153, 0, 0, 0, 0, 0, 0, 0, 1177 149, 150, 0, 0, 151, 0, 152, 153, 0, 310, 1178 311, 312, 313, 0, 0, 0, 0, 0, 0, 0, 1179 154, 0, 155, 156, 157, 158, 0, 159, 0, 0, 1180 160, 161, 0, 0, 0, 376, 162, 154, 0, 155, 1181 156, 157, 158, 0, 159, 0, 0, 160, 161, 0, 1182 -151, 150, 377, 162, 151, 0, 152, 153, 0, 0, 1183 0, 0, 0, 0, 0, 0, 150, 0, 0, 151, 1184 0, 152, 153, 0, 0, 0, 0, 0, 0, 0, 1185 0, 0, 0, 0, 0, 154, 0, 155, 156, 157, 1186 158, 0, 159, 0, 0, 160, 161, 0, 0, 0, 1187 378, 162, 0, 0, 0, 0, 0, 0, 0, 0, 1188 0, 0, 0, 154, 0, 155, 156, 157, 158, 379, 1189 159, 0, 0, 160, 161, 0, 0, 0, 154, 162, 1190 155, 156, 157, 158, 0, 159, 0, 0, 160, 161, 1191 4, 0, 0, 0, 162, 5, 6, 88, 89, 0, 1052 61, 303, 70, 151, 365, 148, 169, 123, 377, 154, 1053 226, 307, 156, 152, 153, 170, 171, 154, 150, 155, 1054 156, 120, 121, 122, 151, 154, 89, 151, 156, 97, 1055 377, 273, 101, 148, 151, 148, 366, 124, 225, 103, 1056 151, 275, 151, 104, 101, 101, 101, 101, 70, 277, 1057 144, 101, 151, 151, 127, 151, 151, 215, 216, 292, 1058 294, 329, 304, 305, 154, 168, 151, 156, 330, 151, 1059 178, 278, 139, 364, 105, 143, 392, 148, 106, 146, 1060 103, 279, 179, 280, 107, 363, 180, 281, 166, 167, 1061 152, 153, 332, 333, 154, 101, 155, 156, 181, 282, 1062 182, 283, 101, 148, 108, 177, 183, 286, 152, 153, 1063 197, 109, 154, 200, 155, 156, 110, 203, 104, 354, 1064 107, 355, 108, 356, 184, 111, 148, 214, 187, 189, 1065 190, 191, 192, 193, 194, 195, 223, 198, 148, 161, 1066 149, 201, 157, 126, 158, 159, 160, 161, 230, 162, 1067 165, 101, 163, 164, 217, 161, 131, 162, 165, 227, 1068 220, 128, 284, 101, -132, -132, 165, 129, 149, 285, 1069 149, 134, 148, 101, 110, 357, 231, 232, 233, 255, 1070 234, 257, 235, 236, 237, 238, 239, 240, 241, 242, 1071 101, 111, 358, 160, 161, 101, 162, 169, 249, 130, 1072 101, 100, 132, 253, 254, 165, 256, -152, 258, 133, 1073 135, 260, 149, 113, 115, 117, 119, 148, 244, 157, 1074 125, 158, 159, 160, 161, 136, 162, 141, 142, 163, 1075 164, 137, -133, -133, 245, 165, 30, 157, 149, 158, 1076 159, 160, 161, 289, 162, 266, -111, 163, 164, 147, 1077 175, 185, 267, 165, 219, -111, -111, 178, -104, 179, 1078 221, 149, 180, 181, 174, 182, 183, -104, -104, 297, 1079 204, 176, 298, 149, 151, 301, 205, 302, 170, 287, 1080 262, 290, 293, 328, 336, 320, 338, 302, 362, 308, 1081 309, 310, -109, 311, 347, 312, 313, 348, 250, 349, 1082 350, -109, -109, 2, 3, 337, 351, 149, 376, 352, 1083 353, 4, 365, 326, 388, 379, 5, 6, 7, 8, 1084 213, 331, 380, 9, 334, 389, 102, 152, 153, 140, 1085 391, 154, 100, 155, 156, 387, 252, -105, 0, 0, 1086 0, 0, 228, 10, 152, 153, -105, -105, 154, 0, 1087 155, 156, 149, 0, 0, 0, 0, 0, 0, 243, 1088 0, 302, 0, 0, 248, 370, 0, 371, 372, 251, 1089 373, 0, 0, 152, 153, 0, 0, 154, 390, 155, 1090 156, 0, 0, 0, 0, 0, 374, 375, 0, 0, 1091 0, 0, 0, 0, 11, 12, 13, 14, 15, 16, 1092 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1093 0, 27, 28, 29, 30, 148, 31, 32, 33, 34, 1094 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 1095 45, 46, 47, 48, 0, 49, 148, 0, 50, 0, 1096 51, 152, 153, 0, 52, 154, 0, 155, 156, 53, 1097 0, 0, 54, 0, 0, 0, 157, 0, 158, 159, 1098 160, 161, 148, 162, 268, 0, 163, 164, 0, 0, 1099 0, 269, 165, 157, 0, 158, 159, 160, 161, 0, 1100 162, 271, 0, 163, 164, 0, 152, 153, 272, 165, 1101 154, 0, 155, 156, 0, 0, 0, 0, 0, 0, 1102 0, 0, 157, 0, 158, 159, 160, 161, 295, 162, 1103 296, 0, 163, 164, 0, 152, 153, 0, 165, 154, 1104 0, 155, 156, 5, 6, 314, 315, 0, 0, 0, 1105 9, 0, 152, 153, 0, -106, 154, 0, 155, 156, 1106 0, 0, 0, 0, -106, -106, 0, 152, 153, 0, 1107 149, 154, 0, 155, 156, 0, -107, 0, 0, 0, 1108 0, 0, 0, 0, 0, -107, -107, 0, 0, 0, 1109 157, 149, 158, 159, 160, 161, 0, 162, 299, 0, 1110 163, 164, -110, 152, 153, 300, 165, 154, 0, 155, 1111 156, -110, -110, 0, 0, 0, 0, 149, 0, 0, 1112 152, 153, 0, 0, 154, 0, 155, 156, 0, 316, 1113 317, 318, 319, 0, 0, 157, 0, 158, 159, 160, 1114 161, 0, 162, 343, 0, 163, 164, 0, 152, 153, 1115 344, 165, 154, 0, 155, 156, 0, 0, 0, 0, 1116 0, 0, 0, 0, 157, 0, 158, 159, 160, 161, 1117 0, 162, 345, 0, 163, 164, 0, 0, 0, 346, 1118 165, 157, 0, 158, 159, 160, 161, 0, 162, 247, 1119 0, 163, 164, 0, 0, 0, 157, 165, 158, 159, 1120 160, 161, 0, 162, 0, 0, 163, 164, 0, 152, 1121 153, 259, 165, 154, 0, 155, 156, 0, 0, 0, 1122 0, 0, 0, 0, 152, 153, 0, 0, 154, 0, 1123 155, 156, 157, 0, 158, 159, 160, 161, 0, 162, 1124 0, 0, 163, 164, 0, 0, 0, 261, 165, 157, 1125 0, 158, 159, 160, 161, 0, 162, 0, 0, 163, 1126 164, 0, 152, 153, 263, 165, 154, 0, 155, 156, 1127 0, 0, 0, 0, 0, 0, 0, 157, 0, 158, 1128 159, 160, 161, 0, 162, 264, 0, 163, 164, 0, 1129 152, 153, 0, 165, 154, 0, 155, 156, 0, 0, 1130 0, 0, 0, 0, 0, 0, 0, 152, 153, 0, 1131 0, 154, 0, 155, 156, 0, 0, 0, 0, 0, 1132 0, 0, 152, 153, 0, 0, 154, 0, 155, 156, 1133 0, 0, 0, 0, 0, 0, 0, 0, 157, 0, 1134 158, 159, 160, 161, 0, 162, 265, 0, 163, 164, 1135 0, 0, 0, 157, 165, 158, 159, 160, 161, 0, 1136 162, 270, 0, 163, 164, 0, 152, 153, 0, 165, 1137 154, 0, 155, 156, 0, 0, 0, 0, 0, 0, 1138 0, 152, 153, 0, 0, 154, 0, 155, 156, 0, 1139 0, 157, 0, 158, 159, 160, 161, 0, 162, 0, 1140 0, 163, 164, 0, 152, 153, 274, 165, 154, 0, 1141 155, 156, 0, 0, 0, 0, 0, 0, 0, 157, 1142 0, 158, 159, 160, 161, 0, 162, 0, 0, 163, 1143 164, 0, 0, 0, 276, 165, 157, 0, 158, 159, 1144 160, 161, 0, 162, 288, 154, 163, 164, 156, 0, 1145 0, 157, 165, 158, 159, 160, 161, 0, 162, 0, 1146 0, 163, 164, 0, 152, 153, 291, 165, 154, 0, 1147 155, 156, 0, 0, 0, 0, 0, 0, 0, 152, 1148 153, 0, 0, 154, 0, 155, 156, 0, 0, 0, 1149 0, 0, 0, 0, 0, 157, 0, 158, 159, 160, 1150 161, 0, 162, 306, 0, 163, 164, 0, 0, 0, 1151 157, 165, 158, 159, 160, 161, 0, 162, 0, 0, 1152 163, 164, 0, 152, 153, 327, 165, 154, 0, 155, 1153 156, 0, 0, 157, 0, 158, 159, 160, 161, 0, 1154 162, 0, 0, 163, 164, 0, 152, 153, 245, 165, 1155 154, 0, 155, 156, 0, 0, 0, 0, 0, 0, 1156 0, 0, 0, 152, 153, 0, 0, 154, 0, 155, 1157 156, 0, 158, 159, 160, 161, 0, 162, 152, 153, 1158 0, 164, 154, 0, 155, 156, 165, 0, 0, 0, 1159 0, 0, 0, 157, 0, 158, 159, 160, 161, 335, 1160 162, 0, 0, 163, 164, 0, 0, 0, 157, 165, 1161 158, 159, 160, 161, 0, 162, 0, 0, 163, 164, 1162 0, 152, 153, 339, 165, 154, 0, 155, 156, 0, 1163 0, 0, 0, 0, 0, 0, 152, 153, 0, 0, 1164 154, 0, 155, 156, 0, 0, 0, 0, 0, 0, 1165 0, 0, 157, 0, 158, 159, 160, 161, 0, 162, 1166 340, 0, 163, 164, 0, 152, 153, 0, 165, 154, 1167 0, 155, 156, 0, 0, 157, 0, 158, 159, 160, 1168 161, 0, 162, 0, 0, 163, 164, 0, 0, 0, 1169 341, 165, 157, 0, 158, 159, 160, 161, 0, 162, 1170 342, 0, 163, 164, 0, 0, 0, 157, 165, 158, 1171 159, 160, 161, 0, 162, 0, 0, 163, 164, 0, 1172 152, 153, 359, 165, 154, 0, 155, 156, 0, 0, 1173 0, 0, 0, 0, 0, 0, 0, 152, 153, 0, 1174 0, 154, 0, 155, 156, 0, 0, 0, 0, 0, 1175 157, 0, 158, 159, 160, 161, 360, 162, 0, 0, 1176 163, 164, 0, 0, 0, 157, 165, 158, 159, 160, 1177 161, 0, 162, 361, 0, 163, 164, 0, 152, 153, 1178 0, 165, 154, 0, 155, 156, 0, 0, 0, 0, 1179 0, 0, 0, 0, 157, 0, 158, 159, 160, 161, 1180 0, 162, 0, 0, 163, 164, 0, 152, 153, 381, 1181 165, 154, 0, 155, 156, 0, 0, 0, 0, 0, 1182 0, 0, 0, 0, 152, 153, 0, 0, 154, 0, 1183 155, 156, 0, 0, 0, 0, 0, 0, 0, 152, 1184 153, 0, 0, 154, 0, 155, 156, 0, 0, 157, 1185 0, 158, 159, 160, 161, 0, 162, 0, 0, 163, 1186 164, 0, 0, 0, 382, 165, 157, 0, 158, 159, 1187 160, 161, 0, 162, 0, 0, 163, 164, 0, -153, 1188 153, 383, 165, 154, 0, 155, 156, 0, 0, 0, 1189 0, 0, 0, 0, 0, 153, 0, 0, 154, 0, 1190 155, 156, 0, 0, 0, 0, 0, 157, 0, 158, 1191 159, 160, 161, 0, 162, 0, 0, 163, 164, 0, 1192 0, 0, 384, 165, 0, 0, 0, 0, 0, 0, 1193 0, 0, 0, 0, 0, 0, 157, 0, 158, 159, 1194 160, 161, 0, 162, 0, 0, 163, 164, 0, 0, 1195 0, 385, 165, 157, 0, 158, 159, 160, 161, 386, 1196 162, 0, 0, 163, 164, 0, 0, 0, 157, 165, 1197 158, 159, 160, 161, 0, 162, 0, 0, 163, 164, 1198 4, 0, 0, 0, 165, 5, 6, 90, 91, 0, 1192 1199 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 1193 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1194 0, 0, 0, 0, 0, 0, 0, 0, 154, 0,1195 155, 156, 157, 158, 0, 159, 0, 0, 160, 161,1196 0, 0, 0, 154, 162, 155, 156, 157, 158, 0,1197 159, 0, 0, 0, 161, 4, 0, 0, 0, 162,1198 5, 6, 88, 89, 0, 0, 0, 9, 0, 0,1200 0, 0, 0, 0, 0, 0, 0, 0, 157, 0, 1201 158, 159, 160, 161, 0, 162, 0, 0, 163, 164, 1202 0, 0, 0, 157, 165, 158, 159, 160, 161, 0, 1203 162, 0, 0, 0, 164, 0, 0, 0, 0, 165, 1204 4, 0, 0, 0, 0, 5, 6, 90, 91, 0, 1205 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 1199 1206 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 1200 18, 90, 91, 92, 93, 0, 0, 0, 0, 0, 1207 18, 92, 93, 94, 95, 0, 0, 154, 0, 0, 1208 156, 0, 0, 30, 0, 31, 32, 33, 0, 35, 1209 36, 0, 0, 0, 40, 41, 0, 0, 0, 0, 1210 0, 0, 96, 0, 0, 4, 0, 50, 0, 51, 1211 5, 6, 90, 91, 0, 0, 0, 9, 53, 196, 1212 0, 54, 0, 11, 12, 13, 14, 15, 16, 17, 1213 18, 92, 93, 94, 95, 0, 0, 0, 0, 0, 1201 1214 0, 0, 0, 30, 0, 31, 32, 33, 0, 35, 1202 0, 0, 0, 39, 40, 0, 0, 0, 0, 0, 1203 0, 94, 0, 0, 4, 0, 49, 0, 50, 5, 1204 6, 88, 89, 0, 0, 0, 9, 52, 192, 0, 1205 53, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1206 13, 14, 15, 16, 17, 18, 90, 91, 92, 93, 1215 36, 0, 0, 0, 40, 41, 0, 0, 0, 0, 1216 0, 0, 96, 0, 0, 4, 0, 50, 0, 51, 1217 5, 6, 206, 207, 0, 0, 0, 9, 53, 199, 1218 0, 54, 0, 0, 0, 0, 0, 0, 11, 12, 1219 13, 14, 15, 16, 17, 18, 92, 93, 94, 95, 1220 0, 0, 157, 0, 158, 159, 160, 161, 30, 162, 1221 31, 32, 33, 164, 35, 36, 0, 0, 165, 40, 1222 41, 0, 0, 0, 0, 0, 0, 96, 0, 0, 1223 4, 0, 50, 0, 51, 5, 6, 90, 91, 0, 1224 0, 0, 9, 53, 202, 0, 54, 0, 11, 12, 1225 13, 14, 15, 16, 17, 18, 208, 209, 210, 211, 1207 1226 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 1208 31, 32, 33, 0, 35, 0, 0, 0, 39, 40, 1209 0, 0, 4, 0, 0, 0, 94, 5, 6, 202, 1210 203, 49, 0, 50, 9, 0, 0, 0, 0, 0, 1211 0, 0, 52, 195, 0, 53, 0, 11, 12, 13, 1212 14, 15, 16, 17, 18, 90, 91, 92, 93, 0, 1213 0, 0, 0, 0, 0, 0, 0, 30, 0, 31, 1214 32, 33, 0, 35, 0, 0, 0, 39, 40, 0, 1215 0, 4, 0, 0, 0, 94, 5, 6, 88, 89, 1216 49, 0, 50, 9, 0, 0, 0, 0, 0, 0, 1217 0, 52, 198, 0, 53, 11, 12, 13, 14, 15, 1218 16, 17, 18, 204, 205, 206, 207, 0, 0, 0, 1219 0, 0, 0, 0, 0, 30, 0, 31, 32, 33, 1220 0, 35, 0, 0, 0, 39, 40, 0, 0, 4, 1221 0, 0, 0, 94, 5, 6, 88, 89, 49, 0, 1222 50, 9, 0, 0, 0, 0, 0, 0, 0, 52, 1223 208, 0, 53, 0, 11, 12, 13, 14, 15, 16, 1224 17, 18, 90, 91, 92, 93, 0, 0, 0, 0, 1225 0, 0, 0, 0, 30, 0, 31, 32, 33, 0, 1226 35, 0, 0, 0, 39, 40, 0, 0, 4, 0, 1227 0, 0, 94, 5, 6, 88, 89, 49, 0, 50, 1228 9, 0, 0, 0, 0, 0, 0, 0, 52, 218, 1229 0, 53, 11, 12, 13, 14, 15, 16, 17, 18, 1230 90, 91, 92, 93, 0, 0, 0, 0, 0, 0, 1231 0, 0, 30, 0, 31, 32, 33, 0, 35, 0, 1232 0, 0, 39, 40, 0, 0, 4, 0, 0, 0, 1233 94, 5, 6, 88, 89, 49, 0, 50, 9, 0, 1234 0, 0, 0, 0, 0, 0, 52, 225, 0, 53, 1235 0, 11, 12, 13, 14, 15, 16, 17, 18, 90, 1236 91, 92, 93, 0, 0, 0, 0, 0, 0, 0, 1237 0, 30, 0, 31, 32, 33, 0, 35, 0, 0, 1238 0, 39, 40, 0, 0, 4, 0, 0, 0, 94, 1239 5, 6, 88, 89, 49, 0, 50, 9, 0, 0, 1240 0, 0, 0, 0, 0, 52, 0, 0, 53, 11, 1241 12, 13, 14, 15, 16, 17, 18, 90, 91, 92, 1242 93, 0, 0, 0, 0, 0, 0, 0, 0, 30, 1243 0, 31, 32, 33, 0, 35, 0, 0, 0, 39, 1244 40, 0, 0, 4, 0, 0, 0, 94, 5, 6, 1245 88, 89, 49, 0, 50, 9, 0, 0, 0, 0, 1246 0, 0, 0, 97, 0, 0, 53, 0, 11, 12, 1247 13, 14, 15, 16, 17, 18, 90, 91, 92, 93, 1227 31, 32, 33, 0, 35, 36, 0, 0, 0, 40, 1228 41, 0, 0, 0, 0, 0, 0, 96, 0, 0, 1229 4, 0, 50, 0, 51, 5, 6, 90, 91, 0, 1230 0, 0, 9, 53, 212, 0, 54, 0, 0, 0, 1231 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 1232 18, 92, 93, 94, 95, 0, 0, 0, 0, 0, 1233 0, 0, 0, 30, 0, 31, 32, 33, 0, 35, 1234 36, 0, 0, 0, 40, 41, 0, 0, 0, 0, 1235 0, 0, 96, 0, 0, 4, 0, 50, 0, 51, 1236 5, 6, 90, 91, 0, 0, 0, 9, 53, 222, 1237 0, 54, 0, 11, 12, 13, 14, 15, 16, 17, 1238 18, 92, 93, 94, 95, 0, 0, 0, 0, 0, 1239 0, 0, 0, 30, 0, 31, 32, 33, 0, 35, 1240 36, 0, 0, 0, 40, 41, 0, 0, 0, 0, 1241 0, 0, 96, 0, 0, 4, 0, 50, 0, 51, 1242 5, 6, 90, 91, 0, 0, 0, 9, 53, 229, 1243 0, 54, 0, 0, 0, 0, 0, 0, 11, 12, 1244 13, 14, 15, 16, 17, 18, 92, 93, 94, 95, 1248 1245 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 1249 31, 32, 33, 0, 35, 0, 0, 0, 39, 40, 1250 0, 0, 4, 0, 0, 0, 94, 5, 6, 88, 1251 89, 49, 0, 50, 9, 0, 0, 0, 0, 0, 1252 0, 0, 110, 0, 0, 53, 11, 12, 13, 14, 1253 15, 16, 17, 18, 90, 91, 92, 93, 0, 0, 1254 0, 0, 0, 0, 0, 0, 30, 0, 31, 32, 1255 33, 0, 35, 0, 0, 0, 39, 40, 0, 0, 1256 4, 0, 0, 0, 94, 5, 6, 88, 89, 49, 1257 0, 50, 9, 0, 0, 0, 0, 0, 0, 0, 1258 112, 0, 0, 53, 0, 11, 12, 13, 14, 15, 1259 16, 17, 18, 90, 91, 92, 93, 0, 0, 0, 1260 0, 0, 0, 0, 0, 30, 0, 31, 32, 33, 1261 0, 35, 0, 0, 0, 39, 40, 0, 0, 4, 1262 0, 0, 0, 94, 5, 6, 135, 89, 49, 0, 1263 50, 9, 0, 0, 0, 0, 0, 0, 0, 114, 1264 0, 0, 53, 11, 12, 13, 14, 15, 16, 17, 1265 18, 90, 91, 92, 93, 0, 0, 0, 0, 0, 1246 31, 32, 33, 0, 35, 36, 0, 0, 0, 40, 1247 41, 0, 0, 0, 0, 0, 0, 96, 0, 0, 1248 4, 0, 50, 0, 51, 5, 6, 90, 91, 0, 1249 0, 0, 9, 53, 0, 0, 54, 0, 11, 12, 1250 13, 14, 15, 16, 17, 18, 92, 93, 94, 95, 1251 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 1252 31, 32, 33, 0, 35, 36, 0, 0, 0, 40, 1253 41, 0, 0, 0, 0, 0, 0, 96, 0, 0, 1254 4, 0, 50, 0, 51, 5, 6, 90, 91, 0, 1255 0, 0, 9, 99, 0, 0, 54, 0, 0, 0, 1256 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 1257 18, 92, 93, 94, 95, 0, 0, 0, 0, 0, 1266 1258 0, 0, 0, 30, 0, 31, 32, 33, 0, 35, 1267 0, 0, 0, 39, 40, 0, 0, 4, 0, 0, 1268 0, 94, 5, 6, 88, 89, 49, 0, 50, 9, 1269 0, 0, 0, 0, 0, 0, 0, 116, 0, 0, 1270 53, 0, 11, 12, 13, 14, 15, 16, 17, 18, 1271 19, 20, 21, 22, 0, 0, 0, 0, 0, 0, 1272 0, 0, 30, 0, 31, 32, 33, 0, 35, 0, 1273 0, 0, 39, 40, 0, 0, 4, 0, 0, 0, 1274 94, 5, 6, 88, 89, 49, 0, 50, 9, 0, 1275 0, 0, 0, 0, 0, 0, 52, 0, 0, 53, 1276 11, 12, 13, 14, 15, 16, 17, 18, 90, 91, 1277 92, 93, 0, 0, 0, 0, 0, 0, 0, 0, 1278 30, 0, 31, 32, 33, 0, 35, 0, 0, 0, 1279 39, 40, 0, 0, 4, 0, 0, 0, 94, 5, 1280 6, 88, 89, 49, 0, 50, 9, 0, 0, 0, 1281 0, 0, 0, 0, 169, 0, 0, 53, 0, 11, 1282 12, 13, 14, 15, 16, 17, 18, 90, 91, 92, 1283 93, 0, 0, 0, 0, 0, 0, 0, 0, 30, 1284 0, 31, 32, 33, 0, 35, 0, 0, 0, 39, 1285 40, 0, 0, 0, 0, 0, 0, 94, 0, 0, 1286 0, 0, 49, 0, 50, 0, 0, 0, 0, 0, 1287 0, 0, 0, 182, 0, 0, 53, 315, 12, 13, 1288 316, 317, 16, 318, 319, 90, 91, 92, 93, 0, 1289 0, 0, 0, 0, 0, 0, 0, 30, 0, 31, 1290 32, 33, 0, 35, 0, 0, 0, 39, 40, 0, 1291 0, 0, 0, 0, 0, 94, 0, 0, 0, 0, 1292 49, 0, 50, 0, 0, 0, 0, 0, 0, 0, 1293 0, 52, 0, 0, 53 1259 36, 0, 0, 0, 40, 41, 0, 0, 0, 0, 1260 0, 0, 96, 0, 0, 4, 0, 50, 0, 51, 1261 5, 6, 90, 91, 0, 0, 0, 9, 112, 0, 1262 0, 54, 0, 11, 12, 13, 14, 15, 16, 17, 1263 18, 92, 93, 94, 95, 0, 0, 0, 0, 0, 1264 0, 0, 0, 30, 0, 31, 32, 33, 0, 35, 1265 36, 0, 0, 0, 40, 41, 0, 0, 0, 0, 1266 0, 0, 96, 0, 0, 4, 0, 50, 0, 51, 1267 5, 6, 90, 91, 0, 0, 0, 9, 114, 0, 1268 0, 54, 0, 0, 0, 0, 0, 0, 11, 12, 1269 13, 14, 15, 16, 17, 18, 92, 93, 94, 95, 1270 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 1271 31, 32, 33, 0, 35, 36, 0, 0, 0, 40, 1272 41, 0, 0, 0, 0, 0, 0, 96, 0, 0, 1273 4, 0, 50, 0, 51, 5, 6, 138, 91, 0, 1274 0, 0, 9, 116, 0, 0, 54, 0, 11, 12, 1275 13, 14, 15, 16, 17, 18, 92, 93, 94, 95, 1276 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 1277 31, 32, 33, 0, 35, 36, 0, 0, 0, 40, 1278 41, 0, 0, 0, 0, 0, 0, 96, 0, 0, 1279 4, 0, 50, 0, 51, 5, 6, 90, 91, 0, 1280 0, 0, 9, 118, 0, 0, 54, 0, 0, 0, 1281 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 1282 18, 19, 20, 21, 22, 0, 0, 0, 0, 0, 1283 0, 0, 0, 30, 0, 31, 32, 33, 0, 35, 1284 36, 0, 0, 0, 40, 41, 0, 0, 0, 0, 1285 0, 0, 96, 0, 0, 4, 0, 50, 0, 51, 1286 5, 6, 90, 91, 0, 0, 0, 9, 53, 0, 1287 0, 54, 0, 11, 12, 13, 14, 15, 16, 17, 1288 18, 92, 93, 94, 95, 0, 0, 0, 0, 0, 1289 0, 0, 0, 30, 0, 31, 32, 33, 0, 35, 1290 36, 0, 0, 0, 40, 41, 0, 0, 0, 0, 1291 0, 0, 96, 0, 0, 4, 0, 50, 0, 51, 1292 5, 6, 90, 91, 0, 0, 0, 9, 173, 0, 1293 0, 54, 0, 0, 0, 0, 0, 0, 11, 12, 1294 13, 14, 15, 16, 17, 18, 92, 93, 94, 95, 1295 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 1296 31, 32, 33, 0, 35, 36, 0, 0, 0, 40, 1297 41, 0, 0, 0, 0, 0, 0, 96, 0, 0, 1298 0, 0, 50, 0, 51, 0, 0, 0, 0, 0, 1299 0, 0, 0, 186, 0, 0, 54, 0, 321, 12, 1300 13, 322, 323, 16, 324, 325, 92, 93, 94, 95, 1301 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 1302 31, 32, 33, 0, 35, 36, 0, 0, 0, 40, 1303 41, 0, 0, 0, 0, 0, 0, 96, 0, 0, 1304 0, 0, 50, 0, 51, 0, 0, 0, 0, 0, 1305 0, 0, 0, 53, 0, 0, 54 1294 1306 }; 1295 1307 1296 1308 static const yytype_int16 yycheck[] = 1297 1309 { 1298 1, 11, 114, 359, 137, 111, 139, 139, 111, 112, 1299 130, 3, 4, 1, 146, 7, 247, 9, 10, 139, 1300 140, 130, 140, 24, 7, 381, 257, 10, 4, 11, 1301 139, 7, 11, 145, 140, 139, 111, 112, 145, 146, 1302 139, 139, 146, 19, 20, 21, 22, 146, 146, 50, 1303 26, 145, 139, 29, 139, 139, 145, 139, 46, 146, 1304 139, 146, 146, 64, 146, 139, 112, 146, 112, 145, 1305 46, 140, 146, 49, 118, 145, 146, 53, 145, 11, 1306 145, 146, 145, 146, 145, 146, 62, 3, 4, 145, 1307 146, 7, 68, 9, 10, 145, 146, 145, 329, 75, 1308 145, 146, 78, 145, 146, 145, 146, 145, 109, 145, 1309 146, 112, 3, 4, 145, 116, 7, 145, 9, 10, 1310 145, 97, 145, 146, 145, 101, 102, 103, 104, 105, 1311 106, 107, 108, 134, 110, 145, 124, 7, 114, 131, 1312 10, 133, 134, 135, 136, 146, 138, 139, 124, 141, 1313 142, 127, 111, 136, 146, 147, 132, 139, 140, 135, 1314 139, 47, 48, 145, 147, 145, 145, 146, 145, 145, 1315 145, 111, 148, 149, 150, 176, 152, 178, 154, 155, 1316 156, 157, 158, 159, 160, 161, 162, 145, 111, 145, 1317 166, 111, 139, 169, 11, 171, 145, 7, 174, 175, 1318 145, 177, 7, 179, 145, 10, 182, 139, 140, 19, 1319 20, 21, 22, 145, 145, 131, 26, 133, 134, 135, 1320 136, 11, 138, 145, 145, 141, 142, 112, 140, 139, 1321 111, 147, 148, 140, 112, 139, 139, 112, 214, 130, 1322 131, 140, 133, 134, 135, 136, 7, 138, 111, 10, 1323 141, 142, 112, 146, 146, 146, 147, 139, 68, 139, 1324 114, 7, 146, 146, 240, 75, 136, 146, 138, 245, 1325 146, 247, 146, 139, 136, 146, 145, 147, 139, 146, 1326 292, 257, 46, 259, 260, 261, 381, 263, 369, 265, 1327 266, 279, -1, -1, -1, 172, 0, 1, -1, 300, 1328 -1, -1, -1, -1, 8, -1, -1, 283, -1, 13, 1329 14, 15, 16, 130, 124, 291, 20, 293, -1, 136, 1330 3, 4, 139, 140, 7, 135, 9, 10, 145, -1, 1331 135, 136, -1, 138, -1, 145, 40, 3, 4, -1, 1332 130, 7, 147, 9, 10, -1, -1, -1, -1, 139, 1333 140, -1, 162, 329, -1, 145, 166, 333, 11, 335, 1334 336, 171, 338, 3, 4, -1, -1, 7, -1, 9, 1335 10, 372, 133, 134, 135, 136, -1, 138, 354, 355, 1336 -1, 142, -1, -1, 11, -1, 147, 91, 92, 93, 1337 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 1338 104, 105, 106, -1, 108, 109, 110, 111, -1, 113, 1339 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 1340 124, 125, 126, 127, 128, 129, -1, 131, 11, -1, 1341 134, -1, 136, 3, 4, -1, 140, 7, -1, 9, 1342 10, 145, -1, -1, 148, -1, -1, -1, 131, -1, 1343 133, 134, 135, 136, 11, 138, 139, -1, 141, 142, 1344 11, -1, -1, 146, 147, 131, -1, 133, 134, 135, 1345 136, 11, 138, 139, -1, 141, 142, 130, 3, 4, 1346 146, 147, 7, -1, 9, 10, 139, 140, -1, -1, 1347 -1, 131, 145, 133, 134, 135, 136, 137, 138, 139, 1348 -1, 141, 142, 130, 3, 4, -1, 147, 7, -1, 1349 9, 10, 139, 140, -1, -1, -1, -1, 145, -1, 1310 1, 252, 1, 140, 114, 11, 131, 111, 366, 7, 1311 147, 262, 10, 3, 4, 140, 141, 7, 131, 9, 1312 10, 111, 112, 24, 140, 7, 141, 140, 10, 4, 1313 388, 147, 7, 11, 140, 11, 146, 141, 138, 146, 1314 140, 147, 140, 146, 19, 20, 21, 22, 47, 147, 1315 51, 26, 140, 140, 29, 140, 140, 111, 112, 147, 1316 147, 112, 147, 147, 7, 66, 140, 10, 119, 140, 1317 146, 147, 47, 147, 146, 50, 147, 11, 146, 54, 1318 146, 147, 146, 147, 146, 336, 146, 147, 63, 64, 1319 3, 4, 297, 298, 7, 70, 9, 10, 146, 147, 1320 146, 147, 77, 11, 146, 80, 146, 147, 3, 4, 1321 111, 146, 7, 114, 9, 10, 146, 118, 146, 147, 1322 146, 147, 146, 147, 99, 146, 11, 126, 103, 104, 1323 105, 106, 107, 108, 109, 110, 137, 112, 11, 137, 1324 146, 116, 132, 146, 134, 135, 136, 137, 149, 139, 1325 148, 126, 142, 143, 129, 137, 112, 139, 148, 149, 1326 135, 111, 140, 138, 140, 141, 148, 146, 146, 147, 1327 146, 111, 11, 148, 146, 147, 151, 152, 153, 180, 1328 155, 182, 157, 158, 159, 160, 161, 162, 163, 164, 1329 165, 146, 147, 136, 137, 170, 139, 131, 173, 146, 1330 175, 7, 146, 178, 179, 148, 181, 141, 183, 146, 1331 146, 186, 146, 19, 20, 21, 22, 11, 131, 132, 1332 26, 134, 135, 136, 137, 111, 139, 48, 49, 142, 1333 143, 146, 140, 141, 147, 148, 111, 132, 146, 134, 1334 135, 136, 137, 218, 139, 140, 131, 142, 143, 141, 1335 140, 112, 147, 148, 111, 140, 141, 146, 131, 146, 1336 112, 146, 146, 146, 70, 146, 146, 140, 141, 244, 1337 141, 77, 247, 146, 140, 250, 141, 252, 140, 112, 1338 140, 111, 141, 112, 140, 284, 140, 262, 137, 264, 1339 265, 266, 131, 268, 147, 270, 271, 147, 137, 147, 1340 147, 140, 141, 0, 1, 306, 147, 146, 140, 147, 1341 147, 8, 114, 288, 140, 146, 13, 14, 15, 16, 1342 126, 296, 147, 20, 299, 147, 7, 3, 4, 47, 1343 388, 7, 138, 9, 10, 376, 176, 131, -1, -1, 1344 -1, -1, 148, 40, 3, 4, 140, 141, 7, -1, 1345 9, 10, 146, -1, -1, -1, -1, -1, -1, 165, 1346 -1, 336, -1, -1, 170, 340, -1, 342, 343, 175, 1347 345, -1, -1, 3, 4, -1, -1, 7, 379, 9, 1348 10, -1, -1, -1, -1, -1, 361, 362, -1, -1, 1349 -1, -1, -1, -1, 91, 92, 93, 94, 95, 96, 1350 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 1351 -1, 108, 109, 110, 111, 11, 113, 114, 115, 116, 1352 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 1353 127, 128, 129, 130, -1, 132, 11, -1, 135, -1, 1354 137, 3, 4, -1, 141, 7, -1, 9, 10, 146, 1355 -1, -1, 149, -1, -1, -1, 132, -1, 134, 135, 1356 136, 137, 11, 139, 140, -1, 142, 143, -1, -1, 1357 -1, 147, 148, 132, -1, 134, 135, 136, 137, -1, 1358 139, 140, -1, 142, 143, -1, 3, 4, 147, 148, 1359 7, -1, 9, 10, -1, -1, -1, -1, -1, -1, 1360 -1, -1, 132, -1, 134, 135, 136, 137, 138, 139, 1361 140, -1, 142, 143, -1, 3, 4, -1, 148, 7, 1362 -1, 9, 10, 13, 14, 15, 16, -1, -1, -1, 1363 20, -1, 3, 4, -1, 131, 7, -1, 9, 10, 1364 -1, -1, -1, -1, 140, 141, -1, 3, 4, -1, 1365 146, 7, -1, 9, 10, -1, 131, -1, -1, -1, 1366 -1, -1, -1, -1, -1, 140, 141, -1, -1, -1, 1367 132, 146, 134, 135, 136, 137, -1, 139, 140, -1, 1368 142, 143, 131, 3, 4, 147, 148, 7, -1, 9, 1369 10, 140, 141, -1, -1, -1, -1, 146, -1, -1, 1370 3, 4, -1, -1, 7, -1, 9, 10, -1, 99, 1371 100, 101, 102, -1, -1, 132, -1, 134, 135, 136, 1372 137, -1, 139, 140, -1, 142, 143, -1, 3, 4, 1373 147, 148, 7, -1, 9, 10, -1, -1, -1, -1, 1374 -1, -1, -1, -1, 132, -1, 134, 135, 136, 137, 1375 -1, 139, 140, -1, 142, 143, -1, -1, -1, 147, 1376 148, 132, -1, 134, 135, 136, 137, -1, 139, 140, 1377 -1, 142, 143, -1, -1, -1, 132, 148, 134, 135, 1378 136, 137, -1, 139, -1, -1, 142, 143, -1, 3, 1379 4, 147, 148, 7, -1, 9, 10, -1, -1, -1, 1380 -1, -1, -1, -1, 3, 4, -1, -1, 7, -1, 1381 9, 10, 132, -1, 134, 135, 136, 137, -1, 139, 1382 -1, -1, 142, 143, -1, -1, -1, 147, 148, 132, 1383 -1, 134, 135, 136, 137, -1, 139, -1, -1, 142, 1384 143, -1, 3, 4, 147, 148, 7, -1, 9, 10, 1385 -1, -1, -1, -1, -1, -1, -1, 132, -1, 134, 1386 135, 136, 137, -1, 139, 140, -1, 142, 143, -1, 1387 3, 4, -1, 148, 7, -1, 9, 10, -1, -1, 1388 -1, -1, -1, -1, -1, -1, -1, 3, 4, -1, 1389 -1, 7, -1, 9, 10, -1, -1, -1, -1, -1, 1390 -1, -1, 3, 4, -1, -1, 7, -1, 9, 10, 1391 -1, -1, -1, -1, -1, -1, -1, -1, 132, -1, 1392 134, 135, 136, 137, -1, 139, 140, -1, 142, 143, 1393 -1, -1, -1, 132, 148, 134, 135, 136, 137, -1, 1394 139, 140, -1, 142, 143, -1, 3, 4, -1, 148, 1395 7, -1, 9, 10, -1, -1, -1, -1, -1, -1, 1350 1396 -1, 3, 4, -1, -1, 7, -1, 9, 10, -1, 1351 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 1352 -1, -1, 7, -1, 9, 10, -1, 130, -1, -1, 1353 -1, -1, -1, -1, -1, -1, 139, 140, -1, -1, 1354 -1, 131, 145, 133, 134, 135, 136, -1, 138, 139, 1355 -1, 141, 142, 130, 3, 4, 146, 147, 7, 130, 1356 9, 10, 139, 140, -1, -1, -1, -1, 145, 140, 1357 130, 3, 4, -1, 145, 7, -1, 9, 10, 139, 1358 140, -1, -1, -1, -1, 145, 131, -1, 133, 134, 1359 135, 136, -1, 138, 139, -1, 141, 142, -1, 3, 1360 4, 146, 147, 7, -1, 9, 10, -1, -1, -1, 1361 -1, -1, 131, -1, 133, 134, 135, 136, -1, 138, 1362 139, -1, 141, 142, -1, -1, -1, 146, 147, 131, 1363 -1, 133, 134, 135, 136, -1, 138, -1, -1, 141, 1364 142, -1, -1, -1, 146, 147, 131, -1, 133, 134, 1365 135, 136, -1, 138, -1, -1, 141, 142, -1, 3, 1366 4, 146, 147, 7, -1, 9, 10, -1, -1, -1, 1367 -1, -1, -1, -1, 3, 4, -1, -1, 7, -1, 1368 9, 10, 131, -1, 133, 134, 135, 136, -1, 138, 1369 -1, -1, 141, 142, -1, -1, -1, 146, 147, 131, 1370 -1, 133, 134, 135, 136, -1, 138, 139, -1, 141, 1371 142, -1, 3, 4, -1, 147, 7, -1, 9, 10, 1372 -1, -1, -1, -1, -1, -1, -1, 131, -1, 133, 1373 134, 135, 136, -1, 138, 139, -1, 141, 142, -1, 1374 3, 4, -1, 147, 7, -1, 9, 10, -1, -1, 1375 -1, -1, -1, -1, -1, 3, 4, -1, -1, 7, 1376 -1, 9, 10, -1, -1, -1, -1, -1, -1, -1, 1377 -1, -1, 3, 4, -1, -1, 7, -1, 9, 10, 1378 -1, -1, -1, -1, -1, -1, -1, 131, -1, 133, 1379 134, 135, 136, -1, 138, 139, -1, 141, 142, -1, 1380 -1, -1, 131, 147, 133, 134, 135, 136, -1, 138, 1381 -1, -1, 141, 142, -1, 3, 4, 146, 147, 7, 1382 -1, 9, 10, -1, -1, -1, -1, -1, -1, -1, 1383 -1, -1, 3, 4, -1, -1, 7, -1, 9, 10, 1384 131, -1, 133, 134, 135, 136, -1, 138, -1, -1, 1385 141, 142, -1, 3, 4, 146, 147, 7, -1, 9, 1386 10, -1, -1, -1, -1, -1, -1, -1, 131, -1, 1387 133, 134, 135, 136, -1, 138, 139, -1, 141, 142, 1388 -1, -1, -1, 131, 147, 133, 134, 135, 136, -1, 1389 138, -1, -1, 141, 142, -1, -1, -1, 146, 147, 1390 131, -1, 133, 134, 135, 136, -1, 138, 139, -1, 1391 141, 142, -1, 3, 4, -1, 147, 7, -1, 9, 1392 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1393 3, 4, -1, -1, 7, -1, 9, 10, -1, -1, 1394 -1, -1, -1, 131, -1, 133, 134, 135, 136, -1, 1395 138, -1, -1, 141, 142, -1, -1, -1, 146, 147, 1396 131, -1, 133, 134, 135, 136, -1, 138, -1, -1, 1397 141, 142, -1, 3, 4, 146, 147, 7, -1, 9, 1398 10, 131, -1, 133, 134, 135, 136, 137, 138, -1, 1399 -1, 141, 142, -1, 3, 4, -1, 147, 7, -1, 1397 -1, 132, -1, 134, 135, 136, 137, -1, 139, -1, 1398 -1, 142, 143, -1, 3, 4, 147, 148, 7, -1, 1399 9, 10, -1, -1, -1, -1, -1, -1, -1, 132, 1400 -1, 134, 135, 136, 137, -1, 139, -1, -1, 142, 1401 143, -1, -1, -1, 147, 148, 132, -1, 134, 135, 1402 136, 137, -1, 139, 140, 7, 142, 143, 10, -1, 1403 -1, 132, 148, 134, 135, 136, 137, -1, 139, -1, 1404 -1, 142, 143, -1, 3, 4, 147, 148, 7, -1, 1400 1405 9, 10, -1, -1, -1, -1, -1, -1, -1, 3, 1401 1406 4, -1, -1, 7, -1, 9, 10, -1, -1, -1, 1407 -1, -1, -1, -1, -1, 132, -1, 134, 135, 136, 1408 137, -1, 139, 140, -1, 142, 143, -1, -1, -1, 1409 132, 148, 134, 135, 136, 137, -1, 139, -1, -1, 1410 142, 143, -1, 3, 4, 147, 148, 7, -1, 9, 1411 10, -1, -1, 132, -1, 134, 135, 136, 137, -1, 1412 139, -1, -1, 142, 143, -1, 3, 4, 147, 148, 1413 7, -1, 9, 10, -1, -1, -1, -1, -1, -1, 1414 -1, -1, -1, 3, 4, -1, -1, 7, -1, 9, 1415 10, -1, 134, 135, 136, 137, -1, 139, 3, 4, 1416 -1, 143, 7, -1, 9, 10, 148, -1, -1, -1, 1417 -1, -1, -1, 132, -1, 134, 135, 136, 137, 138, 1418 139, -1, -1, 142, 143, -1, -1, -1, 132, 148, 1419 134, 135, 136, 137, -1, 139, -1, -1, 142, 143, 1420 -1, 3, 4, 147, 148, 7, -1, 9, 10, -1, 1402 1421 -1, -1, -1, -1, -1, -1, 3, 4, -1, -1, 1403 1422 7, -1, 9, 10, -1, -1, -1, -1, -1, -1, 1404 -1, 131, -1, 133, 134, 135, 136, 7, 138, -1, 1405 10, 141, 142, -1, -1, -1, 146, 147, 131, -1, 1406 133, 134, 135, 136, -1, 138, 139, -1, 141, 142, 1407 -1, 3, 4, -1, 147, 7, -1, 9, 10, -1, 1408 -1, -1, -1, -1, -1, -1, 3, 4, -1, -1, 1409 7, -1, 9, 10, -1, -1, -1, -1, -1, -1, 1410 -1, 131, -1, 133, 134, 135, 136, -1, 138, -1, 1411 -1, 141, 142, -1, 3, 4, 146, 147, 7, -1, 1412 9, 10, 131, -1, 133, 134, 135, 136, -1, 138, 1413 139, -1, 141, 142, -1, -1, -1, 131, 147, 133, 1414 134, 135, 136, -1, 138, -1, -1, 141, 142, -1, 1415 -1, -1, 146, 147, 131, -1, 133, 134, 135, 136, 1416 137, 138, 3, 4, 141, 142, 7, -1, 9, 10, 1417 147, 131, -1, 133, 134, 135, 136, -1, 138, 3, 1418 4, -1, 142, 7, -1, 9, 10, 147, -1, -1, 1419 -1, -1, -1, 13, 14, 15, 16, -1, -1, 131, 1420 20, 133, 134, 135, 136, -1, 138, 139, -1, 141, 1421 142, -1, -1, -1, 131, 147, 133, 134, 135, 136, 1422 -1, 138, -1, -1, 141, 142, -1, 3, 4, 146, 1423 147, 7, -1, 9, 10, -1, -1, -1, -1, -1, 1424 -1, -1, 131, -1, 133, 134, 135, 136, -1, 138, 1425 -1, -1, 141, 142, -1, 3, 4, 146, 147, 7, 1426 -1, 9, 10, -1, -1, -1, -1, -1, -1, -1, 1427 3, 4, -1, -1, 7, -1, 9, 10, -1, 99, 1428 100, 101, 102, -1, -1, -1, -1, -1, -1, -1, 1429 131, -1, 133, 134, 135, 136, -1, 138, -1, -1, 1430 141, 142, -1, -1, -1, 146, 147, 131, -1, 133, 1431 134, 135, 136, -1, 138, -1, -1, 141, 142, -1, 1432 3, 4, 146, 147, 7, -1, 9, 10, -1, -1, 1433 -1, -1, -1, -1, -1, -1, 4, -1, -1, 7, 1434 -1, 9, 10, -1, -1, -1, -1, -1, -1, -1, 1435 -1, -1, -1, -1, -1, 131, -1, 133, 134, 135, 1436 136, -1, 138, -1, -1, 141, 142, -1, -1, -1, 1437 146, 147, -1, -1, -1, -1, -1, -1, -1, -1, 1438 -1, -1, -1, 131, -1, 133, 134, 135, 136, 137, 1439 138, -1, -1, 141, 142, -1, -1, -1, 131, 147, 1440 133, 134, 135, 136, -1, 138, -1, -1, 141, 142, 1441 8, -1, -1, -1, 147, 13, 14, 15, 16, -1, 1423 -1, -1, 132, -1, 134, 135, 136, 137, -1, 139, 1424 140, -1, 142, 143, -1, 3, 4, -1, 148, 7, 1425 -1, 9, 10, -1, -1, 132, -1, 134, 135, 136, 1426 137, -1, 139, -1, -1, 142, 143, -1, -1, -1, 1427 147, 148, 132, -1, 134, 135, 136, 137, -1, 139, 1428 140, -1, 142, 143, -1, -1, -1, 132, 148, 134, 1429 135, 136, 137, -1, 139, -1, -1, 142, 143, -1, 1430 3, 4, 147, 148, 7, -1, 9, 10, -1, -1, 1431 -1, -1, -1, -1, -1, -1, -1, 3, 4, -1, 1432 -1, 7, -1, 9, 10, -1, -1, -1, -1, -1, 1433 132, -1, 134, 135, 136, 137, 138, 139, -1, -1, 1434 142, 143, -1, -1, -1, 132, 148, 134, 135, 136, 1435 137, -1, 139, 140, -1, 142, 143, -1, 3, 4, 1436 -1, 148, 7, -1, 9, 10, -1, -1, -1, -1, 1437 -1, -1, -1, -1, 132, -1, 134, 135, 136, 137, 1438 -1, 139, -1, -1, 142, 143, -1, 3, 4, 147, 1439 148, 7, -1, 9, 10, -1, -1, -1, -1, -1, 1440 -1, -1, -1, -1, 3, 4, -1, -1, 7, -1, 1441 9, 10, -1, -1, -1, -1, -1, -1, -1, 3, 1442 4, -1, -1, 7, -1, 9, 10, -1, -1, 132, 1443 -1, 134, 135, 136, 137, -1, 139, -1, -1, 142, 1444 143, -1, -1, -1, 147, 148, 132, -1, 134, 135, 1445 136, 137, -1, 139, -1, -1, 142, 143, -1, 3, 1446 4, 147, 148, 7, -1, 9, 10, -1, -1, -1, 1447 -1, -1, -1, -1, -1, 4, -1, -1, 7, -1, 1448 9, 10, -1, -1, -1, -1, -1, 132, -1, 134, 1449 135, 136, 137, -1, 139, -1, -1, 142, 143, -1, 1450 -1, -1, 147, 148, -1, -1, -1, -1, -1, -1, 1451 -1, -1, -1, -1, -1, -1, 132, -1, 134, 135, 1452 136, 137, -1, 139, -1, -1, 142, 143, -1, -1, 1453 -1, 147, 148, 132, -1, 134, 135, 136, 137, 138, 1454 139, -1, -1, 142, 143, -1, -1, -1, 132, 148, 1455 134, 135, 136, 137, -1, 139, -1, -1, 142, 143, 1456 8, -1, -1, -1, 148, 13, 14, 15, 16, -1, 1442 1457 -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, 1443 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1444 -1, -1, -1, -1, -1, -1, -1, -1, 131, -1, 1445 133, 134, 135, 136, -1, 138, -1, -1, 141, 142, 1446 -1, -1, -1, 131, 147, 133, 134, 135, 136, -1, 1447 138, -1, -1, -1, 142, 8, -1, -1, -1, 147, 1448 13, 14, 15, 16, -1, -1, -1, 20, -1, -1, 1458 -1, -1, -1, -1, -1, -1, -1, -1, 132, -1, 1459 134, 135, 136, 137, -1, 139, -1, -1, 142, 143, 1460 -1, -1, -1, 132, 148, 134, 135, 136, 137, -1, 1461 139, -1, -1, -1, 143, -1, -1, -1, -1, 148, 1462 8, -1, -1, -1, -1, 13, 14, 15, 16, -1, 1463 -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, 1464 -1, -1, -1, 91, 92, 93, 94, 95, 96, 97, 1465 98, 99, 100, 101, 102, -1, -1, 7, -1, -1, 1466 10, -1, -1, 111, -1, 113, 114, 115, -1, 117, 1467 118, -1, -1, -1, 122, 123, -1, -1, -1, -1, 1468 -1, -1, 130, -1, -1, 8, -1, 135, -1, 137, 1469 13, 14, 15, 16, -1, -1, -1, 20, 146, 147, 1470 -1, 149, -1, 91, 92, 93, 94, 95, 96, 97, 1471 98, 99, 100, 101, 102, -1, -1, -1, -1, -1, 1472 -1, -1, -1, 111, -1, 113, 114, 115, -1, 117, 1473 118, -1, -1, -1, 122, 123, -1, -1, -1, -1, 1474 -1, -1, 130, -1, -1, 8, -1, 135, -1, 137, 1475 13, 14, 15, 16, -1, -1, -1, 20, 146, 147, 1476 -1, 149, -1, -1, -1, -1, -1, -1, 91, 92, 1477 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1478 -1, -1, 132, -1, 134, 135, 136, 137, 111, 139, 1479 113, 114, 115, 143, 117, 118, -1, -1, 148, 122, 1480 123, -1, -1, -1, -1, -1, -1, 130, -1, -1, 1481 8, -1, 135, -1, 137, 13, 14, 15, 16, -1, 1482 -1, -1, 20, 146, 147, -1, 149, -1, 91, 92, 1483 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1484 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1, 1485 113, 114, 115, -1, 117, 118, -1, -1, -1, 122, 1486 123, -1, -1, -1, -1, -1, -1, 130, -1, -1, 1487 8, -1, 135, -1, 137, 13, 14, 15, 16, -1, 1488 -1, -1, 20, 146, 147, -1, 149, -1, -1, -1, 1449 1489 -1, -1, -1, 91, 92, 93, 94, 95, 96, 97, 1450 1490 98, 99, 100, 101, 102, -1, -1, -1, -1, -1, 1451 1491 -1, -1, -1, 111, -1, 113, 114, 115, -1, 117, 1452 -1, -1, -1, 121, 122, -1, -1, -1, -1, -1, 1453 -1, 129, -1, -1, 8, -1, 134, -1, 136, 13, 1454 14, 15, 16, -1, -1, -1, 20, 145, 146, -1, 1455 148, -1, -1, -1, -1, -1, -1, -1, 91, 92, 1492 118, -1, -1, -1, 122, 123, -1, -1, -1, -1, 1493 -1, -1, 130, -1, -1, 8, -1, 135, -1, 137, 1494 13, 14, 15, 16, -1, -1, -1, 20, 146, 147, 1495 -1, 149, -1, 91, 92, 93, 94, 95, 96, 97, 1496 98, 99, 100, 101, 102, -1, -1, -1, -1, -1, 1497 -1, -1, -1, 111, -1, 113, 114, 115, -1, 117, 1498 118, -1, -1, -1, 122, 123, -1, -1, -1, -1, 1499 -1, -1, 130, -1, -1, 8, -1, 135, -1, 137, 1500 13, 14, 15, 16, -1, -1, -1, 20, 146, 147, 1501 -1, 149, -1, -1, -1, -1, -1, -1, 91, 92, 1456 1502 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1457 1503 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1, 1458 113, 114, 115, -1, 117, -1, -1, -1, 121, 122, 1459 -1, -1, 8, -1, -1, -1, 129, 13, 14, 15, 1460 16, 134, -1, 136, 20, -1, -1, -1, -1, -1, 1461 -1, -1, 145, 146, -1, 148, -1, 91, 92, 93, 1462 94, 95, 96, 97, 98, 99, 100, 101, 102, -1, 1463 -1, -1, -1, -1, -1, -1, -1, 111, -1, 113, 1464 114, 115, -1, 117, -1, -1, -1, 121, 122, -1, 1465 -1, 8, -1, -1, -1, 129, 13, 14, 15, 16, 1466 134, -1, 136, 20, -1, -1, -1, -1, -1, -1, 1467 -1, 145, 146, -1, 148, 91, 92, 93, 94, 95, 1468 96, 97, 98, 99, 100, 101, 102, -1, -1, -1, 1469 -1, -1, -1, -1, -1, 111, -1, 113, 114, 115, 1470 -1, 117, -1, -1, -1, 121, 122, -1, -1, 8, 1471 -1, -1, -1, 129, 13, 14, 15, 16, 134, -1, 1472 136, 20, -1, -1, -1, -1, -1, -1, -1, 145, 1473 146, -1, 148, -1, 91, 92, 93, 94, 95, 96, 1474 97, 98, 99, 100, 101, 102, -1, -1, -1, -1, 1475 -1, -1, -1, -1, 111, -1, 113, 114, 115, -1, 1476 117, -1, -1, -1, 121, 122, -1, -1, 8, -1, 1477 -1, -1, 129, 13, 14, 15, 16, 134, -1, 136, 1478 20, -1, -1, -1, -1, -1, -1, -1, 145, 146, 1479 -1, 148, 91, 92, 93, 94, 95, 96, 97, 98, 1480 99, 100, 101, 102, -1, -1, -1, -1, -1, -1, 1481 -1, -1, 111, -1, 113, 114, 115, -1, 117, -1, 1482 -1, -1, 121, 122, -1, -1, 8, -1, -1, -1, 1483 129, 13, 14, 15, 16, 134, -1, 136, 20, -1, 1484 -1, -1, -1, -1, -1, -1, 145, 146, -1, 148, 1485 -1, 91, 92, 93, 94, 95, 96, 97, 98, 99, 1486 100, 101, 102, -1, -1, -1, -1, -1, -1, -1, 1487 -1, 111, -1, 113, 114, 115, -1, 117, -1, -1, 1488 -1, 121, 122, -1, -1, 8, -1, -1, -1, 129, 1489 13, 14, 15, 16, 134, -1, 136, 20, -1, -1, 1490 -1, -1, -1, -1, -1, 145, -1, -1, 148, 91, 1491 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 1492 102, -1, -1, -1, -1, -1, -1, -1, -1, 111, 1493 -1, 113, 114, 115, -1, 117, -1, -1, -1, 121, 1494 122, -1, -1, 8, -1, -1, -1, 129, 13, 14, 1495 15, 16, 134, -1, 136, 20, -1, -1, -1, -1, 1496 -1, -1, -1, 145, -1, -1, 148, -1, 91, 92, 1504 113, 114, 115, -1, 117, 118, -1, -1, -1, 122, 1505 123, -1, -1, -1, -1, -1, -1, 130, -1, -1, 1506 8, -1, 135, -1, 137, 13, 14, 15, 16, -1, 1507 -1, -1, 20, 146, -1, -1, 149, -1, 91, 92, 1497 1508 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1498 1509 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1, 1499 113, 114, 115, -1, 117, -1, -1, -1, 121, 122, 1500 -1, -1, 8, -1, -1, -1, 129, 13, 14, 15, 1501 16, 134, -1, 136, 20, -1, -1, -1, -1, -1, 1502 -1, -1, 145, -1, -1, 148, 91, 92, 93, 94, 1503 95, 96, 97, 98, 99, 100, 101, 102, -1, -1, 1504 -1, -1, -1, -1, -1, -1, 111, -1, 113, 114, 1505 115, -1, 117, -1, -1, -1, 121, 122, -1, -1, 1506 8, -1, -1, -1, 129, 13, 14, 15, 16, 134, 1507 -1, 136, 20, -1, -1, -1, -1, -1, -1, -1, 1508 145, -1, -1, 148, -1, 91, 92, 93, 94, 95, 1509 96, 97, 98, 99, 100, 101, 102, -1, -1, -1, 1510 -1, -1, -1, -1, -1, 111, -1, 113, 114, 115, 1511 -1, 117, -1, -1, -1, 121, 122, -1, -1, 8, 1512 -1, -1, -1, 129, 13, 14, 15, 16, 134, -1, 1513 136, 20, -1, -1, -1, -1, -1, -1, -1, 145, 1514 -1, -1, 148, 91, 92, 93, 94, 95, 96, 97, 1510 113, 114, 115, -1, 117, 118, -1, -1, -1, 122, 1511 123, -1, -1, -1, -1, -1, -1, 130, -1, -1, 1512 8, -1, 135, -1, 137, 13, 14, 15, 16, -1, 1513 -1, -1, 20, 146, -1, -1, 149, -1, -1, -1, 1514 -1, -1, -1, 91, 92, 93, 94, 95, 96, 97, 1515 1515 98, 99, 100, 101, 102, -1, -1, -1, -1, -1, 1516 1516 -1, -1, -1, 111, -1, 113, 114, 115, -1, 117, 1517 -1, -1, -1, 121, 122, -1, -1, 8, -1, -1, 1518 -1, 129, 13, 14, 15, 16, 134, -1, 136, 20, 1519 -1, -1, -1, -1, -1, -1, -1, 145, -1, -1, 1520 148, -1, 91, 92, 93, 94, 95, 96, 97, 98, 1521 99, 100, 101, 102, -1, -1, -1, -1, -1, -1, 1522 -1, -1, 111, -1, 113, 114, 115, -1, 117, -1, 1523 -1, -1, 121, 122, -1, -1, 8, -1, -1, -1, 1524 129, 13, 14, 15, 16, 134, -1, 136, 20, -1, 1525 -1, -1, -1, -1, -1, -1, 145, -1, -1, 148, 1526 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 1527 101, 102, -1, -1, -1, -1, -1, -1, -1, -1, 1528 111, -1, 113, 114, 115, -1, 117, -1, -1, -1, 1529 121, 122, -1, -1, 8, -1, -1, -1, 129, 13, 1530 14, 15, 16, 134, -1, 136, 20, -1, -1, -1, 1531 -1, -1, -1, -1, 145, -1, -1, 148, -1, 91, 1532 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 1533 102, -1, -1, -1, -1, -1, -1, -1, -1, 111, 1534 -1, 113, 114, 115, -1, 117, -1, -1, -1, 121, 1535 122, -1, -1, -1, -1, -1, -1, 129, -1, -1, 1536 -1, -1, 134, -1, 136, -1, -1, -1, -1, -1, 1537 -1, -1, -1, 145, -1, -1, 148, 91, 92, 93, 1538 94, 95, 96, 97, 98, 99, 100, 101, 102, -1, 1539 -1, -1, -1, -1, -1, -1, -1, 111, -1, 113, 1540 114, 115, -1, 117, -1, -1, -1, 121, 122, -1, 1541 -1, -1, -1, -1, -1, 129, -1, -1, -1, -1, 1542 134, -1, 136, -1, -1, -1, -1, -1, -1, -1, 1543 -1, 145, -1, -1, 148 1517 118, -1, -1, -1, 122, 123, -1, -1, -1, -1, 1518 -1, -1, 130, -1, -1, 8, -1, 135, -1, 137, 1519 13, 14, 15, 16, -1, -1, -1, 20, 146, -1, 1520 -1, 149, -1, 91, 92, 93, 94, 95, 96, 97, 1521 98, 99, 100, 101, 102, -1, -1, -1, -1, -1, 1522 -1, -1, -1, 111, -1, 113, 114, 115, -1, 117, 1523 118, -1, -1, -1, 122, 123, -1, -1, -1, -1, 1524 -1, -1, 130, -1, -1, 8, -1, 135, -1, 137, 1525 13, 14, 15, 16, -1, -1, -1, 20, 146, -1, 1526 -1, 149, -1, -1, -1, -1, -1, -1, 91, 92, 1527 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1528 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1, 1529 113, 114, 115, -1, 117, 118, -1, -1, -1, 122, 1530 123, -1, -1, -1, -1, -1, -1, 130, -1, -1, 1531 8, -1, 135, -1, 137, 13, 14, 15, 16, -1, 1532 -1, -1, 20, 146, -1, -1, 149, -1, 91, 92, 1533 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1534 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1, 1535 113, 114, 115, -1, 117, 118, -1, -1, -1, 122, 1536 123, -1, -1, -1, -1, -1, -1, 130, -1, -1, 1537 8, -1, 135, -1, 137, 13, 14, 15, 16, -1, 1538 -1, -1, 20, 146, -1, -1, 149, -1, -1, -1, 1539 -1, -1, -1, 91, 92, 93, 94, 95, 96, 97, 1540 98, 99, 100, 101, 102, -1, -1, -1, -1, -1, 1541 -1, -1, -1, 111, -1, 113, 114, 115, -1, 117, 1542 118, -1, -1, -1, 122, 123, -1, -1, -1, -1, 1543 -1, -1, 130, -1, -1, 8, -1, 135, -1, 137, 1544 13, 14, 15, 16, -1, -1, -1, 20, 146, -1, 1545 -1, 149, -1, 91, 92, 93, 94, 95, 96, 97, 1546 98, 99, 100, 101, 102, -1, -1, -1, -1, -1, 1547 -1, -1, -1, 111, -1, 113, 114, 115, -1, 117, 1548 118, -1, -1, -1, 122, 123, -1, -1, -1, -1, 1549 -1, -1, 130, -1, -1, 8, -1, 135, -1, 137, 1550 13, 14, 15, 16, -1, -1, -1, 20, 146, -1, 1551 -1, 149, -1, -1, -1, -1, -1, -1, 91, 92, 1552 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1553 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1, 1554 113, 114, 115, -1, 117, 118, -1, -1, -1, 122, 1555 123, -1, -1, -1, -1, -1, -1, 130, -1, -1, 1556 -1, -1, 135, -1, 137, -1, -1, -1, -1, -1, 1557 -1, -1, -1, 146, -1, -1, 149, -1, 91, 92, 1558 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1559 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1, 1560 113, 114, 115, -1, 117, 118, -1, -1, -1, 122, 1561 123, -1, -1, -1, -1, -1, -1, 130, -1, -1, 1562 -1, -1, 135, -1, 137, -1, -1, -1, -1, -1, 1563 -1, -1, -1, 146, -1, -1, 149 1544 1564 }; 1545 1565 … … 1548 1568 static const yytype_uint8 yystos[] = 1549 1569 { 1550 0, 15 0, 0, 1, 8, 13, 14, 15, 16, 20,1570 0, 151, 0, 1, 8, 13, 14, 15, 16, 20, 1551 1571 40, 91, 92, 93, 94, 95, 96, 97, 98, 99, 1552 1572 100, 101, 102, 103, 104, 105, 106, 108, 109, 110, 1553 1573 111, 113, 114, 115, 116, 117, 118, 119, 120, 121, 1554 122, 123, 124, 125, 126, 127, 128, 129, 131, 134, 1555 136, 140, 145, 148, 151, 152, 153, 154, 155, 156, 1556 157, 158, 160, 162, 163, 164, 165, 166, 173, 174, 1557 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 1558 186, 187, 188, 189, 190, 191, 192, 140, 15, 16, 1559 99, 100, 101, 102, 129, 158, 173, 145, 156, 158, 1560 164, 145, 145, 145, 145, 145, 145, 145, 145, 145, 1561 145, 156, 145, 156, 145, 156, 145, 156, 111, 112, 1562 157, 111, 140, 156, 145, 158, 111, 145, 112, 145, 1563 145, 111, 145, 111, 145, 15, 158, 165, 166, 166, 1564 158, 157, 157, 158, 140, 11, 145, 130, 139, 3, 1565 4, 7, 9, 10, 131, 133, 134, 135, 136, 138, 1566 141, 142, 147, 158, 157, 130, 139, 140, 172, 145, 1567 156, 139, 156, 158, 145, 145, 145, 145, 145, 145, 1568 158, 112, 145, 158, 167, 158, 158, 158, 158, 158, 1569 158, 158, 146, 157, 158, 146, 157, 158, 146, 157, 1570 140, 140, 15, 16, 99, 100, 101, 102, 146, 156, 1571 173, 111, 112, 158, 159, 111, 158, 112, 146, 157, 1572 175, 137, 146, 148, 156, 146, 157, 158, 158, 158, 1573 158, 158, 158, 158, 158, 158, 158, 158, 158, 156, 1574 130, 146, 161, 156, 158, 136, 156, 172, 158, 158, 1575 157, 158, 157, 158, 146, 158, 146, 139, 146, 139, 1576 139, 139, 146, 139, 146, 139, 139, 146, 146, 146, 1577 146, 146, 146, 146, 146, 146, 146, 146, 146, 139, 1578 146, 146, 112, 139, 158, 111, 146, 146, 140, 146, 1579 137, 139, 158, 139, 146, 158, 158, 167, 146, 146, 1580 139, 167, 158, 158, 158, 158, 158, 158, 15, 16, 1581 99, 100, 101, 102, 173, 91, 94, 95, 97, 98, 1582 158, 146, 112, 112, 118, 158, 161, 158, 137, 139, 1583 157, 139, 146, 139, 146, 139, 139, 146, 139, 146, 1584 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 1585 146, 146, 146, 137, 139, 136, 167, 146, 114, 145, 1586 168, 169, 171, 158, 158, 158, 158, 158, 158, 139, 1587 169, 170, 145, 146, 146, 146, 146, 146, 146, 137, 1588 171, 139, 146, 157, 170, 146 1574 122, 123, 124, 125, 126, 127, 128, 129, 130, 132, 1575 135, 137, 141, 146, 149, 152, 153, 154, 155, 156, 1576 157, 158, 159, 161, 162, 164, 165, 166, 167, 168, 1577 175, 176, 178, 179, 180, 181, 182, 183, 184, 185, 1578 186, 187, 188, 189, 190, 191, 192, 193, 194, 141, 1579 15, 16, 99, 100, 101, 102, 130, 159, 175, 146, 1580 157, 159, 166, 146, 146, 146, 146, 146, 146, 146, 1581 146, 146, 146, 157, 146, 157, 146, 157, 146, 157, 1582 111, 112, 158, 111, 141, 157, 146, 159, 111, 146, 1583 146, 112, 146, 146, 111, 146, 111, 146, 15, 159, 1584 167, 168, 168, 159, 158, 158, 159, 141, 11, 146, 1585 131, 140, 3, 4, 7, 9, 10, 132, 134, 135, 1586 136, 137, 139, 142, 143, 148, 159, 159, 158, 131, 1587 140, 141, 174, 146, 157, 140, 157, 159, 146, 146, 1588 146, 146, 146, 146, 159, 112, 146, 159, 169, 159, 1589 159, 159, 159, 159, 159, 159, 147, 158, 159, 147, 1590 158, 159, 147, 158, 141, 141, 15, 16, 99, 100, 1591 101, 102, 147, 157, 175, 111, 112, 159, 160, 111, 1592 159, 112, 147, 158, 177, 138, 147, 149, 157, 147, 1593 158, 159, 159, 159, 159, 159, 159, 159, 159, 159, 1594 159, 159, 159, 157, 131, 147, 163, 140, 157, 159, 1595 137, 157, 174, 159, 159, 158, 159, 158, 159, 147, 1596 159, 147, 140, 147, 140, 140, 140, 147, 140, 147, 1597 140, 140, 147, 147, 147, 147, 147, 147, 147, 147, 1598 147, 147, 147, 147, 140, 147, 147, 112, 140, 159, 1599 111, 147, 147, 141, 147, 138, 140, 159, 159, 140, 1600 147, 159, 159, 169, 147, 147, 140, 169, 159, 159, 1601 159, 159, 159, 159, 15, 16, 99, 100, 101, 102, 1602 175, 91, 94, 95, 97, 98, 159, 147, 112, 112, 1603 119, 159, 163, 163, 159, 138, 140, 158, 140, 147, 1604 140, 147, 140, 140, 147, 140, 147, 147, 147, 147, 1605 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 1606 138, 140, 137, 169, 147, 114, 146, 170, 171, 173, 1607 159, 159, 159, 159, 159, 159, 140, 171, 172, 146, 1608 147, 147, 147, 147, 147, 147, 138, 173, 140, 147, 1609 158, 172, 147 1589 1610 }; 1590 1611 … … 2410 2431 2411 2432 /* Line 1464 of yacc.c */ 2412 #line 37 3"grammar.y"2433 #line 370 "grammar.y" 2413 2434 { 2414 2435 if (timerv) … … 2446 2467 2447 2468 /* Line 1464 of yacc.c */ 2448 #line 40 8"grammar.y"2469 #line 405 "grammar.y" 2449 2470 {currentVoice->ifsw=0;;} 2450 2471 break; … … 2453 2474 2454 2475 /* Line 1464 of yacc.c */ 2455 #line 4 10"grammar.y"2476 #line 407 "grammar.y" 2456 2477 { (yyvsp[(1) - (2)].lv).CleanUp(); currentVoice->ifsw=0;;} 2457 2478 break; … … 2460 2481 2461 2482 /* Line 1464 of yacc.c */ 2462 #line 4 12"grammar.y"2483 #line 409 "grammar.y" 2463 2484 { 2464 2485 YYACCEPT; … … 2469 2490 2470 2491 /* Line 1464 of yacc.c */ 2471 #line 41 6"grammar.y"2492 #line 413 "grammar.y" 2472 2493 { 2473 2494 currentVoice->ifsw=0; … … 2479 2500 2480 2501 /* Line 1464 of yacc.c */ 2481 #line 4 21"grammar.y"2502 #line 418 "grammar.y" 2482 2503 {currentVoice->ifsw=0;;} 2483 2504 break; … … 2486 2507 2487 2508 /* Line 1464 of yacc.c */ 2488 #line 42 3"grammar.y"2509 #line 420 "grammar.y" 2489 2510 { 2490 2511 #ifdef SIQ … … 2540 2561 2541 2562 /* Line 1464 of yacc.c */ 2563 #line 478 "grammar.y" 2564 {if (currentVoice!=NULL) currentVoice->ifsw=0;;} 2565 break; 2566 2567 case 19: 2568 2569 /* Line 1464 of yacc.c */ 2542 2570 #line 481 "grammar.y" 2543 {if (currentVoice!=NULL) currentVoice->ifsw=0;;}2544 break;2545 2546 case 19:2547 2548 /* Line 1464 of yacc.c */2549 #line 484 "grammar.y"2550 2571 { omFree((ADDRESS)(yyvsp[(2) - (2)].name)); ;} 2551 2572 break; … … 2554 2575 2555 2576 /* Line 1464 of yacc.c */ 2556 #line 49 9"grammar.y"2577 #line 496 "grammar.y" 2557 2578 { 2558 2579 if(iiAssign(&(yyvsp[(1) - (2)].lv),&(yyvsp[(2) - (2)].lv))) YYERROR; … … 2563 2584 2564 2585 /* Line 1464 of yacc.c */ 2565 #line 50 6"grammar.y"2586 #line 503 "grammar.y" 2566 2587 { 2567 2588 if (currRing==NULL) MYYERROR("no ring active"); … … 2573 2594 2574 2595 /* Line 1464 of yacc.c */ 2575 #line 5 11"grammar.y"2596 #line 508 "grammar.y" 2576 2597 { 2577 2598 syMake(&(yyval.lv),(yyvsp[(1) - (1)].name)); … … 2582 2603 2583 2604 /* Line 1464 of yacc.c */ 2584 #line 51 5"grammar.y"2605 #line 512 "grammar.y" 2585 2606 { 2586 2607 if(iiExprArith2(&(yyval.lv), &(yyvsp[(1) - (3)].lv), COLONCOLON, &(yyvsp[(3) - (3)].lv))) YYERROR; … … 2591 2612 2592 2613 /* Line 1464 of yacc.c */ 2593 #line 51 9"grammar.y"2614 #line 516 "grammar.y" 2594 2615 { 2595 2616 if(iiExprArith2(&(yyval.lv), &(yyvsp[(1) - (3)].lv), '.', &(yyvsp[(3) - (3)].lv))) YYERROR; … … 2600 2621 2601 2622 /* Line 1464 of yacc.c */ 2602 #line 52 3"grammar.y"2623 #line 520 "grammar.y" 2603 2624 { 2604 2625 if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'(')) YYERROR; … … 2609 2630 2610 2631 /* Line 1464 of yacc.c */ 2611 #line 52 7"grammar.y"2632 #line 524 "grammar.y" 2612 2633 { 2613 2634 if ((yyvsp[(1) - (4)].lv).rtyp==UNKNOWN) … … 2627 2648 2628 2649 /* Line 1464 of yacc.c */ 2629 #line 5 40"grammar.y"2650 #line 537 "grammar.y" 2630 2651 { 2631 2652 if (currRingHdl==NULL) MYYERROR("no ring active"); … … 2660 2681 2661 2682 /* Line 1464 of yacc.c */ 2662 #line 56 8"grammar.y"2683 #line 565 "grammar.y" 2663 2684 { 2664 2685 memset(&(yyval.lv),0,sizeof((yyval.lv))); … … 2689 2710 2690 2711 /* Line 1464 of yacc.c */ 2691 #line 5 92"grammar.y"2712 #line 589 "grammar.y" 2692 2713 { 2693 2714 memset(&(yyval.lv),0,sizeof((yyval.lv))); … … 2700 2721 2701 2722 /* Line 1464 of yacc.c */ 2702 #line 59 8"grammar.y"2723 #line 595 "grammar.y" 2703 2724 { 2704 2725 memset(&(yyval.lv),0,sizeof((yyval.lv))); … … 2711 2732 2712 2733 /* Line 1464 of yacc.c */ 2713 #line 60 4"grammar.y"2734 #line 601 "grammar.y" 2714 2735 { 2715 2736 if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2720 2741 2721 2742 /* Line 1464 of yacc.c */ 2722 #line 60 8"grammar.y"2743 #line 605 "grammar.y" 2723 2744 { 2724 2745 if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2729 2750 2730 2751 /* Line 1464 of yacc.c */ 2731 #line 6 12"grammar.y"2752 #line 609 "grammar.y" 2732 2753 { 2733 2754 if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2738 2759 2739 2760 /* Line 1464 of yacc.c */ 2740 #line 61 6"grammar.y"2761 #line 613 "grammar.y" 2741 2762 { 2742 2763 if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR; … … 2747 2768 2748 2769 /* Line 1464 of yacc.c */ 2749 #line 6 20"grammar.y"2770 #line 617 "grammar.y" 2750 2771 { 2751 2772 if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2756 2777 2757 2778 /* Line 1464 of yacc.c */ 2758 #line 62 4"grammar.y"2779 #line 621 "grammar.y" 2759 2780 { 2760 2781 if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2765 2786 2766 2787 /* Line 1464 of yacc.c */ 2767 #line 62 8"grammar.y"2788 #line 625 "grammar.y" 2768 2789 { 2769 2790 if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR; … … 2774 2795 2775 2796 /* Line 1464 of yacc.c */ 2776 #line 6 32"grammar.y"2797 #line 629 "grammar.y" 2777 2798 { 2778 2799 if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2783 2804 2784 2805 /* Line 1464 of yacc.c */ 2785 #line 63 6"grammar.y"2806 #line 633 "grammar.y" 2786 2807 { 2787 2808 if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2792 2813 2793 2814 /* Line 1464 of yacc.c */ 2794 #line 6 40"grammar.y"2815 #line 637 "grammar.y" 2795 2816 { 2796 2817 if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2801 2822 2802 2823 /* Line 1464 of yacc.c */ 2803 #line 64 4"grammar.y"2824 #line 641 "grammar.y" 2804 2825 { 2805 2826 if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2810 2831 2811 2832 /* Line 1464 of yacc.c */ 2812 #line 64 8"grammar.y"2833 #line 645 "grammar.y" 2813 2834 { 2814 2835 if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR; … … 2819 2840 2820 2841 /* Line 1464 of yacc.c */ 2821 #line 6 52"grammar.y"2842 #line 649 "grammar.y" 2822 2843 { 2823 2844 if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR; … … 2828 2849 2829 2850 /* Line 1464 of yacc.c */ 2830 #line 65 6"grammar.y"2851 #line 653 "grammar.y" 2831 2852 { 2832 2853 if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR; … … 2837 2858 2838 2859 /* Line 1464 of yacc.c */ 2839 #line 6 60"grammar.y"2860 #line 657 "grammar.y" 2840 2861 { 2841 2862 if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR; … … 2846 2867 2847 2868 /* Line 1464 of yacc.c */ 2848 #line 66 4"grammar.y"2869 #line 661 "grammar.y" 2849 2870 { 2850 2871 if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; … … 2855 2876 2856 2877 /* Line 1464 of yacc.c */ 2857 #line 66 8"grammar.y"2878 #line 665 "grammar.y" 2858 2879 { 2859 2880 if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; … … 2864 2885 2865 2886 /* Line 1464 of yacc.c */ 2866 #line 6 72"grammar.y"2887 #line 669 "grammar.y" 2867 2888 { 2868 2889 if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; … … 2873 2894 2874 2895 /* Line 1464 of yacc.c */ 2875 #line 67 6"grammar.y"2896 #line 673 "grammar.y" 2876 2897 { 2877 2898 if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; … … 2882 2903 2883 2904 /* Line 1464 of yacc.c */ 2884 #line 6 80"grammar.y"2905 #line 677 "grammar.y" 2885 2906 { 2886 2907 if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR; … … 2891 2912 2892 2913 /* Line 1464 of yacc.c */ 2893 #line 68 4"grammar.y"2914 #line 681 "grammar.y" 2894 2915 { 2895 2916 if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2900 2921 2901 2922 /* Line 1464 of yacc.c */ 2902 #line 68 8"grammar.y"2923 #line 685 "grammar.y" 2903 2924 { 2904 2925 if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; … … 2909 2930 2910 2931 /* Line 1464 of yacc.c */ 2911 #line 6 92"grammar.y"2932 #line 689 "grammar.y" 2912 2933 { 2913 2934 if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; … … 2918 2939 2919 2940 /* Line 1464 of yacc.c */ 2920 #line 69 6"grammar.y"2941 #line 693 "grammar.y" 2921 2942 { 2922 2943 if(iiExprArith3(&(yyval.lv),RING_CMD,&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; … … 2927 2948 2928 2949 /* Line 1464 of yacc.c */ 2929 #line 700"grammar.y"2950 #line 697 "grammar.y" 2930 2951 { 2931 2952 if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),RING_CMD)) YYERROR; … … 2936 2957 2937 2958 /* Line 1464 of yacc.c */ 2938 #line 70 7"grammar.y"2959 #line 704 "grammar.y" 2939 2960 { 2940 2961 leftv v = &(yyvsp[(1) - (3)].lv); … … 2952 2973 2953 2974 /* Line 1464 of yacc.c */ 2954 #line 71 8"grammar.y"2975 #line 715 "grammar.y" 2955 2976 { 2956 2977 (yyval.lv) = (yyvsp[(1) - (1)].lv); … … 2961 2982 2962 2983 /* Line 1464 of yacc.c */ 2963 #line 72 4"grammar.y"2984 #line 721 "grammar.y" 2964 2985 { 2965 2986 /*if ($1.typ == eunknown) YYERROR;*/ … … 2971 2992 2972 2993 /* Line 1464 of yacc.c */ 2994 #line 725 "grammar.y" 2995 { (yyval.lv) = (yyvsp[(1) - (1)].lv); ;} 2996 break; 2997 2998 case 69: 2999 3000 /* Line 1464 of yacc.c */ 3001 #line 726 "grammar.y" 3002 { (yyval.lv) = (yyvsp[(2) - (3)].lv); ;} 3003 break; 3004 3005 case 70: 3006 3007 /* Line 1464 of yacc.c */ 2973 3008 #line 728 "grammar.y" 2974 { (yyval.lv) = (yyvsp[(1) - (1)].lv); ;}2975 break;2976 2977 case 69:2978 2979 /* Line 1464 of yacc.c */2980 #line 729 "grammar.y"2981 { (yyval.lv) = (yyvsp[(2) - (3)].lv); ;}2982 break;2983 2984 case 70:2985 2986 /* Line 1464 of yacc.c */2987 #line 731 "grammar.y"2988 3009 { 2989 3010 if(iiExprArith3(&(yyval.lv),'[',&(yyvsp[(1) - (6)].lv),&(yyvsp[(3) - (6)].lv),&(yyvsp[(5) - (6)].lv))) YYERROR; … … 2994 3015 2995 3016 /* Line 1464 of yacc.c */ 2996 #line 73 5"grammar.y"3017 #line 732 "grammar.y" 2997 3018 { 2998 3019 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'[',&(yyvsp[(3) - (4)].lv))) YYERROR; … … 3003 3024 3004 3025 /* Line 1464 of yacc.c */ 3005 #line 73 9"grammar.y"3026 #line 736 "grammar.y" 3006 3027 { 3007 3028 if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR; … … 3012 3033 3013 3034 /* Line 1464 of yacc.c */ 3014 #line 74 3"grammar.y"3035 #line 740 "grammar.y" 3015 3036 { 3016 3037 if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR; … … 3021 3042 3022 3043 /* Line 1464 of yacc.c */ 3023 #line 74 7"grammar.y"3044 #line 744 "grammar.y" 3024 3045 { 3025 3046 if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR; … … 3030 3051 3031 3052 /* Line 1464 of yacc.c */ 3032 #line 7 51"grammar.y"3053 #line 748 "grammar.y" 3033 3054 { 3034 3055 if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR; … … 3039 3060 3040 3061 /* Line 1464 of yacc.c */ 3041 #line 75 5"grammar.y"3062 #line 752 "grammar.y" 3042 3063 { 3043 3064 if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR; … … 3048 3069 3049 3070 /* Line 1464 of yacc.c */ 3050 #line 75 9"grammar.y"3071 #line 756 "grammar.y" 3051 3072 { 3052 3073 if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), 0, &(yyvsp[(5) - (6)].lv))) YYERROR; … … 3057 3078 3058 3079 /* Line 1464 of yacc.c */ 3059 #line 76 3"grammar.y"3080 #line 760 "grammar.y" 3060 3081 { 3061 3082 (yyval.lv)=(yyvsp[(2) - (3)].lv); … … 3066 3087 3067 3088 /* Line 1464 of yacc.c */ 3068 #line 76 7"grammar.y"3089 #line 764 "grammar.y" 3069 3090 { 3070 3091 #ifdef SIQ … … 3088 3109 3089 3110 /* Line 1464 of yacc.c */ 3090 #line 784 "grammar.y" 3111 #line 781 "grammar.y" 3112 { 3113 iiTestAssume(&(yyvsp[(2) - (5)].lv),&(yyvsp[(4) - (5)].lv)); 3114 memset(&(yyval.lv),0,sizeof((yyval.lv))); 3115 (yyval.lv).rtyp=NONE; 3116 ;} 3117 break; 3118 3119 case 81: 3120 3121 /* Line 1464 of yacc.c */ 3122 #line 787 "grammar.y" 3091 3123 { 3092 3124 #ifdef SIQ … … 3096 3128 break; 3097 3129 3098 case 8 1:3099 3100 /* Line 1464 of yacc.c */ 3101 #line 79 0"grammar.y"3130 case 82: 3131 3132 /* Line 1464 of yacc.c */ 3133 #line 793 "grammar.y" 3102 3134 { 3103 3135 #ifdef SIQ … … 3111 3143 break; 3112 3144 3113 case 8 2:3114 3115 /* Line 1464 of yacc.c */ 3116 #line 80 2"grammar.y"3145 case 83: 3146 3147 /* Line 1464 of yacc.c */ 3148 #line 805 "grammar.y" 3117 3149 { 3118 3150 #ifdef SIQ … … 3122 3154 break; 3123 3155 3124 case 83: 3125 3126 /* Line 1464 of yacc.c */ 3127 #line 810 "grammar.y" 3156 case 84: 3157 3158 /* Line 1464 of yacc.c */ 3159 #line 813 "grammar.y" 3160 { 3161 #ifdef SIQ 3162 siq++; 3163 #endif 3164 ;} 3165 break; 3166 3167 case 85: 3168 3169 /* Line 1464 of yacc.c */ 3170 #line 821 "grammar.y" 3128 3171 { 3129 3172 #ifdef SIQ … … 3133 3176 break; 3134 3177 3135 case 8 4:3136 3137 /* Line 1464 of yacc.c */ 3138 #line 8 19"grammar.y"3178 case 86: 3179 3180 /* Line 1464 of yacc.c */ 3181 #line 830 "grammar.y" 3139 3182 { 3140 3183 if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (2)].lv),PLUSPLUS)) YYERROR; … … 3142 3185 break; 3143 3186 3144 case 8 5:3145 3146 /* Line 1464 of yacc.c */ 3147 #line 8 23"grammar.y"3187 case 87: 3188 3189 /* Line 1464 of yacc.c */ 3190 #line 834 "grammar.y" 3148 3191 { 3149 3192 if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (2)].lv),MINUSMINUS)) YYERROR; … … 3151 3194 break; 3152 3195 3153 case 8 6:3154 3155 /* Line 1464 of yacc.c */ 3156 #line 8 27"grammar.y"3196 case 88: 3197 3198 /* Line 1464 of yacc.c */ 3199 #line 838 "grammar.y" 3157 3200 { 3158 3201 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'+',&(yyvsp[(3) - (3)].lv))) YYERROR; … … 3160 3203 break; 3161 3204 3162 case 8 7:3163 3164 /* Line 1464 of yacc.c */ 3165 #line 8 31"grammar.y"3205 case 89: 3206 3207 /* Line 1464 of yacc.c */ 3208 #line 842 "grammar.y" 3166 3209 { 3167 3210 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'-',&(yyvsp[(3) - (3)].lv))) YYERROR; … … 3169 3212 break; 3170 3213 3171 case 88:3172 3173 /* Line 1464 of yacc.c */ 3174 #line 8 35"grammar.y"3214 case 90: 3215 3216 /* Line 1464 of yacc.c */ 3217 #line 846 "grammar.y" 3175 3218 { 3176 3219 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR; … … 3178 3221 break; 3179 3222 3180 case 89:3181 3182 /* Line 1464 of yacc.c */ 3183 #line 8 39"grammar.y"3223 case 91: 3224 3225 /* Line 1464 of yacc.c */ 3226 #line 850 "grammar.y" 3184 3227 { 3185 3228 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'^',&(yyvsp[(3) - (3)].lv))) YYERROR; … … 3187 3230 break; 3188 3231 3189 case 9 0:3190 3191 /* Line 1464 of yacc.c */ 3192 #line 8 43"grammar.y"3232 case 92: 3233 3234 /* Line 1464 of yacc.c */ 3235 #line 854 "grammar.y" 3193 3236 { 3194 3237 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR; … … 3196 3239 break; 3197 3240 3198 case 9 1:3199 3200 /* Line 1464 of yacc.c */ 3201 #line 8 47"grammar.y"3241 case 93: 3242 3243 /* Line 1464 of yacc.c */ 3244 #line 858 "grammar.y" 3202 3245 { 3203 3246 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR; … … 3205 3248 break; 3206 3249 3207 case 9 2:3208 3209 /* Line 1464 of yacc.c */ 3210 #line 8 51"grammar.y"3250 case 94: 3251 3252 /* Line 1464 of yacc.c */ 3253 #line 862 "grammar.y" 3211 3254 { 3212 3255 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),NOTEQUAL,&(yyvsp[(3) - (3)].lv))) YYERROR; … … 3214 3257 break; 3215 3258 3216 case 9 3:3217 3218 /* Line 1464 of yacc.c */ 3219 #line 8 55"grammar.y"3259 case 95: 3260 3261 /* Line 1464 of yacc.c */ 3262 #line 866 "grammar.y" 3220 3263 { 3221 3264 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),EQUAL_EQUAL,&(yyvsp[(3) - (3)].lv))) YYERROR; … … 3223 3266 break; 3224 3267 3225 case 9 4:3226 3227 /* Line 1464 of yacc.c */ 3228 #line 8 59"grammar.y"3268 case 96: 3269 3270 /* Line 1464 of yacc.c */ 3271 #line 870 "grammar.y" 3229 3272 { 3230 3273 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),DOTDOT,&(yyvsp[(3) - (3)].lv))) YYERROR; … … 3232 3275 break; 3233 3276 3234 case 9 5:3235 3236 /* Line 1464 of yacc.c */ 3237 #line 8 63"grammar.y"3277 case 97: 3278 3279 /* Line 1464 of yacc.c */ 3280 #line 874 "grammar.y" 3238 3281 { 3239 3282 if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),':',&(yyvsp[(3) - (3)].lv))) YYERROR; … … 3241 3284 break; 3242 3285 3243 case 9 6:3244 3245 /* Line 1464 of yacc.c */ 3246 #line 8 67"grammar.y"3286 case 98: 3287 3288 /* Line 1464 of yacc.c */ 3289 #line 878 "grammar.y" 3247 3290 { 3248 3291 memset(&(yyval.lv),0,sizeof((yyval.lv))); … … 3253 3296 break; 3254 3297 3255 case 9 7:3256 3257 /* Line 1464 of yacc.c */ 3258 #line 8 74"grammar.y"3298 case 99: 3299 3300 /* Line 1464 of yacc.c */ 3301 #line 885 "grammar.y" 3259 3302 { 3260 3303 if(iiExprArith1(&(yyval.lv),&(yyvsp[(2) - (2)].lv),'-')) YYERROR; … … 3262 3305 break; 3263 3306 3264 case 98:3265 3266 /* Line 1464 of yacc.c */ 3267 #line 8 80"grammar.y"3307 case 100: 3308 3309 /* Line 1464 of yacc.c */ 3310 #line 891 "grammar.y" 3268 3311 { (yyval.lv) = (yyvsp[(1) - (2)].lv); ;} 3269 3312 break; 3270 3313 3271 case 99:3272 3273 /* Line 1464 of yacc.c */ 3274 #line 8 82"grammar.y"3314 case 101: 3315 3316 /* Line 1464 of yacc.c */ 3317 #line 893 "grammar.y" 3275 3318 { 3276 3319 if ((yyvsp[(1) - (2)].lv).rtyp==0) … … 3289 3332 break; 3290 3333 3291 case 10 1:3292 3293 /* Line 1464 of yacc.c */ 3294 #line 9 02"grammar.y"3334 case 103: 3335 3336 /* Line 1464 of yacc.c */ 3337 #line 913 "grammar.y" 3295 3338 { 3296 3339 if ((yyvsp[(2) - (3)].lv).Typ()!=STRING_CMD) … … 3303 3346 break; 3304 3347 3305 case 10 2:3306 3307 /* Line 1464 of yacc.c */ 3308 #line 9 14"grammar.y"3348 case 104: 3349 3350 /* Line 1464 of yacc.c */ 3351 #line 925 "grammar.y" 3309 3352 { 3310 3353 if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot))) … … 3313 3356 break; 3314 3357 3315 case 10 3:3316 3317 /* Line 1464 of yacc.c */ 3318 #line 9 19"grammar.y"3358 case 105: 3359 3360 /* Line 1464 of yacc.c */ 3361 #line 930 "grammar.y" 3319 3362 { 3320 3363 if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot))) … … 3323 3366 break; 3324 3367 3325 case 10 4:3326 3327 /* Line 1464 of yacc.c */ 3328 #line 9 24"grammar.y"3368 case 106: 3369 3370 /* Line 1464 of yacc.c */ 3371 #line 935 "grammar.y" 3329 3372 { 3330 3373 if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR; … … 3332 3375 break; 3333 3376 3334 case 10 5:3335 3336 /* Line 1464 of yacc.c */ 3337 #line 9 28"grammar.y"3377 case 107: 3378 3379 /* Line 1464 of yacc.c */ 3380 #line 939 "grammar.y" 3338 3381 { 3339 3382 if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR; … … 3341 3384 break; 3342 3385 3343 case 10 6:3344 3345 /* Line 1464 of yacc.c */ 3346 #line 9 32"grammar.y"3386 case 108: 3387 3388 /* Line 1464 of yacc.c */ 3389 #line 943 "grammar.y" 3347 3390 { 3348 3391 int r; TESTSETINT((yyvsp[(4) - (8)].lv),r); … … 3386 3429 break; 3387 3430 3388 case 10 7:3389 3390 /* Line 1464 of yacc.c */ 3391 #line 9 72"grammar.y"3431 case 109: 3432 3433 /* Line 1464 of yacc.c */ 3434 #line 983 "grammar.y" 3392 3435 { 3393 3436 if ((yyvsp[(1) - (2)].i) == MATRIX_CMD) … … 3417 3460 break; 3418 3461 3419 case 1 08:3420 3421 /* Line 1464 of yacc.c */ 3422 #line 998"grammar.y"3462 case 110: 3463 3464 /* Line 1464 of yacc.c */ 3465 #line 1009 "grammar.y" 3423 3466 { 3424 3467 int t=(yyvsp[(1) - (3)].lv).Typ(); … … 3443 3486 break; 3444 3487 3445 case 1 09:3446 3447 /* Line 1464 of yacc.c */ 3448 #line 10 19"grammar.y"3488 case 111: 3489 3490 /* Line 1464 of yacc.c */ 3491 #line 1030 "grammar.y" 3449 3492 { 3450 3493 if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot))) … … 3453 3496 break; 3454 3497 3455 case 11 2:3456 3457 /* Line 1464 of yacc.c */ 3458 #line 10 32"grammar.y"3498 case 114: 3499 3500 /* Line 1464 of yacc.c */ 3501 #line 1043 "grammar.y" 3459 3502 { 3460 3503 leftv v = &(yyvsp[(2) - (5)].lv); … … 3469 3512 break; 3470 3513 3471 case 11 3:3472 3473 /* Line 1464 of yacc.c */ 3474 #line 10 46"grammar.y"3514 case 115: 3515 3516 /* Line 1464 of yacc.c */ 3517 #line 1057 "grammar.y" 3475 3518 { 3476 3519 // let rInit take care of any errors … … 3479 3522 break; 3480 3523 3481 case 11 4:3482 3483 /* Line 1464 of yacc.c */ 3484 #line 10 54"grammar.y"3524 case 116: 3525 3526 /* Line 1464 of yacc.c */ 3527 #line 1065 "grammar.y" 3485 3528 { 3486 3529 memset(&(yyval.lv),0,sizeof((yyval.lv))); … … 3493 3536 break; 3494 3537 3495 case 11 5:3496 3497 /* Line 1464 of yacc.c */ 3498 #line 10 63"grammar.y"3538 case 117: 3539 3540 /* Line 1464 of yacc.c */ 3541 #line 1074 "grammar.y" 3499 3542 { 3500 3543 memset(&(yyval.lv),0,sizeof((yyval.lv))); … … 3540 3583 break; 3541 3584 3542 case 11 7:3543 3544 /* Line 1464 of yacc.c */ 3545 #line 11 09"grammar.y"3585 case 119: 3586 3587 /* Line 1464 of yacc.c */ 3588 #line 1120 "grammar.y" 3546 3589 { 3547 3590 (yyval.lv) = (yyvsp[(1) - (3)].lv); … … 3551 3594 break; 3552 3595 3553 case 1 19:3554 3555 /* Line 1464 of yacc.c */ 3556 #line 11 19"grammar.y"3596 case 121: 3597 3598 /* Line 1464 of yacc.c */ 3599 #line 1130 "grammar.y" 3557 3600 { 3558 3601 (yyval.lv) = (yyvsp[(2) - (3)].lv); … … 3560 3603 break; 3561 3604 3562 case 12 0:3563 3564 /* Line 1464 of yacc.c */ 3565 #line 11 25"grammar.y"3605 case 122: 3606 3607 /* Line 1464 of yacc.c */ 3608 #line 1136 "grammar.y" 3566 3609 { 3567 3610 expected_parms = TRUE; … … 3569 3612 break; 3570 3613 3571 case 12 1:3572 3573 /* Line 1464 of yacc.c */ 3574 #line 11 32"grammar.y"3614 case 123: 3615 3616 /* Line 1464 of yacc.c */ 3617 #line 1143 "grammar.y" 3575 3618 { (yyval.i) = (yyvsp[(1) - (1)].i); ;} 3576 3619 break; 3577 3620 3578 case 12 2:3579 3580 /* Line 1464 of yacc.c */ 3581 #line 11 34"grammar.y"3621 case 124: 3622 3623 /* Line 1464 of yacc.c */ 3624 #line 1145 "grammar.y" 3582 3625 { (yyval.i) = (yyvsp[(1) - (1)].i); ;} 3583 3626 break; 3584 3627 3585 case 12 3:3586 3587 /* Line 1464 of yacc.c */ 3588 #line 11 36"grammar.y"3628 case 125: 3629 3630 /* Line 1464 of yacc.c */ 3631 #line 1147 "grammar.y" 3589 3632 { (yyval.i) = (yyvsp[(1) - (1)].i); ;} 3590 3633 break; 3591 3634 3592 case 12 4:3593 3594 /* Line 1464 of yacc.c */ 3595 #line 11 45"grammar.y"3635 case 126: 3636 3637 /* Line 1464 of yacc.c */ 3638 #line 1156 "grammar.y" 3596 3639 { if ((yyvsp[(1) - (2)].i) != '<') YYERROR; 3597 3640 if((feFilePending=feFopen((yyvsp[(2) - (2)].name),"r",NULL,TRUE))==NULL) YYERROR; ;} 3598 3641 break; 3599 3642 3600 case 12 5:3601 3602 /* Line 1464 of yacc.c */ 3603 #line 11 48"grammar.y"3643 case 127: 3644 3645 /* Line 1464 of yacc.c */ 3646 #line 1159 "grammar.y" 3604 3647 { newFile((yyvsp[(2) - (4)].name),feFilePending); ;} 3605 3648 break; 3606 3649 3607 case 12 6:3608 3609 /* Line 1464 of yacc.c */ 3610 #line 11 53"grammar.y"3650 case 128: 3651 3652 /* Line 1464 of yacc.c */ 3653 #line 1164 "grammar.y" 3611 3654 { 3612 3655 feHelp((yyvsp[(2) - (3)].name)); … … 3615 3658 break; 3616 3659 3617 case 12 7:3618 3619 /* Line 1464 of yacc.c */ 3620 #line 11 58"grammar.y"3660 case 129: 3661 3662 /* Line 1464 of yacc.c */ 3663 #line 1169 "grammar.y" 3621 3664 { 3622 3665 feHelp(NULL); … … 3624 3667 break; 3625 3668 3626 case 1 28:3627 3628 /* Line 1464 of yacc.c */ 3629 #line 11 65"grammar.y"3669 case 130: 3670 3671 /* Line 1464 of yacc.c */ 3672 #line 1176 "grammar.y" 3630 3673 { 3631 3674 singular_example((yyvsp[(2) - (3)].name)); … … 3634 3677 break; 3635 3678 3636 case 1 29:3637 3638 /* Line 1464 of yacc.c */ 3639 #line 11 73"grammar.y"3679 case 131: 3680 3681 /* Line 1464 of yacc.c */ 3682 #line 1184 "grammar.y" 3640 3683 { 3641 3684 if (basePack!=(yyvsp[(2) - (2)].lv).req_packhdl) … … 3648 3691 break; 3649 3692 3650 case 13 0:3651 3652 /* Line 1464 of yacc.c */ 3653 #line 11 85"grammar.y"3693 case 132: 3694 3695 /* Line 1464 of yacc.c */ 3696 #line 1196 "grammar.y" 3654 3697 { 3655 3698 leftv v=&(yyvsp[(2) - (2)].lv); … … 3669 3712 break; 3670 3713 3671 case 13 1:3672 3673 /* Line 1464 of yacc.c */ 3674 #line 12 01"grammar.y"3714 case 133: 3715 3716 /* Line 1464 of yacc.c */ 3717 #line 1212 "grammar.y" 3675 3718 { 3676 3719 leftv v=&(yyvsp[(3) - (3)].lv); … … 3690 3733 break; 3691 3734 3692 case 13 2:3693 3694 /* Line 1464 of yacc.c */ 3695 #line 12 20"grammar.y"3735 case 134: 3736 3737 /* Line 1464 of yacc.c */ 3738 #line 1231 "grammar.y" 3696 3739 { 3697 3740 list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE); … … 3699 3742 break; 3700 3743 3701 case 13 3:3702 3703 /* Line 1464 of yacc.c */ 3704 #line 12 24"grammar.y"3744 case 135: 3745 3746 /* Line 1464 of yacc.c */ 3747 #line 1235 "grammar.y" 3705 3748 { 3706 3749 list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE); … … 3708 3751 break; 3709 3752 3710 case 13 4:3711 3712 /* Line 1464 of yacc.c */ 3713 #line 12 28"grammar.y"3753 case 136: 3754 3755 /* Line 1464 of yacc.c */ 3756 #line 1239 "grammar.y" 3714 3757 { 3715 3758 if ((yyvsp[(3) - (4)].i)==QRING_CMD) (yyvsp[(3) - (4)].i)=RING_CMD; … … 3718 3761 break; 3719 3762 3720 case 13 5:3721 3722 /* Line 1464 of yacc.c */ 3723 #line 12 33"grammar.y"3763 case 137: 3764 3765 /* Line 1464 of yacc.c */ 3766 #line 1244 "grammar.y" 3724 3767 { 3725 3768 list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE); … … 3727 3770 break; 3728 3771 3729 case 13 6:3730 3731 /* Line 1464 of yacc.c */ 3732 #line 12 37"grammar.y"3772 case 138: 3773 3774 /* Line 1464 of yacc.c */ 3775 #line 1248 "grammar.y" 3733 3776 { 3734 3777 list_cmd(RING_CMD,NULL,"// ",TRUE); … … 3736 3779 break; 3737 3780 3738 case 13 7:3739 3740 /* Line 1464 of yacc.c */ 3741 #line 12 41"grammar.y"3781 case 139: 3782 3783 /* Line 1464 of yacc.c */ 3784 #line 1252 "grammar.y" 3742 3785 { 3743 3786 list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE); … … 3745 3788 break; 3746 3789 3747 case 1 38:3748 3749 /* Line 1464 of yacc.c */ 3750 #line 12 45"grammar.y"3790 case 140: 3791 3792 /* Line 1464 of yacc.c */ 3793 #line 1256 "grammar.y" 3751 3794 { 3752 3795 list_cmd(PROC_CMD,NULL,"// ",TRUE); … … 3754 3797 break; 3755 3798 3756 case 1 39:3757 3758 /* Line 1464 of yacc.c */ 3759 #line 12 49"grammar.y"3799 case 141: 3800 3801 /* Line 1464 of yacc.c */ 3802 #line 1260 "grammar.y" 3760 3803 { 3761 3804 list_cmd(0,(yyvsp[(3) - (4)].lv).Fullname(),"// ",TRUE); … … 3764 3807 break; 3765 3808 3766 case 14 0:3767 3768 /* Line 1464 of yacc.c */ 3769 #line 12 54"grammar.y"3809 case 142: 3810 3811 /* Line 1464 of yacc.c */ 3812 #line 1265 "grammar.y" 3770 3813 { 3771 3814 if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) … … 3775 3818 break; 3776 3819 3777 case 14 1:3778 3779 /* Line 1464 of yacc.c */ 3780 #line 12 60"grammar.y"3820 case 143: 3821 3822 /* Line 1464 of yacc.c */ 3823 #line 1271 "grammar.y" 3781 3824 { 3782 3825 if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) … … 3786 3829 break; 3787 3830 3788 case 14 2:3789 3790 /* Line 1464 of yacc.c */ 3791 #line 12 66"grammar.y"3831 case 144: 3832 3833 /* Line 1464 of yacc.c */ 3834 #line 1277 "grammar.y" 3792 3835 { 3793 3836 if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) … … 3797 3840 break; 3798 3841 3799 case 14 3:3800 3801 /* Line 1464 of yacc.c */ 3802 #line 12 72"grammar.y"3842 case 145: 3843 3844 /* Line 1464 of yacc.c */ 3845 #line 1283 "grammar.y" 3803 3846 { 3804 3847 if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) … … 3808 3851 break; 3809 3852 3810 case 14 4:3811 3812 /* Line 1464 of yacc.c */ 3813 #line 12 78"grammar.y"3853 case 146: 3854 3855 /* Line 1464 of yacc.c */ 3856 #line 1289 "grammar.y" 3814 3857 { 3815 3858 if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) … … 3819 3862 break; 3820 3863 3821 case 14 5:3822 3823 /* Line 1464 of yacc.c */ 3824 #line 12 84"grammar.y"3864 case 147: 3865 3866 /* Line 1464 of yacc.c */ 3867 #line 1295 "grammar.y" 3825 3868 { 3826 3869 if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) … … 3830 3873 break; 3831 3874 3832 case 14 6:3833 3834 /* Line 1464 of yacc.c */ 3835 #line 1 290"grammar.y"3875 case 148: 3876 3877 /* Line 1464 of yacc.c */ 3878 #line 1301 "grammar.y" 3836 3879 { 3837 3880 if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) … … 3841 3884 break; 3842 3885 3843 case 14 7:3844 3845 /* Line 1464 of yacc.c */ 3846 #line 13 02"grammar.y"3886 case 149: 3887 3888 /* Line 1464 of yacc.c */ 3889 #line 1313 "grammar.y" 3847 3890 { 3848 3891 list_cmd(-1,NULL,"// ",TRUE); … … 3850 3893 break; 3851 3894 3852 case 1 48:3853 3854 /* Line 1464 of yacc.c */ 3855 #line 13 08"grammar.y"3895 case 150: 3896 3897 /* Line 1464 of yacc.c */ 3898 #line 1319 "grammar.y" 3856 3899 { yyInRingConstruction = TRUE; ;} 3857 3900 break; 3858 3901 3859 case 1 49:3860 3861 /* Line 1464 of yacc.c */ 3862 #line 13 17"grammar.y"3902 case 151: 3903 3904 /* Line 1464 of yacc.c */ 3905 #line 1328 "grammar.y" 3863 3906 { 3864 3907 const char *ring_name = (yyvsp[(2) - (8)].lv).name; … … 3895 3938 break; 3896 3939 3897 case 15 0:3898 3899 /* Line 1464 of yacc.c */ 3900 #line 13 50"grammar.y"3940 case 152: 3941 3942 /* Line 1464 of yacc.c */ 3943 #line 1361 "grammar.y" 3901 3944 { 3902 3945 const char *ring_name = (yyvsp[(2) - (2)].lv).name; … … 3907 3950 break; 3908 3951 3909 case 15 1:3910 3911 /* Line 1464 of yacc.c */ 3912 #line 13 60"grammar.y"3952 case 153: 3953 3954 /* Line 1464 of yacc.c */ 3955 #line 1371 "grammar.y" 3913 3956 { 3914 3957 if (((yyvsp[(1) - (2)].i)!=LIB_CMD)||(jjLOAD((yyvsp[(2) - (2)].name),TRUE))) YYERROR; … … 3916 3959 break; 3917 3960 3918 case 15 4:3919 3920 /* Line 1464 of yacc.c */ 3921 #line 13 69"grammar.y"3961 case 156: 3962 3963 /* Line 1464 of yacc.c */ 3964 #line 1380 "grammar.y" 3922 3965 { 3923 3966 if (((yyvsp[(1) - (2)].i)==KEEPRING_CMD) && (myynest==0)) … … 3990 4033 break; 3991 4034 3992 case 15 5:3993 3994 /* Line 1464 of yacc.c */ 3995 #line 14 41"grammar.y"4035 case 157: 4036 4037 /* Line 1464 of yacc.c */ 4038 #line 1452 "grammar.y" 3996 4039 { 3997 4040 type_cmd(&((yyvsp[(2) - (2)].lv))); … … 3999 4042 break; 4000 4043 4001 case 15 6:4002 4003 /* Line 1464 of yacc.c */ 4004 #line 14 45"grammar.y"4044 case 158: 4045 4046 /* Line 1464 of yacc.c */ 4047 #line 1456 "grammar.y" 4005 4048 { 4006 4049 //Print("typ is %d, rtyp:%d\n",$1.Typ(),$1.rtyp); … … 4027 4070 break; 4028 4071 4029 case 15 7:4030 4031 /* Line 1464 of yacc.c */ 4032 #line 14 74"grammar.y"4072 case 159: 4073 4074 /* Line 1464 of yacc.c */ 4075 #line 1485 "grammar.y" 4033 4076 { 4034 4077 int i; TESTSETINT((yyvsp[(3) - (5)].lv),i); … … 4045 4088 break; 4046 4089 4047 case 1 58:4048 4049 /* Line 1464 of yacc.c */ 4050 #line 14 87"grammar.y"4090 case 160: 4091 4092 /* Line 1464 of yacc.c */ 4093 #line 1498 "grammar.y" 4051 4094 { 4052 4095 if (currentVoice->ifsw==1) … … 4067 4110 break; 4068 4111 4069 case 1 59:4070 4071 /* Line 1464 of yacc.c */ 4072 #line 15 04"grammar.y"4112 case 161: 4113 4114 /* Line 1464 of yacc.c */ 4115 #line 1515 "grammar.y" 4073 4116 { 4074 4117 int i; TESTSETINT((yyvsp[(3) - (5)].lv),i); … … 4081 4124 break; 4082 4125 4083 case 16 0:4084 4085 /* Line 1464 of yacc.c */ 4086 #line 15 13"grammar.y"4126 case 162: 4127 4128 /* Line 1464 of yacc.c */ 4129 #line 1524 "grammar.y" 4087 4130 { 4088 4131 if (exitBuffer(BT_break)) YYERROR; … … 4091 4134 break; 4092 4135 4093 case 16 1:4094 4095 /* Line 1464 of yacc.c */ 4096 #line 15 18"grammar.y"4136 case 163: 4137 4138 /* Line 1464 of yacc.c */ 4139 #line 1529 "grammar.y" 4097 4140 { 4098 4141 if (contBuffer(BT_break)) YYERROR; … … 4101 4144 break; 4102 4145 4103 case 16 2:4104 4105 /* Line 1464 of yacc.c */ 4106 #line 15 26"grammar.y"4146 case 164: 4147 4148 /* Line 1464 of yacc.c */ 4149 #line 1537 "grammar.y" 4107 4150 { 4108 4151 /* -> if(!$2) break; $3; continue;*/ … … 4115 4158 break; 4116 4159 4117 case 16 3:4118 4119 /* Line 1464 of yacc.c */ 4120 #line 15 38"grammar.y"4160 case 165: 4161 4162 /* Line 1464 of yacc.c */ 4163 #line 1549 "grammar.y" 4121 4164 { 4122 4165 /* $2 */ … … 4136 4179 break; 4137 4180 4138 case 16 4:4139 4140 /* Line 1464 of yacc.c */ 4141 #line 15 57"grammar.y"4181 case 166: 4182 4183 /* Line 1464 of yacc.c */ 4184 #line 1568 "grammar.y" 4142 4185 { 4143 4186 idhdl h = enterid((yyvsp[(2) - (3)].name),myynest,PROC_CMD,&IDROOT,TRUE); … … 4151 4194 break; 4152 4195 4153 case 16 5:4154 4155 /* Line 1464 of yacc.c */ 4156 #line 15 67"grammar.y"4196 case 167: 4197 4198 /* Line 1464 of yacc.c */ 4199 #line 1578 "grammar.y" 4157 4200 { 4158 4201 idhdl h = enterid((yyvsp[(1) - (3)].name),myynest,PROC_CMD,&IDROOT,TRUE); … … 4175 4218 break; 4176 4219 4177 case 16 6:4178 4179 /* Line 1464 of yacc.c */ 4180 #line 15 86"grammar.y"4220 case 168: 4221 4222 /* Line 1464 of yacc.c */ 4223 #line 1597 "grammar.y" 4181 4224 { 4182 4225 omFree((ADDRESS)(yyvsp[(3) - (4)].name)); … … 4200 4243 break; 4201 4244 4202 case 16 7:4203 4204 /* Line 1464 of yacc.c */ 4205 #line 16 09"grammar.y"4245 case 169: 4246 4247 /* Line 1464 of yacc.c */ 4248 #line 1620 "grammar.y" 4206 4249 { 4207 4250 // decl. of type proc p(int i) … … 4211 4254 break; 4212 4255 4213 case 1 68:4214 4215 /* Line 1464 of yacc.c */ 4216 #line 16 15"grammar.y"4256 case 170: 4257 4258 /* Line 1464 of yacc.c */ 4259 #line 1626 "grammar.y" 4217 4260 { 4218 4261 // decl. of type proc p(i) … … 4225 4268 break; 4226 4269 4227 case 1 69:4228 4229 /* Line 1464 of yacc.c */ 4230 #line 16 27"grammar.y"4270 case 171: 4271 4272 /* Line 1464 of yacc.c */ 4273 #line 1638 "grammar.y" 4231 4274 { 4232 4275 iiRETURNEXPR.Copy(&(yyvsp[(3) - (4)].lv)); … … 4236 4279 break; 4237 4280 4238 case 17 0:4239 4240 /* Line 1464 of yacc.c */ 4241 #line 16 33"grammar.y"4281 case 172: 4282 4283 /* Line 1464 of yacc.c */ 4284 #line 1644 "grammar.y" 4242 4285 { 4243 4286 if ((yyvsp[(1) - (3)].i)==RETURN) … … 4253 4296 4254 4297 /* Line 1464 of yacc.c */ 4255 #line 42 58"grammar.cc"4298 #line 4297 "grammar.cc" 4256 4299 default: break; 4257 4300 } -
Singular/grammar.h
r4c1341 rce70e6 154 154 PROC_DEF = 371, 155 155 APPLY = 372, 156 BREAK_CMD = 373, 157 CONTINUE_CMD = 374, 158 ELSE_CMD = 375, 159 EVAL = 376, 160 QUOTE = 377, 161 FOR_CMD = 378, 162 IF_CMD = 379, 163 SYS_BREAK = 380, 164 WHILE_CMD = 381, 165 RETURN = 382, 166 PARAMETER = 383, 167 SYSVAR = 384, 168 UMINUS = 385 156 ASSUME_CMD = 373, 157 BREAK_CMD = 374, 158 CONTINUE_CMD = 375, 159 ELSE_CMD = 376, 160 EVAL = 377, 161 QUOTE = 378, 162 FOR_CMD = 379, 163 IF_CMD = 380, 164 SYS_BREAK = 381, 165 WHILE_CMD = 382, 166 RETURN = 383, 167 PARAMETER = 384, 168 SYSVAR = 385, 169 UMINUS = 386 169 170 }; 170 171 #endif -
Singular/grammar.y
r4c1341 rce70e6 315 315 /* control */ 316 316 %token <i> APPLY 317 %token <i> ASSUME_CMD 317 318 %token <i> BREAK_CMD 318 319 %token <i> CONTINUE_CMD … … 777 778 #endif 778 779 } 780 | assume_start expr ',' expr quote_end 781 { 782 iiTestAssume(&$2,&$4); 783 memset(&$$,0,sizeof($$)); 784 $$.rtyp=NONE; 785 } 779 786 | EVAL '(' 780 787 { … … 796 803 797 804 quote_start: QUOTE '(' 805 { 806 #ifdef SIQ 807 siq++; 808 #endif 809 } 810 ; 811 812 assume_start: ASSUME_CMD '(' 798 813 { 799 814 #ifdef SIQ -
Singular/ipid.cc
r4c1341 rce70e6 433 433 else if ((IDTYP(h)==RING_CMD)||(IDTYP(h)==QRING_CMD)) 434 434 rKill(h); 435 else 435 else if (IDDATA(h)!=NULL) 436 436 s_internalDelete(IDTYP(h),IDDATA(h),r); 437 437 // general ------------------------------------------------------------- -
Singular/iplib.cc
r4c1341 rce70e6 298 298 return NULL; 299 299 } 300 #ifndef LIBSINGULAR 300 301 301 // see below: 302 302 struct soptionStruct … … 308 308 extern struct soptionStruct optionStruct[]; 309 309 extern struct soptionStruct verboseStruct[]; 310 #endif 310 311 311 312 312 BOOLEAN iiAllStart(procinfov pi, char *p,feBufferTypes t, int l) 313 313 { 314 // see below: 315 BITSET save1=si_opt_1; 316 BITSET save2=si_opt_2; 314 317 newBuffer( omStrDup(p /*pi->data.s.body*/), t /*BT_proc*/, 315 318 pi, l ); 316 #ifndef LIBSINGULAR317 // see below:318 BITSET save1=(test & ~TEST_RINGDEP_OPTS);319 BITSET save2=verbose;320 #endif321 319 BOOLEAN err=yyparse(); 322 320 if (sLastPrinted.rtyp!=0) … … 324 322 sLastPrinted.CleanUp(); 325 323 } 326 #ifndef LIBSINGULAR327 324 // the access to optionStruct and verboseStruct do not work 328 325 // on x86_64-Linux for pic-code 329 BITSET save11= ( test & ~TEST_RINGDEP_OPTS);330 326 if ((TEST_V_ALLWARN) && 331 327 (t==BT_proc) && 332 ((save1!=s ave11)||(save2!=verbose)) &&328 ((save1!=si_opt_1)||(save2!=si_opt_2)) && 333 329 (pi->libname!=NULL) && (pi->libname[0]!='\0')) 334 330 { … … 340 336 for (i=0; optionStruct[i].setval!=0; i++) 341 337 { 342 if ((optionStruct[i].setval & s ave11)338 if ((optionStruct[i].setval & si_opt_1) 343 339 && (!(optionStruct[i].setval & save1))) 344 340 { 345 341 Print(" +%s",optionStruct[i].name); 346 342 } 347 if (!(optionStruct[i].setval & s ave11)343 if (!(optionStruct[i].setval & si_opt_1) 348 344 && ((optionStruct[i].setval & save1))) 349 345 { … … 353 349 for (i=0; verboseStruct[i].setval!=0; i++) 354 350 { 355 if ((verboseStruct[i].setval & verbose)351 if ((verboseStruct[i].setval & si_opt_2) 356 352 && (!(verboseStruct[i].setval & save2))) 357 353 { 358 354 Print(" +%s",verboseStruct[i].name); 359 355 } 360 if (!(verboseStruct[i].setval & verbose)356 if (!(verboseStruct[i].setval & si_opt_2) 361 357 && ((verboseStruct[i].setval & save2))) 362 358 { … … 366 362 PrintLn(); 367 363 } 368 #endif369 364 return err; 370 365 } -
Singular/ipshell.cc
r4c1341 rce70e6 5196 5196 if (mpz_cmp_ui(modBase,0)==0) 5197 5197 { 5198 WerrorS("modulus must not be 0 ");5198 WerrorS("modulus must not be 0 or parameter not allowed"); 5199 5199 goto rInitError; 5200 5200 } … … 5211 5211 if (mpz_cmp_ui(modBase,0)==0) 5212 5212 { 5213 WerrorS("modulus must not be 0 ");5213 WerrorS("modulus must not be 0 or parameter not allowed"); 5214 5214 goto rInitError; 5215 5215 } … … 5813 5813 return TRUE; 5814 5814 } 5815 5816 BOOLEAN iiTestAssume(leftv a, leftv b) 5817 { 5818 // assume a: level 5819 if ((a->Typ()==INT_CMD)&&((long)a->Data()>=0)) 5820 { 5821 int lev=(long)a->Data(); 5822 int startlev=0; 5823 idhdl h=ggetid("assumeLevel"); 5824 if ((h!=NULL)&&(IDTYP(h)==INT_CMD)) startlev=(long)IDINT(h); 5825 if(lev <=startlev) 5826 { 5827 BOOLEAN bo=b->Eval(); 5828 if (bo) { WerrorS("syntax error in ASSUME");return TRUE;} 5829 if (b->Typ()!=INT_CMD) { WerrorS("ASUMME(<level>,<int expr>)");return TRUE; } 5830 if (b->Data()==NULL) { WerrorS("ASSUME failed");return TRUE;} 5831 } 5832 } 5833 else 5834 b->CleanUp(); 5835 a->CleanUp(); 5836 return FALSE; 5837 } -
Singular/ipshell.h
r4c1341 rce70e6 247 247 248 248 249 #endif 250 249 BOOLEAN iiTestAssume(leftv a, leftv b); 250 #endif 251 -
Singular/singular-libs
r4c1341 rce70e6 23 23 paraplanecurves.lib phindex.lib \ 24 24 pointid.lib poly.lib \ 25 oldpolymake.libpresolve.lib primdec.lib primdecint.lib \25 presolve.lib primdec.lib primdecint.lib \ 26 26 primitiv.lib qhmoduli.lib random.lib realclassify.lib \ 27 27 realrad.lib reesclos.lib resbinomial.lib \ … … 32 32 surf.lib surfacesignature.lib surfex.lib \ 33 33 teachstd.lib toric.lib triang.lib \ 34 tropical.libweierstr.lib zeroset.lib34 weierstr.lib zeroset.lib 35 35 36 36 # libs in beta testing: … … 41 41 # for new libs 42 42 43 SLIB1 = classifyci.lib classify_aeq.lib ffsolve.lib decomp.lib template.lib\ 43 SLIB1 = classifyci.lib classify_aeq.lib \ 44 divisors.lib \ 45 ffsolve.lib decomp.lib template.lib \ 44 46 findifs.lib finitediff.lib \ 47 gitfan.lib \ 45 48 locnormal.lib modnormal.lib \ 46 JMBTest.lib JMSConst.lib multigrading.lib parallel.lib realizationMatroids.lib ringgb.lib \ 49 JMBTest.lib JMSConst.lib multigrading.lib\ 50 orbitparam.lib parallel.lib polymake.lib\ 51 realizationMatroids.lib resources.lib ringgb.lib \ 47 52 schreyer.lib symodstd.lib derham.lib polybori.lib ellipticcovers.lib \ 48 schubert.lib 53 schubert.lib tasks.lib tropical.lib 49 54 50 55 PLIBS = bfun.lib central.lib dmod.lib dmodapp.lib dmodvar.lib fpadim.lib \ … … 52 57 ncfactor.lib nctools.lib perron.lib qmatrix.lib \ 53 58 ncall.lib 54 55 59 60 -
Singular/subexpr.cc
r4c1341 rce70e6 455 455 void s_internalDelete(const int t, void *d, const ring r) 456 456 { 457 assume(d!=NULL); 457 458 switch (t) 458 459 { … … 1585 1586 { 1586 1587 // WARNING: do not use ring variable names in procedures 1587 Warn("use of variable >>%s<< in a procedure in line %s",id );1588 Warn("use of variable >>%s<< in a procedure in line %s",id,my_yylinebuf); 1588 1589 } 1589 1590 return; -
Singular/table.h
r4c1341 rce70e6 798 798 { // name-string alias tokval toktype 799 799 { "$INVALID$", 0, -1, 0}, 800 { "ASSUME", 0, ASSUME_CMD, ASSUME_CMD}, 800 801 { "LIB", 0, LIB_CMD , SYSVAR}, 801 802 { "alias", 0, ALIAS_CMD , PARAMETER}, -
Singular/tesths.cc
r4c1341 rce70e6 49 49 #include <time.h> 50 50 #include <errno.h> 51 #ifdef HAVE_SIMPLEIPC52 #include <Singular/links/simpleipc.h>53 #endif54 55 56 57 51 58 52 59 53 extern int siInit(char *); 60 61 #if ! defined(LIBSINGULAR)62 54 63 55 int initializeGMP(){ return 1; } … … 127 119 if (optc == 'h') exit(0); 128 120 } 129 130 // semaphore0: CPUs --------------------------------------------------131 #ifdef HAVE_SIMPLEIPC132 feOptIndex cpu_opt = feGetOptIndex("cpus");133 int cpus = (int)(long)feOptValue(FE_OPT_CPUS);134 sipc_semaphore_init(0, cpus-1);135 #endif136 121 137 122 /* say hello */ … … 249 234 return 0; 250 235 } 251 #endif // not LIBSINGULAR 252 236
Note: See TracChangeset
for help on using the changeset viewer.