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 1448 of file subexpr.cc.

1449 {
1450  if (h->e!=NULL)
1451  {
1452  leftv hh=h->LData();
1453  if (h!=hh) return assumeStdFlag(h->LData());
1454  }
1455  if (!hasFlag(h,FLAG_STD))
1456  {
1457  if (!TEST_VERB_NSB)
1458  {
1459  if (TEST_V_ALLWARN)
1460  Warn("%s is no standard basis in >>%s<<",h->Name(),my_yylinebuf);
1461  else
1462  Warn("%s is no standard basis",h->Name());
1463  }
1464  return FALSE;
1465  }
1466  return TRUE;
1467 }
#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:1448
#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:1380
#define TEST_V_ALLWARN
Definition: options.h:135
#define Warn
Definition: emacs.cc:80
const char* iiSleftv2name ( leftv  v)

Definition at line 1927 of file subexpr.cc.

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

Definition at line 401 of file subexpr.cc.

402 {
403  switch (t)
404  {
405 #ifdef SINGULAR_4_1
406  case CRING_CMD:
407  {
408  coeffs cf=(coeffs)d;
409  cf->ref++;
410  return (void*)d;
411  }
412  case CNUMBER_CMD:
413  return (void*)n2Copy((number2)d);
414  case CMATRIX_CMD: // like BIGINTMAT
415 #endif
416  case BIGINTMAT_CMD:
417  return (void*)bimCopy((bigintmat *)d);
418  case INTVEC_CMD:
419  case INTMAT_CMD:
420  return (void *)ivCopy((intvec *)d);
421  case MATRIX_CMD:
422  return (void *)mp_Copy((matrix)d, currRing);
423  case IDEAL_CMD:
424  case MODUL_CMD:
425  return (void *)idCopy((ideal)d);
426  case STRING_CMD:
427  return (void *)omStrDup((char *)d);
428  case PACKAGE_CMD:
429  return (void *)paCopy((package) d);
430  case PROC_CMD:
431  return (void *)piCopy((procinfov) d);
432  case POLY_CMD:
433  case VECTOR_CMD:
434  return (void *)pCopy((poly)d);
435  case INT_CMD:
436  return d;
437  case NUMBER_CMD:
438  return (void *)nCopy((number)d);
439  case BIGINT_CMD:
440  return (void *)n_Copy((number)d, coeffs_BIGINT);
441  case MAP_CMD:
442  return (void *)maCopy((map)d, currRing);
443  case LIST_CMD:
444  return (void *)lCopy((lists)d);
445  case LINK_CMD:
446  return (void *)slCopy((si_link) d);
447  case RING_CMD:
448  case QRING_CMD:
449  {
450  ring r=(ring)d;
451  if (r!=NULL) r->ref++;
452  //Print("+ ring %d, ref %d\n",r,r->ref);
453  return d;
454  }
455  case RESOLUTION_CMD:
456  return (void*)syCopy((syStrategy)d);
457  case DEF_CMD:
458  case NONE:
459  case 0: /* type in error case */
460  break; /* error recovery: do nothing */
461  //case COMMAND:
462  default:
463  {
464  if (t>MAX_TOK)
465  {
466  blackbox *b=getBlackboxStuff(t);
467  if (b!=NULL) return b->blackbox_Copy(b,d);
468  return NULL;
469  }
470  else
471  Warn("s_internalCopy: cannot copy type %s(%d)",
472  Tok2Cmdname(t),t);
473  }
474  }
475  return NULL;
476 }
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:51
Definition: tok.h:170
intvec * ivCopy(const intvec *o)
Definition: intvec.h:141
procinfov piCopy(procinfov pi)
Definition: subexpr.h:149
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: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:73
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 &#39;n&#39;
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:173
#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 478 of file subexpr.cc.

479 {
480  assume(d!=NULL);
481  switch (t)
482  {
483 #ifdef SINGULAR_4_1
484  case CRING_CMD:
485  nKillChar((coeffs)d);
486  break;
487  case CNUMBER_CMD:
488  {
489  number2 n=(number2)d;
490  n2Delete(n);
491  break;
492  }
493  case CMATRIX_CMD: //like BIGINTMAT
494 #endif
495  case BIGINTMAT_CMD:
496  {
497  bigintmat *v=(bigintmat*)d;
498  delete v;
499  break;
500  }
501  case INTVEC_CMD:
502  case INTMAT_CMD:
503  {
504  intvec *v=(intvec*)d;
505  delete v;
506  break;
507  }
508  case MAP_CMD:
509  {
510  map m=(map)d;
511  omFreeBinAddr((ADDRESS)m->preimage);
512  m->preimage=NULL;
513  /* no break: continue as IDEAL*/
514  }
515  case MATRIX_CMD:
516  case IDEAL_CMD:
517  case MODUL_CMD:
518  {
519  ideal i=(ideal)d;
520  id_Delete(&i,r);
521  break;
522  }
523  case STRING_CMD:
524  omFree(d);
525  break;
526  //case PACKAGE_CMD:
527  // return (void *)paCopy((package) d);
528  case PROC_CMD:
529  piKill((procinfo*)d);
530  break;
531  case POLY_CMD:
532  case VECTOR_CMD:
533  {
534  poly p=(poly)d;
535  p_Delete(&p,r);
536  break;
537  }
538  case NUMBER_CMD:
539  {
540  number n=(number)d;
541  n_Delete(&n,r);
542  break;
543  }
544  case BIGINT_CMD:
545  {
546  number n=(number)d;
548  break;
549  }
550  case LIST_CMD:
551  {
552  lists l=(lists)d;
553  l->Clean(r);
554  break;
555  }
556  case LINK_CMD:
557  {
558  si_link l=(si_link)d;
559  slKill(l);
560  break;
561  }
562  case RING_CMD:
563  case QRING_CMD:
564  {
565  ring R=(ring)d;
566  if ((R!=currRing)||(R->ref>=0))
567  rKill(R);
568  #ifdef TEST
569  else
570  Print("currRing? ref=%d\n",R->ref);
571  #endif
572  break;
573  }
574  case RESOLUTION_CMD:
575  {
577  if (s!=NULL) syKillComputation(s,r);
578  break;
579  }
580  case COMMAND:
581  {
582  command cmd=(command)d;
583  if (cmd->arg1.rtyp!=0) cmd->arg1.CleanUp(r);
584  if (cmd->arg2.rtyp!=0) cmd->arg2.CleanUp(r);
585  if (cmd->arg3.rtyp!=0) cmd->arg3.CleanUp(r);
587  break;
588  }
589  case INT_CMD:
590  case DEF_CMD:
591  case ALIAS_CMD:
592  case PACKAGE_CMD:
593  case IDHDL:
594  case NONE:
595  case ANY_TYPE:
596  case VECHO:
597  case VPRINTLEVEL:
598  case VCOLMAX:
599  case VTIMER:
600  case VRTIMER:
601  case VOICE:
602  case VMAXDEG:
603  case VMAXMULT:
604  case TRACE:
605  case VSHORTOUT:
606  case VNOETHER:
607  case VMINPOLY:
608  case LIB_CMD:
609  case 0: /* type in error case */
610  break; /* error recovery: do nothing */
611  //case COMMAND:
612  //case COMMAND:
613  default:
614  {
615  if (t>MAX_TOK)
616  {
617  blackbox *b=getBlackboxStuff(t);
618  if (b!=NULL) b->blackbox_destroy(b,d);
619  break;
620  }
621  else
622  Warn("s_internalDelete: cannot delete type %s(%d)",
623  Tok2Cmdname(t),t);
624  }
625  }
626 }
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:164
const CanonicalForm int s
Definition: facAbsFact.cc:55
Definition: tok.h:160
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:161
Definition: lists.h:22
Definition: tok.h:42
return P p
Definition: myNF.cc:203
Matrices of numbers.
Definition: bigintmat.h:51
void n2Delete(number2 &d)
Definition: number2.cc:285
Definition: tok.h:170
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
void * ADDRESS
Definition: auxiliary.h:161
coeffs coeffs_BIGINT
Definition: ipid.cc:54
BOOLEAN piKill(procinfov pi)
Definition: ipid.cc:647
#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:165
Definition: tok.h:56
const ring r
Definition: syzextra.cc:208
Definition: intvec.h:16
void rKill(ring r)
Definition: ipshell.cc:5999
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.
const ring R
Definition: DebugPrint.cc:36
int m
Definition: cfEzgcd.cc:119
int i
Definition: cfEzgcd.cc:123
Definition: tok.h:163
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:166
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:49
const char * Tok2Cmdname(int tok)
Definition: gentable.cc:128
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 &#39;p&#39;
Definition: coeffs.h:456
polyrec * poly
Definition: hilb.h:10
#define omFreeBin(addr, bin)
Definition: omAllocDecl.h:259
Definition: tok.h:162
const poly b
Definition: syzextra.cc:213
#define NONE
Definition: tok.h:173
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 628 of file subexpr.cc.

629 {
630  if (t==STRING_CMD)
631  {
632  if ((e==NULL)
633  || (source->rtyp==LIST_CMD)
634  || ((source->rtyp==IDHDL)
635  &&((IDTYP((idhdl)source->data)==LIST_CMD)
636  || (IDTYP((idhdl)source->data)>MAX_TOK)))
637  || (source->rtyp>MAX_TOK))
638  return (void *)omStrDup((char *)d);
639  else if (e->next==NULL)
640  {
641  char *s=(char*)omAllocBin(size_two_bin);
642  s[0]=*(char *)d;
643  s[1]='\0';
644  return s;
645  }
646  #ifdef TEST
647  else
648  {
649  Werror("not impl. string-op in `%s`",my_yylinebuf);
650  return NULL;
651  }
652  #endif
653  }
654  return s_internalCopy(t,d);
655 }
#define omAllocBin(bin)
Definition: omAllocDecl.h:205
const CanonicalForm int s
Definition: facAbsFact.cc:55
Definition: tok.h:170
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:401
#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 1474 of file subexpr.cc.

1475 {
1476  /* resolv an identifier: (to DEF_CMD, if siq>0)
1477  * 1) reserved id: done by scanner
1478  * 2) `basering` / 'Current`
1479  * 3) existing identifier, local
1480  * 4) ringvar, ringpar, local ring
1481  * 5) existing identifier, global
1482  * 6) monom (resp. number), local ring: consisting of:
1483  * 6') ringvar, ringpar,global ring
1484  * 6'') monom (resp. number), local ring
1485  * 7) monom (resp. number), non-local ring
1486  * 8) basering
1487  * 9) `_`
1488  * 10) everything else is of type 0
1489  */
1490 #ifdef TEST
1491  if ((*id<' ')||(*id>(char)126))
1492  {
1493  Print("wrong id :%s:\n",id);
1494  }
1495 #endif
1496  idhdl save_ring=currRingHdl;
1497  v->Init();
1498  if(packhdl != NULL)
1499  {
1500  // Print("setting req_packhdl to %s\n",IDID(packhdl));
1501  v->req_packhdl = IDPACKAGE(packhdl);
1502  }
1503  else v->req_packhdl = currPack;
1504 // if (v->req_packhdl!=basePack)
1505 // Print("search %s in %s\n",id,v->req_packhdl->libname);
1506  idhdl h=NULL;
1507 #ifdef SIQ
1508  if (siq<=0)
1509 #endif
1510  {
1511  if (!isdigit(id[0]))
1512  {
1513  if (strcmp(id,"basering")==0)
1514  {
1515  if (currRingHdl!=NULL)
1516  {
1517  if (id!=IDID(currRingHdl)) omFreeBinAddr((ADDRESS)id);
1518  h=currRingHdl;
1519  goto id_found;
1520  }
1521  else
1522  {
1523  v->name = id;
1524  return; /* undefined */
1525  }
1526  }
1527  else if (strcmp(id,"Current")==0)
1528  {
1529  if (currPackHdl!=NULL)
1530  {
1531  omFreeBinAddr((ADDRESS)id);
1532  h=currPackHdl;
1533  goto id_found;
1534  }
1535  else
1536  {
1537  v->name = id;
1538  return; /* undefined */
1539  }
1540  }
1541  if(v->req_packhdl!=currPack)
1542  {
1543  h=v->req_packhdl->idroot->get(id,myynest);
1544  }
1545  else
1546  h=ggetid(id);
1547  /* 3) existing identifier, local */
1548  if ((h!=NULL) && (IDLEV(h)==myynest))
1549  {
1550  if (id!=IDID(h)) omFreeBinAddr((ADDRESS)id); /*assume strlen(id) <1000 */
1551  goto id_found;
1552  }
1553  }
1555  {
1556  currRingHdl=NULL;
1557  }
1558  /* 4. local ring: ringvar */
1559  if ((currRingHdl!=NULL) && (IDLEV(currRingHdl)==myynest)
1560  /*&& (!yyInRingConstruction)*/)
1561  {
1562  int vnr;
1563  if ((vnr=r_IsRingVar(id, currRing->names,currRing->N))>=0)
1564  {
1565  poly p=pOne();
1566  pSetExp(p,vnr+1,1);
1567  pSetm(p);
1568  v->data = (void *)p;
1569  v->name = id;
1570  v->rtyp = POLY_CMD;
1571  return;
1572  }
1573  if((n_NumberOfParameters(currRing->cf)>0)
1574  &&((vnr=r_IsRingVar(id, (char**)n_ParameterNames(currRing->cf),
1575  n_NumberOfParameters(currRing->cf))>=0)))
1576  {
1577  BOOLEAN ok=FALSE;
1578  poly p = pmInit(id,ok);
1579  if (ok && (p!=NULL))
1580  {
1581  v->data = pGetCoeff(p);
1582  pGetCoeff(p)=NULL;
1583  pLmFree(p);
1584  v->rtyp = NUMBER_CMD;
1585  v->name = id;
1586  return;
1587  }
1588  }
1589  }
1590  /* 5. existing identifier, global */
1591  if (h!=NULL)
1592  {
1593  if (id!=IDID(h)) omFreeBinAddr((ADDRESS)id); /*assume strlen(id) <1000 */
1594  goto id_found;
1595  }
1596  /* 6. local ring: number/poly */
1597  if ((currRingHdl!=NULL) && (IDLEV(currRingHdl)==myynest))
1598  {
1599  BOOLEAN ok=FALSE;
1600  /*poly p = (!yyInRingConstruction) ? pmInit(id,ok) : (poly)NULL;*/
1601  poly p = pmInit(id,ok);
1602  if (ok)
1603  {
1604  if (p==NULL)
1605  {
1606  v->data = (void *)nInit(0);
1607  v->rtyp = NUMBER_CMD;
1608  #ifdef HAVE_PLURAL
1609  // in this case we may have monomials equal to 0 in p_Read
1610  v->name = id;
1611  #else
1612  omFreeBinAddr((ADDRESS)id);
1613  #endif
1614  }
1615  else if (pIsConstant(p))
1616  {
1617  v->data = pGetCoeff(p);
1618  pGetCoeff(p)=NULL;
1619  pLmFree(p);
1620  v->rtyp = NUMBER_CMD;
1621  v->name = id;
1622  }
1623  else
1624  {
1625  v->data = p;
1626  v->rtyp = POLY_CMD;
1627  v->name = id;
1628  }
1629  return;
1630  }
1631  }
1632  /* 7. non-local ring: number/poly */
1633  {
1634  BOOLEAN ok=FALSE;
1635  poly p = ((currRing!=NULL) /* ring required */
1636  && (currRingHdl!=NULL)
1637  /*&& (!yyInRingConstruction) - not in decl */
1638  && (IDLEV(currRingHdl)!=myynest)) /* already in case 4/6 */
1639  ? pmInit(id,ok) : (poly)NULL;
1640  if (ok)
1641  {
1642  if (p==NULL)
1643  {
1644  v->data = (void *)nInit(0);
1645  v->rtyp = NUMBER_CMD;
1646  #ifdef HAVE_PLURAL
1647  // in this case we may have monomials equal to 0 in p_Read
1648  v->name = id;
1649  #else
1650  omFreeBinAddr((ADDRESS)id);
1651  #endif
1652  }
1653  else
1654  if (pIsConstant(p))
1655  {
1656  v->data = pGetCoeff(p);
1657  pGetCoeff(p)=NULL;
1658  pLmFree(p);
1659  v->rtyp = NUMBER_CMD;
1660  v->name = id;
1661  }
1662  else
1663  {
1664  v->data = p;
1665  v->rtyp = POLY_CMD;
1666  v->name = id;
1667  }
1668  //if (TEST_V_ALLWARN /*&& (myynest>0)*/
1669  //&& ((r_IsRingVar(id, currRing->names,currRing->N)>=0)
1670  // || ((n_NumberOfParameters(currRing->cf)>0)
1671  // &&(r_IsRingVar(id, (char**)n_ParameterNames(currRing->cf),
1672  // n_NumberOfParameters(currRing->cf))>=0))))
1673  //{
1674  //// WARNING: do not use ring variable names in procedures
1675  // Warn("use of variable >>%s<< in a procedure in line %s",id,my_yylinebuf);
1676  //}
1677  return;
1678  }
1679  }
1680  /* 8. basering ? */
1681  if ((myynest>1)&&(currRingHdl!=NULL))
1682  {
1683  if (strcmp(id,IDID(currRingHdl))==0)
1684  {
1685  if (IDID(currRingHdl)!=id) omFreeBinAddr((ADDRESS)id); /*assume strlen (id) <1000 */
1686  h=currRingHdl;
1687  goto id_found;
1688  }
1689  }
1690  if((v->req_packhdl!=basePack) && (v->req_packhdl==currPack))
1691  {
1692  h=basePack->idroot->get(id,myynest);
1693  if (h!=NULL)
1694  {
1695  if (id!=IDID(h)) omFreeBinAddr((ADDRESS)id); /*assume strlen(id) <1000 */
1696  v->req_packhdl=basePack;
1697  goto id_found;
1698  }
1699  }
1700  }
1701 #ifdef SIQ
1702  else
1703  v->rtyp=DEF_CMD;
1704 #endif
1705  /* 9: _ */
1706  if (strcmp(id,"_")==0)
1707  {
1708  omFreeBinAddr((ADDRESS)id);
1709  v->Copy(&sLastPrinted);
1710  }
1711  else
1712  {
1713  /* 10: everything else */
1714  /* v->rtyp = UNKNOWN;*/
1715  v->name = id;
1716  }
1717  currRingHdl=save_ring;
1718  return;
1719 id_found: // we have an id (in h) found, to set the data in from h
1720  if (IDTYP(h)!=ALIAS_CMD)
1721  {
1722  v->rtyp = IDHDL;
1723  v->flag = IDFLAG(h);
1724  v->attribute=IDATTR(h);
1725  }
1726  else
1727  {
1728  v->rtyp = ALIAS_CMD;
1729  }
1730  v->name = IDID(h);
1731  v->data = (char *)h;
1732  currRingHdl=save_ring;
1733 }
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:61
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:65
void Copy(leftv e)
Definition: subexpr.cc:657
#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:64
package currPack
Definition: ipid.cc:63
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:490

Variable Documentation

int iiCmatrix_index =0
static

Definition at line 1109 of file subexpr.cc.

snumber2 iiNumber2Data[4]
static

Definition at line 1108 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.