Annotation of OpenXM/src/kan96xx/Kan/extern.h, Revision 1.2
1.2 ! takayama 1: /* $OpenXM$ */
1.1 maekawa 2: /*********** global variables for module stackmachine***************/
3: extern int VerboseStack;
4: extern int DebugStack;
5: extern FILE *Fstack;
6: extern jmp_buf EnvOfStackMachine;
7: extern struct object NullObject;
8: extern struct object NoObject;
9: extern int Lookup[TYPES][TYPES];
10:
11:
12: /* scanner.c */
13: /*struct tokens getokenSM(actionType kind,char *str);
14: struct tokens *decomposeToTokens(char *str,int *size);*/
15: struct tokens getokenSM();
16: struct tokens *decomposeToTokens();
17: char *getLOAD_SM1_PATH();
18:
19:
20: /* stackmachine.c object */
21: struct object *newObject(void);
22: struct object newObjectArray(int size);
23: int isNullObject(struct object obj);
24:
25: /* stackmachine.c dictionary */
26: int putSystemDictionary(char *str,struct object ob);
27: int findSystemDictionary(char *str);
28: int putUserDictionary(char *str,int h0,int h1,struct object ob,
29: struct dictionary *dic);
30: struct object KputUserDictionary(char *str,struct object ob);
31: struct object findUserDictionary(char *str,int h0,int h1,
32: struct context *cp);
33: struct object KfindUserDictionary(char *str);
34: int putPrimitiveFuction(char *str,int number);
35: int hash0(char *s);
36: int hash1(char *s);
37: void hashInitialize(struct dictionary *dic);
38: struct tokens lookupTokens(struct tokens t);
39: struct object lookupLiteralString(char *s);
40: int putUserDictionary2(char *str,int h0,int h1,int attr,
41: struct dictionary *dic);
42: void KdefinePrimitiveFunctions(void);
43: struct object showSystemDictionary(int f);
44: int showUserDictionary(void) ;
45:
46:
47: /* stackmachine.c stack */
48: struct object Kpop(void); /* Kpush and Kpop may be used only in stackmachine.c
49: and primitive.c */
50: int Kpush(struct object ob);
51: struct object peek(int k);
52: void printOperandStack(void);
53: struct object newOperandStack(int size);
54: void setOperandStack(struct object ob);
55: void stdOperandStack(void);
56:
57: /* stackmachine.c printing */
58: void printObject(struct object ob,int nl,FILE *fp) ;
59: void printObjectArray(struct object ob,int nl,FILE *fp);
60:
61: /* stackmachine.c misc*/
62: void scanner(void);
63: void ctrlC(int sig);
64: int executeToken(struct tokens token);
65: int executePrimitive(struct object ob);
66: int isLiteral(char *str);
67: void lockCtrlCForOx();
68: void unlockCtrlCForOx();
69: void restoreCtrlCForOx();
70:
71: /* stackmachine.c export */
72: int KSdefineMacros(void);
73: struct object KSpop(void);
74: void KSpush(struct object ob);
75: char * KSstringPop(void);
76: int KSstackPointer(void);
77: struct object KSdupErrors(void);
78:
79: /* stackmachine.c context */
80: struct context *newContext0(struct context *super,char *name);
81: struct object KnewContext(struct object superobj, char *name);
82: void fprintContext(FILE *fp,struct context *c);
83: void KsetContext(struct object contextobj);
84: void contextControl(actionOfContextControl ctl);
85: struct object getSuperContext(struct object contextObj) ;
86:
87: /* kclass.c */
88: int initClassDataBase();
89: void fprintClass(FILE *fp,struct object ob);
90: int KclassEqualQ(struct object ob1,struct object ob2);
91: struct object KcreateClassIncetance(struct object ob1,
92: struct object ob2,
93: struct object ob3);
94: struct object KclassDataConversion(struct object ob1,struct object ob2);
95: /* dataConversion is also used for creating new object. */
96: /* Arithmetic functions. */
97: struct object Kclass_ooAdd(struct object ob1,struct object ob2);
98:
99: /* ErrorStack */
100: int pushErrorStack(struct object obj);
101: struct object popErrorStack(void);
102: int KScheckErrorStack(void);
103: struct object KnewErrorPacket(int serial,int no,char *message);
104: struct object KnewErrorPacketObj(struct object obj);
105:
106: /** usage.c */
107: void Kusage(struct object ob);
108: void Kusage2(FILE *fp,char *s);
109:
110: /* list.c */
111: struct object *newList(struct object *op);
112: int klength(struct object *op);
113: struct object *vJoin(struct object *list1,struct object *list2);
114: struct object car(struct object *list);
115: struct object *cdr(struct object *list);
116: void printObjectList(struct object *op);
117: int memberQ(struct object *list1,struct object list2);
118:
119: /* list:conversion */
120: struct object listToArray(struct object *op);
121: struct object *arrayToList(struct object ob);
122:
123: /* kanExport0.c */
124: /** arithmetic **/
125: struct object KooAdd(struct object ob1, struct object ob2);
126: struct object KooSub(struct object ob1, struct object ob2);
127: struct object KooMult(struct object ob1,struct object ob2);
128: struct object KooDiv(struct object ob1,struct object ob2);
129: struct object KaoMult(struct object aa,struct object bb);
130: struct object KooDiv2(struct object ob1,struct object ob2);
131: struct object KoNegate(struct object ob1);
132: struct object KreduceRationalFunction(struct object ob);
133:
134: /* for rational function object */
135: struct object KoInverse(struct object ob);
136: int KisInvalidRational(objectp ob);
137: objectp copyObjectp(objectp op);
138: struct object KnewRationalFunction0(objectp op1, objectp op2);
139: int KisZeroObject(objectp ob);
140: int KisOneObject(objectp ob);
141: int KisMinusOneObject(objectp ob);
142:
143:
144: /** relation */
145: struct object KoIsPositive(struct object ob);
146: int KooEqualQ(struct object o1,struct object o2);
147: struct object KooGreater(struct object o1,struct object o2);
148: struct object KooLess(struct object o1,struct object o2);
149:
150:
151: /** Conversion */
152: struct object KdataConversion(struct object ob1, char *key);
153: struct object KpoInteger(int i);
154: struct object KpoString(char *s);
155: struct object KpoPOLY(POLY f);
156: struct object KpoArrayOfPOLY(struct arrayOfPOLY *ap);
157: struct object KpoMatrixOfPOLY(struct matrixOfPOLY *mp);
158: struct object KpoRingp(struct ring *ringp);
159: struct object KpoDouble(double a);
160: #define KopInteger(o) ( (o).lc.ival )
161: #define KopString(o) ( (o).lc.str )
162: #define KopPOLY(o) ( (o).lc.poly )
163: #define KopArrayOfPOLY(o) ( *((o).lc.arrayp) )
164: #define KopMatrixOfPOLY(o) ( *((o).lc.matrixp))
165: #define KopArrayOfPOLYp(o) ( (o).lc.arrayp )
166: #define KopMatrixOfPOLYp(o) ( (o).lc.matrixp)
167: #define KopRingp(o) ( (o).lc.ringp )
168: #define KopUniversalNumber(o) ( (o).lc.universalNumber )
169: #define Knumerator(o) ( (o).lc.op )
170: #define Kdenominator(o) ( (o).rc.op )
171: #define KopDouble(ob) (*((ob).lc.dbl))
172: char *KPOLYToString(POLY f);
173: /** conversion 2 **/
174: struct object arrayOfPOLYToArray(struct arrayOfPOLY *aa);
175: struct object matrixOfPOLYToArray(struct matrixOfPOLY *pmat);
176: struct arrayOfPOLY *arrayToArrayOfPOLY(struct object oa);
177: struct matrixOfPOLY *arrayToMatrixOfPOLY(struct object oa);
178: double toDouble0(struct object ob);
179:
180: /** :ring :kan **/
181: int objArrayToOrderMatrix(struct object oA,int order[],int n,int oasize);
182: int KsetOrderByObjArray(struct object oA);
183: struct object oGetOrderMatrix(struct ring *ringp); /* order.c */
184: struct object KgetOrderMatrixOfCurrentRing();
185: int KsetUpRing(struct object ob1,struct object ob2, struct object ob3,struct object ob4,struct object ob5);
186: void KshowRing(struct ring *ringp);
187: struct object KdefaultPolyRing(struct object num);
188: struct object KswitchFunction(struct object ob1,struct object ob2);
189: void KprintSwitchStatus(void);
190: struct object KoReplace(struct object ob,struct object rule);
191: struct object Kparts(struct object f,struct object v);
192: struct object Kparts2(struct object f,struct object v);
193: struct object parts2(POLY f,POLY g);
194: struct object Kdegree(struct object f,struct object v);
195: struct object KringMap(struct object ob);
196: struct object Ksp(struct object ob1,struct object ob2);
197: struct object Khead(struct object ob);
198: int KpolyLength(POLY f);
199: struct object KsetOutputOrder(struct object obj,struct ring *rp);
200: struct object KsetVariableNames(struct object obj,struct ring *rp);
201:
202:
203: /* :eval */
204: struct object Keval(struct object obj);
205:
206: /** misc **/
207: struct object KtoRecords(struct object ob1);
208: void Kclose(void);
209: int warningKan(char *s);
210: int errorKan1(char *s,char *m);
211: struct object test(struct object ob);
212: struct object Kextension(struct object ob);
213: struct object KgbExtension(struct object ob);
214: struct object KmpzExtension(struct object ob);
215:
216: /** Utilities */
217: char *KremoveSpace(char *s);
218: int KtoArgvbyCurryBrace(char *str,char *argv[],int limit);
219:
220:
221: /** kanExport1.c */
222: /* :ring :kan */
223: struct object Kreduction(struct object f,struct object set);
224: struct object Kgroebner(struct object ob);
225:
226: /* :conversion */
227: struct object gradedPolySetToGradedArray(struct gradedPolySet *gps,
228: int keepRedundant);
229: struct object polySetToArray(struct polySet *ps,int keepRedundant);
230: struct object gradedPolySetToArray(struct gradedPolySet *g,int keepRedundant);
231: struct gradedPolySet *arrayToGradedPolySet(struct object ob);
232: struct object syzPolyToArray(int size,POLY f,struct gradedPolySet *grG);
233: struct object getBackwardArray(struct gradedPolySet *grG);
234: POLY arrayToPOLY(struct object ob);
235: struct object POLYToArray(POLY f);
236: struct object oPrincipalPart(struct object ob);
237: struct object oInitW(struct object ob,struct object oWeight);
238:
239: /* :misc */
240: struct object homogenizeObject(struct object ob,int *gradep);
241: struct object homogenizeObject_vec(struct object ob,int *gradep);
242: int oGrade(struct object ob);
243: struct ring *oRingp(struct object ob);
244: struct object KisOrdered(struct object of);
245: struct object KvectorToSchreyer_es(struct object obarray);
246:
247: /* hilbert.c */
248: struct object hilberto(struct object obgb,struct object obvlist);
249:
250: /* option.c */
251: struct object KsystemVariable(struct object ob);
252:
253: void KasirKanExecute0(char *s);
254:
255: struct object KbinaryToObject(int size, char *data);
256: char *KobjectToBinary(struct object ob,int *size);
257:
258: int mmLarger_tower3(POLY ff,POLY gg,struct object *gbList); /* order.c */
259: struct object KschreyerSkelton(struct object g);
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>