Changeset 8f5259 in git


Ignore:
Timestamp:
Sep 13, 2019, 3:25:05 PM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
7d7d24afc1aacc8696e95ad686d45427dc4a8516972221336f146ec8874444749dead4ee4cff5642e378b43b955e19d23e509ca06beff201fb94e50a
Parents:
5ce735f7885af06a0695b41450438887c665a150860f23ac4f4b9df33c3137f290981b3434d662bc
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2019-09-13 15:25:05+02:00
git-committer:
GitHub <noreply@github.com>2019-09-13 15:25:05+02:00
Message:
Merge pull request #952 from steenpass/execute

remove more occurrences of execute() (5)
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/chern.lib

    r5ce735f r8f5259  
    190190  def br@=basering; // remember the base ring
    191191  // add additional variables to the base ring
    192   execute("ring r@= ("+ charstr(basering) +"),("+varstr(basering)+",c@(1..nV),A@(1..nV)), dp;" );
     192  int ii;
     193  list l2 = ringlist(basering)[2];
     194  for (ii = 1; ii <= nV; ii++)
     195  {
     196   l2[size(l2)+1] = "c@("+string(ii)+")";
     197  }
     198    for (ii = 1; ii <= nV; ii++)
     199  {
     200   l2[size(l2)+1] = "A@("+string(ii)+")";
     201  }
     202  ring r@ = create_ring(ringlist(basering)[1], l2, "dp", "no_minpoly");
    193203  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    194204  ideal V=F(V);
     
    688698    def br@=basering; // remember the base ring
    689699    // add additional variables c@, a@(1..n) to the base ring
    690     execute("ring r@= (" + charstr(basering) + "),(c@,"+varstr(basering)+", a@(1..n)), lp;" );
     700    list l3 = "c@";
     701    l3 = l3+ ringlist(basering)[2];
     702    for (int ii = 1; ii <= n; ii++)
     703    {
     704     l3[size(l3)+1] = "a@("+string(ii)+")";
     705    }
     706    ring r@ = create_ring(ringlist(basering)[1], l3, "lp", "no_minpoly");
    691707    execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    692708    list c=F(c); // embed c in the bigger ring
     
    10181034  def br@=basering; // remember the base ring
    10191035  // add additional variables a@(1..r), b@(1..R), x@ to the base ring
    1020   execute("ring r@=("+ charstr(basering) +"),(x@,"+varstr(basering)+",a@(1..r),b@(1..R)), lp;");
     1036  int ii;
     1037  list l4 = "x@";
     1038  l4 = l4+ ringlist(basering)[2];
     1039  for (ii = 1; ii <= r; ii++)
     1040  {
     1041   l4[size(l4)+1] = "a@("+string(ii)+")";
     1042  }
     1043  for (ii = 1; ii <= R; ii++)
     1044  {
     1045   l4[size(l4)+1] = "b@("+string(ii)+")";
     1046  }
     1047  ring r@ = create_ring(ringlist(basering)[1], l4, "lp", "no_minpoly");
    10211048  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    10221049  list c=F(c); // embed c in the bigger ring
     
    11011128  def br@=basering; // remember the base ring
    11021129  // add  additional variables to the base ring
    1103   execute("ring r@=("+charstr(basering)+"), ("+varstr(basering)+", t@, c@(1..r), C@(1..R)), dp;");
     1130  int ii;
     1131  list l5 = ringlist(basering)[2]; 
     1132  l5[size(l5)+1] = "t@";
     1133  for (ii = 1; ii <= r; ii++)
     1134  {
     1135   l5[size(l5)+1] = "c@("+string(ii)+")";
     1136  }
     1137  for (ii = 1; ii <= R; ii++)
     1138  {
     1139   l5[size(l5)+1] = "C@("+string(ii)+")";
     1140  }
     1141  ring r@ = create_ring(ringlist(basering)[1], l5, "dp", "no_minpoly");
    11041142  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    11051143  list c, C;
     
    12351273  def br@=basering; // remember the base ring
    12361274  // add  additional variables to the base ring
    1237   execute("ring r@=("+charstr(basering)+"), ("+varstr(basering)+", t@, c@(1..r), C@(1..R)), dp;");
     1275  int ii;
     1276  list l6 = ringlist(basering)[2]; 
     1277  l6[size(l6)+1] = "t@";
     1278  for (ii = 1; ii <= r; ii++)
     1279  {
     1280   l6[size(l6)+1] = "c@("+string(ii)+")";
     1281  }
     1282  for (ii = 1; ii <= R; ii++)
     1283  {
     1284   l6[size(l6)+1] = "C@("+string(ii)+")";
     1285  }
     1286  ring r@ = create_ring(ringlist(basering)[1], l6, "dp", "no_minpoly");
    12381287  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    12391288  list c, C;
     
    15711620  def br@=basering; // remember the base ring
    15721621  // add additional variables to the base ring
    1573   execute("ring r@=(" + charstr(basering) +  "),(x@,"+varstr(basering)+", a@(1..r)), lp;" );
     1622  int ii;
     1623  list l7 = "x@";
     1624  l7 = l7+ ringlist(basering)[2];
     1625  for (ii = 1; ii <= r; ii++)
     1626  {
     1627   l7[size(l7)+1] = "a@("+string(ii)+")";
     1628  }
     1629  ring r@ = create_ring(ringlist(basering)[1], l7, "lp", "no_minpoly");
    15741630  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    15751631  list c=F(c); // embed c into the bigger ring
     
    16971753  def br@=basering; // remember the base ring
    16981754  // add  additional variables to the base ring
    1699   execute("ring r@=(" + charstr(basering) +  "), ("+varstr(basering)+", t@, c@(1..r)), dp;" );
     1755  list l8 = ringlist(basering)[2]; 
     1756  l8[size(l8)+1] = "t@";
     1757  for (int ii = 1; ii <= r; ii++)
     1758  {
     1759   l8[size(l8)+1] = "c@("+string(ii)+")";
     1760  }
     1761  ring r@ = create_ring(ringlist(basering)[1], l8, "dp", "no_minpoly");
    17001762  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    17011763  list c;
     
    18631925  def br@=basering; // remember the base ring
    18641926  // add additional variables a@(1..r), x@ to the base ring
    1865   execute("ring r@= (" + charstr(basering) + "), (x@,"+varstr(basering)+", a@(1..r)), lp;" );
     1927  list l9 = "x@";
     1928  l9 = l9+ ringlist(basering)[2];
     1929  for (int ii = 1; ii <= r; ii++)
     1930  {
     1931   l9[size(l9)+1] = "a@("+string(ii)+")";
     1932  }
     1933  ring r@ = create_ring(ringlist(basering)[1], l9, "lp", "no_minpoly");
    18661934  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    18671935  list c = F(c); // embed c into the bigger ring
     
    19912059  def br@=basering; // remember the base ring
    19922060  // add  additional variables to the base ring
    1993   execute("ring r@=(" + charstr(basering) +  "), ("+varstr(basering)+", t@, c@(1..r)), dp;" );
     2061  list l10 = ringlist(basering)[2]; 
     2062  l10[size(l10)+1] = "t@";
     2063  for (int ii = 1; ii <= r; ii++)
     2064  {
     2065   l10[size(l10)+1] = "c@("+string(ii)+")";
     2066  }
     2067  ring r@ = create_ring(ringlist(basering)[1], l10, "dp", "no_minpoly");
    19942068  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    19952069  list c;
     
    21132187    def br@=basering; // remember the base ring
    21142188    // add  additional variables to the base ring
    2115     execute("ring r@=(" + charstr(basering) +  "), ("+varstr(basering)+", a@, c@(1..n)), dp;" );
     2189    list l11 = ringlist(basering)[2]; 
     2190    l11[size(l11)+1] = "a@";
     2191    for (int ii = 1; ii <= n; ii++)
     2192    {
     2193     l11[size(l11)+1] = "c@("+string(ii)+")";
     2194    }
     2195    ring r@ = create_ring(ringlist(basering)[1], l11, "dp", "no_minpoly");
    21162196    execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    21172197    list c=F(c); // embed c into the bigger ring
     
    21952275    def br@=basering; // remember the base ring
    21962276    // add additional variables a@(1..n), x@ to the base ring
    2197     execute("ring r@=(" + charstr(basering) + "), (x@,"+varstr(basering)+", a@(1..n)), lp;" );
     2277    list l12 = "x@";
     2278    l12 = l12+ ringlist(basering)[2];
     2279    for (int ii = 1; ii <= n; ii++)
     2280    {
     2281     l12[size(l12)+1] = "a@("+string(ii)+")";
     2282    }
     2283    ring r@ = create_ring(ringlist(basering)[1], l12, "lp", "no_minpoly");
    21982284    execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    21992285    list c=F(c); // embed c into the bigger ring
     
    30763162  def br@=basering; // remember the base ring
    30773163  // add additional variables t@(1), ... , t@(sz) and u@ to the base ring
    3078   execute("ring r@=("+ charstr(basering) +"),("+varstr(basering)+",t@(1..sz),u@), dp;");
     3164  list l13 = ringlist(basering)[2];
     3165  for (int ii = 1; ii <= sz; ii++)
     3166  {
     3167   l13[size(l13)+1] = "t@("+string(ii)+")";
     3168  }
     3169  l13[size(l13)+1] = "u@";
     3170  ring r@ = create_ring(ringlist(basering)[1], l13, "dp", "no_minpoly");
    30793171  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    30803172  ideal I=F(I); // the ideal generated by I in the new ring
     
    31703262  def br@=basering; // remember the base ring
    31713263  // add additional variables t@(1), ... , t@(sz) and u@ to the base ring
    3172   execute("ring r@=("+ charstr(basering) +"),("+varstr(basering)+",t@(1..sz),u@), dp;");
     3264  list l14 = ringlist(basering)[2];
     3265  for (int ii = 1; ii <= sz; ii++)
     3266  {
     3267   l14[size(l14)+1] = "t@("+string(ii)+")";
     3268  }
     3269  l14[size(l14)+1] = "u@";
     3270  ring r@ = create_ring(ringlist(basering)[1], l14, "dp", "no_minpoly");
    31733271  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    31743272  ideal I=F(I); // the ideal generated by I in the new ring
     
    38833981  int sz=ncols(I);
    38843982  def br@=basering; // remember the base ring
    3885   execute("ring r@=("+ charstr(basering) +"),("+varstr(basering)+",t@(1..sz),u@), dp;");
     3983  list l15 = ringlist(basering)[2];
     3984  for (int ii = 1; ii <= sz; ii++)
     3985  {
     3986   l15[size(l15)+1] = "t@("+string(ii)+")";
     3987  }
     3988  l15[size(l15)+1] = "u@";
     3989  ring r@ = create_ring(ringlist(basering)[1], l15, "dp", "no_minpoly");
    38863990  execute( "map F= br@,"+varstr(br@)+";" ); // define the corresponding inclusion of rings
    38873991  ideal I=F(I);
  • Singular/LIB/finvar.lib

    r5ce735f r8f5259  
    71927192    int m=ncols(F);
    71937193    string mp=string(minpoly);
    7194     execute("ring R=("+charstr(br)+"),("+varstr(br)+",y(1..m)),dp;");
     7194    list l2 = ringlist(br)[2];
     7195    for (int ii = 1; ii <= m; ii++)
     7196    {
     7197     l2[size(l2)+1] = "y("+string(ii)+")";
     7198    }
     7199    ring R = create_ring(ringlist(br)[1], l2, "dp", "no_minpoly");
    71957200    if (mp!="0")
    71967201    { execute("minpoly=number("+mp+");"); }
     
    74147419    int m=ncols(F);
    74157420    string mp=string(minpoly);
    7416     execute("ring R=("+charstr(br)+"),("+varstr(br)+",y(1..m)),lp;");
     7421    list l2 = ringlist(br)[2];
     7422    for (int ii = 1; ii <= m; ii++)
     7423    {
     7424     l2[size(l2)+1] = "y("+string(ii)+")";
     7425    }
     7426    ring R = create_ring(ringlist(br)[1], l2, "lp", "no_minpoly");
    74177427    if (mp!="0")
    74187428    { execute("minpoly=number("+mp+");"); }
  • Singular/LIB/graal.lib

    r5ce735f r8f5259  
    404404  string ostring = ordstr(basering);
    405405  ostring = ostring[1..size(ostring)-2];
    406   execute("ring Q0y = ("+charstr(basering)+"),(Y(1..s),"+varstr(basering)+"),(ds(s),c,"+ostring+")");
     406  list l2;
     407  for (int ii = 1; ii <= s; ii++)
     408  {
     409   l2[ii] = "Y("+string(ii)+")";
     410  }
     411  l2[s+1] = ringlist(basering)[2];
     412  ring Q0y = create_ring(ringlist(basering)[1], l2, "(ds(s),c,"+ostring+")", "no_minpoly");
    407413  setring Q0y;
    408414  ideal H = imap(Gr.A,H);
  • Singular/LIB/help.cnf

    r860f23 r8f5259  
    1717#  %f: the local html file (in the form /some/dir/sing_123.htm)
    1818#  %H: the www html  file
    19 #             (in the form http://www.singular.uni-kl.de/some/dir/sing_123.htm)
     19#             (in the form https://www.singular.uni-kl.de/some/dir/sing_123.htm)
    2020#  %i: the complete path of singular.hlp
    2121#  %n: the info node
     
    4242#----------------------------------------------------------------
    4343# dummy versions for pure online help
    44 mac-www!E:open:O:x86_64-Darwin:!open http://www.singular.uni-kl.de/Manual/%v/ &
    45 mozilla-www!DE:mozilla:!(mozilla -remote "openURL(http://www.singular.uni-kl.de/Manual/%v/)")||(mozilla http://www.singular.uni-kl.de/Manual/%v/) &
     44mac-www!E:open:O:x86_64-Darwin:!open https://www.singular.uni-kl.de/Manual/%v/ &
     45mozilla-www!DE:mozilla:!(mozilla -remote "openURL(https://www.singular.uni-kl.de/Manual/%v/)")||(mozilla https://www.singular.uni-kl.de/Manual/%v/) &
    4646firefox-www-idx!xDE:firefox:!firefox %H &
    47 firefox-www!DE:firefox:!firefox http://www.singular.uni-kl.de/Manual/%v/ &
     47firefox-www!DE:firefox:!firefox https://www.singular.uni-kl.de/Manual/%v/ &
    4848konqueror-www-idx!xDE:konqueror:!konqueror %H &
    49 konqueror-www!DE:konqueror:!konqueror http://www.singular.uni-kl.de/Manual/%v/ &
     49konqueror-www!DE:konqueror:!konqueror https://www.singular.uni-kl.de/Manual/%v/ &
    5050galeon-www-idx!xDE:galeon:!galeon -n %H &
    51 galeon-www!DE:galeon:!galeon -n http://www.singular.uni-kl.de/Manual/%v/ &
    52 netscape-www!DE:netscape:!(netscape -remote "openURL(http://www.singular.uni-kl.de/Manual/%v/)")||(netscape http://www.singular.uni-kl.de/Manual/%v/) &
     51galeon-www!DE:galeon:!galeon -n https://www.singular.uni-kl.de/Manual/%v/ &
     52netscape-www!DE:netscape:!(netscape -remote "openURL(https://www.singular.uni-kl.de/Manual/%v/)")||(netscape https://www.singular.uni-kl.de/Manual/%v/) &
    5353safari-www-idx!xE:/Applications/Safari.app:!open -a /Applications/Safari.app %H
    54 safari-www!E:/Applications/Safari.app:!open -a /Applications/Safari.app http://www.singular.uni-kl.de/Manual/%v/
     54safari-www!E:/Applications/Safari.app:!open -a /Applications/Safari.app https://www.singular.uni-kl.de/Manual/%v/
    5555lynx-www-idx!xE:lynx:!lynx %H
    56 lynx-www!E:lynx:!lynx http://www.singular.uni-kl.de/Manual/%v/
     56lynx-www!E:lynx:!lynx https://www.singular.uni-kl.de/Manual/%v/
    5757
  • Singular/LIB/hnoether.lib

    r5ce735f r8f5259  
    27362736   string strmip=string(minpoly);
    27372737   string strf=string(f);
    2738    execute("ring tempr=("+string(char(basering))+","+parstr(basering)+"),("
    2739            +varstr(basering)+"),dp;");
     2738   ring tempr = create_ring("("+string(char(basering))+","+parstr(basering)+")", "("+varstr(basering)+")", "dp");
    27402739   execute("minpoly="+strmip+";");
    27412740   execute("poly f="+strf+";");
  • Singular/LIB/modular.lib

    r860f23 r8f5259  
    136136        else
    137137        {
    138             ncores_available = system("semaphore", "get_value", sem_cores)+1;
     138            ncores_available = max(1, system("semaphore", "get_value",
     139                    sem_cores)+1);
    139140            if (nAllPrimes < ncores_available)
    140141            {
     
    415416static proc NbModProcs()
    416417{
    417     int available = system("semaphore", "get_value", sem_cores)+1;
     418    int available = max(1, system("semaphore", "get_value", sem_cores)+1);
    418419    int nb;
    419420    if (available < 16) {
  • Singular/LIB/ncalg.lib

    r5ce735f r8f5259  
    595595  int @d = nrows(A);
    596596  int n = ncols(A);
    597   execute("ring r1=0,(d(1..n)),"+sord+";");
     597  list l2;
     598  int ii;
     599  for (ii = 1; ii <= n; ii++)
     600  {
     601   l2[ii] = "d("+string(ii)+")";
     602  }
     603  ring r1 = create_ring(0, l2, sord);
    598604  ideal I0;
    599605  if (size(#)==0)
     
    614620    }
    615621  }
    616   string sord2 = "(a(0:" + string(n) + ")," + sord + ")";
    617   execute("ring GR = (0,b(1..@d)),(x(1..n),d(1..n)),"+sord2+";");
     622  string l3 = "(0";
     623  for (ii = 1; ii <= @d; ii++)
     624  {
     625    l3 = l3+",b("+string(ii)+")";
     626  }
     627  l3 = l3+")";
     628  list l4;
     629  for (ii = 1; ii <= n; ii++)
     630  {
     631    l4[ii] = "x("+string(ii)+")";
     632    l4[n+ii] = "d("+string(ii)+")";
     633  }
     634  string sord2 = "(a(0";
     635  for (ii = 2; ii <= n; ii++)
     636  {
     637    sord2 = sord2 + ",0";
     638  }
     639  sord2 = sord2 + ")," + sord + ")";
     640  ring GR = create_ring(l3, l4, sord2);
    618641  def W=Weyl(); setring W;
    619642  kill GR;
  • Singular/LIB/poly.lib

    r5ce735f r8f5259  
    740740  else
    741741  {
    742     execute("ring R=("+charstr(br)+"),(@z,@x(1..n)),(dp(1),"+ordstr(br)+");");
     742    list l2 = "@z";
     743    for (int ii = 1; ii <= n; ii++)
     744    {
     745     l2[ii+1] = "@x("+string(ii)+")";
     746    }
     747    ring R = create_ring(ringlist(br)[1], l2, "(dp(1),"+ordstr(br)+")", "no_minpoly");
    743748  }
    744749  if (mp!="0")
  • Singular/LIB/resolve.lib

    r5ce735f r8f5259  
    666666//---------------------------------------------------------------------------
    667667//--- control the names of the variables
    668    execute("ring R=("+charstr(R0)+"),(x(1..n)),dp;");
     668   list l2;
     669   int ii;
     670   for (ii = 1; ii <= n; ii++)
     671   {
     672    l2[ii] = "x("+string(ii)+")";
     673   }
     674   ring R = create_ring(ringlist(R0)[1], l2, "dp", "no_minpoly");
    669675   list BO=fetch(R1,BO);
    670676   ideal C=fetch(R1,C);
     
    706712         //to have the list depending on R in case BO[4] is empty
    707713
    708    execute("ring S=("+charstr(R)+"),("+varstr(R)+",y(0..s-1)),dp;");
     714   l2 = ringlist(R)[2];
     715   for (ii = 0; ii <= s-1; ii++)
     716   {
     717    l2[size(l2)+1] = "y("+string(ii)+")";
     718   }
     719   ring S = create_ring(ringlist(R)[1], l2, "dp", "no_minpoly");
    709720   list resu;
    710721   list B;
    711    execute("ring T=("+charstr(R)+"),("+varstr(R)+",y(0..s-1),t),dp;");
     722   l2 = ringlist(R)[2];
     723   for (ii = 0; ii <= s-1; ii++)
     724   {
     725    l2[size(l2)+1] = "y("+string(ii)+")";
     726   }
     727   l2[size(l2)+1] = "t";
     728   ring T = create_ring(ringlist(R)[1], l2, "dp", "no_minpoly");
    712729   ideal C=imap(R,C);
    713730   ideal W=imap(R,W);
  • Singular/LIB/surf.lib

    r860f23 r8f5259  
    1111 You can download @code{surf} either from
    1212  @uref{http://sourceforge.net/projects/surf}
    13   or from @uref{ftp://www.mathematik.uni-kl.de/pub/Math/Singular/utils/}.
     13  or from @uref{ftp://jim.mathematik.uni-kl.de/pub/Math/Singular/utils/}.
    1414 The procedure surfer requires the program @code{surfer} (version 1.4.1 or newwer)
    1515 to be installed.
  • Singular/iparith.cc

    r860f23 r8f5259  
    15501550{
    15511551  if(u->name==NULL) return TRUE;
    1552   char * nn = (char *)omAlloc(strlen(u->name) + 14);
     1552  long slen = strlen(u->name) + 14;
     1553  char *nn = (char*) omAlloc(slen);
    15531554  sprintf(nn,"%s(%d)",u->name,(int)(long)v->Data());
    1554   omFree((ADDRESS)u->name);
    1555   u->name=NULL;
    15561555  char *n=omStrDup(nn);
    1557   omFree((ADDRESS)nn);
     1556  omFreeSize((ADDRESS)nn,slen);
    15581557  syMake(res,n);
    15591558  if (u->next!=NULL) return jjKLAMMER_rest(res,u->next,v);
     
    15621561static BOOLEAN jjKLAMMER_IV(leftv res, leftv u, leftv v)
    15631562{
     1563  if(u->name==NULL) return TRUE;
    15641564  intvec * iv=(intvec *)v->Data();
    15651565  leftv p=NULL;
     
    15821582    syMake(p,omStrDup(n));
    15831583  }
    1584   omFree((ADDRESS)u->name);
    1585   u->name = NULL;
    15861584  omFreeSize(n, slen);
    15871585  if (u->next!=NULL) return jjKLAMMER_rest(res,u->next,v);
  • Singular/table.h

    r860f23 r8f5259  
    286286#if defined(HAVE_PLURAL) || defined(HAVE_SHIFTBBA)
    287287,{D(jjTWOSTD),     TWOSTD_CMD,      IDEAL_CMD,      IDEAL_CMD     , ALLOW_NC |NO_RING}
     288#endif
     289#ifdef HAVE_SHIFTBBA
     290,{D(jjTWOSTD),     TWOSTD_CMD,      MODUL_CMD,      MODUL_CMD     , ALLOW_LP |NO_RING}
    288291#endif
    289292//,{  jjWRONG ,      TRACE_CMD,       0,              INTVEC_CMD    , ALLOW_NC |ALLOW_RING}
Note: See TracChangeset for help on using the changeset viewer.