FORM v5.0.0-35-g6318119
inivar.h
Go to the documentation of this file.
1
7/* #[ License : */
8/*
9 * Copyright (C) 1984-2026 J.A.M. Vermaseren
10 * When using this file you are requested to refer to the publication
11 * J.A.M.Vermaseren "New features of FORM" math-ph/0010025
12 * This is considered a matter of courtesy as the development was paid
13 * for by FOM the Dutch physics granting agency and we would like to
14 * be able to track its scientific use to convince FOM of its value
15 * for the community.
16 *
17 * This file is part of FORM.
18 *
19 * FORM is free software: you can redistribute it and/or modify it under the
20 * terms of the GNU General Public License as published by the Free Software
21 * Foundation, either version 3 of the License, or (at your option) any later
22 * version.
23 *
24 * FORM is distributed in the hope that it will be useful, but WITHOUT ANY
25 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
26 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
27 * details.
28 *
29 * You should have received a copy of the GNU General Public License along
30 * with FORM. If not, see <http://www.gnu.org/licenses/>.
31 */
32/* #] License : */
33
34FIXEDGLOBALS FG = {
35 {Traces /* Dummy as zeroeth argument */
36 ,Traces
37 ,EpfCon
38 ,RatioGen
39 ,SymGen
40 ,TenVec
41 ,DoSumF1
42 ,DoSumF2}
43
44 ,{TraceFind /* Dummy as zeroeth argument */
45 ,TraceFind
46 ,EpfFind
47 ,RatioFind
48 ,SymFind
49 ,TenVecFind}
50
51 ,{"symbol"
52 ,"index"
53 ,"vector"
54 ,"function"
55 ,"set"
56 ,"expression"
57 ,"dotproduct"
58 ,"number"
59 ,"subexp"
60 ,"delta"}
61
62 ,{"(local)"
63 ,"(skip/local)"
64 ,"(drop/local)"
65 ,"(dropped)"
66 ,"(global)"
67 ,"(skip/global)"
68 ,"(drop/global)"
69 ,"(dropped)"
70 ,"(stored)"
71 ,"(local-hidden)"
72 ,"(local-to be hidden)"
73 ,"(local-hidden-dropped)"
74 ,"(local-to be unhidden)"
75 ,"(global-hidden)"
76 ,"(global-to be hidden)"
77 ,"(global-hidden-dropped)"
78 ,"(global-to be unhidden)"
79 ,"(into-hide-local)"
80 ,"(into-hide-global)"
81 ,"(spectator)"
82 ,"(drop/spectator)"}
83
84 ,{" Functions"
85 ," Commuting Functions"}
86
87 ,{"left "
88 ,"active "
89 ,"in output"}
90
91 ,(char *)0
92 ,(char *)0
93 ,(UBYTE *)"1"
94 ,(WORD)0
95 ,(WORD)0
96 ,(WORD)0
97 ,(WORD)0
98
99/* ASCII table of character types. Note that on some computers this
100 table may be different from the ASCII table.
101
102 -1 Illegal character
103 0 Alphabetic character
104 1 Digit
105 2 . $ _ ? # or '
106 3 [,]
107 4 ( ) = ; or ,
108 5 + - * % / ^ :
109 6 blank, tab, linefeed
110 7 {,|,}
111 8 ! & < >
112 9 "
113 10 The ultimate end.
114*/
115 ,{ 10,255,255,255,255,255,255,255,255, 6, 6,255,255, 6,255,255,
116 255,255,255,255,255,255,255,255,255,255, 10,255,255,255,255,255,
117 6, 8, 9, 2, 2, 5, 8, 2, 4, 4, 5, 5, 4, 5, 2, 5,
118 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 8, 4, 8, 2,
119 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,255, 3, 5, 2,
121 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
122 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7,255,255,
123 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
124 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
125 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
126 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
127 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
128 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
129 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
130 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 }
131};
132
133ALLGLOBALS A;
134#ifdef WITHPTHREADS
135ALLPRIVATES **AB;
136#endif
137
138static struct fixedfun {
139 char *name;
140 int commu ,tensor ,complx ,symmetric;
141} fixedfunctions[] = {
142 {"exp_" ,1 ,0 ,0 ,0} /* EXPONENT */
143 ,{"denom_" ,1 ,0 ,0 ,0} /* DENOMINATOR */
144 ,{"setfun_" ,1 ,0 ,0 ,0} /* SETFUNCTION */
145 ,{"g_" ,1 ,GAMMAFUNCTION ,VARTYPEIMAGINARY,0} /* GAMMA */
146 ,{"gi_" ,1 ,GAMMAFUNCTION ,VARTYPEIMAGINARY,0} /* GAMMAI */
147 ,{"g5_" ,1 ,GAMMAFUNCTION ,VARTYPEIMAGINARY,0} /* GAMMAFIVE */
148 ,{"g6_" ,1 ,GAMMAFUNCTION ,VARTYPEIMAGINARY,0} /* GAMMASIX */
149 ,{"g7_" ,1 ,GAMMAFUNCTION ,VARTYPEIMAGINARY,0} /* GAMMASEVEN */
150 ,{"sum_" ,1 ,0 ,0 ,0} /* SUMF1 */
151 ,{"sump_" ,1 ,0 ,0 ,0} /* SUMF2 */
152 ,{"dum_" ,1 ,0 ,0 ,0} /* DUMFUN */
153 ,{"replace_" ,0 ,0 ,0 ,0} /* REPLACEMENT */
154 ,{"reverse_" ,1 ,0 ,0 ,0} /* REVERSEFUNCTION */
155 ,{"distrib_" ,1 ,0 ,0 ,0} /* DISTRIBUTION */
156 ,{"dd_" ,0 ,TENSORFUNCTION ,0 ,0} /* DELTA3 */
157 ,{"dummy_" ,0 ,0 ,0 ,0} /* DUMMYFUN */
158 ,{"dummyten_",0 ,TENSORFUNCTION ,0 ,0} /* DUMMYTEN */
159 ,{"e_" ,0 ,TENSORFUNCTION|1 ,VARTYPEIMAGINARY,ANTISYMMETRIC}
160 /* LEVICIVITA */
161 ,{"fac_" ,0 ,0 ,0 ,0} /* FACTORIAL */
162 ,{"invfac_" ,0 ,0 ,0 ,0} /* INVERSEFACTORIAL */
163 ,{"binom_" ,0 ,0 ,0 ,0} /* BINOMIAL */
164 ,{"nargs_" ,0 ,0 ,0 ,0} /* NUMARGSFUN */
165 ,{"sign_" ,0 ,0 ,0 ,0} /* SIGNFUN */
166 ,{"mod_" ,0 ,0 ,0 ,0} /* MODFUNCTION */
167 ,{"mod2_" ,0 ,0 ,0 ,0} /* MOD2FUNCTION */
168 ,{"min_" ,0 ,0 ,0 ,0} /* MINFUNCTION */
169 ,{"max_" ,0 ,0 ,0 ,0} /* MAXFUNCTION */
170 ,{"abs_" ,0 ,0 ,0 ,0} /* ABSFUNCTION */
171 ,{"sig_" ,0 ,0 ,0 ,0} /* SIGFUNCTION */
172 ,{"integer_" ,0 ,0 ,0 ,0} /* INTFUNCTION */
173 ,{"theta_" ,0 ,0 ,0 ,0} /* THETA */
174 ,{"thetap_" ,0 ,0 ,0 ,0} /* THETA2 */
175 ,{"delta_" ,0 ,0 ,0 ,0} /* DELTA2 */
176 ,{"deltap_" ,0 ,0 ,0 ,0} /* DELTAP */
177 ,{"bernoulli_",0,0 ,0 ,0} /* BERNOULLIFUNCTION */
178 ,{"count_" ,0 ,0 ,0 ,0} /* COUNTFUNCTION */
179 ,{"match_" ,0 ,0 ,0 ,0} /* MATCHFUNCTION */
180 ,{"pattern_" ,0 ,0 ,VARTYPECOMPLEX ,0} /* PATTERNFUNCTION */
181 ,{"term_" ,1 ,0 ,0 ,0} /* TERMFUNCTION */
182 ,{"conjg_" ,1 ,0 ,VARTYPECOMPLEX ,0} /* CONJUGATEFUNCTION */
183 ,{"root_" ,0 ,0 ,0 ,0} /* ROOTFUNCTION */
184 ,{"table_" ,1 ,0 ,0 ,0} /* TABLEFUNCTION */
185 ,{"firstbracket_",0 ,0 ,0 ,0} /* FIRSTBRACKET */
186 ,{"termsin_" ,0 ,0 ,0 ,0} /* TERMSINEXPR */
187 ,{"nterms_" ,0 ,0 ,0 ,0} /* NUMTERMSFUN */
188 ,{"gcd_" ,0 ,0 ,0 ,0} /* GCDFUNCTION */
189 ,{"div_" ,0 ,0 ,0 ,0} /* DIVFUNCTION */
190 ,{"rem_" ,0 ,0 ,0 ,0} /* REMFUNCTION */
191 ,{"maxpowerof_",0 ,0 ,0 ,0} /* MAXPOWEROF */
192 ,{"minpowerof_",0 ,0 ,0 ,0} /* MINPOWEROF */
193 ,{"tbl_" ,0 ,0 ,0 ,0} /* TABLESTUB */
194 ,{"factorin_",0 ,0 ,0 ,0} /* FACTORIN */
195 ,{"termsinbracket_",0 ,0 ,0 ,0} /* TERMSINBRACKET */
196 ,{"farg_" ,0 ,0 ,0 ,0} /* WILDARGFUN */
197/*
198 The following names are reserved for the floating point library.
199 As long as we have no floating point numbers they do not do anything.
200*/
201 ,{"sqrt_" ,0 ,0 ,0 ,0} /* SQRTFUNCTION */
202 ,{"ln_" ,0 ,0 ,0 ,0} /* LNFUNCTION */
203 ,{"sin_" ,0 ,0 ,0 ,0} /* SINFUNCTION */
204 ,{"cos_" ,0 ,0 ,0 ,0} /* COSFUNCTION */
205 ,{"tan_" ,0 ,0 ,0 ,0} /* TANFUNCTION */
206 ,{"asin_" ,0 ,0 ,0 ,0} /* ASINFUNCTION */
207 ,{"acos_" ,0 ,0 ,0 ,0} /* ACOSFUNCTION */
208 ,{"atan_" ,0 ,0 ,0 ,0} /* ATANFUNCTION */
209 ,{"atan2_" ,0 ,0 ,0 ,0} /* ATAN2FUNCTION */
210 ,{"sinh_" ,0 ,0 ,0 ,0} /* SINHFUNCTION */
211 ,{"cosh_" ,0 ,0 ,0 ,0} /* COSHFUNCTION */
212 ,{"tanh_" ,0 ,0 ,0 ,0} /* TANHFUNCTION */
213 ,{"asinh_" ,0 ,0 ,0 ,0} /* ASINHFUNCTION */
214 ,{"acosh_" ,0 ,0 ,0 ,0} /* ACOSHFUNCTION */
215 ,{"atanh_" ,0 ,0 ,0 ,0} /* ATANHFUNCTION */
216 ,{"li2_" ,0 ,0 ,0 ,0} /* LI2FUNCTION */
217 ,{"lin_" ,0 ,0 ,0 ,0} /* LINFUNCTION */
218/*
219 From here on we continue with new functions (26-sep-2010)
220*/
221 ,{"extrasymbol_",0 ,0 ,0 ,0} /* EXTRASYMFUN */
222 ,{"random_" ,0 ,0 ,0 ,0} /* RANDOMFUNCTION */
223 ,{"ranperm_" ,1 ,0 ,0 ,0} /* RANPERM */
224 ,{"numfactors_" ,0 ,0 ,0 ,0} /* NUMFACTORS */
225 ,{"firstterm_" ,0 ,0 ,0 ,0} /* FIRSTTERM */
226 ,{"content_" ,0 ,0 ,0 ,0} /* CONTENTTERM */
227 ,{"prime_" ,0 ,0 ,0 ,0} /* PRIMENUMBER */
228 ,{"exteuclidean_",0 ,0 ,0 ,0} /* EXTEUCLIDEAN */
229 ,{"makerational_",0 ,0 ,0 ,0} /* MAKERATIONAL */
230 ,{"inverse_" ,0 ,0 ,0 ,0} /* INVERSEFUNCTION */
231 ,{"id_" ,1 ,0 ,0 ,0} /* IDFUNCTION */
232 ,{"putfirst_" ,1 ,0 ,0 ,0} /* PUTFIRST */
233 ,{"perm_" ,1 ,0 ,0 ,0} /* PERMUTATIONS */
234 ,{"partitions_" ,1 ,0 ,0 ,0} /* PARTITIONS */
235 ,{"mul_" ,0 ,0 ,0 ,0} /* MULFUNCTION */
236 ,{"moebius_" ,0 ,0 ,0 ,0} /* MOEBIUS */
237 ,{"topologies_" ,0 ,0 ,0 ,0} /* TOPOLOGIES */
238 ,{"diagrams_" ,0 ,0 ,0 ,0} /* DIAGRAMS */
239 ,{"topo_" ,0 ,0 ,0 ,0} /* TOPO */
240 ,{"node_" ,0 ,0 ,0 ,0} /* VERTEX */
241 ,{"edge_" ,0 ,0 ,0 ,0} /* EDGE */
242 ,{"sizeof_" ,0 ,0 ,0 ,0} /* SIZEOFFUNCTION */
243 ,{"block_" ,0 ,0 ,0 ,0} /* BLOCK */
244 ,{"onepi_" ,0 ,0 ,0 ,0} /* ONEPI */
245 ,{"phi_" ,0 ,VERTEXFUNCTION,0 ,0} /* PHI */
246 ,{"float_" ,0 ,0 ,0 ,0} /* FLOATFUN */
247 ,{"tofloat_" ,0 ,0 ,0 ,0} /* TOFLOAT */
248 ,{"torat_" ,0 ,0 ,0 ,0} /* TORAT */
249 ,{"mzv_" ,0 ,0 ,0 ,0} /* MZV */
250 ,{"euler_" ,0 ,0 ,0 ,0} /* EULER */
251 ,{"mzvhalf_" ,0 ,0 ,0 ,0} /* MZVHALF */
252 ,{"agm_" ,0 ,0 ,0 ,0} /* AGMFUNCTION */
253 ,{"gamma_" ,0 ,0 ,0 ,0} /* GAMMAFUN */
254 ,{"eexp_" ,0 ,0 ,0 ,0} /* EXPFUNCTION */
255 ,{"hpl_" ,0 ,0 ,0 ,0} /* HPLFUNCTION */
256 ,{"mpl_" ,0 ,0 ,0 ,0} /* MPLFUNCTION */
257};
258
259FIXEDSET fixedsets[] = {
260 {"pos_", "integers > 0", CSYMBOL, 0} /* POS_ 0 */
261 ,{"pos0_", "integers >= 0", CSYMBOL, 0} /* POS0_ 1 */
262 ,{"neg_", "integers < 0", CSYMBOL, 0} /* NEG_ 2 */
263 ,{"neg0_", "integers <= 0", CSYMBOL, 0} /* NEG0_ 3 */
264 ,{"even_", "even integers", CSYMBOL, 0} /* EVEN_ 4 */
265 ,{"odd_", "odd integers", CSYMBOL, 0} /* ODD_ 5 */
266 ,{"int_", "all integers", CSYMBOL, 0} /* Z_ 6 */
267 ,{"symbol_","only symbols", CSYMBOL, MAXPOSITIVE} /* SYMBOL_ 7 */
268 ,{"fixed_", "fixed indices", CINDEX, 0} /* FIXED_ 8 */
269 ,{"index_", "all indices", CINDEX, 0} /* INDEX_ 9 */
270 ,{"number_","all rationals", CSYMBOL, 0} /* Q_ 10 */
271 ,{"dummyindices_", "dummy indices", CINDEX, 0} /* DUMMYINDEX_ 11 */
272 ,{"vector_","only vectors", CVECTOR, 0} /* VECTOR_ 12 */
273};
274
275UBYTE BufferForOutput[MAXLINELENGTH+14];
276
277char *setupfilename = "form.set";
278
279#ifdef WITHPTHREADS
280INILOCK(ErrorMessageLock)
281INILOCK(FileReadLock)
282#endif