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