source: git/Singular/ipshell.h @ 0519cc

spielwiese
Last change on this file since 0519cc was 3bef0a, checked in by Burcin Erocal <burcin@…>, 13 years ago
Fix Singular/walk_ip.cc.
  • Property mode set to 100644
File size: 5.5 KB
Line 
1#ifndef IPSHELL_H
2#define IPSHELL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id$ */
7/*
8* ABSTRACT
9*/
10#include <stdio.h>
11//#include <kernel/structs.h>
12#include <kernel/ideals.h>
13#include <Singular/lists.h>
14
15struct _ssubexpr;
16typedef struct _ssubexpr *Subexpr;
17
18
19extern leftv iiCurrArgs;
20extern idhdl iiCurrProc;
21extern int iiOp; /* the current operation*/
22extern const char *  currid;
23extern int     iiRETURNEXPR_len;
24extern sleftv *iiRETURNEXPR;
25#ifdef USE_IILOCALRING
26extern ring   *iiLocalRing;
27#endif
28//extern cmdnames cmds[];
29extern const char *lastreserved;
30extern const char *singular_date; /* tesths.cc, set by final compile */
31
32extern BOOLEAN yyInRingConstruction; /* 1: during ring construction */
33
34int     IsCmd(const char *n, int & tok);
35
36BOOLEAN iiPStart(idhdl pn, sleftv * sl);
37BOOLEAN iiEStart(char* example, procinfo *pi);
38BOOLEAN iiAllStart(procinfov pi, char *p,feBufferTypes t, int l);
39void    type_cmd(leftv v);
40void    test_cmd(int i);
41void    list_cmd(int typ, const char* what, const char * prefix,
42                 BOOLEAN iterate, BOOLEAN fullname=FALSE);
43//char *  iiStringMatrix(matrix im, int dim, char ch=',');
44void    killlocals(int v);
45int     exprlist_length(leftv v);
46const char *  Tok2Cmdname(int i);
47const char *  iiTwoOps(int t);
48int     IsPrime(int i);
49
50BOOLEAN iiWRITE(leftv res,leftv exprlist);
51BOOLEAN iiExport(leftv v, int toLev);
52BOOLEAN iiExport(leftv v, int toLev, idhdl roothdl);
53BOOLEAN iiInternalExport (leftv v, int toLev, idhdl roothdl);
54char *  iiGetLibName(procinfov v);
55char *  iiGetLibProcBuffer( procinfov pi, int part=1 );
56char *  iiProcName(char *buf, char & ct, char* &e);
57char *  iiProcArgs(char *e,BOOLEAN withParenth);
58BOOLEAN iiLibCmd( char *newlib, BOOLEAN autoexport, BOOLEAN tellerror, BOOLEAN force );
59/* sees wheter library lib has already been loaded
60   if yes, writes filename of lib into where and returns TRUE,
61   if  no, returns FALSE
62*/
63BOOLEAN iiLocateLib(const char* lib, char* where);
64leftv   iiMap(map theMap, const char * what);
65void    iiMakeResolv(resolvente r, int length, int rlen, char * name, int typ0,
66           intvec ** weights=NULL);
67BOOLEAN jjMINRES(leftv res, leftv v);
68BOOLEAN jjBETTI(leftv res, leftv v);
69BOOLEAN jjBETTI2(leftv res, leftv u, leftv v);
70BOOLEAN jjBETTI2_ID(leftv res, leftv u, leftv v);
71BOOLEAN jjIMPORTFROM(leftv res, leftv u, leftv v);
72BOOLEAN jjLIST_PL(leftv res, leftv v);
73
74BOOLEAN jjVARIABLES_P(leftv res, leftv u);
75BOOLEAN jjVARIABLES_ID(leftv res, leftv u);
76
77int     iiRegularity(lists L);
78leftv   singular_system(sleftv h);
79BOOLEAN jjSYSTEM(leftv res, leftv v);
80void    iiDebug();
81BOOLEAN iiCheckRing(int i);
82poly    iiHighCorner(ideal i, int ak);
83char *  iiConvName(const char *libname);
84BOOLEAN iiLoadLIB(FILE *fp, char *libnamebuf, char *newlib,
85                         idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror);
86
87// converts a resolution into a list of modules
88lists syConvRes(syStrategy syzstr,BOOLEAN toDel=FALSE,int add_row_shift=0);
89// converts a list of modules into a minimal resolution
90syStrategy syForceMin(lists li);
91// converts a list of modules into a resolution
92syStrategy syConvList(lists li,BOOLEAN toDel);
93
94void rSetHdl(idhdl h);
95
96
97/* ================================================================== */
98/* Expressions : */
99BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
100BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
101                     BOOLEAN proccall=FALSE);
102BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
103BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
104
105typedef BOOLEAN (*proc1)(leftv,leftv);
106
107#ifdef __GNUC__
108#if (__GNUC__ < 3)
109#define INIT_BUG 1
110void    jjInitTab1();
111#endif
112#endif
113
114#ifdef GENTABLE
115typedef char * (*Proc1)(char *);
116struct sValCmd1
117{
118  proc1 p;
119  short cmd;
120  short res;
121  short arg;
122  short valid_for;
123};
124
125typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
126struct sValCmd2
127{
128  proc2 p;
129  short cmd;
130  short res;
131  short arg1;
132  short arg2;
133  short valid_for;
134};
135
136typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
137struct sValCmd3
138{
139  proc3 p;
140  short cmd;
141  short res;
142  short arg1;
143  short arg2;
144  short arg3;
145  short valid_for;
146};
147struct sValCmdM
148{
149  proc1 p;
150  short cmd;
151  short res;
152  short number_of_args; /* -1: any, -2: any >0, .. */
153  short valid_for;
154};
155extern struct sValCmd2 dArith2[];
156extern struct sValCmd1 dArith1[];
157extern struct sValCmd3 dArith3[];
158extern struct sValCmdM dArithM[];
159#endif
160
161/* ================================================================== */
162/* Assigments : */
163BOOLEAN iiAssign(leftv left, leftv right);
164
165typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
166struct sValAssign_sys
167{
168  proc1 p;
169  short res;
170  short arg;
171};
172
173struct sValAssign
174{
175  proci p;
176  short res;
177  short arg;
178};
179
180BOOLEAN iiParameter(leftv p);
181BOOLEAN iiAlias(leftv p);
182/* ================================================================== */
183int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
184  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
185sleftv * iiMake_proc(idhdl pn, package pack, sleftv* sl);
186// from misc.cc:
187char *  showOption();
188BOOLEAN setOption(leftv res, leftv v);
189/* ================================================================== */
190char * versionString();
191/* ================================================================== */
192void  singular_example(char *str);
193
194BOOLEAN iiTryLoadLib(leftv v, const char *id);
195
196int iiAddCproc(char *libname, char *procname, BOOLEAN pstatic,
197               BOOLEAN(*func)(leftv res, leftv v));
198
199void iiCheckPack(package &p);
200#ifndef NDEBUG
201void checkall();
202#endif
203#endif
204
Note: See TracBrowser for help on using the repository browser.