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, package pa)
 

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
 
BOOLEAN siq =FALSE
 

Function Documentation

◆ assumeStdFlag()

BOOLEAN assumeStdFlag ( leftv  h)

Definition at line 1474 of file subexpr.cc.

1475 {
1476  if (h->e!=NULL)
1477  {
1478  leftv hh=h->LData();
1479  if (h!=hh) return assumeStdFlag(h->LData());
1480  }
1481  if (!hasFlag(h,FLAG_STD))
1482  {
1483  if (!TEST_VERB_NSB)
1484  {
1485  if (TEST_V_ALLWARN)
1486  Warn("%s is no standard basis in >>%s<<",h->Name(),my_yylinebuf);
1487  else
1488  Warn("%s is no standard basis",h->Name());
1489  }
1490  return FALSE;
1491  }
1492  return TRUE;
1493 }
#define TEST_VERB_NSB
Definition: options.h:129
Class used for (list of) interpreter objects.
Definition: subexpr.h:82
#define FALSE
Definition: auxiliary.h:94
#define TRUE
Definition: auxiliary.h:98
char my_yylinebuf[80]
Definition: febase.cc:48
BOOLEAN assumeStdFlag(leftv h)
Definition: subexpr.cc:1474
#define FLAG_STD
Definition: ipid.h:106
#define NULL
Definition: omList.c:10
#define hasFlag(A, F)
Definition: ipid.h:109
static Poly * h
Definition: janet.cc:978
#define TEST_V_ALLWARN
Definition: options.h:135
#define Warn
Definition: emacs.cc:80

◆ s_internalCopy()

static void* s_internalCopy ( const int  t,
void *  d 
)
inlinestatic

Definition at line 414 of file subexpr.cc.

415 {
416  switch (t)
417  {
418  case CRING_CMD:
419  {
420  coeffs cf=(coeffs)d;
421  cf->ref++;
422  return (void*)d;
423  }
424 #ifdef SINGULAR_4_2
425  case CNUMBER_CMD:
426  return (void*)n2Copy((number2)d);
427  case CPOLY_CMD:
428  return (void*)p2Copy((poly2)d);
429  case CMATRIX_CMD: // like BIGINTMAT
430 #endif
431  case BIGINTMAT_CMD:
432  return (void*)bimCopy((bigintmat *)d);
433  case INTVEC_CMD:
434  case INTMAT_CMD:
435  return (void *)ivCopy((intvec *)d);
436  case MATRIX_CMD:
437  return (void *)mp_Copy((matrix)d, currRing);
438  case IDEAL_CMD:
439  case MODUL_CMD:
440  return (void *)idCopy((ideal)d);
441  case STRING_CMD:
442  return (void *)omStrDup((char *)d);
443  case PACKAGE_CMD:
444  return (void *)paCopy((package) d);
445  case PROC_CMD:
446  return (void *)piCopy((procinfov) d);
447  case POLY_CMD:
448  case VECTOR_CMD:
449  return (void *)pCopy((poly)d);
450  case INT_CMD:
451  return d;
452  case NUMBER_CMD:
453  return (void *)nCopy((number)d);
454  case BIGINT_CMD:
455  return (void *)n_Copy((number)d, coeffs_BIGINT);
456  case MAP_CMD:
457  return (void *)maCopy((map)d, currRing);
458  case LIST_CMD:
459  return (void *)lCopy((lists)d);
460  case LINK_CMD:
461  return (void *)slCopy((si_link) d);
462  case RING_CMD:
463  {
464  ring r=(ring)d;
465  if (r!=NULL)
466  {
467  r->ref++;
468  //Print("s_internalCopy:+ ring %d, ref %d\n",r,r->ref);
469  }
470  return d;
471  }
472  case RESOLUTION_CMD:
473  return (void*)syCopy((syStrategy)d);
474  case DEF_CMD:
475  case NONE:
476  case 0: /* type in error case */
477  break; /* error recovery: do nothing */
478  //case COMMAND:
479  default:
480  {
481  if (t>MAX_TOK)
482  {
483  blackbox *b=getBlackboxStuff(t);
484  if (b!=NULL) return b->blackbox_Copy(b,d);
485  return NULL;
486  }
487  else
488  Warn("s_internalCopy: cannot copy type %s(%d)",
489  Tok2Cmdname(t),t);
490  }
491  }
492  return NULL;
493 }
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:48
Definition: tok.h:95
Definition: lists.h:22
Definition: tok.h:38
Matrices of numbers.
Definition: bigintmat.h:51
Definition: tok.h:213
intvec * ivCopy(const intvec *o)
Definition: intvec.h:126
procinfov piCopy(procinfov pi)
Definition: subexpr.h:148
coeffs coeffs_BIGINT
Definition: ipid.cc:54
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
Definition: tok.h:56
const ring r
Definition: syzextra.cc:208
Definition: intvec.h:14
bigintmat * bimCopy(const bigintmat *b)
same as copy constructor - apart from it being able to accept NULL as input
Definition: bigintmat.cc:406
Definition: tok.h:58
The main handler for Singular numbers which are suitable for Singular polynomials.
package paCopy(package pack)
Definition: ipid.h:45
lists lCopy(lists L)
Definition: lists.cc:32
ideal idCopy(ideal A)
Definition: ideals.h:60
CanonicalForm cf
Definition: cfModGcd.cc:4024
Definition: tok.h:116
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of &#39;n&#39;
Definition: coeffs.h:455
syStrategy syCopy(syStrategy syzstr)
Definition: syz1.cc:1892
const char * Tok2Cmdname(int tok)
Definition: gentable.cc:132
#define nCopy(n)
Definition: numbers.h:15
Definition: tok.h:117
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
Definition: matpol.cc:71
map maCopy(map theMap, const ring r)
Definition: maps.cc:38
polyrec * poly
Definition: hilb.h:10
const poly b
Definition: syzextra.cc:213
#define NONE
Definition: tok.h:216
#define pCopy(p)
return a copy of the poly
Definition: polys.h:168
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
Definition: blackbox.cc:16
#define Warn
Definition: emacs.cc:80
#define omStrDup(s)
Definition: omAllocDecl.h:263

◆ s_internalDelete()

void s_internalDelete ( const int  t,
void *  d,
const ring  r 
)

Definition at line 495 of file subexpr.cc.

496 {
497  assume(d!=NULL);
498  switch (t)
499  {
500  case CRING_CMD:
501  {
502  coeffs cf=(coeffs)d;
503  if ((cf->ref<=1)&&
504  ((cf->type <=n_long_R)
505  ||((cf->type >=n_long_C)&&(cf->type <=n_CF))))
506  {
507  Werror("cannot kill %s",nCoeffName(cf));
508  }
509  else
510  nKillChar((coeffs)d);
511  break;
512  }
513 #ifdef SINGULAR_4_2
514  case CNUMBER_CMD:
515  {
516  number2 n=(number2)d;
517  n2Delete(n);
518  break;
519  }
520  case CPOLY_CMD:
521  {
522  poly2 n=(poly2)d;
523  p2Delete(n);
524  break;
525  }
526  case CMATRIX_CMD: //like BIGINTMAT
527 #endif
528  case BIGINTMAT_CMD:
529  {
530  bigintmat *v=(bigintmat*)d;
531  delete v;
532  break;
533  }
534  case INTVEC_CMD:
535  case INTMAT_CMD:
536  {
537  intvec *v=(intvec*)d;
538  delete v;
539  break;
540  }
541  case MAP_CMD:
542  {
543  map m=(map)d;
544  omFreeBinAddr((ADDRESS)m->preimage);
545  m->preimage=NULL;
546  /* no break: continue as IDEAL*/
547  }
548  case MATRIX_CMD:
549  case IDEAL_CMD:
550  case MODUL_CMD:
551  {
552  ideal i=(ideal)d;
553  id_Delete(&i,r);
554  break;
555  }
556  case STRING_CMD:
557  omFree(d);
558  break;
559  //case PACKAGE_CMD:
560  // return (void *)paCopy((package) d);
561  case PROC_CMD:
562  piKill((procinfo*)d);
563  break;
564  case POLY_CMD:
565  case VECTOR_CMD:
566  {
567  poly p=(poly)d;
568  p_Delete(&p,r);
569  break;
570  }
571  case NUMBER_CMD:
572  {
573  number n=(number)d;
574  n_Delete(&n,r->cf);
575  break;
576  }
577  case BIGINT_CMD:
578  {
579  number n=(number)d;
581  break;
582  }
583  case LIST_CMD:
584  {
585  lists l=(lists)d;
586  l->Clean(r);
587  break;
588  }
589  case LINK_CMD:
590  {
591  si_link l=(si_link)d;
592  slKill(l);
593  break;
594  }
595  case RING_CMD:
596  {
597  ring R=(ring)d;
598  if ((R!=currRing)||(R->ref>=0))
599  rKill(R);
600  #ifdef TEST
601  else
602  Print("currRing? ref=%d\n",R->ref);
603  #endif
604  break;
605  }
606  case RESOLUTION_CMD:
607  {
609  if (s!=NULL) syKillComputation(s,r);
610  break;
611  }
612  case COMMAND:
613  {
614  command cmd=(command)d;
615  if (cmd->arg1.rtyp!=0) cmd->arg1.CleanUp(r);
616  if (cmd->arg2.rtyp!=0) cmd->arg2.CleanUp(r);
617  if (cmd->arg3.rtyp!=0) cmd->arg3.CleanUp(r);
619  break;
620  }
621  case INT_CMD:
622  case DEF_CMD:
623  case ALIAS_CMD:
624  case PACKAGE_CMD:
625  case IDHDL:
626  case NONE:
627  case ANY_TYPE:
628  case VECHO:
629  case VPRINTLEVEL:
630  case VCOLMAX:
631  case VTIMER:
632  case VRTIMER:
633  case VOICE:
634  case VMAXDEG:
635  case VMAXMULT:
636  case TRACE:
637  case VSHORTOUT:
638  case VNOETHER:
639  case VMINPOLY:
640  case 0: /* type in error case */
641  break; /* error recovery: do nothing */
642  //case COMMAND:
643  //case COMMAND:
644  default:
645  {
646  if (t>MAX_TOK)
647  {
648  blackbox *b=getBlackboxStuff(t);
649  if (b!=NULL) b->blackbox_destroy(b,d);
650  break;
651  }
652  else
653  Warn("s_internalDelete: cannot delete type %s(%d)",
654  Tok2Cmdname(t),t);
655  }
656  }
657 }
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:207
const CanonicalForm int s
Definition: facAbsFact.cc:55
Definition: tok.h:203
ip_command * command
Definition: ipid.h:24
Definition: tok.h:48
#define ANY_TYPE
Definition: tok.h:30
#define Print
Definition: emacs.cc:83
Definition: tok.h:95
Definition: tok.h:204
?
Definition: coeffs.h:47
Definition: lists.h:22
Definition: tok.h:38
return P p
Definition: myNF.cc:203
Matrices of numbers.
Definition: bigintmat.h:51
Definition: tok.h:213
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
void * ADDRESS
Definition: auxiliary.h:115
coeffs coeffs_BIGINT
Definition: ipid.cc:54
BOOLEAN piKill(procinfov pi)
Definition: ipid.cc:653
#define IDHDL
Definition: tok.h:31
real floating point (GMP) numbers
Definition: coeffs.h:34
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
Definition: tok.h:208
Definition: tok.h:56
const ring r
Definition: syzextra.cc:208
Definition: intvec.h:14
void rKill(ring r)
Definition: ipshell.cc:6057
Definition: tok.h:58
#define omFreeBinAddr(addr)
Definition: omAllocDecl.h:258
#define omFree(addr)
Definition: omAllocDecl.h:261
#define assume(x)
Definition: mod2.h:394
The main handler for Singular numbers which are suitable for Singular polynomials.
const ring R
Definition: DebugPrint.cc:36
complex floating point (GMP) numbers
Definition: coeffs.h:42
static FORCE_INLINE char * nCoeffName(const coeffs cf)
Definition: coeffs.h:980
int m
Definition: cfEzgcd.cc:119
int i
Definition: cfEzgcd.cc:123
Definition: tok.h:206
Definition: tok.h:34
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:843
Definition: tok.h:209
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
CanonicalForm cf
Definition: cfModGcd.cc:4024
Definition: tok.h:116
#define NULL
Definition: omList.c:10
slists * lists
Definition: mpr_numeric.h:146
omBin sip_command_bin
Definition: ipid.cc:49
const char * Tok2Cmdname(int tok)
Definition: gentable.cc:132
Definition: tok.h:117
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:459
polyrec * poly
Definition: hilb.h:10
#define omFreeBin(addr, bin)
Definition: omAllocDecl.h:259
Definition: tok.h:205
const poly b
Definition: syzextra.cc:213
#define NONE
Definition: tok.h:216
void nKillChar(coeffs r)
undo all initialisations
Definition: numbers.cc:504
void Werror(const char *fmt,...)
Definition: reporter.cc:189
void syKillComputation(syStrategy syzstr, ring r=currRing)
Definition: syz1.cc:1503
int l
Definition: cfEzgcd.cc:94
#define COMMAND
Definition: tok.h:29
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
Definition: blackbox.cc:16
ssyStrategy * syStrategy
Definition: syz.h:35
#define Warn
Definition: emacs.cc:80

◆ slInternalCopy()

void* slInternalCopy ( leftv  source,
const int  t,
void *  d,
Subexpr  e 
)

Definition at line 659 of file subexpr.cc.

660 {
661  if (t==STRING_CMD)
662  {
663  if ((e==NULL)
664  || (source->rtyp==LIST_CMD)
665  || ((source->rtyp==IDHDL)
666  &&((IDTYP((idhdl)source->data)==LIST_CMD)
667  || (IDTYP((idhdl)source->data)>MAX_TOK)))
668  || (source->rtyp>MAX_TOK))
669  return (void *)omStrDup((char *)d);
670  else if (e->next==NULL)
671  {
672  char *s=(char*)omAllocBin(size_two_bin);
673  s[0]=*(char *)d;
674  s[1]='\0';
675  return s;
676  }
677  #ifdef TEST
678  else
679  {
680  Werror("not impl. string-op in `%s`",my_yylinebuf);
681  return NULL;
682  }
683  #endif
684  }
685  return s_internalCopy(t,d);
686 }
#define omAllocBin(bin)
Definition: omAllocDecl.h:205
const CanonicalForm int s
Definition: facAbsFact.cc:55
Definition: tok.h:213
Definition: idrec.h:34
#define IDHDL
Definition: tok.h:31
void * data
Definition: subexpr.h:88
#define IDTYP(a)
Definition: ipid.h:116
char my_yylinebuf[80]
Definition: febase.cc:48
static void * s_internalCopy(const int t, void *d)
Definition: subexpr.cc:414
#define NULL
Definition: omList.c:10
int rtyp
Definition: subexpr.h:91
Definition: tok.h:117
void Werror(const char *fmt,...)
Definition: reporter.cc:189
static omBin size_two_bin
Definition: subexpr.cc:53
#define omStrDup(s)
Definition: omAllocDecl.h:263

◆ syMake()

void syMake ( leftv  v,
const char *  id,
package  pa 
)

Definition at line 1500 of file subexpr.cc.

1501 {
1502  /* resolv an identifier: (to DEF_CMD, if siq>0)
1503  * 1) reserved id: done by scanner
1504  * 2) `basering` / 'Current`
1505  * 3) existing identifier, local
1506  * 4) ringvar, ringpar, local ring
1507  * 5) existing identifier, global
1508  * 6) monom (resp. number), local ring: consisting of:
1509  * 6') ringvar, ringpar,global ring
1510  * 6'') monom (resp. number), local ring
1511  * 7) monom (resp. number), non-local ring
1512  * 8) basering
1513  * 9) `_`
1514  * 10) everything else is of type 0
1515  */
1516 #ifdef TEST
1517  if ((*id<' ')||(*id>(char)126))
1518  {
1519  Print("wrong id :%s:\n",id);
1520  }
1521 #endif
1522  idhdl save_ring=currRingHdl;
1523  v->Init();
1524  if(pa != NULL)
1525  {
1526  v->req_packhdl = pa;
1527  }
1528  else v->req_packhdl = currPack;
1529 // if (v->req_packhdl!=basePack)
1530 // Print("search %s in %s\n",id,v->req_packhdl->libname);
1531  idhdl h=NULL;
1532 #ifdef SIQ
1533  if (siq<=0)
1534 #endif
1535  {
1536  if (!isdigit(id[0]))
1537  {
1538  if (strcmp(id,"basering")==0)
1539  {
1540  if (currRingHdl!=NULL)
1541  {
1542  if (id!=IDID(currRingHdl)) omFreeBinAddr((ADDRESS)id);
1543  h=currRingHdl;
1544  goto id_found;
1545  }
1546  else
1547  {
1548  v->name = id;
1549  return; /* undefined */
1550  }
1551  }
1552  else if (strcmp(id,"Current")==0)
1553  {
1554  if (currPackHdl!=NULL)
1555  {
1556  omFreeBinAddr((ADDRESS)id);
1557  h=currPackHdl;
1558  goto id_found;
1559  }
1560  else
1561  {
1562  v->name = id;
1563  return; /* undefined */
1564  }
1565  }
1566  if(v->req_packhdl!=currPack)
1567  {
1568  h=v->req_packhdl->idroot->get(id,myynest);
1569  }
1570  else
1571  h=ggetid(id);
1572  /* 3) existing identifier, local */
1573  if ((h!=NULL) && (IDLEV(h)==myynest))
1574  {
1575  if (id!=IDID(h)) omFreeBinAddr((ADDRESS)id); /*assume strlen(id) <1000 */
1576  goto id_found;
1577  }
1578  }
1580  {
1581  currRingHdl=NULL;
1582  }
1583  /* 4. local ring: ringvar */
1584  if ((currRingHdl!=NULL) && (IDLEV(currRingHdl)==myynest)
1585  /*&& (!yyInRingConstruction)*/)
1586  {
1587  int vnr;
1588  if ((vnr=r_IsRingVar(id, currRing->names,currRing->N))>=0)
1589  {
1590  poly p=pOne();
1591  pSetExp(p,vnr+1,1);
1592  pSetm(p);
1593  v->data = (void *)p;
1594  v->name = id;
1595  v->rtyp = POLY_CMD;
1596  return;
1597  }
1598  if((n_NumberOfParameters(currRing->cf)>0)
1599  &&((vnr=r_IsRingVar(id, (char**)n_ParameterNames(currRing->cf),
1600  n_NumberOfParameters(currRing->cf))>=0)))
1601  {
1602  BOOLEAN ok=FALSE;
1603  poly p = pmInit(id,ok);
1604  if (ok && (p!=NULL))
1605  {
1606  v->data = pGetCoeff(p);
1607  pGetCoeff(p)=NULL;
1608  pLmFree(p);
1609  v->rtyp = NUMBER_CMD;
1610  v->name = id;
1611  return;
1612  }
1613  }
1614  }
1615  /* 5. existing identifier, global */
1616  if (h!=NULL)
1617  {
1618  if (id!=IDID(h)) omFreeBinAddr((ADDRESS)id); /*assume strlen(id) <1000 */
1619  goto id_found;
1620  }
1621  /* 6. local ring: number/poly */
1622  if ((currRingHdl!=NULL) && (IDLEV(currRingHdl)==myynest))
1623  {
1624  BOOLEAN ok=FALSE;
1625  /*poly p = (!yyInRingConstruction) ? pmInit(id,ok) : (poly)NULL;*/
1626  poly p = pmInit(id,ok);
1627  if (ok)
1628  {
1629  if (p==NULL)
1630  {
1631  v->data = (void *)nInit(0);
1632  v->rtyp = NUMBER_CMD;
1633  #ifdef HAVE_PLURAL
1634  // in this case we may have monomials equal to 0 in p_Read
1635  v->name = id;
1636  #else
1637  omFreeBinAddr((ADDRESS)id);
1638  #endif
1639  }
1640  else 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  return;
1655  }
1656  }
1657  /* 7. non-local ring: number/poly */
1658  {
1659  BOOLEAN ok=FALSE;
1660  poly p = ((currRing!=NULL) /* ring required */
1661  && (currRingHdl!=NULL)
1662  /*&& (!yyInRingConstruction) - not in decl */
1663  && (IDLEV(currRingHdl)!=myynest)) /* already in case 4/6 */
1664  ? pmInit(id,ok) : (poly)NULL;
1665  if (ok)
1666  {
1667  if (p==NULL)
1668  {
1669  v->data = (void *)nInit(0);
1670  v->rtyp = NUMBER_CMD;
1671  #ifdef HAVE_PLURAL
1672  // in this case we may have monomials equal to 0 in p_Read
1673  v->name = id;
1674  #else
1675  omFreeBinAddr((ADDRESS)id);
1676  #endif
1677  }
1678  else
1679  if (pIsConstant(p))
1680  {
1681  v->data = pGetCoeff(p);
1682  pGetCoeff(p)=NULL;
1683  pLmFree(p);
1684  v->rtyp = NUMBER_CMD;
1685  v->name = id;
1686  }
1687  else
1688  {
1689  v->data = p;
1690  v->rtyp = POLY_CMD;
1691  v->name = id;
1692  }
1693  //if (TEST_V_ALLWARN /*&& (myynest>0)*/
1694  //&& ((r_IsRingVar(id, currRing->names,currRing->N)>=0)
1695  // || ((n_NumberOfParameters(currRing->cf)>0)
1696  // &&(r_IsRingVar(id, (char**)n_ParameterNames(currRing->cf),
1697  // n_NumberOfParameters(currRing->cf))>=0))))
1698  //{
1699  //// WARNING: do not use ring variable names in procedures
1700  // Warn("use of variable >>%s<< in a procedure in line %s",id,my_yylinebuf);
1701  //}
1702  return;
1703  }
1704  }
1705  /* 8. basering ? */
1706  if ((myynest>1)&&(currRingHdl!=NULL))
1707  {
1708  if (strcmp(id,IDID(currRingHdl))==0)
1709  {
1710  if (IDID(currRingHdl)!=id) omFreeBinAddr((ADDRESS)id); /*assume strlen (id) <1000 */
1711  h=currRingHdl;
1712  goto id_found;
1713  }
1714  }
1715  if((v->req_packhdl!=basePack) && (v->req_packhdl==currPack))
1716  {
1717  h=basePack->idroot->get(id,myynest);
1718  if (h!=NULL)
1719  {
1720  if (id!=IDID(h)) omFreeBinAddr((ADDRESS)id); /*assume strlen(id) <1000 */
1721  v->req_packhdl=basePack;
1722  goto id_found;
1723  }
1724  }
1725  }
1726 #ifdef SIQ
1727  else
1728  v->rtyp=DEF_CMD;
1729 #endif
1730  /* 9: _ */
1731  if (strcmp(id,"_")==0)
1732  {
1733  omFreeBinAddr((ADDRESS)id);
1734  v->Copy(&sLastPrinted);
1735  }
1736  else
1737  {
1738  /* 10: everything else */
1739  /* v->rtyp = UNKNOWN;*/
1740  v->name = id;
1741  }
1742  currRingHdl=save_ring;
1743  return;
1744 id_found: // we have an id (in h) found, to set the data in from h
1745  if (IDTYP(h)!=ALIAS_CMD)
1746  {
1747  v->rtyp = IDHDL;
1748  v->flag = IDFLAG(h);
1749  v->attribute=IDATTR(h);
1750  }
1751  else
1752  {
1753  v->rtyp = ALIAS_CMD;
1754  }
1755  v->name = IDID(h);
1756  v->data = (char *)h;
1757  currRingHdl=save_ring;
1758 }
BOOLEAN yyInRingConstruction
Definition: grammar.cc:172
static FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
Definition: coeffs.h:812
idhdl ggetid(const char *n)
Definition: ipid.cc:510
#define pSetm(p)
Definition: polys.h:253
#define Print
Definition: emacs.cc:83
idhdl currPackHdl
Definition: ipid.cc:61
#define IDID(a)
Definition: ipid.h:119
#define pSetExp(p, i, v)
Definition: polys.h:42
#define FALSE
Definition: auxiliary.h:94
return P p
Definition: myNF.cc:203
BOOLEAN siq
Definition: subexpr.cc:57
void * ADDRESS
Definition: auxiliary.h:115
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:31
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
Definition: coeffs.h:808
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:10
#define IDTYP(a)
Definition: ipid.h:116
int r_IsRingVar(const char *n, char **names, int N)
Definition: ring.cc:222
Definition: tok.h:58
#define omFreeBinAddr(addr)
Definition: omAllocDecl.h:258
idhdl currRingHdl
Definition: ipid.cc:65
#define pIsConstant(p)
like above, except that Comp might be != 0
Definition: polys.h:221
#define pOne()
Definition: polys.h:297
char name() const
Definition: variable.cc:122
#define IDLEV(a)
Definition: ipid.h:118
Definition: tok.h:34
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
#define NULL
Definition: omList.c:10
package basePack
Definition: ipid.cc:64
package currPack
Definition: ipid.cc:63
sleftv sLastPrinted
Definition: subexpr.cc:55
#define IDFLAG(a)
Definition: ipid.h:117
#define pmInit(a, b)
Definition: polys.h:271
#define IDATTR(a)
Definition: ipid.h:120
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
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:85

Variable Documentation

◆ libstack_bin

omBin libstack_bin = omGetSpecBin(sizeof(libstack))

Definition at line 52 of file subexpr.cc.

◆ procinfo_bin

omBin procinfo_bin = omGetSpecBin(sizeof(procinfo))

Definition at line 51 of file subexpr.cc.

◆ siq

BOOLEAN siq =FALSE

Definition at line 57 of file subexpr.cc.

◆ size_two_bin

omBin size_two_bin = omGetSpecBin(2)
static

Definition at line 53 of file subexpr.cc.

◆ sLastPrinted

sleftv sLastPrinted

Definition at line 55 of file subexpr.cc.

◆ sleftv_bin

omBin sleftv_bin = omGetSpecBin(sizeof(sleftv))

Definition at line 50 of file subexpr.cc.

◆ sSubexpr_bin

omBin sSubexpr_bin = omGetSpecBin(sizeof(_ssubexpr))

Definition at line 49 of file subexpr.cc.