Functions | Variables
subexpr.cc File Reference
#include <kernel/mod2.h>
#include <omalloc/omalloc.h>
#include <misc/intvec.h>
#include <misc/options.h>
#include <coeffs/numbers.h>
#include <coeffs/bigintmat.h>
#include <coeffs/ffields.h>
#include <polys/monomials/maps.h>
#include <polys/matpol.h>
#include <polys/monomials/ring.h>
#include <kernel/polys.h>
#include <kernel/ideals.h>
#include <kernel/GBEngine/kstd1.h>
#include <kernel/GBEngine/syz.h>
#include <kernel/oswrapper/timer.h>
#include <Singular/tok.h>
#include <Singular/ipid.h>
#include <Singular/ipshell.h>
#include <Singular/lists.h>
#include <Singular/attrib.h>
#include <Singular/links/silink.h>
#include <Singular/subexpr.h>
#include <Singular/blackbox.h>
#include <Singular/number2.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>

Go to the source code of this file.

Functions

static void * s_internalCopy (const int t, void *d)
 
void s_internalDelete (const int t, void *d, const ring r)
 
void * slInternalCopy (leftv source, const int t, void *d, Subexpr e)
 
BOOLEAN assumeStdFlag (leftv h)
 
void syMake (leftv v, const char *id, idhdl packhdl)
 
const char * iiSleftv2name (leftv v)
 

Variables

omBin sSubexpr_bin = omGetSpecBin(sizeof(_ssubexpr))
 
omBin sleftv_bin = omGetSpecBin(sizeof(sleftv))
 
omBin procinfo_bin = omGetSpecBin(sizeof(procinfo))
 
omBin libstack_bin = omGetSpecBin(sizeof(libstack))
 
static omBin size_two_bin = omGetSpecBin(2)
 
sleftv sLastPrinted
 
const char sNoName [] ="_"
 
BOOLEAN siq =FALSE
 
static snumber2 iiNumber2Data [4]
 
static int iiCmatrix_index =0
 

Function Documentation

BOOLEAN assumeStdFlag ( leftv  h)

Definition at line 1434 of file subexpr.cc.

1435 {
1436  if (h->e!=NULL)
1437  {
1438  leftv hh=h->LData();
1439  if (h!=hh) return assumeStdFlag(h->LData());
1440  }
1441  if (!hasFlag(h,FLAG_STD))
1442  {
1443  if (!TEST_VERB_NSB)
1444  {
1445  if (TEST_V_ALLWARN)
1446  Warn("%s is no standard basis in >>%s<<",h->Name(),my_yylinebuf);
1447  else
1448  Warn("%s is no standard basis",h->Name());
1449  }
1450  return FALSE;
1451  }
1452  return TRUE;
1453 }
#define TEST_VERB_NSB
Definition: options.h:129
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
Subexpr e
Definition: subexpr.h:106
#define FALSE
Definition: auxiliary.h:140
#define TRUE
Definition: auxiliary.h:144
const char * Name()
Definition: subexpr.h:121
char my_yylinebuf[80]
Definition: febase.cc:48
BOOLEAN assumeStdFlag(leftv h)
Definition: subexpr.cc:1434
#define FLAG_STD
Definition: ipid.h:108
#define NULL
Definition: omList.c:10
#define hasFlag(A, F)
Definition: ipid.h:111
leftv LData()
Definition: subexpr.cc:1366
#define TEST_V_ALLWARN
Definition: options.h:135
#define Warn
Definition: emacs.cc:80
const char* iiSleftv2name ( leftv  v)

Definition at line 1913 of file subexpr.cc.

1914 {
1915  return(v->name);
1916 }
const char * name
Definition: subexpr.h:88
static void* s_internalCopy ( const int  t,
void *  d 
)
inlinestatic

Definition at line 387 of file subexpr.cc.

388 {
389  switch (t)
390  {
391 #ifdef SINGULAR_4_1
392  case CRING_CMD:
393  {
394  coeffs cf=(coeffs)d;
395  cf->ref++;
396  return (void*)d;
397  }
398  case CNUMBER_CMD:
399  return (void*)n2Copy((number2)d);
400  case CMATRIX_CMD: // like BIGINTMAT
401 #endif
402  case BIGINTMAT_CMD:
403  return (void*)bimCopy((bigintmat *)d);
404  case INTVEC_CMD:
405  case INTMAT_CMD:
406  return (void *)ivCopy((intvec *)d);
407  case MATRIX_CMD:
408  return (void *)mp_Copy((matrix)d, currRing);
409  case IDEAL_CMD:
410  case MODUL_CMD:
411  return (void *)idCopy((ideal)d);
412  case STRING_CMD:
413  return (void *)omStrDup((char *)d);
414  case PACKAGE_CMD:
415  return (void *)paCopy((package) d);
416  case PROC_CMD:
417  return (void *)piCopy((procinfov) d);
418  case POLY_CMD:
419  case VECTOR_CMD:
420  return (void *)pCopy((poly)d);
421  case INT_CMD:
422  return d;
423  case NUMBER_CMD:
424  return (void *)nCopy((number)d);
425  case BIGINT_CMD:
426  return (void *)n_Copy((number)d, coeffs_BIGINT);
427  case MAP_CMD:
428  return (void *)maCopy((map)d, currRing);
429  case LIST_CMD:
430  return (void *)lCopy((lists)d);
431  case LINK_CMD:
432  return (void *)slCopy((si_link) d);
433  case RING_CMD:
434  case QRING_CMD:
435  {
436  ring r=(ring)d;
437  if (r!=NULL) r->ref++;
438  //Print("+ ring %d, ref %d\n",r,r->ref);
439  return d;
440  }
441  case RESOLUTION_CMD:
442  return (void*)syCopy((syStrategy)d);
443  case DEF_CMD:
444  case NONE:
445  case 0: /* type in error case */
446  break; /* error recovery: do nothing */
447  //case COMMAND:
448  default:
449  {
450  if (t>MAX_TOK)
451  {
452  blackbox *b=getBlackboxStuff(t);
453  if (b!=NULL) return b->blackbox_Copy(b,d);
454  return NULL;
455  }
456  else
457  Warn("s_internalCopy: cannot copy type %s(%d)",
458  Tok2Cmdname(t),t);
459  }
460  }
461  return NULL;
462 }
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
Definition: cf_map_ext.cc:400
ip_package * package
Definition: structs.h:46
Definition: tok.h:85
Definition: lists.h:22
Definition: tok.h:42
Matrices of numbers.
Definition: bigintmat.h:32
Definition: tok.h:167
intvec * ivCopy(const intvec *o)
Definition: intvec.h:137
procinfov piCopy(procinfov pi)
Definition: subexpr.h:149
coeffs coeffs_BIGINT
Definition: ipid.cc:53
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
Definition: tok.h:56
const ring r
Definition: syzextra.cc:208
Definition: intvec.h:16
bigintmat * bimCopy(const bigintmat *b)
same as copy constructor - apart from it being able to accept NULL as input
Definition: bigintmat.cc:405
Definition: tok.h:58
The main handler for Singular numbers which are suitable for Singular polynomials.
package paCopy(package pack)
Definition: ipid.h:45
Definition: tok.h:88
lists lCopy(lists L)
Definition: lists.cc:32
ideal idCopy(ideal A)
Definition: ideals.h:76
number2 n2Copy(const number2 d)
Definition: number2.cc:270
CanonicalForm cf
Definition: cfModGcd.cc:4024
Definition: tok.h:95
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Definition: coeffs.h:452
syStrategy syCopy(syStrategy syzstr)
Definition: syz1.cc:1895
const char * Tok2Cmdname(int tok)
Definition: gentable.cc:128
#define nCopy(n)
Definition: numbers.h:15
Definition: tok.h:96
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
Definition: matpol.cc:75
map maCopy(map theMap, const ring r)
Definition: maps.cc:38
Definition: tok.h:126
polyrec * poly
Definition: hilb.h:10
const poly b
Definition: syzextra.cc:213
#define NONE
Definition: tok.h:170
#define pCopy(p)
return a copy of the poly
Definition: polys.h:156
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
Definition: blackbox.cc:20
#define Warn
Definition: emacs.cc:80
#define omStrDup(s)
Definition: omAllocDecl.h:263
void s_internalDelete ( const int  t,
void *  d,
const ring  r 
)

Definition at line 464 of file subexpr.cc.

465 {
466  assume(d!=NULL);
467  switch (t)
468  {
469 #ifdef SINGULAR_4_1
470  case CRING_CMD:
471  nKillChar((coeffs)d);
472  break;
473  case CNUMBER_CMD:
474  {
475  number2 n=(number2)d;
476  n2Delete(n);
477  break;
478  }
479  case CMATRIX_CMD: //like BIGINTMAT
480 #endif
481  case BIGINTMAT_CMD:
482  {
483  bigintmat *v=(bigintmat*)d;
484  delete v;
485  break;
486  }
487  case INTVEC_CMD:
488  case INTMAT_CMD:
489  {
490  intvec *v=(intvec*)d;
491  delete v;
492  break;
493  }
494  case MAP_CMD:
495  {
496  map m=(map)d;
497  omFreeBinAddr((ADDRESS)m->preimage);
498  m->preimage=NULL;
499  /* no break: continue as IDEAL*/
500  }
501  case MATRIX_CMD:
502  case IDEAL_CMD:
503  case MODUL_CMD:
504  {
505  ideal i=(ideal)d;
506  id_Delete(&i,r);
507  break;
508  }
509  case STRING_CMD:
510  omFree(d);
511  break;
512  //case PACKAGE_CMD:
513  // return (void *)paCopy((package) d);
514  case PROC_CMD:
515  piKill((procinfo*)d);
516  break;
517  case POLY_CMD:
518  case VECTOR_CMD:
519  {
520  poly p=(poly)d;
521  p_Delete(&p,r);
522  break;
523  }
524  case NUMBER_CMD:
525  {
526  number n=(number)d;
527  n_Delete(&n,r);
528  break;
529  }
530  case BIGINT_CMD:
531  {
532  number n=(number)d;
534  break;
535  }
536  case LIST_CMD:
537  {
538  lists l=(lists)d;
539  l->Clean(r);
540  break;
541  }
542  case LINK_CMD:
543  {
544  si_link l=(si_link)d;
545  slKill(l);
546  break;
547  }
548  case RING_CMD:
549  case QRING_CMD:
550  {
551  ring R=(ring)d;
552  if ((R!=currRing)||(R->ref>=0))
553  rKill(R);
554  #ifdef TEST
555  else
556  Print("currRing? ref=%d\n",R->ref);
557  #endif
558  break;
559  }
560  case RESOLUTION_CMD:
561  {
563  if (s!=NULL) syKillComputation(s,r);
564  break;
565  }
566  case COMMAND:
567  {
568  command cmd=(command)d;
569  if (cmd->arg1.rtyp!=0) cmd->arg1.CleanUp(r);
570  if (cmd->arg2.rtyp!=0) cmd->arg2.CleanUp(r);
571  if (cmd->arg3.rtyp!=0) cmd->arg3.CleanUp(r);
573  break;
574  }
575  case INT_CMD:
576  case DEF_CMD:
577  case ALIAS_CMD:
578  case PACKAGE_CMD:
579  case IDHDL:
580  case NONE:
581  case ANY_TYPE:
582  case VECHO:
583  case VPRINTLEVEL:
584  case VCOLMAX:
585  case VTIMER:
586  case VRTIMER:
587  case VOICE:
588  case VMAXDEG:
589  case VMAXMULT:
590  case TRACE:
591  case VSHORTOUT:
592  case VNOETHER:
593  case VMINPOLY:
594  case LIB_CMD:
595  case 0: /* type in error case */
596  break; /* error recovery: do nothing */
597  //case COMMAND:
598  //case COMMAND:
599  default:
600  {
601  if (t>MAX_TOK)
602  {
603  blackbox *b=getBlackboxStuff(t);
604  if (b!=NULL) b->blackbox_destroy(b,d);
605  break;
606  }
607  else
608  Warn("s_internalDelete: cannot delete type %s(%d)",
609  Tok2Cmdname(t),t);
610  }
611  }
612 }
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
Definition: cf_map_ext.cc:400
Definition: tok.h:161
const CanonicalForm int s
Definition: facAbsFact.cc:55
Definition: tok.h:157
ip_command * command
Definition: ipid.h:24
#define ANY_TYPE
Definition: tok.h:34
#define Print
Definition: emacs.cc:83
Definition: tok.h:85
Definition: tok.h:158
Definition: lists.h:22
Definition: tok.h:42
return P p
Definition: myNF.cc:203
Matrices of numbers.
Definition: bigintmat.h:32
void n2Delete(number2 &d)
Definition: number2.cc:285
Definition: tok.h:167
const CanonicalForm CFMap CFMap int &both_non_zero int n
Definition: cfEzgcd.cc:52
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
void * ADDRESS
Definition: auxiliary.h:161
coeffs coeffs_BIGINT
Definition: ipid.cc:53
BOOLEAN piKill(procinfov pi)
Definition: ipid.cc:644
#define IDHDL
Definition: tok.h:35
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
Definition: tok.h:162
Definition: tok.h:56
const ring r
Definition: syzextra.cc:208
Definition: intvec.h:16
void rKill(ring r)
Definition: ipshell.cc:5690
Definition: tok.h:58
#define omFreeBinAddr(addr)
Definition: omAllocDecl.h:258
#define omFree(addr)
Definition: omAllocDecl.h:261
#define assume(x)
Definition: mod2.h:405
The main handler for Singular numbers which are suitable for Singular polynomials.
int m
Definition: cfEzgcd.cc:119
int i
Definition: cfEzgcd.cc:123
Definition: tok.h:160
Definition: tok.h:88
Definition: tok.h:38
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:850
Definition: tok.h:163
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Definition: tok.h:95
#define NULL
Definition: omList.c:10
slists * lists
Definition: mpr_numeric.h:146
omBin sip_command_bin
Definition: ipid.cc:48
const char * Tok2Cmdname(int tok)
Definition: gentable.cc:128
#define R
Definition: sirandom.c:26
void Clean(ring r=currRing)
Definition: lists.h:25
Definition: tok.h:96
Definition: tok.h:126
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:456
polyrec * poly
Definition: hilb.h:10
#define omFreeBin(addr, bin)
Definition: omAllocDecl.h:259
Definition: tok.h:159
const poly b
Definition: syzextra.cc:213
#define NONE
Definition: tok.h:170
void nKillChar(coeffs r)
undo all initialisations
Definition: numbers.cc:488
void syKillComputation(syStrategy syzstr, ring r=currRing)
Definition: syz1.cc:1497
int l
Definition: cfEzgcd.cc:94
#define COMMAND
Definition: tok.h:33
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
Definition: blackbox.cc:20
ssyStrategy * syStrategy
Definition: syz.h:35
#define Warn
Definition: emacs.cc:80
void* slInternalCopy ( leftv  source,
const int  t,
void *  d,
Subexpr  e 
)

Definition at line 614 of file subexpr.cc.

615 {
616  if (t==STRING_CMD)
617  {
618  if ((e==NULL)
619  || (source->rtyp==LIST_CMD)
620  || ((source->rtyp==IDHDL)
621  &&((IDTYP((idhdl)source->data)==LIST_CMD)
622  || (IDTYP((idhdl)source->data)>MAX_TOK)))
623  || (source->rtyp>MAX_TOK))
624  return (void *)omStrDup((char *)d);
625  else if (e->next==NULL)
626  {
627  char *s=(char*)omAllocBin(size_two_bin);
628  s[0]=*(char *)d;
629  s[1]='\0';
630  return s;
631  }
632  #ifdef TEST
633  else
634  {
635  Werror("not impl. string-op in `%s`",my_yylinebuf);
636  return NULL;
637  }
638  #endif
639  }
640  return s_internalCopy(t,d);
641 }
#define omAllocBin(bin)
Definition: omAllocDecl.h:205
const CanonicalForm int s
Definition: facAbsFact.cc:55
Definition: tok.h:167
Definition: idrec.h:34
#define IDHDL
Definition: tok.h:35
void * data
Definition: subexpr.h:89
#define IDTYP(a)
Definition: ipid.h:118
char my_yylinebuf[80]
Definition: febase.cc:48
static void * s_internalCopy(const int t, void *d)
Definition: subexpr.cc:387
#define NULL
Definition: omList.c:10
int rtyp
Definition: subexpr.h:92
Definition: tok.h:96
void Werror(const char *fmt,...)
Definition: reporter.cc:199
static omBin size_two_bin
Definition: subexpr.cc:53
#define omStrDup(s)
Definition: omAllocDecl.h:263
void syMake ( leftv  v,
const char *  id,
idhdl  packhdl 
)

Definition at line 1460 of file subexpr.cc.

1461 {
1462  /* resolv an identifier: (to DEF_CMD, if siq>0)
1463  * 1) reserved id: done by scanner
1464  * 2) `basering` / 'Current`
1465  * 3) existing identifier, local
1466  * 4) ringvar, ringpar, local ring
1467  * 5) existing identifier, global
1468  * 6) monom (resp. number), local ring: consisting of:
1469  * 6') ringvar, ringpar,global ring
1470  * 6'') monom (resp. number), local ring
1471  * 7) monom (resp. number), non-local ring
1472  * 8) basering
1473  * 9) `_`
1474  * 10) everything else is of type 0
1475  */
1476 #ifdef TEST
1477  if ((*id<' ')||(*id>(char)126))
1478  {
1479  Print("wrong id :%s:\n",id);
1480  }
1481 #endif
1482  idhdl save_ring=currRingHdl;
1483  v->Init();
1484  if(packhdl != NULL)
1485  {
1486  // Print("setting req_packhdl to %s\n",IDID(packhdl));
1487  v->req_packhdl = IDPACKAGE(packhdl);
1488  }
1489  else v->req_packhdl = currPack;
1490 // if (v->req_packhdl!=basePack)
1491 // Print("search %s in %s\n",id,v->req_packhdl->libname);
1492  idhdl h=NULL;
1493 #ifdef SIQ
1494  if (siq<=0)
1495 #endif
1496  {
1497  if (!isdigit(id[0]))
1498  {
1499  if (strcmp(id,"basering")==0)
1500  {
1501  if (currRingHdl!=NULL)
1502  {
1503  if (id!=IDID(currRingHdl)) omFreeBinAddr((ADDRESS)id);
1504  h=currRingHdl;
1505  goto id_found;
1506  }
1507  else
1508  {
1509  v->name = id;
1510  return; /* undefined */
1511  }
1512  }
1513  else if (strcmp(id,"Current")==0)
1514  {
1515  if (currPackHdl!=NULL)
1516  {
1517  omFreeBinAddr((ADDRESS)id);
1518  h=currPackHdl;
1519  goto id_found;
1520  }
1521  else
1522  {
1523  v->name = id;
1524  return; /* undefined */
1525  }
1526  }
1527  if(v->req_packhdl!=currPack)
1528  {
1529  h=v->req_packhdl->idroot->get(id,myynest);
1530  }
1531  else
1532  h=ggetid(id);
1533  /* 3) existing identifier, local */
1534  if ((h!=NULL) && (IDLEV(h)==myynest))
1535  {
1536  if (id!=IDID(h)) omFreeBinAddr((ADDRESS)id); /*assume strlen(id) <1000 */
1537  goto id_found;
1538  }
1539  }
1541  {
1542  currRingHdl=NULL;
1543  }
1544  /* 4. local ring: ringvar */
1545  if ((currRingHdl!=NULL) && (IDLEV(currRingHdl)==myynest)
1546  /*&& (!yyInRingConstruction)*/)
1547  {
1548  int vnr;
1549  if ((vnr=r_IsRingVar(id, currRing->names,currRing->N))>=0)
1550  {
1551  poly p=pOne();
1552  pSetExp(p,vnr+1,1);
1553  pSetm(p);
1554  v->data = (void *)p;
1555  v->name = id;
1556  v->rtyp = POLY_CMD;
1557  return;
1558  }
1559  if((n_NumberOfParameters(currRing->cf)>0)
1560  &&((vnr=r_IsRingVar(id, (char**)n_ParameterNames(currRing->cf),
1561  n_NumberOfParameters(currRing->cf))>=0)))
1562  {
1563  BOOLEAN ok=FALSE;
1564  poly p = pmInit(id,ok);
1565  if (ok && (p!=NULL))
1566  {
1567  v->data = pGetCoeff(p);
1568  pGetCoeff(p)=NULL;
1569  pLmFree(p);
1570  v->rtyp = NUMBER_CMD;
1571  v->name = id;
1572  return;
1573  }
1574  }
1575  }
1576  /* 5. existing identifier, global */
1577  if (h!=NULL)
1578  {
1579  if (id!=IDID(h)) omFreeBinAddr((ADDRESS)id); /*assume strlen(id) <1000 */
1580  goto id_found;
1581  }
1582  /* 6. local ring: number/poly */
1583  if ((currRingHdl!=NULL) && (IDLEV(currRingHdl)==myynest))
1584  {
1585  BOOLEAN ok=FALSE;
1586  /*poly p = (!yyInRingConstruction) ? pmInit(id,ok) : (poly)NULL;*/
1587  poly p = pmInit(id,ok);
1588  if (ok)
1589  {
1590  if (p==NULL)
1591  {
1592  v->data = (void *)nInit(0);
1593  v->rtyp = NUMBER_CMD;
1594  #ifdef HAVE_PLURAL
1595  // in this case we may have monomials equal to 0 in p_Read
1596  v->name = id;
1597  #else
1598  omFreeBinAddr((ADDRESS)id);
1599  #endif
1600  }
1601  else if (pIsConstant(p))
1602  {
1603  v->data = pGetCoeff(p);
1604  pGetCoeff(p)=NULL;
1605  pLmFree(p);
1606  v->rtyp = NUMBER_CMD;
1607  v->name = id;
1608  }
1609  else
1610  {
1611  v->data = p;
1612  v->rtyp = POLY_CMD;
1613  v->name = id;
1614  }
1615  return;
1616  }
1617  }
1618  /* 7. non-local ring: number/poly */
1619  {
1620  BOOLEAN ok=FALSE;
1621  poly p = ((currRing!=NULL) /* ring required */
1622  && (currRingHdl!=NULL)
1623  /*&& (!yyInRingConstruction) - not in decl */
1624  && (IDLEV(currRingHdl)!=myynest)) /* already in case 4/6 */
1625  ? pmInit(id,ok) : (poly)NULL;
1626  if (ok)
1627  {
1628  if (p==NULL)
1629  {
1630  v->data = (void *)nInit(0);
1631  v->rtyp = NUMBER_CMD;
1632  #ifdef HAVE_PLURAL
1633  // in this case we may have monomials equal to 0 in p_Read
1634  v->name = id;
1635  #else
1636  omFreeBinAddr((ADDRESS)id);
1637  #endif
1638  }
1639  else
1640  if (pIsConstant(p))
1641  {
1642  v->data = pGetCoeff(p);
1643  pGetCoeff(p)=NULL;
1644  pLmFree(p);
1645  v->rtyp = NUMBER_CMD;
1646  v->name = id;
1647  }
1648  else
1649  {
1650  v->data = p;
1651  v->rtyp = POLY_CMD;
1652  v->name = id;
1653  }
1654  //if (TEST_V_ALLWARN /*&& (myynest>0)*/
1655  //&& ((r_IsRingVar(id, currRing->names,currRing->N)>=0)
1656  // || ((n_NumberOfParameters(currRing->cf)>0)
1657  // &&(r_IsRingVar(id, (char**)n_ParameterNames(currRing->cf),
1658  // n_NumberOfParameters(currRing->cf))>=0))))
1659  //{
1660  //// WARNING: do not use ring variable names in procedures
1661  // Warn("use of variable >>%s<< in a procedure in line %s",id,my_yylinebuf);
1662  //}
1663  return;
1664  }
1665  }
1666  /* 8. basering ? */
1667  if ((myynest>1)&&(currRingHdl!=NULL))
1668  {
1669  if (strcmp(id,IDID(currRingHdl))==0)
1670  {
1671  if (IDID(currRingHdl)!=id) omFreeBinAddr((ADDRESS)id); /*assume strlen (id) <1000 */
1672  h=currRingHdl;
1673  goto id_found;
1674  }
1675  }
1676  if((v->req_packhdl!=basePack) && (v->req_packhdl==currPack))
1677  {
1678  h=basePack->idroot->get(id,myynest);
1679  if (h!=NULL)
1680  {
1681  if (id!=IDID(h)) omFreeBinAddr((ADDRESS)id); /*assume strlen(id) <1000 */
1682  v->req_packhdl=basePack;
1683  goto id_found;
1684  }
1685  }
1686  }
1687 #ifdef SIQ
1688  else
1689  v->rtyp=DEF_CMD;
1690 #endif
1691  /* 9: _ */
1692  if (strcmp(id,"_")==0)
1693  {
1694  omFreeBinAddr((ADDRESS)id);
1695  v->Copy(&sLastPrinted);
1696  }
1697  else
1698  {
1699  /* 10: everything else */
1700  /* v->rtyp = UNKNOWN;*/
1701  v->name = id;
1702  }
1703  currRingHdl=save_ring;
1704  return;
1705 id_found: // we have an id (in h) found, to set the data in from h
1706  if (IDTYP(h)!=ALIAS_CMD)
1707  {
1708  v->rtyp = IDHDL;
1709  v->flag = IDFLAG(h);
1710  v->attribute=IDATTR(h);
1711  }
1712  else
1713  {
1714  v->rtyp = ALIAS_CMD;
1715  }
1716  v->name = IDID(h);
1717  v->data = (char *)h;
1718  currRingHdl=save_ring;
1719 }
BOOLEAN yyInRingConstruction
Definition: grammar.cc:173
static FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
Definition: coeffs.h:796
#define pSetm(p)
Definition: polys.h:241
#define Print
Definition: emacs.cc:83
idhdl currPackHdl
Definition: ipid.cc:60
BITSET flag
Definition: subexpr.h:91
#define IDID(a)
Definition: ipid.h:121
#define pSetExp(p, i, v)
Definition: polys.h:42
#define FALSE
Definition: auxiliary.h:140
return P p
Definition: myNF.cc:203
BOOLEAN siq
Definition: subexpr.cc:58
void Init()
Definition: subexpr.h:108
void * ADDRESS
Definition: auxiliary.h:161
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
Definition: monomials.h:51
Definition: idrec.h:34
#define IDHDL
Definition: tok.h:35
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
Definition: coeffs.h:792
void * data
Definition: subexpr.h:89
#define IDPACKAGE(a)
Definition: ipid.h:138
int myynest
Definition: febase.cc:46
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
#define IDTYP(a)
Definition: ipid.h:118
int r_IsRingVar(const char *n, char **names, int N)
Definition: ring.cc:222
Definition: tok.h:58
const char * name
Definition: subexpr.h:88
#define omFreeBinAddr(addr)
Definition: omAllocDecl.h:258
idhdl currRingHdl
Definition: ipid.cc:64
void Copy(leftv e)
Definition: subexpr.cc:643
#define pIsConstant(p)
like above, except that Comp might be != 0
Definition: polys.h:209
#define pOne()
Definition: polys.h:286
#define IDLEV(a)
Definition: ipid.h:120
Definition: tok.h:38
#define NULL
Definition: omList.c:10
package req_packhdl
Definition: subexpr.h:107
package basePack
Definition: ipid.cc:63
package currPack
Definition: ipid.cc:62
int rtyp
Definition: subexpr.h:92
sleftv sLastPrinted
Definition: subexpr.cc:55
#define IDFLAG(a)
Definition: ipid.h:119
#define pmInit(a, b)
Definition: polys.h:260
#define IDATTR(a)
Definition: ipid.h:122
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced ...
Definition: polys.h:70
attr attribute
Definition: subexpr.h:90
polyrec * poly
Definition: hilb.h:10
#define nInit(i)
Definition: numbers.h:24
static Poly * h
Definition: janet.cc:978
int BOOLEAN
Definition: auxiliary.h:131
idhdl ggetid(const char *n, BOOLEAN, idhdl *packhdl)
Definition: ipid.cc:487

Variable Documentation

int iiCmatrix_index =0
static

Definition at line 1095 of file subexpr.cc.

snumber2 iiNumber2Data[4]
static

Definition at line 1094 of file subexpr.cc.

omBin libstack_bin = omGetSpecBin(sizeof(libstack))

Definition at line 52 of file subexpr.cc.

omBin procinfo_bin = omGetSpecBin(sizeof(procinfo))

Definition at line 51 of file subexpr.cc.

BOOLEAN siq =FALSE

Definition at line 58 of file subexpr.cc.

omBin size_two_bin = omGetSpecBin(2)
static

Definition at line 53 of file subexpr.cc.

sleftv sLastPrinted

Definition at line 55 of file subexpr.cc.

omBin sleftv_bin = omGetSpecBin(sizeof(sleftv))

Definition at line 50 of file subexpr.cc.

const char sNoName[] ="_"

Definition at line 56 of file subexpr.cc.

omBin sSubexpr_bin = omGetSpecBin(sizeof(_ssubexpr))

Definition at line 49 of file subexpr.cc.