FORM
4.3
sources
ftypes.h
Go to the documentation of this file.
1
9
/* #[ License : */
10
/*
11
* Copyright (C) 1984-2022 J.A.M. Vermaseren
12
* When using this file you are requested to refer to the publication
13
* J.A.M.Vermaseren "New features of FORM" math-ph/0010025
14
* This is considered a matter of courtesy as the development was paid
15
* for by FOM the Dutch physics granting agency and we would like to
16
* be able to track its scientific use to convince FOM of its value
17
* for the community.
18
*
19
* This file is part of FORM.
20
*
21
* FORM is free software: you can redistribute it and/or modify it under the
22
* terms of the GNU General Public License as published by the Free Software
23
* Foundation, either version 3 of the License, or (at your option) any later
24
* version.
25
*
26
* FORM is distributed in the hope that it will be useful, but WITHOUT ANY
27
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
28
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
29
* details.
30
*
31
* You should have received a copy of the GNU General Public License along
32
* with FORM. If not, see <http://www.gnu.org/licenses/>.
33
*/
34
/* #] License : */
35
51
#define WITHOUTERROR 0
52
#define WITHERROR 1
53
54
/*
55
The various streams. (look also in tools.c)
56
*/
57
58
#define FILESTREAM 0
59
#define PREVARSTREAM 1
60
#define PREREADSTREAM 2
61
#define PIPESTREAM 3
62
#define PRECALCSTREAM 4
63
#define DOLLARSTREAM 5
64
#define PREREADSTREAM2 6
65
#define EXTERNALCHANNELSTREAM 7
66
#define PREREADSTREAM3 8
67
#define REVERSEFILESTREAM 9
68
#define INPUTSTREAM 10
69
70
#define ENDOFSTREAM 0xFF
71
#define ENDOFINPUT 0xFF
72
73
/*
74
Types of files
75
*/
76
77
#define SUBROUTINEFILE 0
78
#define PROCEDUREFILE 1
79
#define HEADERFILE 2
80
#define SETUPFILE 3
81
#define TABLEBASEFILE 4
82
83
/*
84
Types of modules
85
*/
86
87
#define FIRSTMODULE -1
88
#define GLOBALMODULE 0
89
#define SORTMODULE 1
90
#define STOREMODULE 2
91
#define CLEARMODULE 3
92
#define ENDMODULE 4
93
94
#define POLYFUN 0
95
96
#define NOPARALLEL_DOLLAR 0x0001
97
#define NOPARALLEL_RHS 0x0002
98
#define NOPARALLEL_CONVPOLY 0x0004
99
#define NOPARALLEL_SPECTATOR 0x0008
100
#define NOPARALLEL_USER 0x0010
101
#define NOPARALLEL_TBLDOLLAR 0x0100
102
#define NOPARALLEL_NPROC 0x0200
103
#define PARALLELFLAG 0x0000
104
105
#define PRENOACTION 0
106
#define PRERAISEAFTER 1
107
#define PRELOWERAFTER 2
108
/*
109
#define ELIUMOD 1
110
#define ELIZMOD 2
111
#define SKIUMOD 3
112
#define SKIZMOD 4
113
*/
114
#define WITHSEMICOLON 0
115
#define WITHOUTSEMICOLON 1
116
#define MODULEINSTACK 8
117
#define EXECUTINGIF 0
118
#define LOOKINGFORELSE 1
119
#define LOOKINGFORENDIF 2
120
#define NEWSTATEMENT 1
121
#define OLDSTATEMENT 0
122
123
#define EXECUTINGPRESWITCH 0
124
#define SEARCHINGPRECASE 1
125
#define SEARCHINGPREENDSWITCH 2
126
127
#define PREPROONLY 1
128
#define DUMPTOCOMPILER 2
129
#define DUMPOUTTERMS 4
130
#define DUMPINTERMS 8
131
#define DUMPTOSORT 16
132
#define DUMPTOPARALLEL 32
133
#define THREADSDEBUG 64
134
135
#define ERROROUT 0
136
#define INPUTOUT 1
137
#define STATSOUT 2
138
#define EXPRSOUT 3
139
#define WRITEOUT 4
140
141
#define EXTERNALCHANNELOUT 5
142
143
#define NUMERICALLOOP 0
144
#define LISTEDLOOP 1
145
#define ONEEXPRESSION 2
146
147
#define PRETYPENONE 0
148
#define PRETYPEIF 1
149
#define PRETYPEDO 2
150
#define PRETYPEPROCEDURE 3
151
#define PRETYPESWITCH 4
152
#define PRETYPEINSIDE 5
153
154
/*
155
Type of statement. Used to make sure that the statements are in proper order
156
*/
157
158
#define DECLARATION 1
159
#define SPECIFICATION 2
160
#define DEFINITION 3
161
#define STATEMENT 4
162
#define TOOUTPUT 5
163
#define ATENDOFMODULE 6
164
#define MIXED 9
165
166
/*
167
The typedefs are to allow the compilers to do better error checking.
168
*/
169
170
/*
171
icc doesn't like the typedef void VOID; Neither does g++ on the apple
172
Hence we work the old fashioned way:
173
*/
174
#define VOID void
175
176
#ifdef ANSI
177
typedef
VOID (*PVFUNWP)(WORD *);
178
#ifdef INTELCOMPILER
179
typedef
VOID (*PVFUNV)();
180
typedef
int (*CFUN)();
181
#else
182
typedef
VOID (*PVFUNV)(VOID);
183
typedef
int (*CFUN)(VOID);
184
#endif
185
typedef
int (*TFUN)(UBYTE *);
186
typedef
int (*TFUN1)(UBYTE *,int);
187
#else
188
typedef
VOID (*PVFUNWP)();
189
typedef
VOID (*PVFUNV)();
190
typedef
int (*CFUN)();
191
typedef
int (*TFUN)();
192
typedef
int (*TFUN1)();
193
#endif
194
195
196
#define NOAUTO 0
197
#define PARTEST 1
198
#define WITHAUTO 2
199
200
#define ALLVARIABLES -1
201
#define SYMBOLONLY 1
202
#define INDEXONLY 2
203
#define VECTORONLY 4
204
#define FUNCTIONONLY 8
205
#define SETONLY 16
206
#define EXPRESSIONONLY 32
207
208
216
217
#define CDELETE -1
218
#define ANYTYPE -1
219
#define CSYMBOL 0
220
#define CINDEX 1
221
#define CVECTOR 2
222
#define CFUNCTION 3
223
#define CSET 4
224
#define CEXPRESSION 5
225
#define CDOTPRODUCT 6
226
#define CNUMBER 7
227
#define CSUBEXP 8
228
#define CDELTA 9
229
#define CDOLLAR 10
230
#define CDUBIOUS 11
231
#define CRANGE 12
232
#define CVECTOR1 21
233
#define CDOUBLEDOT 22
234
237
/*
238
Types of tokens in the tokenizer.
239
*/
240
241
#define TSYMBOL -1
242
#define TINDEX -2
243
#define TVECTOR -3
244
#define TFUNCTION -4
245
#define TSET -5
246
#define TEXPRESSION -6
247
#define TDOTPRODUCT -7
248
#define TNUMBER -8
249
#define TSUBEXP -9
250
#define TDELTA -10
251
#define TDOLLAR -11
252
#define TDUBIOUS -12
253
#define LPARENTHESIS -13
254
#define RPARENTHESIS -14
255
#define TWILDCARD -15
256
#define TWILDARG -16
257
#define TDOT -17
258
#define LBRACE -18
259
#define RBRACE -19
260
#define TCOMMA -20
261
#define TFUNOPEN -21
262
#define TFUNCLOSE -22
263
#define TMULTIPLY -23
264
#define TDIVIDE -24
265
#define TPOWER -25
266
#define TPLUS -26
267
#define TMINUS -27
268
#define TNOT -28
269
#define TENDOFIT -29
270
#define TSETOPEN -30
271
#define TSETCLOSE -31
272
#define TGENINDEX -32
273
#define TCONJUGATE -33
274
#define LRPARENTHESES -34
275
#define TNUMBER1 -35
276
#define TPOWER1 -36
277
#define TEMPTY -37
278
#define TSETNUM -38
279
#define TSGAMMA -39
280
#define TSETDOL -40
281
282
#define TYPEISFUN 0
283
#define TYPEISSUB 1
284
#define TYPEISMYSTERY -1
285
286
#define LHSIDEX 2
287
#define LHSIDE 1
288
#define RHSIDE 0
289
290
/*
291
Output modes
292
*/
293
294
#define FORTRANMODE 1
295
#define REDUCEMODE 2
296
#define MAPLEMODE 3
297
#define MATHEMATICAMODE 4
298
#define CMODE 5
299
#define VORTRANMODE 6
300
#define PFORTRANMODE 7
301
#define DOUBLEFORTRANMODE 33
302
#define DOUBLEPRECISIONFLAG 32
303
#define NODOUBLEMASK 31
304
#define QUADRUPLEFORTRANMODE 65
305
#define QUADRUPLEPRECISIONFLAG 64
306
#define ALLINTEGERDOUBLE 128
307
#define NOQUADMASK 63
308
#define NORMALFORMAT 0
309
#define NOSPACEFORMAT 1
310
311
#define ISNOTFORTRAN90 0
312
#define ISFORTRAN90 1
313
314
#define ALSOREVERSE 1
315
#define CHISHOLM 2
316
#define NOTRICK 16
317
318
#define SORTLOWFIRST 0
319
#define SORTHIGHFIRST 1
320
#define SORTPOWERFIRST 2
321
#define SORTANTIPOWER 3
322
323
#define NMIN4SHIFT 4
324
/*
325
The next are the main codes.
326
Note: SETSET is not allowed to be 4*n+1
327
We use those codes in CoIdExpression for function information
328
after the pattern. Because SETSET also stands there we have to
329
be careful!!
330
Don't forget MAXBUILTINFUNCTION when adding codes!
331
The object FUNCTION is at the start of the functions that are in regular
332
notation. Anything below it is in special notation.
333
334
Remark: HAAKJE0 is for compression purposes and should only occur
335
at moments that ARGWILD cannot occur.
336
*/
337
#define SYMBOL 1
338
#define DOTPRODUCT 2
339
#define VECTOR 3
340
#define INDEX 4
341
#define EXPRESSION 5
342
#define SUBEXPRESSION 6
343
#define DOLLAREXPRESSION 7
344
#define SETSET 8
345
#define ARGWILD 9
346
#define MINVECTOR 10
347
#define SETEXP 11
348
#define DOLLAREXPR2 12
349
#define HAAKJE0 9
350
#define FUNCTION 20
351
352
#define TMPPOLYFUN 14
353
#define ARGFIELD 15
354
#define SNUMBER 16
355
#define LNUMBER 17
356
#define HAAKJE 18
357
#define DELTA 19
358
#define EXPONENT 20
359
#define DENOMINATOR 21
360
#define SETFUNCTION 22
361
#define GAMMA 23
362
#define GAMMAI 24
363
#define GAMMAFIVE 25
364
#define GAMMASIX 26
365
#define GAMMASEVEN 27
366
#define SUMF1 28
367
#define SUMF2 29
368
#define DUMFUN 30
369
#define REPLACEMENT 31
370
#define REVERSEFUNCTION 32
371
#define DISTRIBUTION 33
372
#define DELTA3 34
373
#define DUMMYFUN 35
374
#define DUMMYTEN 36
375
#define LEVICIVITA 37
376
#define FACTORIAL 38
377
#define INVERSEFACTORIAL 39
378
#define BINOMIAL 40
379
#define NUMARGSFUN 41
380
#define SIGNFUN 42
381
#define MODFUNCTION 43
382
#define MOD2FUNCTION 44
383
#define MINFUNCTION 45
384
#define MAXFUNCTION 46
385
#define ABSFUNCTION 47
386
#define SIGFUNCTION 48
387
#define INTFUNCTION 49
388
#define THETA 50
389
#define THETA2 51
390
#define DELTA2 52
391
#define DELTAP 53
392
#define BERNOULLIFUNCTION 54
393
#define COUNTFUNCTION 55
394
#define MATCHFUNCTION 56
395
#define PATTERNFUNCTION 57
396
#define TERMFUNCTION 58
397
#define CONJUGATION 59
398
#define ROOTFUNCTION 60
399
#define TABLEFUNCTION 61
400
#define FIRSTBRACKET 62
401
#define TERMSINEXPR 63
402
#define NUMTERMSFUN 64
403
#define GCDFUNCTION 65
404
#define DIVFUNCTION 66
405
#define REMFUNCTION 67
406
#define MAXPOWEROF 68
407
#define MINPOWEROF 69
408
#define TABLESTUB 70
409
#define FACTORIN 71
410
#define TERMSINBRACKET 72
411
#define WILDARGFUN 73
412
/*
413
In the past we would add new functions here and raise the numbers
414
on the special reserved names. This is impractical in the light of
415
the .sav files. The .sav files need a mechanism that contains the
416
value of MAXBUILTINFUNCTION at the moment of writing. This allows
417
form corrections if this value has changed in the mean time.
418
*/
419
#define SQRTFUNCTION 74
420
#define LNFUNCTION 75
421
#define SINFUNCTION 76
422
#define COSFUNCTION 77
423
#define TANFUNCTION 78
424
#define ASINFUNCTION 79
425
#define ACOSFUNCTION 80
426
#define ATANFUNCTION 81
427
#define ATAN2FUNCTION 82
428
#define SINHFUNCTION 83
429
#define COSHFUNCTION 84
430
#define TANHFUNCTION 85
431
#define ASINHFUNCTION 86
432
#define ACOSHFUNCTION 87
433
#define ATANHFUNCTION 88
434
#define LI2FUNCTION 89
435
#define LINFUNCTION 90
436
437
#define EXTRASYMFUN 91
438
#define RANDOMFUNCTION 92
439
#define RANPERM 93
440
#define NUMFACTORS 94
441
#define FIRSTTERM 95
442
#define CONTENTTERM 96
443
#define PRIMENUMBER 97
444
#define EXTEUCLIDEAN 98
445
#define MAKERATIONAL 99
446
#define INVERSEFUNCTION 100
447
#define IDFUNCTION 101
448
#define PUTFIRST 102
449
#define PERMUTATIONS 103
450
#define PARTITIONS 104
451
#define MULFUNCTION 105
452
#define MOEBIUS 106
453
#define TOPOLOGIES 107
454
#define DIAGRAMS 108
455
#define VERTEX 109
456
#define EDGE 110
457
/*#define ALLWILD 109 ???? */
458
#define SIZEOFFUNCTION 111
459
460
#define MAXBUILTINFUNCTION 111
461
#define FIRSTUSERFUNCTION 150
462
463
/*
464
Note: if we add a builtin table we have to look also inside names.c
465
in the routine Globalize because there we assume there does not exist
466
such an object
467
*/
468
469
#define ISYMBOL 0
470
#define PISYMBOL 1
471
#define COEFFSYMBOL 2
472
#define NUMERATORSYMBOL 3
473
#define DENOMINATORSYMBOL 4
474
#define WILDARGSYMBOL 5
475
#define DIMENSIONSYMBOL 6
476
#define FACTORSYMBOL 7
477
#define SEPARATESYMBOL 8
478
479
#define BUILTINSYMBOLS 9
480
#define FIRSTUSERSYMBOL 20
481
482
#define BUILTININDICES 1
483
#define BUILTINVECTORS 1
484
#define BUILTINDOLLARS 1
485
486
#define WILDARGVECTOR 0
487
#define WILDARGINDEX 0
488
489
/*
490
The objects that have a name that starts with TYPE are codes of statements
491
made by the compiler. Each statement starts with such a code, followed by
492
its size. For how most of these statements are used can be seen in the
493
Generator function in the file proces.c
494
TYPEOPERATION is an anachronism that remains used only for the statements
495
that are executed in the file opera.c (like traces and contractions).
496
*/
497
498
#define TYPEEXPRESSION 0
499
#define TYPEIDNEW 1
500
#define TYPEIDOLD 2
501
#define TYPEOPERATION 3
502
#define TYPEREPEAT 4
503
#define TYPEENDREPEAT 5
504
/*
505
The next counts must be higher than the ones before
506
*/
507
#define TYPECOUNT 20
508
#define TYPEMULT 21
509
#define TYPEGOTO 22
510
#define TYPEDISCARD 23
511
#define TYPEIF 24
512
#define TYPEELSE 25
513
#define TYPEELIF 26
514
#define TYPEENDIF 27
515
#define TYPESUM 28
516
#define TYPECHISHOLM 29
517
#define TYPEREVERSE 30
518
#define TYPEARG 31
519
#define TYPENORM 32
520
#define TYPENORM2 33
521
#define TYPENORM3 34
522
#define TYPEEXIT 35
523
#define TYPESETEXIT 36
524
#define TYPEPRINT 37
525
#define TYPEFPRINT 38
526
#define TYPEREDEFPRE 39
527
#define TYPESPLITARG 40
528
#define TYPESPLITARG2 41
529
#define TYPEFACTARG 42
530
#define TYPEFACTARG2 43
531
#define TYPETRY 44
532
#define TYPEASSIGN 45
533
#define TYPERENUMBER 46
534
#define TYPESUMFIX 47
535
#define TYPEFINDLOOP 48
536
#define TYPEUNRAVEL 49
537
#define TYPEADJUSTBOUNDS 50
538
#define TYPEINSIDE 51
539
#define TYPETERM 52
540
#define TYPESORT 53
541
#define TYPEDETCURDUM 54
542
#define TYPEINEXPRESSION 55
543
#define TYPESPLITFIRSTARG 56
544
#define TYPESPLITLASTARG 57
545
#define TYPEMERGE 58
546
#define TYPETESTUSE 59
547
#define TYPEAPPLY 60
548
#define TYPEAPPLYRESET 61
549
#define TYPECHAININ 62
550
#define TYPECHAINOUT 63
551
#define TYPENORM4 64
552
#define TYPEFACTOR 65
553
#define TYPEARGIMPLODE 66
554
#define TYPEARGEXPLODE 67
555
#define TYPEDENOMINATORS 68
556
#define TYPESTUFFLE 69
557
#define TYPEDROPCOEFFICIENT 70
558
#define TYPETRANSFORM 71
559
#define TYPETOPOLYNOMIAL 72
560
#define TYPEFROMPOLYNOMIAL 73
561
#define TYPEDOLOOP 74
562
#define TYPEENDDOLOOP 75
563
#define TYPEDROPSYMBOLS 76
564
#define TYPEPUTINSIDE 77
565
#define TYPETOSPECTATOR 78
566
#define TYPEARGTOEXTRASYMBOL 79
567
#define TYPECANONICALIZE 80
568
#define TYPESWITCH 81
569
#define TYPEENDSWITCH 82
570
571
/*
572
The codes for the 'operations' that are part of TYPEOPERATION.
573
*/
574
575
#define TAKETRACE 1
576
#define CONTRACT 2
577
#define RATIO 3
578
#define SYMMETRIZE 4
579
#define TENVEC 5
580
#define SUMNUM1 6
581
#define SUMNUM2 7
582
583
/*
584
The various types of wildcards.
585
*/
586
587
#define WILDDUMMY 0
588
#define SYMTONUM 1
589
#define SYMTOSYM 2
590
#define SYMTOSUB 3
591
#define VECTOMIN 4
592
#define VECTOVEC 5
593
#define VECTOSUB 6
594
#define INDTOIND 7
595
#define INDTOSUB 8
596
#define FUNTOFUN 9
597
#define ARGTOARG 10
598
#define ARLTOARL 11
599
#define EXPTOEXP 12
600
#define FROMBRAC 13
601
#define FROMSET 14
602
#define SETTONUM 15
603
#define WILDCARDS 16
604
#define SETNUMBER 17
605
#define LOADDOLLAR 18
606
/*
607
Some new types of wildcards that hold only for function arguments.
608
*/
609
#define NUMTONUM 20
610
#define NUMTOSYM 21
611
#define NUMTOIND 22
612
#define NUMTOSUB 23
613
614
/*
615
Dirty flags (introduced when functions got a field with a dirty flag)
616
*/
617
618
#define CLEANFLAG 0
619
#define DIRTYFLAG 1
620
#define DIRTYSYMFLAG 2
621
#define MUSTCLEANPRF 4
622
#define SUBTERMUSED1 8
623
#define SUBTERMUSED2 16
624
#define ALLDIRTY (DIRTYFLAG|DIRTYSYMFLAG)
625
626
#define ARGHEAD 2
627
#define FUNHEAD 3
628
#define SUBEXPSIZE 5
629
#define EXPRHEAD 5
630
#define TYPEARGHEADSIZE 6
631
632
/*
633
Actions to be taken with expressions. They are marked with these objects
634
during compilation.
635
*/
636
637
#define SKIP 1
638
#define DROP 2
639
#define HIDE 3
640
#define UNHIDE 4
641
#define INTOHIDE 5
642
643
/*
644
Types of expressions
645
*/
646
647
#define LOCALEXPRESSION 0
648
#define SKIPLEXPRESSION 1
649
#define DROPLEXPRESSION 2
650
#define DROPPEDEXPRESSION 3
651
#define GLOBALEXPRESSION 4
652
#define SKIPGEXPRESSION 5
653
#define DROPGEXPRESSION 6
654
#define STOREDEXPRESSION 8
655
#define HIDDENLEXPRESSION 9
656
#define HIDDENGEXPRESSION 13
657
#define INCEXPRESSION 9
658
#define HIDELEXPRESSION 10
659
#define HIDEGEXPRESSION 14
660
#define DROPHLEXPRESSION 11
661
#define DROPHGEXPRESSION 15
662
#define UNHIDELEXPRESSION 12
663
#define UNHIDEGEXPRESSION 16
664
#define INTOHIDELEXPRESSION 17
665
#define INTOHIDEGEXPRESSION 18
666
#define SPECTATOREXPRESSION 19
667
#define DROPSPECTATOREXPRESSION 20
668
#define SKIPUNHIDELEXPRESSION 21
669
#define SKIPUNHIDEGEXPRESSION 22
670
671
#define PRINTOFF 0
672
#define PRINTON 1
673
#define PRINTCONTENTS 2
674
#define PRINTCONTENT 3
675
#define PRINTLFILE 4
676
#define PRINTONETERM 8
677
#define PRINTONEFUNCTION 16
678
#define PRINTALL 32
679
680
/*
681
Special codes for the replace variable in the EXPRESSIONS struct
682
*/
683
684
#define REGULAREXPRESSION -1
685
#define REDEFINEDEXPRESSION -2
686
#define NEWLYDEFINEDEXPRESSION -3
687
695
#define GENERALFUNCTION 0
696
#define FASTFUNCTION 1
697
#define TENSORFUNCTION 2
698
#define GAMMAFUNCTION 4
701
/*
702
Special sets
703
*/
704
705
#define POS_ 0
/* integer > 0 */
706
#define POS0_ 1
/* integer >= 0 */
707
#define NEG_ 2
/* integer < 0 */
708
#define NEG0_ 3
/* integer <= 0 */
709
#define EVEN_ 4
/* integer (even) */
710
#define ODD_ 5
/* integer (odd) */
711
#define Z_ 6
/* integer */
712
#define SYMBOL_ 7
/* symbol only */
713
#define FIXED_ 8
/* fixed index */
714
#define INDEX_ 9
/* index only */
715
#define Q_ 10
/* rational */
716
#define DUMMYINDEX_ 11
/* dummy index only */
717
#define VECTOR_ 12
/* vector only */
718
719
/*
720
Special indices.
721
*/
722
723
#define GAMMA1 0
724
#define GAMMA5 -1
725
#define GAMMA6 -2
726
#define GAMMA7 -3
727
#define FUNNYVEC -4
728
#define FUNNYWILD -5
729
#define SUMMEDIND -6
730
#define NOINDEX -7
731
#define FUNNYDOLLAR -8
732
#define EMPTYINDEX -9
733
734
/*
735
The next one should be less than all of the above special indices.
736
*/
737
738
#define MINSPEC -10
739
740
#define USEDFLAG 2
741
#define DUMMYFLAG 1
742
743
#define MAINSORT 0
744
#define FUNCTIONSORT 1
745
#define SUBSORT 2
746
747
#define FLOATMODE 1
748
#define RATIONALMODE 0
749
750
#define NUMSPECSETS 10
751
#define EATTENSOR 0x2000
752
753
#define ISZERO 1
754
#define ISUNMODIFIED 2
755
#define ISCOMPRESSED 4
756
#define ISINRHS 8
757
#define ISFACTORIZED 16
758
#define TOBEFACTORED 32
759
#define TOBEUNFACTORED 64
760
#define KEEPZERO 128
761
762
#define VARTYPENONE 0
763
#define VARTYPECOMPLEX 1
764
#define VARTYPEIMAGINARY 2
765
#define VARTYPEROOTOFUNITY 4
766
#define VARTYPEMINUS 8
767
#define CYCLESYMMETRIC 1
768
#define RCYCLESYMMETRIC 2
769
#define SYMMETRIC 3
770
#define ANTISYMMETRIC 4
771
#define REVERSEORDER 256
772
773
/*
774
Types of id statements (substitutions)
775
*/
776
777
#define SUBMULTI 1
778
#define SUBONCE 2
779
#define SUBONLY 3
780
#define SUBMANY 4
781
#define SUBVECTOR 5
782
#define SUBSELECT 6
783
#define SUBALL 7
784
#define SUBMASK 15
785
#define SUBDISORDER 16
786
#define SUBAFTER 32
787
#define SUBAFTERNOT 64
788
789
#define IDHEAD 6
790
791
#define DOLLARFLAG 1
792
#define NORMALIZEFLAG 2
793
794
#define GIDENT 1
795
#define GFIVE 4
796
#define GPLUS 3
797
#define GMINUS 2
798
799
/*
800
Types of objects inside an if clause.
801
*/
802
803
#define LONGNUMBER 1
804
#define MATCH 2
805
#define COEFFI 3
806
#define SUBEXPR 4
807
#define MULTIPLEOF 5
808
#define IFDOLLAR 6
809
#define IFEXPRESSION 7
810
#define IFDOLLAREXTRA 8
811
#define IFISFACTORIZED 9
812
#define IFOCCURS 10
813
#define GREATER 0
814
#define GREATEREQUAL 1
815
#define LESS 2
816
#define LESSEQUAL 3
817
#define EQUAL 4
818
#define NOTEQUAL 5
819
#define ORCOND 6
820
#define ANDCOND 7
821
#define DUMMY 1
822
#define SORT 1
823
#define STORE 2
824
#define END 3
825
#define GLOBAL 4
826
#define CLEAR 5
827
828
#define VECTBIT 1
829
#define DOTPBIT 2
830
#define FUNBIT 4
831
#define SETBIT 8
832
833
#define EXTRAPARAMETER 0x4000
834
#define GENCOMMUTE 0
835
#define GENNONCOMMUTE 0x2000
836
837
#define NAMENOTFOUND -9
838
839
/*
840
Types of dollar expressions.
841
*/
842
843
#define DOLUNDEFINED 0
844
#define DOLNUMBER 1
845
#define DOLARGUMENT 2
846
#define DOLSUBTERM 3
847
#define DOLTERMS 4
848
#define DOLWILDARGS 5
849
#define DOLINDEX 6
850
#define DOLZERO 7
851
852
#define FINDLOOP 0
853
#define REPLACELOOP 1
854
855
#define NOFUNPOWERS 0
856
#define COMFUNPOWERS 1
857
#define ALLFUNPOWERS 2
858
859
#define PROPERORDERFLAG 0
860
861
#define REGULAR 0
862
#define FINISH 1
863
864
#define POLYADD 1
865
#define POLYSUB 2
866
#define POLYMUL 3
867
#define POLYDIV 4
868
#define POLYREM 5
869
#define POLYGCD 6
870
#define POLYINTFAC 7
871
#define POLYNORM 8
872
873
#define MODNONE 0
874
#define MODSUM 1
875
#define MODMAX 2
876
#define MODMIN 3
877
#define MODLOCAL 4
878
879
#define ELEMENTUSED 1
880
#define ELEMENTLOADED 2
881
/*
882
Variables for the modulus statement, flags in AC.modmode
883
For explanation, see CoModulus
884
*/
885
#define POSNEG 0x1
886
#define INVERSETABLE 0x2
887
#define COEFFICIENTSONLY 0x4
888
#define ALSOPOWERS 0x8
889
#define ALSOFUNARGS 0x10
890
#define ALSODOLLARS 0x20
891
#define NOINVERSES 0x40
892
893
#define POSITIVEONLY 0
894
#define UNPACK 0x80
895
#define NOUNPACK 0
896
#define FROMFUNCTION 0x100
897
898
#define VARNAMES 0
899
#define AUTONAMES 1
900
#define EXPRNAMES 2
901
#define DOLLARNAMES 3
902
903
#ifdef WITHPTHREADS
904
/*
905
Signals that the workers have to react to
906
*/
907
908
#define TERMINATETHREAD -1
909
#define STARTNEWEXPRESSION 1
910
#define LOWESTLEVELGENERATION 2
911
#define FINISHEXPRESSION 3
912
#define CLEANUPEXPRESSION 4
913
#define HIGHERLEVELGENERATION 5
914
#define STARTNEWMODULE 6
915
#define CLAIMOUTPUT 7
916
#define FINISHEXPRESSION2 8
917
#define INISORTBOT 7
918
#define RUNSORTBOT 8
919
#define DOONEEXPRESSION 9
920
#define DOBRACKETS 10
921
#define CLEARCLOCK 11
922
#define MCTSEXPANDTREE 12
923
#define OPTIMIZEEXPRESSION 13
924
925
#define MASTERBUFFERISFULL 1
926
927
/*
928
Bucket states
929
*/
930
931
#define BUCKETFREE 1
932
#define BUCKETINUSE 0
933
#define BUCKETCOMINGFREE 2
934
#define BUCKETFILLED -1
935
#define BUCKETATEND -2
936
#define BUCKETTERMINATED 3
937
#define BUCKETRELEASED 4
938
939
#define NUMBEROFBLOCKSINSORT 10
940
#define MINIMUMNUMBEROFTERMS 10
941
942
#define BUCKETDOINGTERM 1
943
#define BUCKETASSIGNED -1
944
#define BUCKETTOBERELEASED -2
945
#define BUCKETPREPARINGTERM 0
946
947
#define BUCKETDOINGTERMS 0
948
#define BUCKETDOINGBRACKET 1
949
#endif
950
951
/*
952
The next variable is because there is some use of cbufnum that is
953
probably irrelevant. We use here DUMMYBUFNUM instead of AC.cbufnum
954
just in case we run into trouble later.
955
*/
956
#define DUMMYBUFFER 1
957
958
#define ALLARGS 1
959
#define NUMARG 2
960
#define ARGRANGE 3
961
#define MAKEARGS 4
962
#define MAXRANGEINDICATOR 4
963
#define REPLACEARG 5
964
#define ENCODEARG 6
965
#define DECODEARG 7
966
#define IMPLODEARG 8
967
#define EXPLODEARG 9
968
#define PERMUTEARG 10
969
#define REVERSEARG 11
970
#define CYCLEARG 12
971
#define ISLYNDON 13
972
#define ISLYNDONR 14
973
#define TOLYNDON 15
974
#define TOLYNDONR 16
975
#define ADDARG 17
976
#define MULTIPLYARG 18
977
#define DROPARG 19
978
#define SELECTARG 20
979
#define DEDUPARG 21
980
981
#define BASECODE 1
982
#define YESLYNDON 1
983
#define NOLYNDON 2
984
985
#define TOPOLYNOMIALFLAG 1
986
#define FACTARGFLAG 2
987
988
#define OLDFACTARG 1
989
#define NEWFACTARG 0
990
991
#define FROMMODULEOPTION 0
992
#define FROMPOINTINSTRUCTION 1
993
994
#define EXTRASYMBOL 0
995
#define REGULARSYMBOL 1
996
#define EXPRESSIONNUMBER 2
997
998
#define O_NONE 0
999
#define O_CSE 1
1000
#define O_CSEGREEDY 2
1001
#define O_GREEDY 3
1002
1003
#define O_OCCURRENCE 0
1004
#define O_MCTS 1
1005
#define O_SIMULATED_ANNEALING 2
1006
1007
#define O_FORWARD 0
1008
#define O_BACKWARD 1
1009
#define O_FORWARDORBACKWARD 2
1010
#define O_FORWARDANDBACKWARD 3
1011
1012
#define OPTHEAD 3
1013
#define DOALL 1
1014
#define ONLYFUNCTIONS 2
1015
1016
#define INUSE 1
1017
#define COULDCOMMUTE 2
1018
#define DOESNOTCOMMUTE 4
1019
1020
#define DICT_NONUMBERS 0
1021
#define DICT_INTEGERONLY 1
1022
#define DICT_RATIONALONLY 2
1023
#define DICT_ALLNUMBERS 3
1024
#define DICT_NOVARIABLES 0
1025
#define DICT_DOVARIABLES 1
1026
#define DICT_NOSPECIALS 0
1027
#define DICT_DOSPECIALS 1
1028
#define DICT_NOFUNWITHARGS 0
1029
#define DICT_DOFUNWITHARGS 1
1030
#define DICT_NOTINDOLLARS 0
1031
#define DICT_INDOLLARS 1
1032
1033
#define DICT_INTEGERNUMBER 1
1034
#define DICT_RATIONALNUMBER 2
1035
#define DICT_SYMBOL 3
1036
#define DICT_VECTOR 4
1037
#define DICT_INDEX 5
1038
#define DICT_FUNCTION 6
1039
#define DICT_FUNCTION_WITH_ARGUMENTS 7
1040
#define DICT_SPECIALCHARACTER 8
1041
#define DICT_RANGE 9
1042
1043
#define READSPECTATORFLAG 3
1044
#define GLOBALSPECTATORFLAG 1
1045
1046
#define ORDEREDSET 1
1047
1048
#define DENSETABLE 1
1049
#define SPARSETABLE 0
1050
Generated by
1.9.6