Annotation of OpenXM_contrib2/asir2000/parse/parse.h, Revision 1.59
1.3 noro 1: /*
2: * Copyright (c) 1994-2000 FUJITSU LABORATORIES LIMITED
3: * All rights reserved.
4: *
5: * FUJITSU LABORATORIES LIMITED ("FLL") hereby grants you a limited,
6: * non-exclusive and royalty-free license to use, copy, modify and
7: * redistribute, solely for non-commercial and non-profit purposes, the
8: * computer program, "Risa/Asir" ("SOFTWARE"), subject to the terms and
9: * conditions of this Agreement. For the avoidance of doubt, you acquire
10: * only a limited right to use the SOFTWARE hereunder, and FLL or any
11: * third party developer retains all rights, including but not limited to
12: * copyrights, in and to the SOFTWARE.
13: *
14: * (1) FLL does not grant you a license in any way for commercial
15: * purposes. You may use the SOFTWARE only for non-commercial and
16: * non-profit purposes only, such as academic, research and internal
17: * business use.
18: * (2) The SOFTWARE is protected by the Copyright Law of Japan and
19: * international copyright treaties. If you make copies of the SOFTWARE,
20: * with or without modification, as permitted hereunder, you shall affix
21: * to all such copies of the SOFTWARE the above copyright notice.
22: * (3) An explicit reference to this SOFTWARE and its copyright owner
23: * shall be made on your publication or presentation in any form of the
24: * results obtained by use of the SOFTWARE.
25: * (4) In the event that you modify the SOFTWARE, you shall notify FLL by
1.4 noro 26: * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification
1.3 noro 27: * for such modification or the source code of the modified part of the
28: * SOFTWARE.
29: *
30: * THE SOFTWARE IS PROVIDED AS IS WITHOUT ANY WARRANTY OF ANY KIND. FLL
31: * MAKES ABSOLUTELY NO WARRANTIES, EXPRESSED, IMPLIED OR STATUTORY, AND
32: * EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
33: * FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT OF THIRD PARTIES'
34: * RIGHTS. NO FLL DEALER, AGENT, EMPLOYEES IS AUTHORIZED TO MAKE ANY
35: * MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS WARRANTY.
36: * UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT,
37: * OR OTHERWISE, SHALL FLL BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY
38: * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
39: * DAMAGES OF ANY CHARACTER, INCLUDING, WITHOUT LIMITATION, DAMAGES
40: * ARISING OUT OF OR RELATING TO THE SOFTWARE OR THIS AGREEMENT, DAMAGES
41: * FOR LOSS OF GOODWILL, WORK STOPPAGE, OR LOSS OF DATA, OR FOR ANY
42: * DAMAGES, EVEN IF FLL SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF
43: * SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. EVEN IF A PART
44: * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
45: * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
46: * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
47: *
1.59 ! noro 48: * $OpenXM: OpenXM_contrib2/asir2000/parse/parse.h,v 1.58 2019/11/12 10:52:05 kondoh Exp $
1.3 noro 49: */
1.55 fujimoto 50: # if defined(VISUAL) || defined(__MINGW32__)
1.1 noro 51: #include <time.h>
52: #else
53: #include <sys/time.h>
54: #include <sys/resource.h>
55: #endif
56: #include <setjmp.h>
57: #ifdef ABS
58: #undef ABS
59: #define ABS(a) ((a)>0?(a):-(a))
60: #endif
61:
1.59 ! noro 62: #include <math.h>
! 63: #include <ctype.h>
! 64:
1.1 noro 65: /* identifiers for expressions */
66:
67: typedef enum {
1.57 noro 68: I_BOP, I_COP, I_AND, I_OR, I_NOT, I_CE,
69: I_PRESELF, I_POSTSELF,
70: I_FUNC, I_FUNC_OPT, I_IFUNC, I_MAP, I_RECMAP, I_PFDERIV,
71: I_ANS, I_PVAR, I_ASSPVAR,
72: I_FORMULA, I_LIST, I_STR, I_NEWCOMP, I_CAR, I_CDR, I_CAST,
73: I_INDEX, I_EV, I_TIMER, I_GF2NGEN, I_GFPNGEN, I_GFSNGEN,
74: I_LOP, I_OPT, I_GETOPT, I_POINT, I_PAREN, I_MINUS,
75: I_NARYOP, I_CONS, I_FUNC_QARG, I_FUNC_HEAD, I_EVM
1.1 noro 76: } fid;
77:
78: /* identifiers for statements */
79:
80: typedef enum {
1.57 noro 81: S_BP, S_PFDEF,
82: S_SINGLE, S_CPLX,
83: S_IFELSE, S_FOR, S_DO,
84: S_BREAK, S_RETURN, S_CONTINUE,
85: S_MODULE
1.1 noro 86: } sid;
87:
88: /* identifiers for comparison operators */
89:
90: typedef enum { C_LT, C_GT, C_LE, C_GE, C_EQ, C_NE } cid;
91:
92: /* identifiers for logical operators */
93:
94: typedef enum { L_LT, L_GT, L_LE, L_GE, L_EQ, L_NE, L_AND, L_OR, L_NOT, L_IMPL, L_REPL, L_EQUIV } lid;
95:
96: /* identifiers for functions */
97:
98: typedef enum { A_UNDEF, A_BIN, A_USR, A_PURE, A_PARI } aid;
99:
100: /* identifiers for indeterminates */
101:
102: typedef enum { V_IND, V_UC, V_PF, V_SR } vid;
103:
1.18 noro 104: typedef struct oVS {
1.57 noro 105: unsigned int n;
106: unsigned int asize;
107: unsigned int at;
108: unsigned int level;
109: struct oFUNC *usrf;
110: struct oPV *va;
111: NODE opt;
1.18 noro 112: } *VS;
1.1 noro 113:
1.18 noro 114: typedef struct oMODULE {
1.57 noro 115: char *name;
116: VS pvs;
117: NODE usrf_list;
1.18 noro 118: } *MODULE;
1.1 noro 119:
1.18 noro 120: typedef struct oPV {
1.57 noro 121: char *name;
122: short attr,type;
123: pointer priv;
1.18 noro 124: } *PV;
1.1 noro 125:
1.18 noro 126: typedef struct oINFILE {
1.57 noro 127: char *name;
128: FILE *fp;
129: JMP_BUF jmpbuf;
130: int ready_for_longjmp;
131: int ln;
132: struct oINFILE *next;
133: char *tname;
134: int encoded;
135: short vol;
1.18 noro 136: } *INFILE;
1.1 noro 137:
138: struct oTKWD {
1.57 noro 139: char *name;
140: int token;
1.1 noro 141: };
1.32 noro 142:
143: typedef struct fid_spec {
1.57 noro 144: fid id;
145: farg_type type[10];
1.32 noro 146: } *fid_spec_p;
1.1 noro 147:
1.18 noro 148: typedef struct oARF {
1.57 noro 149: char *name;
150: void (*fp)();
1.18 noro 151: } *ARF;
1.1 noro 152:
1.18 noro 153: typedef struct oFUNC {
1.57 noro 154: char *name,*fullname;
155: int argc;
156: int type;
157: int secure;
158: aid id;
159: unsigned int quote;
160: union {
161: void (*binf)();
162: struct oUSRF *usrf;
163: struct oPF *puref;
164: } f;
1.18 noro 165: } *FUNC;
1.1 noro 166:
1.18 noro 167: typedef struct oUSRF {
1.57 noro 168: char *fname;
169: MODULE module;
170: int startl,endl;
171: NODE args;
172: VS pvs;
173: char *desc;
174: struct oSNODE *body;
1.18 noro 175: } *USRF;
1.1 noro 176:
1.18 noro 177: typedef struct oPF {
1.57 noro 178: char *name;
179: int argc;
180: Obj body;
181: V *args;
182: Obj *deriv;
183: NODE ins;
184: int (*pari)();
185: double (*libm)();
186: int (*simplify)();
1.58 kondoh 187: #if defined(INTERVAL)
188: void (**intervalfunc)();
189: #endif
1.18 noro 190: } *PF;
1.1 noro 191:
1.18 noro 192: typedef struct oPFAD {
1.57 noro 193: Obj arg;
194: int d;
1.18 noro 195: } *PFAD;
1.1 noro 196:
1.18 noro 197: typedef struct oPFINS {
1.57 noro 198: struct oPF *pf;
199: struct oPFAD ad[1];
1.18 noro 200: } *PFINS;
1.1 noro 201:
202: #define NEWPF(p) ((p)=(PF)MALLOC(sizeof(struct oPF)))
203:
1.18 noro 204: typedef struct oFNODE {
1.57 noro 205: short id;
206: unsigned normalized:1;
207: unsigned expanded:2;
208: unsigned coef:1;
209: pointer arg[1];
1.18 noro 210: } *FNODE;
1.1 noro 211:
212: #define NEWFNODE(a,b) \
213: ((a)=(FNODE)MALLOC(sizeof(struct oFNODE)+sizeof(pointer)*(b-1)))
214:
1.18 noro 215: typedef struct oSNODE {
1.57 noro 216: sid id;
217: int ln;
218: pointer arg[1];
1.18 noro 219: } *SNODE;
1.1 noro 220:
221: #define NEWSNODE(a,b) \
222: ((a)=(SNODE)MALLOC(sizeof(struct oSNODE)+sizeof(pointer)*(b-1)),(a)->ln=asir_infile->ln)
223:
1.18 noro 224: typedef struct oPVI {
1.57 noro 225: int pv;
226: NODE index;
1.18 noro 227: } *PVI;
1.1 noro 228:
1.18 noro 229: typedef struct oNODE2 {
1.57 noro 230: pointer body1,body2;
231: struct oNODE2 *next;
1.18 noro 232: } *NODE2;
1.1 noro 233:
234: struct ftab {
1.57 noro 235: char *name;
236: void (*f)();
237: int argc;
238: unsigned int quote;
1.1 noro 239: };
240:
241: #define MKPVI(a,b,c)\
242: ((a)=(pointer)MALLOC(sizeof(struct oPVI)),((PVI)(a))->pv=(b),((PVI)(a))->index=(c))
243:
244: #define FA0(f) ((f)->arg[0])
245: #define FA1(f) ((f)->arg[1])
246: #define FA2(f) ((f)->arg[2])
247: #define FA3(f) ((f)->arg[3])
248: #define FA4(f) ((f)->arg[4])
249: #define FA5(f) ((f)->arg[5])
250: #define FA6(f) ((f)->arg[6])
251:
252: #define ARG0(a) ((a)->body)
253: #define ARG1(a) (NEXT(a)->body)
254: #define ARG2(a) (NEXT(NEXT(a))->body)
255: #define ARG3(a) (NEXT(NEXT(NEXT(a)))->body)
256: #define ARG4(a) (NEXT(NEXT(NEXT(NEXT((a)))))->body)
257: #define ARG5(a) (NEXT(NEXT(NEXT(NEXT(NEXT((a))))))->body)
258: #define ARG6(a) (NEXT(NEXT(NEXT(NEXT(NEXT(NEXT((a)))))))->body)
259: #define ARG7(a) (NEXT(NEXT(NEXT(NEXT(NEXT(NEXT(NEXT((a))))))))->body)
260: #define ARG8(a) (NEXT(NEXT(NEXT(NEXT(NEXT(NEXT(NEXT(NEXT((a)))))))))->body)
261: #define ARG9(a) (NEXT(NEXT(NEXT(NEXT(NEXT(NEXT(NEXT(NEXT(NEXT((a))))))))))->body)
262: #define ARG10(a) (NEXT(NEXT(NEXT(NEXT(NEXT(NEXT(NEXT(NEXT(NEXT(NEXT((a)))))))))))->body)
263:
264: #define asir_assert(ptr,id,message)\
265: switch ( id ) {\
1.57 noro 266: case O_N: case O_P: case O_R:\
267: if( (ptr) && (OID(ptr) > (id)) ) {\
268: fprintf(stderr,message);\
269: error(" : invalid argument");\
270: }\
271: break;\
272: case O_DP:\
273: if( (ptr) && (OID(ptr) != (id)) ) {\
274: fprintf(stderr,message);\
275: error(" : invalid argument");\
276: }\
277: break;\
278: default:\
279: if( !(ptr) || (OID(ptr) != (id)) ) {\
280: fprintf(stderr,message);\
281: error(" : invalid argument");\
282: }\
283: break;\
1.1 noro 284: }
285:
286: #define DEFSIZE 32
1.18 noro 287: #define PVGLOBAL(i) (((unsigned int)(i))|(1<<30))
1.40 noro 288: #define PVMGLOBAL(i) (((unsigned int)(i))|(2<<30))
289: #define PVPATTERN(i) (((unsigned int)(i))|(3<<30))
1.18 noro 290: #define PVATTR(i) (((unsigned int)(i))>>30)
291: #define PVIND(i) (((unsigned int)(i))&0x3fffffff)
1.1 noro 292: #define GETPV(i,p) \
1.18 noro 293: (PVATTR(i)==0?(int)((p)=CPVS->va[(unsigned int)(i)].priv)\
1.40 noro 294: :PVATTR(i)==1?(int)((p)=GPVS->va[PVIND(i)].priv)\
295: :PVATTR(i)==2?(int)((p)=MPVS->va[PVIND(i)].priv)\
296: :(int)((p)=PPVS->va[PVIND(i)].priv))
297:
1.18 noro 298: #define GETPVREF(i,p) \
299: (PVATTR(i)==0?(int)((p)=&(CPVS->va[(unsigned int)(i)].priv))\
1.40 noro 300: :PVATTR(i)==1?(int)((p)=&(GPVS->va[PVIND(i)].priv))\
301: :PVATTR(i)==2?(int)((p)=&(MPVS->va[PVIND(i)].priv))\
302: :(int)((p)=&(PPVS->va[PVIND(i)].priv)))
303:
1.13 noro 304: #define GETPVNAME(i,p) \
1.18 noro 305: (PVATTR(i)==0?(int)((p)=CPVS->va[(unsigned int)(i)].name)\
1.40 noro 306: :PVATTR(i)==1?(int)((p)=GPVS->va[PVIND(i)].name)\
307: :PVATTR(i)==2?(int)((p)=MPVS->va[PVIND(i)].name)\
308: :(int)((p)=PPVS->va[PVIND(i)].name))
309:
1.1 noro 310: #define ASSPV(i,p) \
1.18 noro 311: (PVATTR(i)==0?(int)(CPVS->va[(unsigned int)(i)].priv=(pointer)(p))\
1.40 noro 312: :PVATTR(i)==1?(int)(GPVS->va[PVIND(i)].priv=(pointer)(p))\
313: :PVATTR(i)==2?(int)(MPVS->va[PVIND(i)].priv=(pointer)(p))\
314: :(int)(PPVS->va[PVIND(i)].priv=(pointer)(p)))
1.1 noro 315:
316: #define NEWNODE2(a) ((a)=(NODE2)MALLOC(sizeof(struct oNODE2)))
317: #define MKNODE2(a,b,c,d) \
318: (NEWNODE2(a),(a)->body1=(pointer)b,(a)->body2=(pointer)c,NEXT(a)=(NODE2)(d))
319: #define BDY1(a) ((a)->body1)
320: #define BDY2(a) ((a)->body2)
321:
1.40 noro 322: extern VS GPVS,CPVS,EPVS,APVS,MPVS,PPVS;
1.18 noro 323: extern MODULE CUR_MODULE;
324: extern NODE MODULE_LIST;
1.19 noro 325: extern char *CUR_FUNC;
1.1 noro 326: extern ARF addfs, subfs, mulfs, divfs, remfs, pwrfs;
1.15 noro 327: extern INFILE asir_infile;
1.1 noro 328: extern NODE usrf,sysf,noargsysf,ubinf,parif,ONENODE;
329: extern int nextbp,nextbplevel;
330: extern int Verbose;
1.23 ohara 331: extern int do_quiet;
1.27 noro 332: extern SYMBOL Symbol_grlex, Symbol_glex, Symbol_lex;
1.30 noro 333: extern NODE current_option;
1.1 noro 334:
335: #if defined(VISUAL_LIB)
336: #include <w_stdio.h>
337: #undef getc
338: #define getc w_fgetc
339: #undef putc
340: #define putc w_fputc
341: #define fputc w_fputc
342: #define ungetc w_ungetc
343: #define fgets w_fgets
344: #define fputs w_fputs
345: #define printf w_printf
346: #define fprintf w_fprintf
347: #define fflush w_fflush
348: #endif
349:
1.55 fujimoto 350: #if defined(__GNUC__) || defined(VISUAL) || defined(__MINGW32__) || (defined(__MACH__) && defined(__ppc__)) || defined(__FreeBSD__)
1.1 noro 351: NODE mknode(int,...);
352: FNODE mkfnode(int,fid,...);
353: SNODE mksnode(int,sid,...);
354: void call_usrf(FUNC f,...);
355: #else
356: NODE mknode();
357: FNODE mkfnode();
358: SNODE mksnode();
359: void call_usrf();
360: #endif
361:
362: /* prototypes */
363:
1.7 noro 364: void dp_ptozp2_d(DP,DP,DP *,DP *);
365: void dp_ptozp_d(DP,DP *);
1.1 noro 366: void dp_vtod(Q *,DP,DP *);
367: void dp_idivv_hist(Q,DP *);
368: void dp_igcdv_hist(DP,Q *);
1.36 ohara 369: void dp_ptozp3(DP,Q *,DP *);
1.1 noro 370: void dp_ptozp2(DP,DP,DP *,DP *);
371: void dp_ptozp(DP,DP *);
372: void dp_nf_tab_mod(DP,LIST *,int,DP *);
373: void dp_lnf_mod(DP,DP,NODE,int,DP *,DP *);
374: void insert_to_node(DL,NODE *,int);
375: int _dl_redble(DL,DL,int);
376: void dp_mbase(NODE,NODE *);
377: void dp_dtov(DP,VECT *);
378: void dp_cont(DP,Q *);
379: void dp_idiv(DP,Q,DP *);
1.59 ! noro 380: void dtodpm(DP d,int pos,DPM *dp);
! 381: void dpm_nf_z(NODE b,DPM g,DPM *ps,int full,int multiple,DPM *rp);
! 382: void dpm_nf_f(NODE b,DPM g,DPM *ps,int full,DPM *rp);
! 383: void weyl_actd(VL vl,DP p1,DP p2,DP *pr);
! 384: void dpm_sp(DPM p1,DPM p2,DPM *rp);
! 385: void initdpm(struct order_spec *spec,int type);
! 386: void dpm_ht(DPM p,DPM *rp);
! 387: void dpm_hm(DPM p,DPM *rp);
! 388: int dpm_redble(DPM p1,DPM p2);
! 389: void lumtop_unsigned(V v,int mod,int bound,LUM f,P *g);
1.1 noro 390: int dp_nt(DP);
391: void dp_dehomo(DP,DP *);
392: void dp_homo(DP,DP *);
393: DL lcm_of_DL(int,DL,DL,DL);
394: void dp_rest(DP,DP *);
395: void dp_hm(DP,DP *);
396: void dp_sp_mod(DP,DP,int,DP *);
397: void dp_sp(DP,DP,DP *);
1.2 noro 398: void dp_red(DP,DP,DP,DP *,DP *,P *,DP *);
1.1 noro 399: void dp_subd(DP,DP,DP *);
400: void dp_red_mod(DP,DP,DP,int,DP *,DP *,P *);
401: int dp_redble(DP,DP);
402: int comp_nm(Q *,Q *);
403: void dp_true_nf_mod(NODE,DP,DP *,int,int,DP *,P *);
404: void dp_nf_mod(NODE,DP,DP *,int,int,DP *);
405: void dp_nf_mod_qindex(NODE,DP,DP *,int,int,DP *);
406: void dp_nf_ptozp(NODE,DP,DP *,int,int,DP *);
407: void dp_true_nf(NODE,DP,DP *,int,DP *,P *);
408: void dp_nf(NODE,DP,DP *,int,DP *);
409: void dp_rat(DP,DP *);
410: void dp_mod(DP,int,NODE,DP *);
411: void dp_prim_mod(DP,int,DP *);
412: void dp_prim(DP,DP *);
413: void heu_nezgcdnpz(VL,P *,int,P *);
1.24 noro 414: void homogenize_order(struct order_spec *,int,struct order_spec **);
415: int create_order_spec(VL,Obj,struct order_spec **);
1.1 noro 416:
417: int dl_equal(int,DL,DL);
418: void qltozl(Q *,int,Q *);
419:
420: int mainparse(SNODE *);
421: int exprparse(FUNC,char *,FNODE *);
422: void output_init(void);
423: void GC_init(void);
424: void env_init(void);
425: void soutput_init(char *);
426: void appendparif(NODE *,char *,int (*)(),int);
427: int mmono(P);
428: void mkpow(VL,Obj,Obj,Obj *);
429: void _printdp(DP);
430: int mt_save(char *);
431: int mt_load(char *);
432: void sortbynm(Q *,int);
433: void iqrv(VECT,Q,LIST *);
434: void igcdv(VECT,Q *);
435: void igcdv_estimate(VECT,Q *);
436: void cpp_main(int,char **);
437: int afternl(void);
438: void glob_init();
439: void input_init(FILE *,char *);
440: void asir_terminate(int);
441: void param_init(void);
442: void sprompt(char *);
1.17 ohara 443: void cppname_init();
1.1 noro 444: void process_args(int,char **);
445: void sig_init(void);
446: void asir_save_handler(void);
447: void asir_set_handler(void);
448: void asir_reset_handler(void);
449: void resetenv(char *);
450: void fatal(int);
451: void restore_handler(void);
452: void resize_buffer(void);
453: void tty_init(void);
454: void tty_reset(void);
455: void set_timer(int);
456: void reset_timer(void);
457: void int_handler(int);
458: void segv_handler(int);
459: void bus_handler(int);
460: void fpe_handler(int);
461: void ill_handler(int);
462: void winch_handler(int);
463: void pipe_handler(int);
464: void usr1_handler(int);
465: void alrm_handler(int);
466: void copyright(void);
467: void kan_init(void);
468: void pushpvs(FUNC);
469: void read_eval_loop(void);
470: void prompt(void);
471: void storeans(pointer);
472: int yyparse(void);
473: void nodetod(NODE,DP *);
474: void poppvs(void);
475: int length(NODE);
1.50 ohara 476: size_t get_heapsize(void);
1.1 noro 477: int searchpvar(char *);
478: void mkparif(char *,FUNC *);
479: void makevar(char *,P *);
1.19 noro 480: void mkpvs(char *);
481: MODULE mkmodule(char *);
1.1 noro 482: void stoarg(char *,int *,char **);
483: void yyerror(char *);
484: void closecurrentinput(void);
485: void asir_terminate(int);
486: void searchasirpath(char *,char **);
487: void get_vars(Obj,VL *);
1.38 noro 488: void appendbinf(NODE *,char *,void(*)(),int,unsigned int);
489: void appendubinf(char *,void(*)(),int,unsigned int);
1.1 noro 490: void parif_init(void);
491: void sysf_init(void);
492: void makesrvar(FUNC, P *);
493: void sprintexpr(VL,Obj);
494: void printexpr(VL,Obj);
495: void appendvar(VL,V);
496: void change_mvar(VL,P,V,P *);
497: void restore_mvar(VL,P,V,P *);
498: int argc(NODE);
499: void printn(N);
500: void sprintn(N);
501: void printv(VL,V);
502: void sprintv(VL,V);
503: int arf_comp(VL, Obj, Obj);
504: int complist(VL, LIST, LIST);
505: int getcompsize(int);
506: int getpvar(VS,char *,int);
507: int gettype(unsigned int);
508: int indextotype(int,int);
509: int loadfile(char *);
510: int loadfiles(NODE);
1.18 noro 511: unsigned int makepvar(char *);
1.1 noro 512: int membertoindex(int,char *);
513: int qcoefp(Obj);
514: int qcoefr(Obj);
515: int rangecheck(Obj,int);
516: int structtoindex(char *);
517: void _mkpfins(PF ,Obj *,V *);
518: void appendpfins(V ,V *);
519: void appenduf(char *,FUNC *);
520: void arf_add(VL, Obj, Obj, Obj *);
521: void arf_chsgn(Obj, Obj *);
522: void arf_div(VL, Obj, Obj, Obj *);
523: void arf_init(void);
524: void arf_mul(VL, Obj, Obj, Obj *);
525: void arf_pwr(VL, Obj, Obj, Obj *);
526: void arf_remain(VL, Obj, Obj, Obj *);
527: void arf_sub(VL, Obj, Obj, Obj *);
528: void bp(SNODE);
529: void clearbp(FUNC);
530: void debug(SNODE);
531: void debug_init(void);
532: void delbp(int, char **);
533: void derivr(VL ,Obj ,V ,Obj *);
534: void derivvar(VL ,V ,V ,Obj *);
535: void duppfins(V ,V *);
536: void error(char *);
537: void evalins(PFINS ,int ,Obj *);
538: void evalnodebody(NODE,NODE *);
539: void evalp(VL ,P ,int ,P *);
540: void evalr(VL ,Obj ,int ,Obj *);
541: void evalv(VL ,V ,int ,Obj *);
542: void getarrayp(Obj,NODE,Obj **);
543: void getmember(FNODE,Obj *);
544: void getmemberp(FNODE,Obj **);
545: void help(char *);
546: void instov(PFINS ,V *);
1.5 noro 547: Obj memberofstruct(COMP,char *);
1.58 kondoh 548: #if defined(INTERVAL)
549: void mkpf(char *,Obj ,int ,V *,int (*)(),double (*)(),int (*)(),void (*[])(), PF *);
550: #else
551: void mkpf(char *,Obj ,int ,V *,int (*)(),double (*)(),int (*)(), PF *);
552: #endif
1.1 noro 553: void mkpfins(PF ,V *,V *);
1.18 noro 554: void mkuf(char *,char *,NODE,SNODE,int,int,char *,MODULE);
1.1 noro 555: void newstruct(int,struct oCOMP **);
556: void optobj(Obj *);
557: void println(int, char **, int);
558: void printvars(char *,VS);
559: void resetpvs(void);
560: void searchc(char *,FUNC *);
561: void searchf(NODE,char *,FUNC *);
562: void searchpf(char *,FUNC *);
563: void searchsn(SNODE *, int, SNODE **);
564: void setbp(char *);
565: void setf(int, char **);
566: void setstruct(char *,NODE);
567: void showbp(int);
568: void showbps(void);
569: void showpos(void);
570: void simplify_ins(PFINS ,Obj *);
571: void sprintvars(char *,VS);
1.5 noro 572: int structdef(char *,NODE);
1.1 noro 573: void substfp(VL ,Obj ,PF ,PF ,Obj *);
574: void substfr(VL ,Obj ,PF ,PF ,Obj *);
575: void substfv(VL ,V ,PF ,PF ,Obj *);
576: void substpr(VL ,int ,Obj ,V ,Obj ,Obj *);
577: void substr(VL ,int ,Obj ,V ,Obj ,Obj *);
578: void appendtonode(NODE,pointer, NODE *);
579: void getarray(pointer,NODE,pointer *);
580: void putarray(pointer,NODE,pointer);
581:
582: void addcomp(VL,COMP,COMP,COMP *);
583: void subcomp(VL,COMP,COMP,COMP *);
584: void mulcomp(VL,COMP,COMP,COMP *);
585: void divcomp(VL,COMP,COMP,COMP *);
586: void chsgncomp(COMP,COMP *);
587: void pwrcomp(VL,COMP,Obj,COMP *);
588: int compcomp(VL,COMP,COMP);
1.15 noro 589:
590: void mergedeglist(NODE d0,NODE d1,NODE *dr);
591: void getdeglist(P p,V v,NODE *d);
592: void restore_mvar(VL vl,P p,V v,P *r);
593: void change_mvar(VL vl,P p,V v,P *r);
594: void getcoef(VL vl,P p,V v,Q d,P *r);
595: void ranp(int n,UP *nr);
596:
597: void _print_mp(int nv,MP m);
598: int dp_homogeneous(DP p);
599: int dp_nt(DP p);
600: int dl_equal(int nv,DL dl1,DL dl2);
601: DL lcm_of_DL(int nv,DL dl1,DL dl2,DL dl);
602: void dp_rest(DP p,DP *rp);
603: void dp_hm(DP p,DP *rp);
604: void dltod(DL d,int n,DP *rp);
605: void dp_subd(DP p1,DP p2,DP *rp);
606: int dp_redble(DP p1,DP p2);
607: void sortbynm(Q *w,int n);
608: int comp_nm(Q *a,Q *b);
609: void qltozl(Q *w,int n,Q *dvr);
610: void dp_rat(DP p,DP *rp);
611: void dp_mod(DP p,int mod,NODE subst,DP *rp);
612: void dp_dehomo(DP p,DP *rp);
613: void dp_homo(DP p,DP *rp);
614: void dp_nf_tab_mod(DP p,LIST *tab,int mod,DP *rp);
615: void dp_lnf_mod(DP p1,DP p2,NODE g,int mod,DP *r1p,DP *r2p);
616: void dp_lnf_f(DP p1,DP p2,NODE g,DP *r1p,DP *r2p);
617: void _dp_nf_mod_destructive(NODE b,DP g,DP *ps,int mod,int full,DP *rp);
618: void dp_true_nf_mod(NODE b,DP g,DP *ps,int mod,int full,DP *rp,P *dnp);
619: void dp_nf_mod(NODE b,DP g,DP *ps,int mod,int full,DP *rp);
620: void dp_nf_f(NODE b,DP g,DP *ps,int full,DP *rp);
621: void dp_nf_z(NODE b,DP g,DP *ps,int full,int multiple,DP *rp);
622: void dp_true_nf(NODE b,DP g,DP *ps,int full,DP *rp,P *dnp);
623: void _dp_red_mod_destructive(DP p1,DP p2,int mod,DP *rp);
624: void dp_red_mod(DP p0,DP p1,DP p2,int mod,DP *head,DP *rest,P *dnp);
625: void dp_red_f(DP p1,DP p2,DP *rest);
626: void dp_red(DP p0,DP p1,DP p2,DP *head,DP *rest,P *dnp,DP *multp);
627: void _dp_sp_mod(DP p1,DP p2,int mod,DP *rp);
628: void _dp_sp_mod_dup(DP p1,DP p2,int mod,DP *rp);
629: void dp_sp_mod(DP p1,DP p2,int mod,DP *rp);
630: void _dp_sp_dup(DP p1,DP p2,DP *rp);
631: void dp_sp(DP p1,DP p2,DP *rp);
632: void dp_dtov(DP dp,VECT *rp);
633: void dp_cont(DP p,Q *rp);
634: void dp_prim_mod(DP p,int mod,DP *rp);
635: void heu_nezgcdnpz(VL vl,P *pl,int m,P *pr);
636: void dp_prim(DP p,DP *rp);
637: void dp_ptozp2_d(DP p0,DP p1,DP *hp,DP *rp);
638: void dp_ptozp_d(DP p,DP *rp);
639: void dp_vtod(Q *c,DP p,DP *rp);
640: void insert_to_node(DL d,NODE *n,int nvar);
641: int _dl_redble(DL d1,DL d2,int nvar);
642: void dp_mbase(NODE hlist,NODE *mbase);
643: void dp_idiv(DP p,Q c,DP *rp);
644: void dp_ptozp2(DP p0,DP p1,DP *hp,DP *rp);
645: void dp_ptozp(DP p,DP *rp);
646: void _dpmod_to_vect(DP f,DL *at,int *b);
647: void _tf_to_vect_compress(NODE tf,DL *at,CDP *b);
648: void dp_to_vect(DP f,DL *at,Q *b);
649: NODE dp_dllist(DP f);
650: NODE mul_dllist(DL d,DP f);
651: void pdl(NODE f);
652: void dp_gr_main(LIST f,LIST v,Num homo,int modular,int field,struct order_spec *ord,LIST *rp);
653: void dp_gr_mod_main(LIST f,LIST v,Num homo,int m,struct order_spec *ord,LIST *rp);
654: void dp_f4_main(LIST f,LIST v,struct order_spec *ord,LIST *rp);
655: void dp_f4_mod_main(LIST f,LIST v,int m,struct order_spec *ord,LIST *rp);
656: NODE gb_f4(NODE f);
657: NODE gb_f4_mod(NODE f,int m);
658: NODE gb_f4_mod_old(NODE f,int m);
659: int DPPlength(DP_pairs n);
660: void printdl(DL dl);
661: void pltovl(LIST l,VL *vl);
662: void makesubst(VL v,NODE *s);
663: void printsubst(NODE s);
664: void vlminus(VL v,VL w,VL *d);
665: int validhc(P a,int m,NODE s);
666: void setup_arrays(NODE f,int m,NODE *r);
667: void prim_part(DP f,int m,DP *r);
668: NODE /* of DP */ NODE_sortb_insert( DP newdp, NODE /* of DP */ nd, int dec );
669: NODE NODE_sortb( NODE node, int dec );
670: NODE /* of index */ NODE_sortbi_insert( int newdpi, NODE /* of index */ nd, int dec );
671: NODE NODE_sortbi( NODE node, int dec );
672: void reduceall(NODE in,NODE *h);
673: void reduceall_mod(NODE in,int m,NODE *h);
674: int newps(DP a,int m,NODE subst);
675: int newps_nosave(DP a,int m,NODE subst);
676: int newps_mod(DP a,int m);
677: void reducebase_dehomo(NODE f,NODE *g);
678: NODE append_one(NODE f,int n);
679: DP_pairs minp( DP_pairs d, DP_pairs *prest );
680: void minsugar(DP_pairs d,DP_pairs *dm,DP_pairs *dr);
681: NODE gb(NODE f,int m,NODE subst);
682: NODE gb_mod(NODE f,int m);
683: DP_pairs updpairs( DP_pairs d, NODE /* of index */ g, int t);
684: DP_pairs newpairs( NODE /* of index */ g, int t );
685: DP_pairs criterion_B( DP_pairs d, int s );
686: DP_pairs criterion_M( DP_pairs d1 );
687: int criterion_2( int dp1, int dp2 );
688: DP_pairs criterion_F( DP_pairs d1 );
689: NODE updbase(NODE g,int t);
690: NODE /* of index */ remove_reducibles(NODE /* of index */ nd, int newdp );
691: int dl_redble(DL dl1,DL dl2);
1.16 noro 692: int dl_weyl_weight(DL dl);
1.15 noro 693: int gbcheck(NODE f);
694: int membercheck(NODE f,NODE x);
695: void dp_set_flag(Obj name,Obj value);
696: void dp_make_flaglist(LIST *list);
697: void dp_save(int index,Obj p,char *prefix);
698: void dp_load(int index,DP *p);
699: int dp_load_t(int index,DP *p);
700: void init_stat();
701: void print_stat();
702: void dp_mulc_d(DP p,P c,DP *r);
703: void _dp_nf(NODE b,DP g,DP *ps,int full,DP *rp);
704: void _dp_nf_z(NODE b,DP g,DP *ps,int full,int multiple,DP *r);
705: void dp_imul_d(DP p,Q q,DP *rp);
706: void imulv(VECT w,Q c,VECT *rp);
707: void dptoca(DP p,unsigned int **rp);
708: int yylex();
709: void purge_stdin();
710: int afternl();
711: int aftercomment();
712: int myatoi(char *s);
713: void yyerror(char *s);
714: int Egetc(FILE *fp);
715: void Eungetc(int c,FILE *fp);
716: int readline_getc();
717: void readline_ungetc();
718: char *readline_console(char *prompt);
719: void ox_usr1_handler(int sig);
720: void env_init();
721: void loadasirfile(char *name0);
722: void execasirfile(char *name);
723: void load_and_execfile(char *name);
724: int loadfile(char *s);
725: int loadfiles(NODE node);
726: unsigned char encrypt_char(unsigned char c);
727: unsigned char decrypt_char(unsigned char c);
728: void encrypt_file(char *in,char *out);
729: void decrypt_file(char *in,char *out);
730: void get_vars(Obj t,VL *vlp);
731: void get_vars_recursive(Obj obj,VL *vlp);
732: int comp_obj(Obj *a,Obj *b);
733: int generic_comp_obj(Obj *a,Obj *b);
734: void sepvect(VECT v,int d,VECT *rp);
735: int gauss_elim_mod(int **mat,int row,int col,int md);
736: int generic_gauss_elim(MAT mat,MAT *nm,Q *dn,int **rindp,int **cindp);
737: int generic_gauss_elim_hensel(MAT mat,MAT *nmmat,Q *dn,int **rindp,int **cindp);
738: int gensolve_check(MAT mat,MAT nm,Q dn,int *rind,int *cind);
739: int inttorat(N c,N m,N b,int *sgnp,N *nmp,N *dnp);
740: int intmtoratm(MAT mat,N md,MAT nm,Q *dn);
741: int intmtoratm_q(MAT mat,N md,MAT nm,Q *dn);
742: void reduce_reducers_mod(int **mat,int row,int col,int md);
743: void pre_reduce_mod(int **mat,int row,int col,int nred,int md);
744: void reduce_sp_by_red_mod(int *sp,int **redmat,int *ind,int nred,int col,int md);
745: void red_by_compress(int m,unsigned int *p,unsigned int *r,
1.57 noro 746: unsigned int *ri,unsigned int hc,int len);
1.15 noro 747: void red_by_vect(int m,unsigned int *p,unsigned int *r,unsigned int hc,int len);
748: void reduce_sp_by_red_mod_compress (int *sp,CDP *redmat,int *ind,
1.57 noro 749: int nred,int col,int md);
1.15 noro 750: int generic_gauss_elim_mod(int **mat0,int row,int col,int md,int *colstat);
751: int lu_gfmmat(GFMMAT mat,unsigned int md,int *perm);
752: int find_lhs_and_lu_mod(unsigned int **a,int row,int col,
1.57 noro 753: unsigned int md,int **rinfo,int **cinfo);
1.34 noro 754: void solve_by_lu_mod(int **a,int n,int md,int **b,int l,int normalize);
1.15 noro 755: int gauss_elim_mod1(int **mat,int row,int col,int md);
756: int gauss_elim_geninv_mod(unsigned int **mat,int row,int col,int md);
757: void solve_by_lu_gfmmat(GFMMAT lu,unsigned int md,unsigned int *b,unsigned int *x);
758: void mat_to_gfmmat(MAT m,unsigned int md,GFMMAT *rp);
759: int gauss_elim_geninv_mod_swap(unsigned int **mat,int row,int col,
1.57 noro 760: unsigned int md,unsigned int ***invmatp,int **indexp);
1.15 noro 761: void inner_product_int(Q *a,Q *b,int n,Q *r);
762: void inner_product_mat_int_mod(Q **a,int **b,int n,int k,int l,Q *r);
763: int generate_ONB_polynomial(UP2 *rp,int m,int type);
764: int _generate_irreducible_polynomial(UP2 f,int d);
765: int _generate_good_irreducible_polynomial(UP2 f,int d);
766: void printqmat(Q **mat,int row,int col);
767: void printimat(int **mat,int row,int col);
768: void ixor(N n1,N n2,N *r);
769: void ior(N n1,N n2,N *r);
770: void iand(N n1,N n2,N *r);
771: void isqrt(N a,N *r);
772: void igcd_cofactor(Q a,Q b,Q *gcd,Q *ca,Q *cb);
773: int comp_n(N *a,N *b);
774: int TypeT_NB_check(unsigned int m, unsigned int t);
775: int small_jacobi(int a,int m);
776: void pushpvs(FUNC f);
777: void poppvs();
1.18 noro 778: unsigned int makepvar(char *str);
1.15 noro 779: int searchpvar(char *str);
780: int getpvar(VS pvs,char *str,int searchonly);
781: void closecurrentinput();
782: void resetpvs();
783: void savepvs();
784: void restorepvs();
785: void storeans(pointer p);
786: void get_rootdir(char *name,int len);
787: void set_rootdir(char *name);
788: int process_id();
789: void call_exe(char *name,char **av);
790: void addquote(VL vl,QUOTE a,QUOTE b,QUOTE *c);
791: void subquote(VL vl,QUOTE a,QUOTE b,QUOTE *c);
792: void mulquote(VL vl,QUOTE a,QUOTE b,QUOTE *c);
793: void divquote(VL vl,QUOTE a,QUOTE b,QUOTE *c);
794: void pwrquote(VL vl,QUOTE a,QUOTE b,QUOTE *c);
795: void chsgnquote(QUOTE a,QUOTE *c);
796: void objtoquote(Obj a,QUOTE *c);
797: void polytoquote(P a,QUOTE *c);
798: void dptoquote(DP a,QUOTE *c);
1.28 noro 799: void dctoquote(DCP dc,QUOTE v,QUOTE *c,int *sgn);
1.29 noro 800: void mptoquote(MP m,int n,QUOTE *c,int *sgn);
1.15 noro 801: void vartoquote(V v,QUOTE *c);
802: void fnodetotree(FNODE f,LIST *rp);
803: FNODE eval_pvar_in_fnode(FNODE f);
804: FNODE subst_in_fnode(FNODE f,V v,FNODE g);
805: char *get_attribute(char *key,LIST attr);
806: void treetofnode(Obj obj,FNODE *f);
807: void glob_init() ;
808: void input_init(FILE *fp,char *name);
809: void notdef(VL vl,Obj a,Obj b,Obj *c);
810: void ExitAsir() ;
811: void asir_terminate(int status);
812: void param_init() ;
813: void prompt() ;
814: void sprompt(char *ptr);
815: void process_args(int ac,char **av);
816: void sig_init() ;
817: void asir_save_handler() ;
818: void asir_set_handler() ;
819: void asir_reset_handler() ;
820: void resetenv(char *s);
821: void fatal(int n);
822: void int_handler(int sig);
823: void restore_handler() ;
824: void segv_handler(int sig);
825: void ill_handler(int sig);
826: void alrm_handler(int sig);
827: void bus_handler(int sig);
828: void fpe_handler(int sig);
829: void pipe_handler(int sig);
830: void resize_buffer();
831: void tty_init() ;
832: void tty_reset() ;
833: void set_lasterror(char *s);
834: void error(char *s);
835: void set_timer(int interval);
836: void reset_timer();
837: void copyright() ;
838: void show_debug_window(int on);
839: void init_cmdwin();
840: void searchpf(char *name,FUNC *fp);
841: void searchc(char *name,FUNC *fp);
1.58 kondoh 842: #if defined(INTERVAL)
1.15 noro 843: void mkpf(char *name,Obj body,int argc,V *args,
1.58 kondoh 844: int (*parif)(),double (*libmf)(), int (*simp)(), void (*intervalfunc[])(), PF *pfp);
845: #else
846: void mkpf(char *name,Obj body,int argc,V *args,
847: int (*parif)(),double (*libmf)(), int (*simp)(), PF *pfp);
848: #endif
1.15 noro 849: void mkpfins(PF pf,V *args,V *vp);
850: void _mkpfins(PF pf,Obj *args,V *vp);
851: void _mkpfins_with_darray(PF pf,Obj *args,int *darray,V *vp);
852: void appendpfins(V v,V *vp);
853: void duppfins(V v,V *vp);
854: void derivvar(VL vl,V pf,V v,Obj *a);
855: void derivr(VL vl,Obj a,V v,Obj *b);
856: void substr(VL vl,int partial,Obj a,V v,Obj b,Obj *c);
857: void substpr(VL vl,int partial,Obj p,V v0,Obj p0,Obj *pr);
858: void evalr(VL vl,Obj a,int prec,Obj *c);
859: void evalp(VL vl,P p,int prec,P *pr);
860: void evalv(VL vl,V v,int prec,Obj *rp);
861: void evalins(PFINS ins,int prec,Obj *rp);
862: void devalr(VL vl,Obj a,Obj *c);
863: void devalp(VL vl,P p,P *pr);
864: void devalv(VL vl,V v,Obj *rp);
865: void devalins(PFINS ins,Obj *rp);
866: void simplify_ins(PFINS ins,Obj *rp);
867: void instov(PFINS ins,V *vp);
868: void substfr(VL vl,Obj a,PF u,PF f,Obj *c);
869: void substfp(VL vl,Obj p,PF u,PF f,Obj *pr);
870: void substfv(VL vl,V v,PF u,PF f,Obj *c);
871: int structdef(char *name,NODE member);
872: void newstruct(int type,COMP *rp);
873: int structtoindex(char *name);
874: int membertoindex(int type,char *name);
875: int getcompsize(int type);
876: Obj memberofstruct(COMP a,char *name);
877: void assign_to_member(COMP a,char *name,Obj obj);
878: void node_concat_dup(NODE n1,NODE n2,NODE *nr);
879: pointer evall(lid id,Obj a1,Obj a2);
880: pointer eval(FNODE f);
881: pointer evalstat(SNODE f);
882: pointer evalnode(NODE node);
883: pointer evalf(FUNC f,FNODE a,FNODE opt);
1.38 noro 884: pointer evalparif(FUNC f,NODE a);
885: pointer evalf_deriv(FUNC f,FNODE a,FNODE deriv);
1.15 noro 886: pointer evalmapf(FUNC f,FNODE a);
887: pointer eval_rec_mapf(FUNC f,FNODE a);
888: pointer beval_rec_mapf(FUNC f,NODE node);
889: pointer bevalf(FUNC f,NODE a);
1.49 ohara 890: pointer bevalf_with_opts(FUNC f,NODE a,NODE opts);
1.48 noro 891: pointer evalif(FNODE f,FNODE a,FNODE opt);
1.38 noro 892: pointer evalpf(PF pf,NODE args,NODE deriv);
1.15 noro 893: void evalnodebody(NODE sn,NODE *dnp);
894: void gen_searchf(char *name,FUNC *r);
895: void searchf(NODE fn,char *name,FUNC *r);
896: void appenduf(char *name,FUNC *r);
897: void mkparif(char *name,FUNC *r);
1.18 noro 898: void mkuf(char *name,char *fname,NODE args,SNODE body,int startl,int endl,char *desc,MODULE module);
1.15 noro 899: Obj getopt_from_cpvs(char *key);
1.57 noro 900: void des_enc(unsigned long *, unsigned char *, unsigned long *);
901: unsigned long round_func(unsigned long , unsigned char *);
902: unsigned long s_box_func(unsigned char *);
903: void des_dec(unsigned long *, unsigned char *, unsigned long *);
904: void key_schedule(unsigned char *,unsigned char *);
1.15 noro 905: void debug_init();
906: void add_alias(char *com,char *alias);
907: void show_alias(char *alias);
908: void debug(SNODE f);
909: void setf(int ac,char **av);
910: void setbp(char *p);
911: void settp(char *p);
912: void clearbp(FUNC f);
913: int searchbp();
914: void delbp(int ac,char **av);
915: void showbps();
916: void showbp(int n);
917: void searchsn(SNODE *fp,int n,SNODE **fpp);
918: void bp(SNODE f);
919: void println(int ac,char **av,int l);
920: void printvars(char *s,VS vs);
921: void showpos();
922: void showpos_to_string(char *buf);
923: void change_stack(int level,NODE *pvss);
924: void show_stack(VS vs);
925: int estimate_length(VL vl,pointer p);
926: void send_progress(short per,char *msg);
927: void set_error(int code,char *reason,char *action);
928: double get_current_time();
1.59 ! noro 929: int get_opt(char *key0,Obj *r);
! 930:
! 931: #if defined(VISUAL) || defined(__MINGW32__)
! 932: void ox_plot_main();
! 933: #else
! 934: void ox_plot_main(int argc,char **argv);
! 935: #endif
! 936: void launch_main(int argc,char **argv);
! 937: void ox_main(int argc,char **argv);
! 938:
! 939: void get_fid_spec(fid id,fid_spec_p *spec);
! 940: FNODE strip_paren(FNODE f);
! 941: NODE flatten_fnodenode(NODE n,char *opname);
! 942: FNODE flatten_fnode(FNODE f,char *opname);
! 943: int compquote(VL vl,QUOTE q1,QUOTE q2);
! 944: int compqa(VL vl,QUOTEARG q1,QUOTEARG q2);
! 945: int compfnode(FNODE f1,FNODE f2);
! 946: void shuffle_mulnbp(VL vl,NBP p1,NBP p2, NBP *rp);
! 947: void harmonic_mulnbp(VL vl,NBP p1,NBP p2, NBP *rp);
! 948: void mulnbmnbp(VL vl,NBM m,NBP p, NBP *rp);
! 949: void mulnbpnbm(VL vl,NBP p,NBM m, NBP *rp);
! 950: P separate_nbm(NBM a,NBP *a0,NBP *ah,NBP *ar);
! 951: P separate_tail_nbm(NBM a,NBP *a0,NBP *ar,NBP *at);
! 952: P separate_xky_nbm(NBM a,NBP *a0,NBP *ah,NBP *ar);
! 953:
! 954: int fnode_is_var(FNODE f);
! 955: int fnode_is_coef(FNODE f);
! 956: int fnode_is_number(FNODE f);
! 957: int fnode_is_rational(FNODE f);
! 958: int fnode_is_integer(FNODE f);
! 959: int fnode_is_nonnegative_integer(FNODE f);
! 960: int fnode_is_one(FNODE f);
! 961: int fnode_is_minusone(FNODE f);
! 962: int fnode_is_dependent(FNODE f,V v);
! 963:
! 964: int nfnode_comp(FNODE f1,FNODE f2);
! 965: int nfnode_comp_lex(FNODE f1,FNODE f2);
! 966: int nfnode_match(FNODE f,FNODE pat,NODE *rp);
! 967: int nfnode_match_naryadd(FNODE f,FNODE p,NODE *rp);
! 968: int nfnode_match_narymul(FNODE f,FNODE p,NODE *rp);
! 969:
! 970: int exprparse_create_var(FUNC f,char *str,SNODE *statp);
! 971: int obj_is_dependent(Obj a,V v);
! 972: void instoobj(PFINS ins,Obj *rp);
! 973: void goto_toplevel(char *s);
! 974: void add_bucket(GeoBucket g,NODE d,int nv);
! 975: void gen_searchf_searchonly(char *name,FUNC *r,int global);
! 976: void update_LASTCO();
! 977: void order_init();
! 978: void GC_init(void);
! 979: void showpos_to_list(LIST *r);
! 980: void mp_abs(NODE arg,Num *rp);
! 981: void print_crossref(FUNC f);
! 982: void ox_usr1_handler(int sig);
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>