My Project
Loading...
Searching...
No Matches
ipassign.cc
Go to the documentation of this file.
1/****************************************
2* Computer Algebra System SINGULAR *
3****************************************/
4/*
5* ABSTRACT: interpreter:
6* assignment of expressions and lists to objects or lists
7*/
8
9#include "kernel/mod2.h"
10
11#define TRANSEXT_PRIVATES
13
14#include "misc/options.h"
15#include "misc/intvec.h"
16
17#include "coeffs/coeffs.h"
18#include "coeffs/numbers.h"
19#include "coeffs/bigintmat.h"
20
21
23
25#include "polys/matpol.h"
27#include "polys/nc/nc.h"
28#include "polys/nc/sca.h"
29#include "polys/prCopy.h"
30
31#include "kernel/polys.h"
32#include "kernel/ideals.h"
36#include "kernel/GBEngine/syz.h"
37
38//#include "weight.h"
39#include "tok.h"
40#include "ipid.h"
41#include "idrec.h"
42#include "subexpr.h"
43#include "lists.h"
44#include "ipconv.h"
45#include "attrib.h"
46#include "links/silink.h"
47#include "ipshell.h"
48#include "blackbox.h"
49#include "Singular/number2.h"
50
51/*=================== proc =================*/
53{
54 si_echo=(int)((long)(a->Data()));
55 return FALSE;
56}
58{
59 printlevel=(int)((long)(a->Data()));
60 return FALSE;
61}
63{
64 colmax=(int)((long)(a->Data()));
65 return FALSE;
66}
68{
69 timerv=(int)((long)(a->Data()));
70 initTimer();
71 return FALSE;
72}
73#ifdef HAVE_GETTIMEOFDAY
75{
76 rtimerv=(int)((long)(a->Data()));
77 initRTimer();
78 return FALSE;
79}
80#endif
82{
83 Kstd1_deg=(int)((long)(a->Data()));
84 if (Kstd1_deg!=0)
86 else
87 si_opt_1 &=(~Sy_bit(OPT_DEGBOUND));
88 return FALSE;
89}
91{
92 Kstd1_mu=(int)((long)(a->Data()));
93 if (Kstd1_mu!=0)
95 else
96 si_opt_1 &=(~Sy_bit(OPT_MULTBOUND));
97 return FALSE;
98}
100{
101 traceit=(int)((long)(a->Data()));
102 return FALSE;
103}
105{
106 if (currRing != NULL)
107 {
108 BOOLEAN shortOut = (BOOLEAN)((long)a->Data());
109 if (shortOut==0)
110 currRing->ShortOut = 0;
111 else
112 {
113 if (currRing->CanShortOut)
114 currRing->ShortOut = 1;
115 }
116 shortOut = currRing->ShortOut;
117 coeffs cf = currRing->cf;
118 while (nCoeff_is_Extension(cf))
119 {
120 cf->extRing->ShortOut = shortOut;
121 assume(cf->extRing != NULL);
122 cf = cf->extRing->cf;
123 }
124 }
125 return FALSE;
126}
128{
129 switch(IDTYP(h))
130 {
131 case NUMBER_CMD:
132 {
133 number n=(number)IDDATA(h);
134 number one = nInit(1);
135 number nn=nMult(n,one);
136 nDelete(&n);nDelete(&one);
137 IDDATA(h)=(char*)nn;
138 break;
139 }
140 case VECTOR_CMD:
141 case POLY_CMD:
142 {
143 poly p=(poly)IDDATA(h);
145 break;
146 }
147 case IDEAL_CMD:
148 case MODUL_CMD:
149 case MAP_CMD:
150 case MATRIX_CMD:
151 {
152 int i;
153 ideal I=(ideal)IDDATA(h);
154 for(i=IDELEMS(I)-1;i>=0;i--)
155 I->m[i]=p_MinPolyNormalize(I->m[i], currRing);
156 break;
157 }
158 case LIST_CMD:
159 {
160 lists L=(lists)IDDATA(h);
161 int i=L->nr;
162 for(;i>=0;i--)
163 {
164 jjMINPOLY_red((idhdl)&(L->m[i]));
165 }
166 break;
167 }
168 default:
169 //case RESOLUTION_CMD:
170 Werror("type %d too complex...set minpoly before",IDTYP(h)); break;
171 }
172}
173// change the coeff cf=K[x] (of type n_transExt) to K[x]/a
174// return NULL in error case
176{
177 if ( !nCoeff_is_transExt(cf) )
178 {
179 if(!nCoeff_is_algExt(cf) )
180 {
181 WerrorS("cannot set minpoly for these coeffients");
182 return NULL;
183 }
184 }
185 if (rVar(cf->extRing)!=1)
186 {
187 WerrorS("only univariate minpoly allowed");
188 return NULL;
189 }
190
191 number p = n_Copy(a,cf);
192 n_Normalize(p, cf);
193
194 if (n_IsZero(p, cf))
195 {
196 n_Delete(&p, cf);
197 return cf;
198 }
199
201
202 A.r = rCopy(cf->extRing); // Copy ground field!
203 // if minpoly was already set:
204 if( cf->extRing->qideal != NULL ) id_Delete(&(A.r->qideal),A.r);
205 ideal q = idInit(1,1);
206 if ((p==NULL) ||(NUM((fraction)p)==NULL))
207 {
208 WerrorS("Could not construct the alg. extension: minpoly==0");
209 // cleanup A: TODO
210 rDelete( A.r );
211 return NULL;
212 }
213 if (DEN((fraction)(p)) != NULL) // minpoly must be a fraction with poly numerator...!!
214 {
215 poly n=DEN((fraction)(p));
216 if(!p_IsConstant(n,cf->extRing))
217 {
218 WarnS("denominator must be constant - ignoring it");
219 }
220 p_Delete(&n,cf->extRing);
221 DEN((fraction)(p))=NULL;
222 }
223
224 q->m[0] = NUM((fraction)p);
225 A.r->qideal = q;
226
228 NUM((fractionObject *)p) = NULL; // not necessary, but still...
230
232 if (new_cf==NULL)
233 {
234 WerrorS("Could not construct the alg. extension: illegal minpoly?");
235 // cleanup A: TODO
236 rDelete( A.r );
237 return NULL;
238 }
239 return new_cf;
240}
241
243{
244 if( !nCoeff_is_transExt(currRing->cf) && (currRing->idroot == NULL) && n_IsZero((number)a->Data(), currRing->cf) )
245 {
246#ifndef SING_NDEBUG
247 WarnS("Set minpoly over non-transcendental ground field to 0?!");
248 Warn("in >>%s<<",my_yylinebuf);
249#endif
250 return FALSE;
251 }
252
253
254 if ( !nCoeff_is_transExt(currRing->cf) )
255 {
256 WarnS("Trying to set minpoly over non-transcendental ground field...");
257 if(!nCoeff_is_algExt(currRing->cf) )
258 {
259 WerrorS("cannot set minpoly for these coeffients");
260 return TRUE;
261 }
262 }
263 if ((rVar(currRing->cf->extRing)!=1)
264 && !n_IsZero((number)a->Data(), currRing->cf) )
265 {
266 WerrorS("only univarite minpoly allowed");
267 return TRUE;
268 }
269
271 if ( currRing->idroot != NULL )
272 {
273 redefine_from_algext=(currRing->cf->extRing->qideal!=NULL);
274#ifndef SING_NDEBUG
275// idhdl p = currRing->idroot;
276//
277// WarnS("no minpoly allowed if there are local objects belonging to the basering: ");
278//
279// while(p != NULL)
280// {
281// PrintS(p->String(TRUE)); Print("(%s)\n",IDID(p));
282// p = p->next;
283// }
284#endif
285 }
286
287// assume (currRing->idroot==NULL);
288
290 n_Normalize(p, currRing->cf);
291
292 if (n_IsZero(p, currRing->cf))
293 {
294 n_Delete(&p, currRing->cf);
296 {
297#ifndef SING_NDEBUG
298 WarnS("minpoly is already 0...");
299#endif
300 return FALSE;
301 }
302 WarnS("cannot set minpoly to 0 / alg. extension?");
303 return TRUE;
304 }
305
306 // remove all object currently in the ring
307 while(currRing->idroot!=NULL)
308 {
309#ifndef SING_NDEBUG
310// Warn("killing a local object due to minpoly change: %s", IDID(currRing->idroot));
311#endif
312 killhdl2(currRing->idroot,&(currRing->idroot),currRing);
313 }
314
316
317 A.r = rCopy(currRing->cf->extRing); // Copy ground field!
318 // if minpoly was already set:
319 if( currRing->cf->extRing->qideal != NULL ) id_Delete(&(A.r->qideal),A.r);
320 ideal q = idInit(1,1);
321 if ((p==NULL) ||(NUM((fraction)p)==NULL))
322 {
323 WerrorS("Could not construct the alg. extension: minpoly==0");
324 // cleanup A: TODO
325 rDelete( A.r );
326 return TRUE;
327 }
328 if (!redefine_from_algext && (DEN((fraction)(p)) != NULL)) // minpoly must be a fraction with poly numerator...!!
329 {
330 poly n=DEN((fraction)(p));
331 if(!p_IsConstant(n,currRing->cf->extRing))
332 {
333 WarnS("denominator must be constant - ignoring it");
334 }
335 p_Delete(&n,currRing->cf->extRing);
336 DEN((fraction)(p))=NULL;
337 }
338
339 if (redefine_from_algext) q->m[0]=(poly)p;
340 else q->m[0] = NUM((fraction)p);
341 A.r->qideal = q;
342
343#if 0
344 PrintS("\nTrying to conver the currRing into an algebraic field: ");
345 PrintS("Ground poly. ring: \n");
346 rWrite( A.r );
347 PrintS("\nGiven MinPOLY: ");
348 p_Write( A.i->m[0], A.r );
349#endif
350
351 // :(
352// NUM((fractionObject *)p) = NULL; // makes 0/ NULL fraction - which should not happen!
353// n_Delete(&p, currRing->cf); // doesn't expect 0/ NULL :(
355 {
357 NUM((fractionObject *)p) = NULL; // not necessary, but still...
359 }
360
362 if (new_cf==NULL)
363 {
364 WerrorS("Could not construct the alg. extension: llegal minpoly?");
365 // cleanup A: TODO
366 rDelete( A.r );
367 return TRUE;
368 }
369 else
370 {
372 }
373 return FALSE;
374}
375
376
378{
379 poly p=(poly)a->CopyD(POLY_CMD);
380 pDelete(&(currRing->ppNoether));
381 (currRing->ppNoether)=p;
382 return FALSE;
383}
384/*=================== proc =================*/
385static void jiAssignAttr(leftv l,leftv r)
386{
387 // get the attribute of th right side
388 // and set it to l
389 leftv rv=r->LData();
390 if (rv!=NULL)
391 {
392 if (rv->e==NULL)
393 {
394 if (rv->attribute!=NULL)
395 {
396 attr la;
397 if (r->rtyp!=IDHDL)
398 {
399 la=rv->attribute;
400 rv->attribute=NULL;
401 }
402 else
403 {
404 la=rv->attribute->Copy();
405 }
406 l->attribute=la;
407 }
408 l->flag=rv->flag;
409 }
410 }
411 if (l->rtyp==IDHDL)
412 {
413 idhdl h=(idhdl)l->data;
414 IDATTR(h)=l->attribute;
415 IDFLAG(h)=l->flag;
416 }
417}
419{
420 if (e==NULL)
421 {
422 res->data=(void *)a->Data();
423 jiAssignAttr(res,a);
424 }
425 else
426 {
427 int i=e->start-1;
428 if (i<0)
429 {
430 Werror("index[%d] must be positive",i+1);
431 return TRUE;
432 }
433 intvec *iv=(intvec *)res->data;
434 if (e->next==NULL)
435 {
436 if (i>=iv->length())
437 {
438 intvec *iv1=new intvec(i+1);
439 (*iv1)[i]=(int)((long)(a->Data()));
440 intvec *ivn=ivAdd(iv,iv1);
441 delete iv;
442 delete iv1;
443 res->data=(void *)ivn;
444 }
445 else
446 (*iv)[i]=(int)((long)(a->Data()));
447 }
448 else
449 {
450 int c=e->next->start;
451 if ((i>=iv->rows())||(c<1)||(c>iv->cols()))
452 {
453 Werror("wrong range [%d,%d] in intmat %s(%d,%d)",i+1,c,res->Name(),iv->rows(),iv->cols());
454 return TRUE;
455 }
456 else
457 IMATELEM(*iv,i+1,c) = (int)((long)(a->Data()));
458 }
459 }
460 return FALSE;
461}
463{
465 if (Sy_inset(FLAG_RING,res->flag))
466 {
467 if ((res-1)->data!=currRing)
468 {
469 if ((res-1)->data!=NULL)
470 {
471 old_r=(ring)(res-1)->data;
473 }
474 (res-1)->data=rIncRefCnt(currRing);
475 (res-1)->rtyp=RING_CMD;
476 }
477 }
479 return old_r;
480}
482{
484 if (errorreported) return TRUE;
485 if (res->data!=NULL) nDelete((number *)&res->data);
486 nNormalize(p);
487 res->data=(void *)p;
488 jiAssignAttr(res,a);
489 return FALSE;
490}
491#ifdef SINGULAR_4_2
493{
495 if (e==NULL)
496 {
497 if (res->data!=NULL)
498 {
499 number2 nn=(number2)res->data;
500 n2Delete(nn);
501 }
502 res->data=(void *)n;
503 jiAssignAttr(res,a);
504 }
505 else
506 {
507 int i=e->start-1;
508 if (i<0)
509 {
510 Werror("index[%d] must be positive",i+1);
511 return TRUE;
512 }
513 bigintmat *iv=(bigintmat *)res->data;
514 if (e->next==NULL)
515 {
516 WerrorS("only one index given");
517 return TRUE;
518 }
519 else
520 {
521 int c=e->next->start;
522 if ((i>=iv->rows())||(c<1)||(c>iv->cols()))
523 {
524 Werror("wrong range [%d,%d] in cmatrix %s(%d,%d)",i+1,c,res->Name(),iv->rows(),iv->cols());
525 return TRUE;
526 }
527 else if (iv->basecoeffs()==n->cf)
528 {
529 n_Delete((number *)&BIMATELEM(*iv,i+1,c),iv->basecoeffs());
530 BIMATELEM(*iv,i+1,c) = n->n;
531 }
532 else
533 {
534 WerrorS("different base");
535 return TRUE;
536 }
537 }
538 }
539 jiAssignAttr(res,a);
540 return FALSE;
541}
543{
544 if (e==NULL)
545 {
546 if (res->data!=NULL)
547 {
548 number2 nn=(number2)res->data;
549 number2 n=n2Init((long)a->Data(),nn->cf);
550 n2Delete(nn);
551 res->data=(void *)n;
552 }
553 else
554 {
555 WerrorS("no Ring avialable for conversion from int");
556 return TRUE;
557 }
558 }
559 else
560 {
561 int i=e->start-1;
562 if (i<0)
563 {
564 Werror("index[%d] must be positive",i+1);
565 return TRUE;
566 }
567 bigintmat *iv=(bigintmat *)res->data;
568 if (e->next==NULL)
569 {
570 WerrorS("only one index given");
571 return TRUE;
572 }
573 else
574 {
575 int c=e->next->start;
576 if ((i>=iv->rows())||(c<1)||(c>iv->cols()))
577 {
578 Werror("wrong range [%d,%d] in cmatrix %s(%d,%d)",i+1,c,res->Name(),iv->rows(),iv->cols());
579 return TRUE;
580 }
581 else
582 {
583 n_Delete((number *)&BIMATELEM(*iv,i+1,c),iv->basecoeffs());
584 BIMATELEM(*iv,i+1,c) = n_Init((long)a->Data(),iv->basecoeffs());
585 }
586 }
587 }
588 return FALSE;
589}
591{
592 if (e==NULL)
593 {
594 if (res->data!=NULL)
595 {
596 number2 nn=(number2)res->data;
597 number2 n=(number2)omAlloc(sizeof(*n));
598 n->cf=currRing->cf; n->cf->ref++;
599 n->n=(number)a->CopyD(NUMBER_CMD);
600 n2Delete(nn);
601 res->data=(void *)n;
602 }
603 else
604 {
605 number2 n=(number2)omAlloc(sizeof(*n));
606 n->cf=currRing->cf; n->cf->ref++;
607 n->n=(number)a->CopyD(NUMBER_CMD);
608 res->data=(void *)n;
609 }
610 }
611 else return TRUE; // TODO: list elements
612 return FALSE;
613}
615{
616 poly2 n=(poly2)a->CopyD(CPOLY_CMD);
617 if (e==NULL)
618 {
619 if (res->data!=NULL)
620 {
621 poly2 nn=(poly2)res->data;
622 p2Delete(nn);
623 }
624 res->data=(void *)n;
625 jiAssignAttr(res,a);
626 }
627 else
628 {
629 int i=e->start-1;
630 if (i<0)
631 {
632 Werror("index[%d] must be positive",i+1);
633 return TRUE;
634 }
635 WerrorS("not yet"); // TODO: list elem
636 return TRUE;
637 }
638 jiAssignAttr(res,a);
639 return FALSE;
640}
642{
643 if (e==NULL)
644 {
645 if (res->data!=NULL)
646 {
647 poly2 nn=(poly2)res->data;
648 poly2 n=(poly2)omAlloc(sizeof(*n));
649 n->cf=currRing; n->cf->ref++;
650 n->n=(poly)a->CopyD(POLY_CMD);
651 p2Delete(nn);
652 res->data=(void *)n;
653 }
654 else
655 {
656 poly2 n=(poly2)omAlloc(sizeof(*n));
657 n->cf=currRing; n->cf->ref++;
658 n->n=(poly)a->CopyD(POLY_CMD);
659 res->data=(void *)n;
660 }
661 }
662 else return TRUE; // TODO: list elements
663 return FALSE;
664}
665#endif
667{
669 if (e==NULL)
670 {
671 if (res->data!=NULL) n_Delete((number *)&res->data,coeffs_BIGINT);
672 res->data=(void *)p;
673 }
674 else
675 {
676 int i=e->start-1;
677 if (i<0)
678 {
679 Werror("index[%d] must be positive",i+1);
680 return TRUE;
681 }
682 bigintmat *iv=(bigintmat *)res->data;
683 if ((e->next==NULL)&&(res->rtyp==BIGINTMAT_CMD))
684 {
685 WerrorS("only one index given");
686 return TRUE;
687 }
688 else
689 {
690 int c;
691 if (res->rtyp==BIGINTMAT_CMD) c=e->next->start;
692 else { c=i+1; i=0;}
693 if ((i>=iv->rows())||(c<1)||(c>iv->cols()))
694 {
695 Werror("wrong range [%d,%d] in bigintmat/bigintvec %s(%d,%d)",i+1,c,res->Name(),iv->rows(),iv->cols());
696 return TRUE;
697 }
698 else
699 {
700 n_Delete((number *)&BIMATELEM(*iv,i+1,c),iv->basecoeffs());
701 BIMATELEM(*iv,i+1,c) = p;
702 }
703 }
704 }
705 jiAssignAttr(res,a);
706 return FALSE;
707}
709{
711 if (errorreported) return TRUE;
712 if (res->data!=NULL) ((lists)res->data)->Clean();
713 int add_row_shift = 0;
714 intvec *weights=(intvec*)atGet(a,"isHomog",INTVEC_CMD);
715 if (weights!=NULL) add_row_shift=weights->min_in();
716 res->data=(void *)syConvRes(r,TRUE,add_row_shift);
717 //jiAssignAttr(res,a);
718 return FALSE;
719}
721{
723 if (errorreported) return TRUE;
724 if (res->data!=NULL) ((lists)res->data)->Clean();
725 res->data=(void *)l;
726 jiAssignAttr(res,a);
727 return FALSE;
728}
730{
731 poly p=(poly)a->CopyD(POLY_CMD);
732 if (errorreported) return TRUE;
733 pNormalize(p);
734 if (e==NULL)
735 {
736 if ((p!=NULL) && TEST_V_QRING && (currRing->qideal!=NULL)
737 && (!hasFlag(a,FLAG_QRING)))
738 {
741 }
742 if (res->data!=NULL) pDelete((poly*)&res->data);
743 res->data=(void*)p;
744 jiAssignAttr(res,a);
745 }
746 else
747 {
748 int i,j;
749 matrix m=(matrix)res->data;
750 i=e->start;
751 if (e->next==NULL)
752 {
753 j=i; i=1;
754 // for all ideal like data types: check indices
755 if (j>MATCOLS(m))
756 {
757 if (TEST_V_ALLWARN)
758 {
759 Warn("increase ideal %d -> %d in %s(%d):%s",MATCOLS(m),j,VoiceName(),VoiceLine(),my_yylinebuf);
760 }
761 pEnlargeSet(&(m->m),MATCOLS(m),j-MATCOLS(m));
762 MATCOLS(m)=j;
763 }
764 else if (j<=0)
765 {
766 Werror("index[%d] must be positive",j/*e->start*/);
767 return TRUE;
768 }
769 }
770 else
771 {
772 // for matrices: indices are correct (see ipExprArith3(..,'['..) )
773 j=e->next->start;
774 }
775 if ((p!=NULL) && TEST_V_QRING && (currRing->qideal!=NULL))
776 {
778 }
779 if (res->rtyp==SMATRIX_CMD)
780 {
781 p=pSub(p,SMATELEM(m,i-1,j-1,currRing));
782 pSetCompP(p,i);
783 m->m[j-1]=pAdd(m->m[j-1],p);
784 }
785 else
786 {
787 pDelete(&MATELEM(m,i,j));
788 MATELEM(m,i,j)=p;
789 /* for module: update rank */
790 if ((p!=NULL) && (pGetComp(p)!=0))
791 {
792 m->rank=si_max(m->rank,pMaxComp(p));
793 }
794 }
795 }
796 return FALSE;
797}
799{
800 if (/*(*/ res->rtyp!=INTMAT_CMD /*)*/) /*|| (e!=NULL) - TRUE because of type int */
801 {
802 // no error message: assignment simply fails
803 return TRUE;
804 }
805 intvec* am=(intvec*)a->CopyD(INTMAT_CMD);
806 if ((am->rows()!=1) || (am->cols()!=1))
807 {
808 WerrorS("must be 1x1 intmat");
809 delete am;
810 return TRUE;
811 }
812 intvec* m=(intvec *)res->data;
813 // indices are correct (see ipExprArith3(..,'['..) )
814 int i=e->start;
815 int j=e->next->start;
816 IMATELEM(*m,i,j)=IMATELEM(*am,1,1);
817 delete am;
818 return FALSE;
819}
821{
822 if (/*(*/ res->rtyp!=MATRIX_CMD /*)*/) /*|| (e!=NULL) - TRUE because of type poly */
823 {
824 // no error message: assignment simply fails
825 return TRUE;
826 }
828 if (errorreported) return TRUE;
829 if ((MATROWS(am)!=1) || (MATCOLS(am)!=1))
830 {
831 WerrorS("must be 1x1 matrix");
832 idDelete((ideal *)&am);
833 return TRUE;
834 }
835 matrix m=(matrix)res->data;
836 // indices are correct (see ipExprArith3(..,'['..) )
837 int i=e->start;
838 int j=e->next->start;
839 pDelete(&MATELEM(m,i,j));
840 pNormalize(MATELEM(am,1,1));
841 MATELEM(m,i,j)=MATELEM(am,1,1);
842 MATELEM(am,1,1)=NULL;
843 idDelete((ideal *)&am);
844 return FALSE;
845}
847{
848 if (e==NULL)
849 {
850 void* tmp = res->data;
851 res->data=(void *)a->CopyD(STRING_CMD);
852 jiAssignAttr(res,a);
853 omfree(tmp);
854 }
855 else
856 {
857 char *s=(char *)res->data;
858 if ((e->start>0)&&(e->start<=(int)strlen(s)))
859 s[e->start-1]=(char)(*((char *)a->Data()));
860 else
861 {
862 Werror("string index %d out of range 1..%d",e->start,(int)strlen(s));
863 return TRUE;
864 }
865 }
866 return FALSE;
867}
869{
870 extern procinfo *iiInitSingularProcinfo(procinfo *pi, const char *libname,
871 const char *procname, int line,
872 long pos, BOOLEAN pstatic=FALSE);
873 if(res->data!=NULL) piKill((procinfo *)res->data);
874 if(a->Typ()==STRING_CMD)
875 {
876 res->data = (void *)omAlloc0Bin(procinfo_bin);
877 ((procinfo *)(res->data))->language=LANG_NONE;
878 iiInitSingularProcinfo((procinfo *)res->data,"",res->name,0,0);
879 ((procinfo *)res->data)->data.s.body=(char *)a->CopyD(STRING_CMD);
880 }
881 else
882 res->data=(void *)a->CopyD(PROC_CMD);
883 jiAssignAttr(res,a);
884 return FALSE;
885}
887{
888 //if ((res->data==NULL) || (res->Typ()==a->Typ()))
889 {
890 if (res->data!=NULL) delete ((intvec *)res->data);
891 res->data=(void *)a->CopyD(INTVEC_CMD);
892 jiAssignAttr(res,a);
893 return FALSE;
894 }
895#if 0
896 else
897 {
898 intvec *r=(intvec *)(res->data);
899 intvec *s=(intvec *)(a->Data());
900 int i=si_min(r->length(), s->length())-1;
901 for(;i>=0;i--)
902 {
903 (*r)[i]=(*s)[i];
904 }
905 return FALSE; //(r->length()< s->length());
906 }
907#endif
908}
910{
911 //Warn("bigintvec -> intvec in >>%s<<",my_yylinebuf);
912 if (res->data!=NULL) delete ((intvec *)res->data);
913 bigintmat *b=(bigintmat*)a->Data();
914 intvec *iv=new intvec(1,b->cols());
915 for(int i=0;i<b->cols();i++)
916 {
917 (*iv)[i]=n_Int(BIMATELEM(*b,1,i+1),coeffs_BIGINT);
918 }
919 res->data=(void *)iv;
920 jiAssignAttr(res,a);
921 return FALSE;
922}
924{
925 if (res->data!=NULL) delete ((bigintmat *)res->data);
926 res->data=(void *)a->CopyD();
927 jiAssignAttr(res,a);
928 return FALSE;
929}
931{
932 if (res->data!=NULL) delete ((bigintmat *)res->data);
933 intvec *aa=(intvec*)a->Data();
934 int l=aa->rows();
936 for(int i=0;i<l;i++)
937 {
939 n_Delete(&BIMATELEM((*bim),1,i+1), coeffs_BIGINT);
940 BIMATELEM((*bim),1,i+1)=tp;
941 }
942 res->data=(void*)bim;
943 jiAssignAttr(res,a);
944 return FALSE;
945}
947// there should be no assign bucket:=bucket, here we have poly:=bucket
948{
950 if (errorreported) return TRUE;
951 poly p; int l;
953 sleftv tmp;
954 tmp.Init();
955 tmp.rtyp=POLY_CMD;
956 tmp.data=p;
957 return jiA_POLY(res,&tmp,e);
958}
960{
962 if (errorreported) return TRUE;
963 if (res->data!=NULL) idDelete((ideal*)&res->data);
964 res->data=(void*)I;
965 if (a->rtyp==IDHDL) id_Normalize((ideal)a->Data(), currRing);
966 else id_Normalize(I/*(ideal)res->data*/, currRing);
967 jiAssignAttr(res,a);
968 if (((res->rtyp==IDEAL_CMD)||(res->rtyp==MODUL_CMD))
969 && (IDELEMS(I/*(ideal)(res->data)*/)==1)
970 && (currRing->qideal==NULL)
972 )
973 {
975 }
976 if (TEST_V_QRING && (currRing->qideal!=NULL))
977 {
980 }
981 return FALSE;
982}
984{
986 if (errorreported) return TRUE;
987 if (res->data!=NULL) syKillComputation((syStrategy)res->data);
988 res->data=(void*)R;
989 jiAssignAttr(res,a);
990 return FALSE;
991}
993/* module = poly */
994{
995 ideal I=idInit(1,1);
996 I->m[0]=(poly)a->CopyD(POLY_CMD);
997 if (errorreported) return TRUE;
998 if (I->m[0]!=NULL) pSetCompP(I->m[0],1);
999 pNormalize(I->m[0]);
1000 if (res->data!=NULL) idDelete((ideal*)&res->data);
1001 res->data=(void *)I;
1002 if (TEST_V_QRING && (currRing->qideal!=NULL))
1003 {
1005 else jjNormalizeQRingId(res);
1006 }
1007 return FALSE;
1008}
1010{
1012 if (errorreported) return TRUE;
1013 if (TEST_V_ALLWARN)
1014 if (MATROWS(m)>1)
1015 Warn("assign matrix with %d rows to an ideal in >>%s<<",MATROWS(m),my_yylinebuf);
1017 ((ideal)m)->rank=1;
1018 MATROWS(m)=1;
1020 if (res->data!=NULL) idDelete((ideal*)&res->data);
1021 res->data=(void *)m;
1022 if (TEST_V_QRING && (currRing->qideal!=NULL))
1023 {
1025 else jjNormalizeQRingId(res);
1026 }
1027 return FALSE;
1028}
1030{
1032 if (errorreported) return TRUE;
1033 if (m->rank>1)
1034 {
1035 Werror("rank of module is %ld in assignment to ideal",m->rank);
1036 return TRUE;
1037 }
1038 if (res->data!=NULL) idDelete((ideal*)&res->data);
1040 id_Shift(m,-1,currRing);
1041 m->rank=1;
1042 res->data=(void *)m;
1043 if (TEST_V_QRING && (currRing->qideal!=NULL))
1044 {
1046 else jjNormalizeQRingId(res);
1047 }
1048 return FALSE;
1049}
1051{
1052 si_link l=(si_link)res->data;
1053
1054 if (l!=NULL) slCleanUp(l);
1055
1056 if (a->Typ() == STRING_CMD)
1057 {
1058 if (l == NULL)
1059 {
1061 res->data = (void *) l;
1062 }
1063 return slInit(l, (char *) a->Data());
1064 }
1065 else if (a->Typ() == LINK_CMD)
1066 {
1067 if (l != NULL) omFreeBin(l, sip_link_bin);
1068 res->data = slCopy((si_link)a->Data());
1069 return FALSE;
1070 }
1071 return TRUE;
1072}
1073// assign map -> map
1075{
1076 if (res->data!=NULL)
1077 {
1078 omFreeBinAddr((ADDRESS)((map)res->data)->preimage);
1079 ((map)res->data)->preimage=NULL;
1080 idDelete((ideal*)&res->data);
1081 }
1082 res->data=(void *)a->CopyD(MAP_CMD);
1083 if (errorreported) return TRUE;
1084 jiAssignAttr(res,a);
1085 return FALSE;
1086}
1087// assign ideal -> map
1089{
1090 map f=(map)res->data;
1091 char *rn=f->preimage; // save the old/already assigned preimage ring name
1092 f->preimage=NULL;
1093 idDelete((ideal *)&f);
1094 res->data=(void *)a->CopyD(IDEAL_CMD);
1095 if (errorreported) return TRUE;
1096 f=(map)res->data;
1098 f->preimage = rn;
1099 return FALSE;
1100}
1102{
1103 // the follwing can only happen, if:
1104 // - the left side is of type qring AND not an id
1105 if ((e!=NULL)||(res->rtyp!=IDHDL))
1106 {
1107 WerrorS("qring_id expected");
1108 return TRUE;
1109 }
1110
1111 ring old_ring=(ring)res->Data();
1112
1113 coeffs newcf = currRing->cf;
1114 ideal id = (ideal)a->Data(); //?
1115 if (errorreported) return TRUE;
1116 const int cpos = idPosConstant(id);
1118 if (cpos >= 0)
1119 {
1121 if(newcf == NULL)
1122 return TRUE;
1123 }
1124 //qr=(ring)res->Data();
1125 //if (qr!=NULL) omFreeBin((ADDRESS)qr, ip_sring_bin);
1126 ring qr = rCopy(currRing);
1127 assume(qr->cf == currRing->cf);
1128
1129 if ( qr->cf != newcf )
1130 {
1131 nKillChar ( qr->cf ); // ???
1132 qr->cf = newcf;
1133 }
1134 // we have to fill it, but the copy also allocates space
1135 idhdl h=(idhdl)res->data; // we have res->rtyp==IDHDL
1136 IDRING(h)=qr;
1137
1138 ideal qid;
1139
1140 if((rField_is_Ring(currRing)) && (cpos != -1))
1141 {
1142 int i, j;
1143 int *perm = (int *)omAlloc0((qr->N+1)*sizeof(int));
1144
1145 for(i=qr->N;i>0;i--)
1146 perm[i]=i;
1147
1149 qid = idInit(IDELEMS(id)-1,1);
1150 for(i = 0, j = 0; i<IDELEMS(id); i++)
1151 if( i != cpos )
1152 qid->m[j++] = p_PermPoly(id->m[i], perm, currRing, qr, nMap, NULL, 0);
1153 }
1154 else
1155 qid = idrCopyR(id,currRing,qr);
1156
1158 //idPrint(qid);
1159 if ((idElem(qid)>1) || rIsSCA(currRing) || (currRing->qideal!=NULL))
1160 assumeStdFlag(a);
1161
1162 if (currRing->qideal!=NULL) /* we are already in a qring! */
1163 {
1164 ideal tmp=idSimpleAdd(qid,currRing->qideal);
1165 // both ideals should be GB, so dSimpleAdd is sufficient
1166 idDelete(&qid);
1167 qid=tmp;
1168 // delete the qr copy of quotient ideal!!!
1169 idDelete(&qr->qideal);
1170 }
1171 if (idElem(qid)==0)
1172 {
1173 qr->qideal = NULL;
1175 IDTYP(h)=RING_CMD;
1176 }
1177 else
1178 qr->qideal = qid;
1179
1180 // qr is a copy of currRing with the new qideal!
1181 #ifdef HAVE_PLURAL
1182 if(rIsPluralRing(currRing) &&(qr->qideal!=NULL))
1183 {
1184 if (!hasFlag(a,FLAG_TWOSTD))
1185 {
1186 Warn("%s is no twosided standard basis",a->Name());
1187 }
1188
1190 {
1191// WarnS("error in nc_SetupQuotient");
1192 }
1193 }
1194 #endif
1195 //rWrite(qr);
1196 rSetHdl((idhdl)res->data);
1197 if (old_ring!=NULL)
1198 {
1200 }
1201 return FALSE;
1202}
1203
1205{
1207 if ((e!=NULL)||(res->rtyp!=IDHDL))
1208 {
1209 //WerrorS("id expected");
1210 //return TRUE;
1211 have_id=FALSE;
1212 }
1213 ring r=(ring)a->Data();
1214 if ((r==NULL)||(r->cf==NULL)) return TRUE;
1215 if (have_id)
1216 {
1217 idhdl rl=(idhdl)res->data;
1218 if (IDRING(rl)!=NULL) rKill(rl);
1219 IDRING(rl)=r;
1220 if ((IDLEV((idhdl)a->data)!=myynest) && (r==currRing))
1221 currRingHdl=(idhdl)res->data;
1222 }
1223 else
1224 {
1225 if (e==NULL) res->data=(char *)r;
1226 else
1227 {
1228 WerrorS("id expected");
1229 return TRUE;
1230 }
1231 }
1232 rIncRefCnt(r);
1233 jiAssignAttr(res,a);
1234 return FALSE;
1235}
1237{
1238 res->data=(void *)a->CopyD(PACKAGE_CMD);
1239 jiAssignAttr(res,a);
1240 return FALSE;
1241}
1243{
1244 res->data=(void *)0;
1245 return FALSE;
1246}
1248{
1249 coeffs r=(coeffs)a->Data();
1250 if (errorreported) return TRUE;
1251 if (r==NULL) return TRUE;
1252 if (res->data!=NULL) nKillChar((coeffs)res->data);
1253 res->data=(void *)a->CopyD(CRING_CMD);
1254 jiAssignAttr(res,a);
1255 return FALSE;
1256}
1257
1258/*=================== table =================*/
1259#define IPASSIGN
1260#define D(A) A
1261#define NULL_VAL NULL
1262#include "table.h"
1263/*=================== operations ============================*/
1264/*2
1265* assign a = b
1266*/
1268{
1269 if (rt==0)
1270 {
1271 if (!errorreported) Werror("`%s` is undefined",r->Fullname());
1272 return TRUE;
1273 }
1274
1275 int lt=l->Typ();
1276 if (lt==0)
1277 {
1278 if (!errorreported) Werror("left side `%s` is undefined",l->Fullname());
1279 return TRUE;
1280 }
1281 if(rt==NONE)
1282 {
1283 if ((!TEST_V_ASSIGN_NONE)||(lt!=DEF_CMD))
1284 {
1285 WarnS("right side is not a datum, assignment ignored");
1286 Warn("in line >>%s<<",my_yylinebuf);
1287 // if (!errorreported)
1288 // WerrorS("right side is not a datum");
1289 //return TRUE;
1290 }
1291 return FALSE;
1292 }
1293
1294 if (lt==DEF_CMD)
1295 {
1296
1297 if (TEST_V_ALLWARN
1298 && (rt!=RING_CMD)
1299 && (l->name!=NULL)
1300 && (l->e==NULL)
1301 && (iiCurrArgs==NULL) /* not in proc header */
1302 )
1303 {
1304 Warn("use `%s` instead of `def` in %s:%d:%s",Tok2Cmdname(rt),
1306 }
1307 if (l->rtyp==IDHDL)
1308 {
1309 if((currRingHdl==NULL) && RingDependend(rt))
1310 {
1311 WerrorS("basering required");
1312 return TRUE;
1313 }
1314 if (rt==BUCKET_CMD) IDTYP((idhdl)l->data)=POLY_CMD;
1315 else IDTYP((idhdl)l->data)=rt;
1316 }
1317 else if (l->name!=NULL)
1318 {
1319 int rrt;
1320 if (rt==BUCKET_CMD) rrt=POLY_CMD;
1321 else rrt=rt;
1322 sleftv ll;
1324 memcpy(l,&ll,sizeof(sleftv));
1325 }
1326 else
1327 {
1328 if (rt==BUCKET_CMD) l->rtyp=POLY_CMD;
1329 else l->rtyp=rt;
1330 }
1331 lt=l->Typ();
1332 }
1333 else
1334 {
1335 if ((l->data==r->data)&&(l->e==NULL)&&(r->e==NULL))
1336 return FALSE;
1337 }
1338 leftv ld=l;
1339 if (l->rtyp==IDHDL)
1340 {
1341 if (lt!=RING_CMD)
1342 ld=(leftv)l->data;
1343 }
1344 else if (toplevel)
1345 {
1346 WerrorS("error in assign: left side is not an l-value");
1347 return TRUE;
1348 }
1349 if (lt>MAX_TOK)
1350 {
1352#ifdef BLACKBOX_DEVEL
1353 Print("bb-assign: bb=%lx\n",bb);
1354#endif
1355 return (bb==NULL) || bb->blackbox_Assign(l,r);
1356 }
1357 if ((is_qring)
1358 &&(lt==RING_CMD)
1359 &&(rt==RING_CMD))
1360 {
1361 Warn("qring .. = <ring>; is misleading in >>%s<<",my_yylinebuf);
1362 }
1363 int start=0;
1364 while ((dAssign[start].res!=lt)
1365 && (dAssign[start].res!=0)) start++;
1366 int i=start;
1367 while ((dAssign[i].res==lt)
1368 && (dAssign[i].arg!=rt)) i++;
1369 if (dAssign[i].res==lt)
1370 {
1371 if (traceit&TRACE_ASSIGN) Print("assign %s=%s\n",Tok2Cmdname(lt),Tok2Cmdname(rt));
1372 BOOLEAN b;
1373 b=dAssign[i].p(ld,r,l->e);
1374 if(l!=ld) /* i.e. l is IDHDL, l->data is ld */
1375 {
1376 l->flag=ld->flag;
1377 l->attribute=ld->attribute;
1378 }
1379 return b;
1380 }
1381 // implicite type conversion ----------------------------------------------
1382 if (dAssign[i].res!=lt)
1383 {
1384 int ri;
1387 i=start;
1388 //while ((dAssign[i].res!=lt)
1389 // && (dAssign[i].res!=0)) i++;
1390 while (dAssign[i].res==lt)
1391 {
1392 if ((ri=iiTestConvert(rt,dAssign[i].arg))!=0)
1393 {
1394 failed= iiConvert(rt,dAssign[i].arg,ri,r,rn);
1395 if(!failed)
1396 {
1397 failed= dAssign[i].p(ld,rn,l->e);
1399 Print("assign %s=%s ok? %d\n",Tok2Cmdname(lt),Tok2Cmdname(rn->rtyp),!failed);
1400 }
1401 // everything done, clean up temp. variables
1402 rn->CleanUp();
1404 if (failed)
1405 {
1406 // leave loop, goto error handling
1407 break;
1408 }
1409 else
1410 {
1411 if(l!=ld) /* i.e. l is IDHDL, l->data is ld */
1412 {
1413 l->flag=ld->flag;
1414 l->attribute=ld->attribute;
1415 }
1416 // everything ok, return
1417 return FALSE;
1418 }
1419 }
1420 i++;
1421 }
1422 // error handling ---------------------------------------------------
1423 if (!errorreported)
1424 {
1425 if ((l->rtyp==IDHDL) && (l->e==NULL))
1426 Werror("`%s`(%s) = `%s` is not supported",
1427 Tok2Cmdname(lt),l->Name(),Tok2Cmdname(rt));
1428 else
1429 Werror("`%s` = `%s` is not supported"
1430 ,Tok2Cmdname(lt),Tok2Cmdname(rt));
1431 if (BVERBOSE(V_SHOW_USE))
1432 {
1433 i=0;
1434 while ((dAssign[i].res!=lt)
1435 && (dAssign[i].res!=0)) i++;
1436 while (dAssign[i].res==lt)
1437 {
1438 Werror("expected `%s` = `%s`"
1439 ,Tok2Cmdname(lt),Tok2Cmdname(dAssign[i].arg));
1440 i++;
1441 }
1442 }
1443 }
1444 }
1445 return TRUE;
1446}
1447/*2
1448* assign sys_var = val
1449*/
1451{
1452 int rt=r->Typ();
1453
1454 if (rt==0)
1455 {
1456 if (!errorreported) Werror("`%s` is undefined",r->Fullname());
1457 return TRUE;
1458 }
1459 int i=0;
1460 int lt=l->rtyp;
1461 while (((dAssign_sys[i].res!=lt)
1462 || (dAssign_sys[i].arg!=rt))
1463 && (dAssign_sys[i].res!=0)) i++;
1464 if (dAssign_sys[i].res!=0)
1465 {
1466 if (!dAssign_sys[i].p(l,r))
1467 {
1468 // everything ok, clean up
1469 return FALSE;
1470 }
1471 }
1472 // implicite type conversion ----------------------------------------------
1473 if (dAssign_sys[i].res==0)
1474 {
1475 int ri;
1478 i=0;
1479 while ((dAssign_sys[i].res!=lt)
1480 && (dAssign_sys[i].res!=0)) i++;
1481 while (dAssign_sys[i].res==lt)
1482 {
1483 if ((ri=iiTestConvert(rt,dAssign_sys[i].arg))!=0)
1484 {
1485 failed= ((iiConvert(rt,dAssign_sys[i].arg,ri,r,rn))
1486 || (dAssign_sys[i].p(l,rn)));
1487 // everything done, clean up temp. variables
1488 rn->CleanUp();
1490 if (failed)
1491 {
1492 // leave loop, goto error handling
1493 break;
1494 }
1495 else
1496 {
1497 // everything ok, return
1498 return FALSE;
1499 }
1500 }
1501 i++;
1502 }
1503 // error handling ---------------------------------------------------
1504 if(!errorreported)
1505 {
1506 Werror("`%s` = `%s` is not supported"
1507 ,Tok2Cmdname(lt),Tok2Cmdname(rt));
1508 if (BVERBOSE(V_SHOW_USE))
1509 {
1510 i=0;
1511 while ((dAssign_sys[i].res!=lt)
1512 && (dAssign_sys[i].res!=0)) i++;
1513 while (dAssign_sys[i].res==lt)
1514 {
1515 Werror("expected `%s` = `%s`"
1517 i++;
1518 }
1519 }
1520 }
1521 }
1522 return TRUE;
1523}
1525{
1526 /* right side is intvec, left side is list (of int)*/
1527 BOOLEAN nok;
1528 int i=0;
1529 leftv l1=l;
1530 leftv h;
1531 sleftv t;
1532 intvec *iv=(intvec *)r->Data();
1533 memset(&t,0,sizeof(sleftv));
1534 t.rtyp=INT_CMD;
1535 while ((i<iv->length())&&(l!=NULL))
1536 {
1537 t.data=(char *)(long)(*iv)[i];
1538 h=l->next;
1539 l->next=NULL;
1541 l->next=h;
1542 if (nok) return TRUE;
1543 i++;
1544 l=h;
1545 }
1546 l1->CleanUp();
1547 r->CleanUp();
1548 return FALSE;
1549}
1551{
1552 /* right side is vector, left side is list (of poly)*/
1553 BOOLEAN nok;
1554 leftv l1=l;
1555 ideal I=idVec2Ideal((poly)r->Data());
1556 leftv h;
1557 sleftv t;
1558 int i=0;
1559 memset(&t,0,sizeof(sleftv));
1560 while (l!=NULL)
1561 {
1562 t.rtyp=POLY_CMD;
1563 if (i>=IDELEMS(I))
1564 {
1565 t.data=NULL;
1566 }
1567 else
1568 {
1569 t.data=(char *)I->m[i];
1570 I->m[i]=NULL;
1571 }
1572 h=l->next;
1573 l->next=NULL;
1575 l->next=h;
1576 t.CleanUp();
1577 if (nok)
1578 {
1579 idDelete(&I);
1580 return TRUE;
1581 }
1582 i++;
1583 l=h;
1584 }
1585 idDelete(&I);
1586 l1->CleanUp();
1587 r->CleanUp();
1588 //if (TEST_V_QRING && (currRing->qideal!=NULL)) l=jjNormalizeQRingP(l);
1589 return FALSE;
1590}
1592/* left side: list/def, has to be a "real" variable
1593* right side: expression list
1594*/
1595{
1596 int sl = r->listLength();
1598 lists oldL;
1599 leftv h=NULL,o_r=r;
1600 int i;
1601 int rt;
1602
1603 L->Init(sl);
1604 for (i=0;i<sl;i++)
1605 {
1606 if (h!=NULL) { /* e.g. not in the first step:
1607 * h is the pointer to the old sleftv,
1608 * r is the pointer to the next sleftv
1609 * (in this moment) */
1610 h->next=r;
1611 }
1612 h=r;
1613 r=r->next;
1614 h->next=NULL;
1615 rt=h->Typ();
1616 if ((rt==0)||(rt==NONE)||(rt==DEF_CMD))
1617 {
1618 L->Clean();
1619 Werror("`%s` is undefined",h->Fullname());
1620 //listall();
1621 goto err;
1622 }
1623 //if (rt==RING_CMD)
1624 //{
1625 // L->m[i].rtyp=rt;
1626 // L->m[i].data=h->Data();
1627 // ((ring)L->m[i].data)->ref++;
1628 //}
1629 //else
1630 L->m[i].CleanUp();
1631 L->m[i].Copy(h);
1632 if(errorreported)
1633 {
1634 L->Clean();
1635 goto err;
1636 }
1637 }
1638 oldL=(lists)l->Data();
1639 if (oldL!=NULL) oldL->Clean();
1640 if (l->rtyp==IDHDL)
1641 {
1642 IDLIST((idhdl)l->data)=L;
1643 IDTYP((idhdl)l->data)=LIST_CMD; // was possibly DEF_CMD
1644 if (lRingDependend(L)) ipMoveId((idhdl)l->data);
1645 }
1646 else
1647 {
1648 l->LData()->data=L;
1649 if ((l->e!=NULL) && (l->rtyp==DEF_CMD))
1650 l->rtyp=LIST_CMD;
1651 }
1652err:
1653 o_r->CleanUp();
1654 return errorreported;
1655}
1657{
1658 /* left side is intvec/intmat, right side is list (of int,intvec,intmat)*/
1659 leftv hh=r;
1660 int i = 0;
1661 while (hh!=NULL)
1662 {
1663 if (i>=iv->length())
1664 {
1666 {
1667 Warn("expression list length(%d) does not match intmat size(%d)",
1668 iv->length()+exprlist_length(hh),iv->length());
1669 }
1670 break;
1671 }
1672 if (hh->Typ() == INT_CMD)
1673 {
1674 (*iv)[i++] = (int)((long)(hh->Data()));
1675 }
1676 else if ((hh->Typ() == INTVEC_CMD)
1677 ||(hh->Typ() == INTMAT_CMD))
1678 {
1679 intvec *ivv = (intvec *)(hh->Data());
1680 int ll = 0,l = si_min(ivv->length(),iv->length());
1681 for (; l>0; l--)
1682 {
1683 (*iv)[i++] = (*ivv)[ll++];
1684 }
1685 }
1686 else
1687 {
1688 delete iv;
1689 return TRUE;
1690 }
1691 hh = hh->next;
1692 }
1693 if (l->rtyp==IDHDL)
1694 {
1695 if (IDINTVEC((idhdl)l->data)!=NULL) delete IDINTVEC((idhdl)l->data);
1696 IDINTVEC((idhdl)l->data)=iv;
1697 }
1698 else
1699 {
1700 if (l->data!=NULL) delete ((intvec*)l->data);
1701 l->data=(char*)iv;
1702 }
1703 return FALSE;
1704}
1706{
1707 /* left side is bigintmat, right side is list (of int,intvec,intmat)*/
1708 leftv hh=r;
1709 int i = 0;
1710 if (bim->length()==0) { WerrorS("bigintmat is 1x0"); delete bim; return TRUE; }
1711 while (hh!=NULL)
1712 {
1713 if (i>=bim->cols()*bim->rows())
1714 {
1716 {
1717 Warn("expression list length(%d) does not match bigintmat size(%d x %d)",
1718 exprlist_length(hh),bim->rows(),bim->cols());
1719 }
1720 break;
1721 }
1722 if (hh->Typ() == INT_CMD)
1723 {
1724 number tp = n_Init((int)((long)(hh->Data())), coeffs_BIGINT);
1725 bim->set(i++, tp);
1727 }
1728 else if (hh->Typ() == BIGINT_CMD)
1729 {
1730 bim->set(i++, (number)(hh->Data()));
1731 }
1732 /*
1733 ((hh->Typ() == INTVEC_CMD)
1734 ||(hh->Typ() == INTMAT_CMD))
1735 {
1736 intvec *ivv = (intvec *)(hh->Data());
1737 int ll = 0,l = si_min(ivv->length(),iv->length());
1738 for (; l>0; l--)
1739 {
1740 (*iv)[i++] = (*ivv)[ll++];
1741 }
1742 }*/
1743 else
1744 {
1745 delete bim;
1746 return TRUE;
1747 }
1748 hh = hh->next;
1749 }
1750 if (IDBIMAT((idhdl)l->data)!=NULL) delete IDBIMAT((idhdl)l->data);
1751 IDBIMAT((idhdl)l->data)=bim;
1752 return FALSE;
1753}
1755{
1756 /* left side is bigintvec, right side is list (of int,intvec,intmat)*/
1757 leftv hh=r;
1758 int i = 0;
1759 delete bim;
1761 while (hh!=NULL)
1762 {
1763 if (i>=bim->cols())
1764 {
1766 {
1767 Warn("expression list length(%d) does not match bigintvec size(%d)",
1768 exprlist_length(hh),bim->cols());
1769 }
1770 break;
1771 }
1772 if (hh->Typ() == INT_CMD)
1773 {
1774 number tp = n_Init((int)((long)(hh->Data())), coeffs_BIGINT);
1775 bim->set(i++, tp);
1777 }
1778 else if (hh->Typ() == BIGINT_CMD)
1779 {
1780 bim->set(i++, (number)(hh->Data()));
1781 }
1782 else
1783 {
1784 delete bim;
1785 return TRUE;
1786 }
1787 hh = hh->next;
1788 }
1789 if (IDBIMAT((idhdl)l->data)!=NULL) delete IDBIMAT((idhdl)l->data);
1790 IDBIMAT((idhdl)l->data)=bim;
1791 return bim==NULL;
1792}
1794{
1795 /* left side is string, right side is list of string*/
1796 leftv hh=r;
1797 int sl = 1;
1798 char *s;
1799 char *t;
1800 int tl;
1801 /* find the length */
1802 while (hh!=NULL)
1803 {
1804 if (hh->Typ()!= STRING_CMD)
1805 {
1806 return TRUE;
1807 }
1808 sl += strlen((char *)hh->Data());
1809 hh = hh->next;
1810 }
1811 s = (char * )omAlloc(sl);
1812 sl=0;
1813 hh = r;
1814 while (hh!=NULL)
1815 {
1816 t=(char *)hh->Data();
1817 tl=strlen(t);
1818 memcpy(s+sl,t,tl);
1819 sl+=tl;
1820 hh = hh->next;
1821 }
1822 s[sl]='\0';
1823 omFree((ADDRESS)IDDATA((idhdl)(l->data)));
1824 IDDATA((idhdl)(l->data))=s;
1825 return FALSE;
1826}
1828{
1829 /* right side is matrix, left side is list (of poly)*/
1831 int i;
1833 leftv h;
1834 leftv ol=l;
1835 leftv o_r=r;
1836 sleftv t;
1837 memset(&t,0,sizeof(sleftv));
1838 t.rtyp=POLY_CMD;
1839 int mxn=MATROWS(m)*MATCOLS(m);
1840 loop
1841 {
1842 i=0;
1843 while ((i<mxn /*MATROWS(m)*MATCOLS(m)*/)&&(l!=NULL))
1844 {
1845 t.data=(char *)m->m[i];
1846 m->m[i]=NULL;
1847 h=l->next;
1848 l->next=NULL;
1849 idhdl hh=NULL;
1850 if ((l->rtyp==IDHDL)&&(l->Typ()==DEF_CMD)) hh=(idhdl)l->data;
1852 if (hh!=NULL) { ipMoveId(hh);hh=NULL;}
1853 l->next=h;
1854 if (nok)
1855 {
1856 idDelete((ideal *)&m);
1857 goto ende;
1858 }
1859 i++;
1860 l=h;
1861 }
1862 idDelete((ideal *)&m);
1863 h=r;
1864 r=r->next;
1865 if (l==NULL)
1866 {
1867 if (r!=NULL)
1868 {
1869 WarnS("list length mismatch in assign (l>r)");
1870 nok=TRUE;
1871 }
1872 break;
1873 }
1874 else if (r==NULL)
1875 {
1876 WarnS("list length mismatch in assign (l<r)");
1877 nok=TRUE;
1878 break;
1879 }
1880 if ((r->Typ()==IDEAL_CMD)||(r->Typ()==MATRIX_CMD))
1881 {
1882 m=(matrix)r->CopyD(MATRIX_CMD);
1883 mxn=MATROWS(m)*MATCOLS(m);
1884 }
1885 else if (r->Typ()==POLY_CMD)
1886 {
1887 m=mpNew(1,1);
1888 MATELEM(m,1,1)=(poly)r->CopyD(POLY_CMD);
1889 pNormalize(MATELEM(m,1,1));
1890 mxn=1;
1891 }
1892 else
1893 {
1894 nok=TRUE;
1895 break;
1896 }
1897 }
1898ende:
1899 o_r->CleanUp();
1900 ol->CleanUp();
1901 return nok;
1902}
1904{
1905 /*left side are strings, right side is a string*/
1906 /*e.g. s[2..3]="12" */
1907 /*the case s=t[1..4] is handled in iiAssign,
1908 * the case s[2..3]=t[3..4] is handled in iiAssgn_rec*/
1910 sleftv t;
1911 leftv h,l1=l;
1912 int i=0;
1913 char *ss;
1914 char *s=(char *)r->Data();
1915 int sl=strlen(s);
1916
1917 memset(&t,0,sizeof(sleftv));
1918 t.rtyp=STRING_CMD;
1919 while ((i<sl)&&(l!=NULL))
1920 {
1921 ss=(char *)omAlloc(2);
1922 ss[1]='\0';
1923 ss[0]=s[i];
1924 t.data=ss;
1925 h=l->next;
1926 l->next=NULL;
1928 if (nok)
1929 {
1930 break;
1931 }
1932 i++;
1933 l=h;
1934 }
1935 r->CleanUp();
1936 l1->CleanUp();
1937 return nok;
1938}
1940{
1941 int i=l->e->start-1;
1942 if (i<0)
1943 {
1944 Werror("index[%d] must be positive",i+1);
1945 return TRUE;
1946 }
1947 if(l->attribute!=NULL)
1948 {
1949 atKillAll((idhdl)l);
1950 l->attribute=NULL;
1951 }
1952 l->flag=0;
1953 lists li;
1954 if (l->rtyp==IDHDL)
1955 {
1956 li=IDLIST((idhdl)l->data);
1957 }
1958 else
1959 {
1960 li=(lists)l->data;
1961 }
1962 if (i>li->nr)
1963 {
1964 if (TEST_V_ALLWARN)
1965 {
1966 Warn("increase list %d -> %d in %s(%d):%s",li->nr,i,VoiceName(),VoiceLine(),my_yylinebuf);
1967 }
1968 li->m=(leftv)omreallocSize(li->m,(li->nr+1)*sizeof(sleftv),(i+1)*sizeof(sleftv));
1969 memset(&(li->m[li->nr+1]),0,(i-li->nr)*sizeof(sleftv));
1970 int j=li->nr+1;
1971 for(;j<=i;j++)
1972 li->m[j].rtyp=DEF_CMD;
1973 li->nr=i;
1974 }
1975 leftv ld=&(li->m[i]);
1976 ld->e=l->e->next;
1977 BOOLEAN b;
1978 sleftv tmp;
1979 memset(&tmp,0,sizeof(sleftv));
1980 if (/*(ld->rtyp!=LIST_CMD)
1981 &&*/(ld->e==NULL)
1982 && (ld->Typ()!=r->Typ()))
1983 {
1985 tmp.rtyp=DEF_CMD;
1986 tmp.flag=ld->flag;
1987 b=iiAssign(&tmp,r,FALSE);
1988 ld->CleanUp(old_r);
1989 memcpy(ld,&tmp,sizeof(sleftv));
1990 }
1991 else if ((ld->e==NULL)
1992 && (ld->Typ()==r->Typ())
1993 && (ld->Typ()<MAX_TOK))
1994 {
1996 tmp.rtyp=r->Typ();
1997 tmp.flag=ld->flag;
1998 tmp.data=(char*)idrecDataInit(r->Typ());
1999 b=iiAssign(&tmp,r,FALSE);
2000 ld->CleanUp(old_r);
2001 memcpy(ld,&tmp,sizeof(sleftv));
2002 }
2003 else
2004 {
2005 b=iiAssign(ld,r,FALSE);
2006 if (l->e!=NULL) l->e->next=ld->e;
2007 ld->e=NULL;
2008 }
2009 return b;
2010}
2012{
2013 leftv l1=l;
2014 leftv r1=r;
2015 leftv lrest;
2016 leftv rrest;
2017 BOOLEAN b;
2018 do
2019 {
2020 lrest=l->next;
2021 rrest=r->next;
2022 l->next=NULL;
2023 r->next=NULL;
2024 b=iiAssign(l,r);
2025 l->next=lrest;
2026 r->next=rrest;
2027 l=lrest;
2028 r=rrest;
2029 } while ((!b)&&(l!=NULL));
2030 l1->CleanUp();
2031 r1->CleanUp();
2032 return b;
2033}
2035{
2036 if (errorreported) return TRUE;
2037 int ll=l->listLength();
2038 int rl;
2039 int lt=l->Typ();
2040 int rt=NONE;
2041 int is_qring=FALSE;
2042 BOOLEAN b=FALSE;
2043 if (l->rtyp==ALIAS_CMD)
2044 {
2045 Werror("`%s` is read-only",l->Name());
2046 }
2047
2048 if (l->rtyp==IDHDL)
2049 {
2050 atKillAll((idhdl)l->data);
2052 IDFLAG((idhdl)l->data)=0;
2053 l->attribute=NULL;
2055 }
2056 else if (l->attribute!=NULL)
2057 atKillAll((idhdl)l);
2058 if (ll==1)
2059 {
2060 /* l[..] = ... */
2061 if(l->e!=NULL)
2062 {
2064 blackbox *bb=NULL;
2065 int bt;
2066 if (((bt=l->rtyp)>MAX_TOK)
2067 || ((l->rtyp==IDHDL) && ((bt=IDTYP((idhdl)l->data))>MAX_TOK)))
2068 {
2070 like_lists=BB_LIKE_LIST(bb); // bb like a list
2071 }
2072 else if (((l->rtyp==IDHDL) && (IDTYP((idhdl)l->data)==LIST_CMD))
2073 || (l->rtyp==LIST_CMD))
2074 {
2075 like_lists=2; // bb in a list
2076 }
2077 if(like_lists)
2078 {
2079 if (traceit&TRACE_ASSIGN) PrintS("assign list[..]=...or similar\n");
2080 if (like_lists==1)
2081 {
2082 // check blackbox/newtype type:
2083 if(bb->blackbox_CheckAssign(bb,l,r)) return TRUE;
2084 }
2085 b=jiAssign_list(l,r);
2086 if((!b) && (like_lists==2))
2087 {
2088 //Print("jjA_L_LIST: - 2 \n");
2089 if((l->rtyp==IDHDL) && (l->data!=NULL))
2090 {
2091 ipMoveId((idhdl)l->data);
2092 l->attribute=IDATTR((idhdl)l->data);
2093 l->flag=IDFLAG((idhdl)l->data);
2094 }
2095 }
2096 r->CleanUp();
2097 Subexpr h;
2098 while (l->e!=NULL)
2099 {
2100 h=l->e->next;
2102 l->e=h;
2103 }
2104 return b;
2105 }
2106 }
2107 if (lt>MAX_TOK)
2108 {
2110#ifdef BLACKBOX_DEVEL
2111 Print("bb-assign: bb=%lx\n",bb);
2112#endif
2113 return (bb==NULL) || bb->blackbox_Assign(l,r);
2114 }
2115 // end of handling elems of list and similar
2116 rl=r->listLength();
2117 if (rl==1)
2118 {
2119 /* system variables = ... */
2120 if(((l->rtyp>=VECHO)&&(l->rtyp<=VPRINTLEVEL))
2121 ||((l->rtyp>=VALTVARS)&&(l->rtyp<=VMINPOLY)))
2122 {
2123 b=iiAssign_sys(l,r);
2124 r->CleanUp();
2125 //l->CleanUp();
2126 return b;
2127 }
2128 rt=r->Typ();
2129 /* a = ... */
2130 if ((lt!=MATRIX_CMD)
2131 &&(lt!=BIGINTMAT_CMD)
2132 &&(lt!=BIGINTVEC_CMD)
2133 &&(lt!=CMATRIX_CMD)
2134 &&(lt!=INTMAT_CMD)
2135 &&((lt==rt)||(lt!=LIST_CMD)))
2136 {
2138 if (l->rtyp==IDHDL)
2139 {
2140 if ((lt==DEF_CMD)||(lt==LIST_CMD))
2141 {
2142 ipMoveId((idhdl)l->data);
2143 }
2144 l->attribute=IDATTR((idhdl)l->data);
2145 l->flag=IDFLAG((idhdl)l->data);
2146 l->CleanUp();
2147 }
2148 r->CleanUp();
2149 return b;
2150 }
2151 if (((lt!=LIST_CMD)
2152 &&((rt==MATRIX_CMD)
2153 ||(rt==BIGINTMAT_CMD)
2154 ||(rt==BIGINTVEC_CMD)
2155 ||(rt==CMATRIX_CMD)
2156 ||(rt==INTMAT_CMD)
2157 ||(rt==INTVEC_CMD)
2158 ||(rt==MODUL_CMD)))
2159 ||((lt==LIST_CMD)
2160 &&(rt==RESOLUTION_CMD))
2161 )
2162 {
2163 b=jiAssign_1(l,r,rt,toplevel);
2164 if((l->rtyp==IDHDL)&&(l->data!=NULL))
2165 {
2166 if ((lt==DEF_CMD) || (lt==LIST_CMD))
2167 {
2168 //Print("ipAssign - 3.0\n");
2169 ipMoveId((idhdl)l->data);
2170 }
2171 l->attribute=IDATTR((idhdl)l->data);
2172 l->flag=IDFLAG((idhdl)l->data);
2173 }
2174 r->CleanUp();
2175 Subexpr h;
2176 while (l->e!=NULL)
2177 {
2178 h=l->e->next;
2180 l->e=h;
2181 }
2182 return b;
2183 }
2184 }
2185 if (rt==NONE) rt=r->Typ();
2186 }
2187 else if (ll==(rl=r->listLength()))
2188 {
2189 b=jiAssign_rec(l,r);
2190 return b;
2191 }
2192 else
2193 {
2194 if (rt==NONE) rt=r->Typ();
2195 if (rt==INTVEC_CMD)
2196 return jiA_INTVEC_L(l,r);
2197 else if (rt==VECTOR_CMD)
2198 return jiA_VECTOR_L(l,r);
2199 else if ((rt==IDEAL_CMD)||(rt==MATRIX_CMD))
2200 return jiA_MATRIX_L(l,r);
2201 else if ((rt==STRING_CMD)&&(rl==1))
2202 return jiA_STRING_L(l,r);
2203 Werror("length of lists in assignment does not match (l:%d,r:%d)",
2204 ll,rl);
2205 return TRUE;
2206 }
2207
2208 leftv hh=r;
2210 switch (lt)
2211 {
2212 case INTVEC_CMD:
2214 break;
2215 case INTMAT_CMD:
2216 {
2217 b=jjA_L_INTVEC(l,r,new intvec(IDINTVEC((idhdl)l->data)));
2218 break;
2219 }
2220 case BIGINTVEC_CMD:
2221 {
2222 b=jjA_L_BIGINTVEC(l, r, new bigintmat(IDBIMAT((idhdl)l->data)));
2223 break;
2224 }
2225 case BIGINTMAT_CMD:
2226 {
2227 b=jjA_L_BIGINTMAT(l, r, new bigintmat(IDBIMAT((idhdl)l->data)));
2228 break;
2229 }
2230 case MAP_CMD:
2231 {
2232 // first element in the list sl (r) must be a ring
2233 if ((rt == RING_CMD)&&(r->e==NULL))
2234 {
2235 omFreeBinAddr((ADDRESS)IDMAP((idhdl)l->data)->preimage);
2236 IDMAP((idhdl)l->data)->preimage = omStrDup (r->Fullname());
2237 /* advance the expressionlist to get the next element after the ring */
2238 hh = r->next;
2239 }
2240 else
2241 {
2242 WerrorS("expected ring-name");
2243 b=TRUE;
2244 break;
2245 }
2246 if (hh==NULL) /* map-assign: map f=r; */
2247 {
2248 WerrorS("expected image ideal");
2249 b=TRUE;
2250 break;
2251 }
2252 if ((hh->next==NULL)&&(hh->Typ()==IDEAL_CMD))
2253 {
2254 b=jiAssign_1(l,hh,IDEAL_CMD,toplevel); /* map-assign: map f=r,i; */
2256 return b;
2257 }
2258 //no break, handle the rest like an ideal:
2259 map_assign=TRUE; // and continue
2260 }
2261 case MATRIX_CMD:
2262 case IDEAL_CMD:
2263 case MODUL_CMD:
2264 {
2265 sleftv t;
2266 matrix olm = (matrix)l->Data();
2267 long rk;
2268 char *pr=((map)olm)->preimage;
2269 BOOLEAN module_assign=(/*l->Typ()*/ lt==MODUL_CMD);
2270 matrix lm ;
2271 long num;
2272 int j,k;
2273 int i=0;
2274 int mtyp=MATRIX_CMD; /*Type of left side object*/
2275 int etyp=POLY_CMD; /*Type of elements of left side object*/
2276
2277 if (lt /*l->Typ()*/==MATRIX_CMD)
2278 {
2279 rk=olm->rows();
2280 num=olm->cols()*rk /*olm->rows()*/;
2281 lm=mpNew(olm->rows(),olm->cols());
2282 int el;
2284 {
2285 Warn("expression list length(%d) does not match matrix size(%d)",el,num);
2286 }
2287 }
2288 else /* IDEAL_CMD or MODUL_CMD */
2289 {
2291 lm=(matrix)idInit(num,1);
2292 if (module_assign)
2293 {
2294 rk=0;
2297 }
2298 else
2299 rk=1;
2300 }
2301
2302 int ht;
2303 loop
2304 {
2305 if (hh==NULL)
2306 break;
2307 else
2308 {
2309 matrix rm;
2310 ht=hh->Typ();
2311 if ((j=iiTestConvert(ht,etyp))!=0)
2312 {
2313 b=iiConvert(ht,etyp,j,hh,&t);
2314 hh->next=t.next;
2315 if (b)
2316 { Werror("can not convert %s(%s) -> %s",Tok2Cmdname(ht),hh->Name(),Tok2Cmdname(etyp));
2317 break;
2318 }
2319 lm->m[i]=(poly)t.CopyD(etyp);
2320 pNormalize(lm->m[i]);
2321 if (module_assign) rk=si_max(rk,pMaxComp(lm->m[i]));
2322 i++;
2323 }
2324 else
2325 if ((j=iiTestConvert(ht,mtyp))!=0)
2326 {
2327 b=iiConvert(ht,mtyp,j,hh,&t);
2328 hh->next=t.next;
2329 if (b)
2330 { Werror("can not convert %s(%s) -> %s",Tok2Cmdname(ht),hh->Name(),Tok2Cmdname(mtyp));
2331 break;
2332 }
2333 rm = (matrix)t.CopyD(mtyp);
2334 if (module_assign)
2335 {
2336 j = si_min((int)num,rm->cols());
2337 rk=si_max(rk,rm->rank);
2338 }
2339 else
2340 j = si_min(num-i,(long)rm->rows() * (long)rm->cols());
2341 for(k=0;k<j;k++,i++)
2342 {
2343 lm->m[i]=rm->m[k];
2344 pNormalize(lm->m[i]);
2345 rm->m[k]=NULL;
2346 }
2347 idDelete((ideal *)&rm);
2348 }
2349 else
2350 {
2351 b=TRUE;
2352 Werror("can not convert %s(%s) -> %s",Tok2Cmdname(ht),hh->Name(),Tok2Cmdname(mtyp));
2353 break;
2354 }
2355 t.next=NULL;t.CleanUp();
2356 if (i==num) break;
2357 hh=hh->next;
2358 }
2359 }
2360 if (b)
2361 idDelete((ideal *)&lm);
2362 else
2363 {
2364 idDelete((ideal *)&olm);
2365 if (module_assign) lm->rank=rk;
2366 else if (map_assign) ((map)lm)->preimage=pr;
2367 l=l->LData();
2368 if (l->rtyp==IDHDL)
2369 IDMATRIX((idhdl)l->data)=lm;
2370 else
2371 l->data=(char *)lm;
2372 }
2373 break;
2374 }
2375 case STRING_CMD:
2376 b=jjA_L_STRING(l,r);
2377 break;
2378 //case DEF_CMD:
2379 case LIST_CMD:
2380 b=jjA_L_LIST(l,r);
2381 break;
2382 case NONE:
2383 case 0:
2384 Werror("cannot assign to %s",l->Fullname());
2385 b=TRUE;
2386 break;
2387 default:
2388 WerrorS("assign not impl.");
2389 b=TRUE;
2390 break;
2391 } /* end switch: typ */
2392 if (b && (!errorreported)) WerrorS("incompatible type in list assignment");
2393 r->CleanUp();
2394 return b;
2395}
2397{
2398 assume ((currRing->qideal!=NULL) && (!hasFlag(I,FLAG_QRING)));
2399 {
2400 if (I->e==NULL)
2401 {
2402 ideal I0=(ideal)I->Data();
2403 switch (I->Typ())
2404 {
2405 case IDEAL_CMD:
2406 case MODUL_CMD:
2407 {
2408 ideal F=idInit(1,1);
2409 ideal II=kNF(F,currRing->qideal,I0);
2410 idDelete(&F);
2411 if (I->rtyp!=IDHDL)
2412 {
2413 idDelete((ideal*)&(I0));
2414 I->data=II;
2415 }
2416 else
2417 {
2418 idhdl h=(idhdl)I->data;
2419 idDelete((ideal*)&IDIDEAL(h));
2420 IDIDEAL(h)=II;
2422 }
2423 break;
2424 }
2425 default: break;
2426 }
2428 }
2429 }
2430}
2431poly jj_NormalizeQRingP(poly p, const ring r)
2432{
2433 if((p!=NULL) && (r->qideal!=NULL))
2434 {
2436 if (r!=currRing) rChangeCurrRing(r);
2437 ideal F=idInit(1,1);
2438 poly p2=kNF(F,r->qideal,p);
2439 p_Normalize(p2,r);
2440 id_Delete(&F,r);
2441 p_Delete(&p,r);
2442 p=p2;
2443 if (r!=save) rChangeCurrRing(save);
2444 }
2445 return p;
2446}
2448{
2449 //Print("importfrom %s::%s ->.\n",v->Name(),u->Name() );
2450 assume(u->Typ()==PACKAGE_CMD);
2451 char *vn=(char *)v->Name();
2452 idhdl h=((package)(u->Data()))->idroot->get(vn /*v->Name()*/, myynest);
2453 if (h!=NULL)
2454 {
2455 //check for existence
2456 if (((package)(u->Data()))==basePack)
2457 {
2458 WarnS("source and destination packages are identical");
2459 return FALSE;
2460 }
2461 idhdl t=basePack->idroot->get(vn /*v->Name()*/, myynest);
2462 if (t!=NULL)
2463 {
2464 if (BVERBOSE(V_REDEFINE)) Warn("redefining %s (%s)",vn,my_yylinebuf);
2465 killhdl(t);
2466 }
2469 sleftv h_expr;
2470 memset(&h_expr,0,sizeof(h_expr));
2471 h_expr.rtyp=IDHDL;
2472 h_expr.data=h;
2473 h_expr.name=vn;
2474 return iiAssign(&tmp_expr,&h_expr);
2475 }
2476 else
2477 {
2478 Werror("`%s` not found in `%s`",v->Name(), u->Name());
2479 return TRUE;
2480 }
2481 return FALSE;
2482}
struct for passing initialization parameters to naInitChar
Definition algext.h:37
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
Definition attrib.cc:132
#define atKillAll(H)
Definition attrib.h:47
static int si_max(const int a, const int b)
Definition auxiliary.h:124
int BOOLEAN
Definition auxiliary.h:87
#define TRUE
Definition auxiliary.h:100
#define FALSE
Definition auxiliary.h:96
static int si_min(const int a, const int b)
Definition auxiliary.h:125
#define BIMATELEM(M, I, J)
Definition bigintmat.h:133
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
Definition blackbox.cc:17
#define BB_LIKE_LIST(B)
Definition blackbox.h:53
CanonicalForm num(const CanonicalForm &f)
int l
Definition cfEzgcd.cc:100
int m
Definition cfEzgcd.cc:128
int i
Definition cfEzgcd.cc:132
int k
Definition cfEzgcd.cc:99
int p
Definition cfModGcd.cc:4086
CanonicalForm cf
Definition cfModGcd.cc:4091
CanonicalForm b
Definition cfModGcd.cc:4111
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
FILE * f
Definition checklibs.c:9
int length() const
char * filename
Definition fevoices.h:63
Matrices of numbers.
Definition bigintmat.h:51
int length()
Definition bigintmat.h:143
int cols() const
Definition bigintmat.h:144
int rows() const
Definition bigintmat.h:145
coeffs basecoeffs() const
Definition bigintmat.h:146
void set(int i, int j, number n, const coeffs C=NULL)
replace an entry with a copy (delete old + copy new!). NOTE: starts at [1,1]
Definition bigintmat.cc:95
Definition idrec.h:35
idhdl get(const char *s, int lev)
Definition ipid.cc:65
int min_in()
Definition intvec.h:121
int length() const
Definition intvec.h:94
int cols() const
Definition intvec.h:95
int rows() const
Definition intvec.h:96
Definition attrib.h:21
Class used for (list of) interpreter objects.
Definition subexpr.h:83
void * CopyD(int t)
Definition subexpr.cc:713
int Typ()
Definition subexpr.cc:1047
int rtyp
Definition subexpr.h:91
void * Data()
Definition subexpr.cc:1191
leftv next
Definition subexpr.h:86
const char * Name()
Definition subexpr.h:120
int listLength()
Definition subexpr.cc:51
void Copy(leftv e)
Definition subexpr.cc:688
void * data
Definition subexpr.h:88
void CleanUp(ring r=currRing)
Definition subexpr.cc:349
const char * Fullname()
Definition subexpr.h:125
Subexpr e
Definition subexpr.h:105
leftv LData()
Definition subexpr.cc:1518
Definition lists.h:24
sleftv * m
Definition lists.h:46
void Clean(ring r=currRing)
Definition lists.h:26
INLINE_THIS void Init(int l=0)
int nr
Definition lists.h:44
Coefficient rings, fields and other domains suitable for Singular polynomials.
static FORCE_INLINE coeffs n_CoeffRingQuot1(number c, const coeffs r)
Definition coeffs.h:522
static FORCE_INLINE long n_Int(number &n, const coeffs r)
conversion of n to an int; 0 if not possible in Z/pZ: the representing int lying in (-p/2 ....
Definition coeffs.h:551
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Definition coeffs.h:455
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
Definition coeffs.h:850
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
Definition coeffs.h:35
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
Definition coeffs.h:704
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
Definition numbers.cc:419
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
Definition coeffs.h:468
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition coeffs.h:459
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition coeffs.h:542
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
Definition coeffs.h:914
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
Definition coeffs.h:80
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
Definition coeffs.h:582
void nKillChar(coeffs r)
undo all initialisations
Definition numbers.cc:574
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
Definition coeffs.h:922
#define Print
Definition emacs.cc:80
#define Warn
Definition emacs.cc:77
#define WarnS
Definition emacs.cc:78
const CanonicalForm int s
Definition facAbsFact.cc:51
CanonicalForm res
Definition facAbsFact.cc:60
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
int j
Definition facHensel.cc:110
VAR short errorreported
Definition feFopen.cc:23
void WerrorS(const char *s)
Definition feFopen.cc:24
VAR int printlevel
Definition febase.cc:36
VAR int yylineno
Definition febase.cc:40
VAR char my_yylinebuf[80]
Definition febase.cc:44
VAR int si_echo
Definition febase.cc:35
VAR int myynest
Definition febase.cc:41
VAR Voice * currentVoice
Definition fevoices.cc:49
const char * VoiceName()
Definition fevoices.cc:58
int VoiceLine()
Definition fevoices.cc:66
int iiTestConvert(int inputType, int outputType)
Definition gentable.cc:301
const char * Tok2Cmdname(int tok)
Definition gentable.cc:140
static int RingDependend(int t)
Definition gentable.cc:28
#define EXTERN_VAR
Definition globaldefs.h:6
@ IDEAL_CMD
Definition grammar.cc:285
@ VALTVARS
Definition grammar.cc:306
@ MATRIX_CMD
Definition grammar.cc:287
@ BUCKET_CMD
Definition grammar.cc:284
@ BIGINTMAT_CMD
Definition grammar.cc:278
@ MAP_CMD
Definition grammar.cc:286
@ PROC_CMD
Definition grammar.cc:281
@ INTMAT_CMD
Definition grammar.cc:280
@ MODUL_CMD
Definition grammar.cc:288
@ SMATRIX_CMD
Definition grammar.cc:292
@ VECTOR_CMD
Definition grammar.cc:293
@ RESOLUTION_CMD
Definition grammar.cc:291
@ BIGINTVEC_CMD
Definition grammar.cc:279
@ NUMBER_CMD
Definition grammar.cc:289
@ POLY_CMD
Definition grammar.cc:290
@ VMINPOLY
Definition grammar.cc:310
@ RING_CMD
Definition grammar.cc:282
#define idDelete(H)
delete an ideal
Definition ideals.h:29
#define idSimpleAdd(A, B)
Definition ideals.h:42
static ideal idVec2Ideal(poly vec)
Definition ideals.h:172
#define idPosConstant(I)
index of generator with leading term in ground ring (if any); otherwise -1
Definition ideals.h:37
static BOOLEAN length(leftv result, leftv arg)
Definition interval.cc:257
intvec * ivAdd(intvec *a, intvec *b)
Definition intvec.cc:249
#define IMATELEM(M, I, J)
Definition intvec.h:85
static BOOLEAN jiA_1x1INTMAT(leftv res, leftv a, Subexpr e)
Definition ipassign.cc:798
static BOOLEAN jjA_L_BIGINTVEC(leftv l, leftv r, bigintmat *bim)
Definition ipassign.cc:1754
static BOOLEAN jiA_INTVEC(leftv res, leftv a, Subexpr)
Definition ipassign.cc:886
static BOOLEAN jiA_IDEAL_Mo(leftv res, leftv a, Subexpr)
Definition ipassign.cc:1029
static BOOLEAN jiA_MATRIX_L(leftv l, leftv r)
Definition ipassign.cc:1827
static BOOLEAN jiA_PACKAGE(leftv res, leftv a, Subexpr)
Definition ipassign.cc:1236
void jjNormalizeQRingId(leftv I)
Definition ipassign.cc:2396
static BOOLEAN jiA_1x1MATRIX(leftv res, leftv a, Subexpr e)
Definition ipassign.cc:820
static BOOLEAN jiA_INTVEC_BI(leftv res, leftv a, Subexpr)
Definition ipassign.cc:909
static ring jjCheck_FLAG_OTHER_RING(leftv res)
Definition ipassign.cc:462
static BOOLEAN jjPRINTLEVEL(leftv, leftv a)
Definition ipassign.cc:57
static BOOLEAN jjMINPOLY(leftv, leftv a)
Definition ipassign.cc:242
static BOOLEAN jjTRACE(leftv, leftv a)
Definition ipassign.cc:99
static BOOLEAN jiA_VECTOR_L(leftv l, leftv r)
Definition ipassign.cc:1550
static BOOLEAN jiA_BIGINT(leftv res, leftv a, Subexpr e)
Definition ipassign.cc:666
static BOOLEAN iiAssign_sys(leftv l, leftv r)
Definition ipassign.cc:1450
static BOOLEAN jiA_POLY(leftv res, leftv a, Subexpr e)
Definition ipassign.cc:729
static BOOLEAN jjCOLMAX(leftv, leftv a)
Definition ipassign.cc:62
static BOOLEAN jiAssign_rec(leftv l, leftv r)
Definition ipassign.cc:2011
static BOOLEAN jjECHO(leftv, leftv a)
Definition ipassign.cc:52
poly jj_NormalizeQRingP(poly p, const ring r)
Definition ipassign.cc:2431
static BOOLEAN jiAssign_1(leftv l, leftv r, int rt, BOOLEAN toplevel, BOOLEAN is_qring=FALSE)
Definition ipassign.cc:1267
static BOOLEAN jiA_BUCKET(leftv res, leftv a, Subexpr e)
Definition ipassign.cc:946
static BOOLEAN jiA_RESOLUTION(leftv res, leftv a, Subexpr)
Definition ipassign.cc:983
static BOOLEAN jiA_CRING(leftv res, leftv a, Subexpr)
Definition ipassign.cc:1247
static BOOLEAN jjMAXDEG(leftv, leftv a)
Definition ipassign.cc:81
static BOOLEAN jjA_L_LIST(leftv l, leftv r)
Definition ipassign.cc:1591
static void jiAssignAttr(leftv l, leftv r)
Definition ipassign.cc:385
BOOLEAN jjIMPORTFROM(leftv, leftv u, leftv v)
Definition ipassign.cc:2447
static BOOLEAN jjRTIMER(leftv, leftv a)
Definition ipassign.cc:74
static BOOLEAN jiA_RING(leftv res, leftv a, Subexpr e)
Definition ipassign.cc:1204
static BOOLEAN jiA_MAP(leftv res, leftv a, Subexpr)
Definition ipassign.cc:1074
static BOOLEAN jiA_INT(leftv res, leftv a, Subexpr e)
Definition ipassign.cc:418
static BOOLEAN jiA_STRING_L(leftv l, leftv r)
Definition ipassign.cc:1903
static BOOLEAN jjA_L_BIGINTMAT(leftv l, leftv r, bigintmat *bim)
Definition ipassign.cc:1705
static void jjMINPOLY_red(idhdl h)
Definition ipassign.cc:127
static BOOLEAN jiA_DEF(leftv res, leftv, Subexpr)
Definition ipassign.cc:1242
static BOOLEAN jiA_IDEAL(leftv res, leftv a, Subexpr)
Definition ipassign.cc:959
static BOOLEAN jiA_MODUL_P(leftv res, leftv a, Subexpr)
Definition ipassign.cc:992
static BOOLEAN jiA_BIGINTMAT(leftv res, leftv a, Subexpr)
Definition ipassign.cc:923
static BOOLEAN jiA_NUMBER(leftv res, leftv a, Subexpr)
Definition ipassign.cc:481
static BOOLEAN jiAssign_list(leftv l, leftv r)
Definition ipassign.cc:1939
static BOOLEAN jjA_L_STRING(leftv l, leftv r)
Definition ipassign.cc:1793
static BOOLEAN jiA_LIST_RES(leftv res, leftv a, Subexpr)
Definition ipassign.cc:708
coeffs jjSetMinpoly(coeffs cf, number a)
Definition ipassign.cc:175
static BOOLEAN jiA_LINK(leftv res, leftv a, Subexpr)
Definition ipassign.cc:1050
static BOOLEAN jiA_MAP_ID(leftv res, leftv a, Subexpr)
Definition ipassign.cc:1088
static BOOLEAN jiA_STRING(leftv res, leftv a, Subexpr e)
Definition ipassign.cc:846
static BOOLEAN jjSHORTOUT(leftv, leftv a)
Definition ipassign.cc:104
static BOOLEAN jjNOETHER(leftv, leftv a)
Definition ipassign.cc:377
BOOLEAN iiAssign(leftv l, leftv r, BOOLEAN toplevel)
Definition ipassign.cc:2034
static BOOLEAN jiA_IDEAL_M(leftv res, leftv a, Subexpr)
Definition ipassign.cc:1009
static BOOLEAN jiA_INTVEC_L(leftv l, leftv r)
Definition ipassign.cc:1524
static BOOLEAN jiA_QRING(leftv res, leftv a, Subexpr e)
Definition ipassign.cc:1101
static BOOLEAN jiA_LIST(leftv res, leftv a, Subexpr)
Definition ipassign.cc:720
static BOOLEAN jjMAXMULT(leftv, leftv a)
Definition ipassign.cc:90
static BOOLEAN jjTIMER(leftv, leftv a)
Definition ipassign.cc:67
static BOOLEAN jiA_BIGINTVEC_IV(leftv res, leftv a, Subexpr)
Definition ipassign.cc:930
static BOOLEAN jjA_L_INTVEC(leftv l, leftv r, intvec *iv)
Definition ipassign.cc:1656
static BOOLEAN jiA_PROC(leftv res, leftv a, Subexpr)
Definition ipassign.cc:868
BOOLEAN iiConvert(int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
Definition ipconv.cc:449
void killhdl2(idhdl h, idhdl *ih, ring r)
Definition ipid.cc:424
VAR package basePack
Definition ipid.cc:58
VAR idhdl currRingHdl
Definition ipid.cc:59
void killhdl(idhdl h, package proot)
Definition ipid.cc:393
void * idrecDataInit(int t)
Definition ipid.cc:118
void ipMoveId(idhdl tomove)
Definition ipid.cc:683
BOOLEAN piKill(procinfov pi)
Definition ipid.cc:726
VAR coeffs coeffs_BIGINT
Definition ipid.cc:50
#define IDMAP(a)
Definition ipid.h:135
#define IDMATRIX(a)
Definition ipid.h:134
EXTERN_VAR omBin sleftv_bin
Definition ipid.h:145
#define IDDATA(a)
Definition ipid.h:126
#define hasFlag(A, F)
Definition ipid.h:112
#define FLAG_OTHER_RING
Definition ipid.h:110
#define setFlag(A, F)
Definition ipid.h:113
#define IDINTVEC(a)
Definition ipid.h:128
#define IDBIMAT(a)
Definition ipid.h:129
#define IDIDEAL(a)
Definition ipid.h:133
#define IDFLAG(a)
Definition ipid.h:120
#define IDROOT
Definition ipid.h:19
#define FLAG_TWOSTD
Definition ipid.h:107
#define FLAG_QRING
Definition ipid.h:108
#define FLAG_QRING_DEF
Definition ipid.h:109
#define IDLEV(a)
Definition ipid.h:121
#define IDRING(a)
Definition ipid.h:127
#define jjNormalizeQRingP(p)
Definition ipid.h:103
#define IDTYP(a)
Definition ipid.h:119
#define FLAG_STD
Definition ipid.h:106
#define IDLIST(a)
Definition ipid.h:137
#define IDATTR(a)
Definition ipid.h:123
#define FLAG_RING
Definition ipid.h:111
procinfo * iiInitSingularProcinfo(procinfov pi, const char *libname, const char *procname, int, long pos, BOOLEAN pstatic)
Definition iplib.cc:1058
int iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl *root, BOOLEAN isring, BOOLEAN init_b)
Definition ipshell.cc:1199
void rKill(ring r)
Definition ipshell.cc:6182
int exprlist_length(leftv v)
Definition ipshell.cc:552
VAR leftv iiCurrArgs
Definition ipshell.cc:80
lists syConvRes(syStrategy syzstr, BOOLEAN toDel, int add_row_shift)
Definition ipshell.cc:3184
void rSetHdl(idhdl h)
Definition ipshell.cc:5128
STATIC_VAR Poly * h
Definition janet.cc:971
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
Definition kstd1.cc:3235
EXTERN_VAR int Kstd1_deg
Definition kstd1.h:50
EXTERN_VAR int Kstd1_mu
Definition kstd1.h:50
#define pi
Definition libparse.cc:1145
static bool rIsSCA(const ring r)
Definition nc.h:190
bool nc_SetupQuotient(ring rGR, const ring rG=NULL, bool bCopy=false)
VAR omBin slists_bin
Definition lists.cc:23
BOOLEAN lRingDependend(lists L)
Definition lists.cc:222
poly p_MinPolyNormalize(poly p, const ring r)
Definition maps.cc:430
matrix mpNew(int r, int c)
create a r x c zero-matrix
Definition matpol.cc:37
#define MATELEM(mat, i, j)
1-based access to matrix
Definition matpol.h:29
ip_smatrix * matrix
Definition matpol.h:43
#define SMATELEM(A, i, j, R)
Definition matpol.h:123
#define MATROWS(i)
Definition matpol.h:26
#define MATCOLS(i)
Definition matpol.h:27
#define assume(x)
Definition mod2.h:387
#define p_GetCoeff(p, r)
Definition monomials.h:50
slists * lists
The main handler for Singular numbers which are suitable for Singular polynomials.
Definition qr.h:46
#define nDelete(n)
Definition numbers.h:16
#define nNormalize(n)
Definition numbers.h:30
#define nInit(i)
Definition numbers.h:24
#define nMult(n1, n2)
Definition numbers.h:17
#define omStrDup(s)
#define omfree(addr)
#define omAlloc(size)
#define omreallocSize(addr, o_size, size)
#define omAllocBin(bin)
#define omAlloc0Bin(bin)
#define omFree(addr)
#define omAlloc0(size)
#define omFreeBin(addr, bin)
#define omFreeBinAddr(addr)
#define NULL
Definition omList.c:12
omBin_t * omBin
Definition omStructs.h:12
VAR unsigned si_opt_1
Definition options.c:5
#define Sy_inset(x, s)
Definition options.h:33
#define BVERBOSE(a)
Definition options.h:35
#define TEST_V_ALLWARN
Definition options.h:142
#define Sy_bit(x)
Definition options.h:31
#define V_REDEFINE
Definition options.h:45
#define TEST_V_QRING
Definition options.h:131
#define OPT_MULTBOUND
Definition options.h:89
#define OPT_DEGBOUND
Definition options.h:90
#define TEST_V_ASSIGN_NONE
Definition options.h:134
#define V_SHOW_USE
Definition options.h:52
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
Definition p_polys.cc:4152
void p_Normalize(poly p, const ring r)
Definition p_polys.cc:3835
void pEnlargeSet(poly **p, int l, int increment)
Definition p_polys.cc:3718
void p_Write(poly p, ring lmRing, ring tailRing)
Definition polys0.cc:342
static BOOLEAN p_IsConstant(const poly p, const ring r)
Definition p_polys.h:1964
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:901
void rChangeCurrRing(ring r)
Definition polys.cc:15
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
Compatibility layer for legacy polynomial operations (over currRing)
#define pAdd(p, q)
Definition polys.h:203
#define pDelete(p_ptr)
Definition polys.h:186
#define pSetCompP(a, i)
Definition polys.h:303
#define pGetComp(p)
Component.
Definition polys.h:37
#define pSub(a, b)
Definition polys.h:287
#define pMaxComp(p)
Definition polys.h:299
#define pNormalize(p)
Definition polys.h:317
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
Definition prCopy.cc:192
#define NUM
Definition readcf.cc:180
void PrintS(const char *s)
Definition reporter.cc:284
void Werror(const char *fmt,...)
Definition reporter.cc:189
EXTERN_VAR int traceit
Definition reporter.h:24
#define TRACE_ASSIGN
Definition reporter.h:46
EXTERN_VAR int colmax
Definition reporter.h:17
void rWrite(ring r, BOOLEAN details)
Definition ring.cc:227
void rDelete(ring r)
unconditionally deletes fields in r
Definition ring.cc:452
ring rCopy(ring r)
Definition ring.cc:1733
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition ring.h:405
static ring rIncRefCnt(ring r)
Definition ring.h:846
static void rDecRefCnt(ring r)
Definition ring.h:847
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition ring.h:597
#define rField_is_Ring(R)
Definition ring.h:490
idrec * idhdl
Definition ring.h:21
sBucket * sBucket_pt
Definition sbuckets.h:16
void sBucketDestroyAdd(sBucket_pt bucket, poly *p, int *length)
Definition sbuckets.h:68
ideal idInit(int idsize, int rank)
initialise an ideal / module
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
void id_Normalize(ideal I, const ring r)
normialize all polys in id
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
void id_Shift(ideal M, int s, const ring r)
#define IDELEMS(i)
static int idElem(const ideal F)
number of non-zero polys in F
#define R
Definition sirandom.c:27
#define A
Definition sirandom.c:24
ip_package * package
Definition structs.h:43
sleftv * leftv
Definition structs.h:57
#define loop
Definition structs.h:75
VAR omBin sSubexpr_bin
Definition subexpr.cc:40
VAR omBin procinfo_bin
Definition subexpr.cc:42
BOOLEAN assumeStdFlag(leftv h)
Definition subexpr.cc:1586
@ LANG_NONE
Definition subexpr.h:22
void syKillComputation(syStrategy syzstr, ring r=currRing)
Definition syz1.cc:1495
ssyStrategy * syStrategy
Definition syz.h:36
const struct sValAssign dAssign[]
Definition table.h:1419
const struct sValAssign_sys dAssign_sys[]
Definition table.h:1471
int initTimer()
Definition timer.cc:67
void initRTimer()
Definition timer.cc:156
VAR int rtimerv
Definition timer.cc:146
VAR int timerv
Definition timer.cc:17
#define IDHDL
Definition tok.h:31
@ ALIAS_CMD
Definition tok.h:34
@ BIGINT_CMD
Definition tok.h:38
@ CRING_CMD
Definition tok.h:56
@ LIST_CMD
Definition tok.h:118
@ VPRINTLEVEL
Definition tok.h:217
@ INTVEC_CMD
Definition tok.h:101
@ PACKAGE_CMD
Definition tok.h:150
@ CMATRIX_CMD
Definition tok.h:46
@ DEF_CMD
Definition tok.h:58
@ VECHO
Definition tok.h:210
@ CNUMBER_CMD
Definition tok.h:47
@ LINK_CMD
Definition tok.h:117
@ STRING_CMD
Definition tok.h:187
@ CPOLY_CMD
Definition tok.h:48
@ INT_CMD
Definition tok.h:96
@ MAX_TOK
Definition tok.h:220
#define NONE
Definition tok.h:223
VAR omBin fractionObjectBin
Definition transext.cc:89