Annotation of OpenXM/src/kan96xx/Kan/global.c, Revision 1.38
1.38 ! takayama 1: /* global.c $OpenXM: OpenXM/src/kan96xx/Kan/global.c,v 1.37 2015/09/29 01:52:14 takayama Exp $ */
1.1 maekawa 2: #include <stdio.h>
3: #include <setjmp.h>
4: #include "datatype.h"
5: #include "stackm.h"
6: #include "lookup.h"
7:
1.38 ! takayama 8: void hashInitialize(struct dictionary *dic); /* declared in extern.h */
! 9: void initClassDataBase(void);
1.1 maekawa 10: /*-------- variables to define a ring ----------------*/
11: /*
12: The numbers L,M, LL,MM,NN are set in setUpRing() in setupring.c now.
13:
14: Be careful when you do not use one of three type variables.
15: Any setting must keep the relation: L<=M<=N.
16: You must see mmwMult() in poly.c in the above case.
17: Example. L=M=0 means there is no q-variables and difference variables.
1.15 takayama 18: L=5, M=N=5 means all variables are q-variables (x0=q).
19: L=2, M=2, N=5 means x0=q, x1 is q-variable and x2,,,,x4 are
20: differential variables.
21: L=0, M=2, N=5 means x0,x1 are difference variables and x2,,,x4
22: are differential variables. */
1.1 maekawa 23: /*#define L 0 number of q-variables */
24: /*#define M 0 number of difference variables */
25: /*Number of elimination variables */
26: /*#define LL 0 */
27: /*#define MM 0 */
1.15 takayama 28: /* x_MM,...,x_{M-1} are eliminated difference variables */
29: /* MM < M if you want to use it. MM>=M if you do not use it */
1.1 maekawa 30: /*#define NN 9 */
1.15 takayama 31: /*x_NN,...,x_{N-1} are eliminated differential variables */
32: /* NN < N if you want to use it. NN>=N if you do not use it.
33: See the eliminated_standard() in dbm3.c */
1.1 maekawa 34:
35:
36: /* They are not used.
37: int N = 6;
38: int L = 1;
39: int M = 1;
40: int C = 1;
41: int NN = 5;
42: int MM = 1;
43: int LL = 1;
44: int CC = 1;
45: */
46:
47:
48: /********** These variables are set in setUpRing() ***********************/
49: int Md = 0; /* if Md=1, then x_NN, ..., x_{N-1} are eliminated variables*/
50: int Med = 0; /* if Med=1, then x_MM, ..., x_{M-1} are eliminated variables*/
51: int Mq = 0; /* if Mq=1, then x_LL, ..., x_{L-1} are eliminated variables*/
52:
53: char **TransX; /* name of variables */
54: char **TransD;
55: int *Order; /* order matrix */
56:
57: int Msize = 0;
58: /*int P = 32609; */ /* characteristic */
59: /* ------------------ end of variables for the ring -------------- */
60:
61: struct ring SmallRing;
62: struct ring *SmallRingp = &SmallRing;
63:
64: struct ring *CurrentRingp = (struct ring *)0;
65:
66: struct ring *SyzRingp = (struct ring *)0;
67:
68: MP_INT *Mp_one;
69: MP_INT *Mp_zero;
70: MP_INT Mp_work_iiComb;
71: MP_INT Mp_work_iiPower;
72: MP_INT Mp_work_iiPoch;
73:
74: struct coeff *UniversalZero;
75: struct coeff *UniversalOne;
76:
77: /*******************************************************************/
78: int History = 1; /* get a transformation matrix or not */
79:
80: int Commutative = 0;
81: int UseCriterion1 = 0;
82: int UseCriterion2B = 0;
83: int OutputStyle = '*';
1.36 takayama 84: int COutput = 0; /* C sytle output of polynomial */
1.1 maekawa 85: int Wrap = 0; /* output.c */
86: int Verbose = 0;
87: int ReduceLowerTerms = 1;
88: int Criterion2B = 0;
89: int Criterion2M = 0;
90: int Criterion2F = 0;
91: int Statistics = 0;
1.9 takayama 92: int AutoReduce = 0;
1.1 maekawa 93: int CheckHomogenization = 1;
94: int ErrorMessageMode = 0;
95: int WarningMessageMode = 0;
96: int CatchCtrlC = 0;
97: int Strict = 0; /* It is used warning. */
98: int Strict2 = 0; /* It is used in putDictionary */
99: extern struct dictionary UserDictionary[];
100: int SigIgn = 0;
101: int StopDegree = 0x7fff;
102: int KSPushEnvMode = 0;
103: int Sugar = 0;
104: int Homogenize_vec = 1; /*x + e (x+1)===>(1) x h + e (x+h) or (0)x + e(x+h) */
105: int CmoDMSOutputOption = 0; /* Output with
1.15 takayama 106: (1) RING_BY_NAME or (0) DMS_OF_N_VARIABLES.
107: plugin/cmo.c */
1.10 takayama 108: int SecureMode = 0;
1.31 takayama 109: int RestrictedMode = 0;
110: int RestrictedMode_saved = 0;
1.22 takayama 111: int Ecart = 0;
1.23 takayama 112: int EcartAutomaticHomogenization = 0;
1.24 takayama 113: int TraceLift = 0;
114: struct ring *TraceLift_ringmod = NULL;
1.25 takayama 115: int DoCancel = 0;
1.27 takayama 116: int QuoteMode = 0;
1.35 takayama 117: int UseDsmall = 0;
1.1 maekawa 118:
119: /* global variables for stackmachine.c */
120: int VerboseStack = 1; /* 0 is quiet, 1 is standard, 2 ... */
121: int DebugStack = 0;
122:
1.11 takayama 123: FILE *Fstack = NULL; /* Initialized to standard output stream
124: in stackmachine_init()
125: for module: stackmachine */
1.1 maekawa 126:
127: #if defined(sun)
128: /* in case of Solaris, use the following: */
129: int EnvOfStackMachine[2000];
130: #else
1.18 takayama 131: #if defined(__CYGIWN__)
132: sigjmp_buf EnvOfStackMachine;
133: #else
1.1 maekawa 134: jmp_buf EnvOfStackMachine;
1.18 takayama 135: #endif
1.1 maekawa 136: #endif
137:
138: struct object NullObject;
139: struct object NoObject;
140:
141: int Lookup[TYPES][TYPES];
142:
143: int Quiet = 0;
144: int TimerOn = 0;
145:
1.34 takayama 146: char *VersionString = "3.050615";
1.1 maekawa 147:
1.4 takayama 148: char *LeftBracket = NULL;
149: char *RightBracket = NULL;
150:
1.1 maekawa 151: int AvoidTheSameRing = 1;
152: int DebugCMO = 0; /* plugin/cmo.c */
153: int OXprintMessage = 1; /* referred only from ox_sm1 plugin/ox.hh */
154:
155: char *OxSystem = "ox_sm1.plain"; /* Example : ox_sm1.plain */
156: char *OxSystemVersion = NULL; /* Example : 0.1 */
157:
1.11 takayama 158: /* global variables for kanExport0.c */
159: int VerboseK = 1; /* 1 is standard */
160: int DebugK = 0;
161: FILE *Fk = NULL; /* Initialized to stdout in stackmachine_init() */
162:
1.38 ! takayama 163: void stackmachine_init() {
1.1 maekawa 164: int i,j;
1.11 takayama 165: extern FILE *BaseFp;
1.37 takayama 166: /* GC_init(); */
167: GC_INIT();
1.1 maekawa 168: OxSystemVersion = VersionString;
169: Fstack = stdout; /* initialize output stream */
1.11 takayama 170: Fk = stdout;
171: BaseFp = stdin;
1.4 takayama 172: LeftBracket = "["; RightBracket = "]";
1.1 maekawa 173: /* initialize null object */
174: NullObject.tag = 0;
175: NullObject.lc.op = NullObject.rc.op = (struct object *)NULL;
1.33 takayama 176: NullObject.attr = (struct object *)NULL;
1.1 maekawa 177: /* findUserdictionary returns NoObject if it cannot find the key.*/
178: NoObject.tag = -1;
179: NoObject.lc.op = NoObject.rc.op = (struct object *)NULL;
1.33 takayama 180: NoObject.attr = (struct object *)NULL;
1.1 maekawa 181: /* Initalize lookup table */
182: for (i=0; i<TYPES; i++) {
183: for (j=0; j<TYPES; j++)
184: Lookup[i][j] = i*TYPES + j; /* Refer to mklookup.c */
185: }
186: /* Initialize hashing */
187: hashInitialize(UserDictionary);
188:
189: initClassDataBase();
190:
191: }
192:
193:
1.38 ! takayama 194: int stackmachine_close() {
1.1 maekawa 195: /* close output stream */
196: }
197:
198:
199:
1.38 ! takayama 200: void Kclose() {
1.1 maekawa 201: /* close Fk */
202: }
203:
204:
205:
206:
207:
208:
209:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>