[BACK]Return to global.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Annotation of OpenXM/src/kan96xx/Kan/global.c, Revision 1.36

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>