source: git/Singular/ipshell.h @ 4e654a2

spielwiese
Last change on this file since 4e654a2 was 06c0b3, checked in by Hans Schoenemann <hannes@…>, 12 years ago
fix: newstruct changes fropm master
  • Property mode set to 100644
File size: 6.9 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
18BOOLEAN    spectrumProc ( leftv,leftv );
19BOOLEAN    spectrumfProc( leftv,leftv );
20BOOLEAN    spaddProc    ( leftv,leftv,leftv );
21BOOLEAN    spmulProc    ( leftv,leftv,leftv );
22BOOLEAN    semicProc   ( leftv,leftv,leftv );
23BOOLEAN    semicProc3   ( leftv,leftv,leftv,leftv );
24
25extern leftv iiCurrArgs;
26extern idhdl iiCurrProc;
27extern int iiOp; /* the current operation*/
28extern const char *  currid;
29extern int     iiRETURNEXPR_len;
30extern sleftv *iiRETURNEXPR;
31#ifdef USE_IILOCALRING
32extern ring   *iiLocalRing;
33#endif
34//extern cmdnames cmds[];
35extern const char *lastreserved;
36extern const char *singular_date; /* tesths.cc, set by final compile */
37
38extern BOOLEAN yyInRingConstruction; /* 1: during ring construction */
39
40int     IsCmd(const char *n, int & tok);
41
42BOOLEAN iiPStart(idhdl pn, sleftv * sl);
43BOOLEAN iiEStart(char* example, procinfo *pi);
44BOOLEAN iiAllStart(procinfov pi, char *p,feBufferTypes t, int l);
45void    type_cmd(leftv v);
46void    test_cmd(int i);
47void    list_cmd(int typ, const char* what, const char * prefix,
48                 BOOLEAN iterate, BOOLEAN fullname=FALSE);
49//char *  iiStringMatrix(matrix im, int dim, char ch=',');
50void    killlocals(int v);
51int     exprlist_length(leftv v);
52const char *  Tok2Cmdname(int i);
53const char *  iiTwoOps(int t);
54int           iiOpsTwoChar(const char *s);
55
56int     IsPrime(int i);
57
58BOOLEAN iiWRITE(leftv res,leftv exprlist);
59BOOLEAN iiExport(leftv v, int toLev);
60BOOLEAN iiExport(leftv v, int toLev, idhdl roothdl);
61BOOLEAN iiInternalExport (leftv v, int toLev, idhdl roothdl);
62char *  iiGetLibName(procinfov v);
63char *  iiGetLibProcBuffer( procinfov pi, int part=1 );
64char *  iiProcName(char *buf, char & ct, char* &e);
65char *  iiProcArgs(char *e,BOOLEAN withParenth);
66BOOLEAN iiLibCmd( char *newlib, BOOLEAN autoexport, BOOLEAN tellerror, BOOLEAN force );
67/* sees wheter library lib has already been loaded
68   if yes, writes filename of lib into where and returns TRUE,
69   if  no, returns FALSE
70*/
71BOOLEAN iiLocateLib(const char* lib, char* where);
72leftv   iiMap(map theMap, const char * what);
73void    iiMakeResolv(resolvente r, int length, int rlen, char * name, int typ0,
74           intvec ** weights=NULL);
75BOOLEAN jjMINRES(leftv res, leftv v);
76BOOLEAN jjBETTI(leftv res, leftv v);
77BOOLEAN jjBETTI2(leftv res, leftv u, leftv v);
78BOOLEAN jjBETTI2_ID(leftv res, leftv u, leftv v);
79BOOLEAN jjIMPORTFROM(leftv res, leftv u, leftv v);
80BOOLEAN jjLIST_PL(leftv res, leftv v);
81
82BOOLEAN jjVARIABLES_P(leftv res, leftv u);
83BOOLEAN jjVARIABLES_ID(leftv res, leftv u);
84
85int     iiRegularity(lists L);
86leftv   singular_system(sleftv h);
87BOOLEAN jjSYSTEM(leftv res, leftv v);
88void    iiDebug();
89BOOLEAN iiCheckRing(int i);
90poly    iiHighCorner(ideal i, int ak);
91char *  iiConvName(const char *libname);
92BOOLEAN iiLoadLIB(FILE *fp, char *libnamebuf, char *newlib,
93                         idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror);
94
95// converts a resolution into a list of modules
96lists syConvRes(syStrategy syzstr,BOOLEAN toDel=FALSE,int add_row_shift=0);
97// converts a list of modules into a minimal resolution
98syStrategy syForceMin(lists li);
99// converts a list of modules into a resolution
100syStrategy syConvList(lists li,BOOLEAN toDel);
101
102BOOLEAN syBetti1(leftv res, leftv u);
103BOOLEAN syBetti2(leftv res, leftv u, leftv w);
104
105/* ================================================================== */
106/* Expressions : */
107BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
108BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
109                     BOOLEAN proccall=FALSE);
110BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
111BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
112
113typedef BOOLEAN (*proc1)(leftv,leftv);
114
115#ifdef __GNUC__
116#if (__GNUC__ < 3)
117#define INIT_BUG 1
118void    jjInitTab1();
119#endif
120#endif
121
122#ifdef GENTABLE
123typedef char * (*Proc1)(char *);
124struct sValCmd1
125{
126  proc1 p;
127  short cmd;
128  short res;
129  short arg;
130  short valid_for;
131};
132
133typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
134struct sValCmd2
135{
136  proc2 p;
137  short cmd;
138  short res;
139  short arg1;
140  short arg2;
141  short valid_for;
142};
143
144typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
145struct sValCmd3
146{
147  proc3 p;
148  short cmd;
149  short res;
150  short arg1;
151  short arg2;
152  short arg3;
153  short valid_for;
154};
155struct sValCmdM
156{
157  proc1 p;
158  short cmd;
159  short res;
160  short number_of_args; /* -1: any, -2: any >0, .. */
161  short valid_for;
162};
163extern struct sValCmd2 dArith2[];
164extern struct sValCmd1 dArith1[];
165extern struct sValCmd3 dArith3[];
166extern struct sValCmdM dArithM[];
167#endif
168
169/* ================================================================== */
170/* Assigments : */
171BOOLEAN iiAssign(leftv left, leftv right);
172
173typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
174struct sValAssign_sys
175{
176  proc1 p;
177  short res;
178  short arg;
179};
180
181struct sValAssign
182{
183  proci p;
184  short res;
185  short arg;
186};
187
188BOOLEAN iiParameter(leftv p);
189BOOLEAN iiAlias(leftv p);
190
191int iiTokType(int op);
192/* ================================================================== */
193int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
194  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
195sleftv * iiMake_proc(idhdl pn, package pack, sleftv* sl);
196// from misc.cc:
197char *  showOption();
198BOOLEAN setOption(leftv res, leftv v);
199/* ================================================================== */
200char * versionString();
201/* ================================================================== */
202void  singular_example(char *str);
203
204BOOLEAN iiTryLoadLib(leftv v, const char *id);
205
206int iiAddCproc(const char *libname, const char *procname, BOOLEAN pstatic,
207               BOOLEAN(*func)(leftv res, leftv v));
208
209void iiCheckPack(package &p);
210#ifndef NDEBUG
211void checkall();
212#endif
213
214void rSetHdl(idhdl h);
215ring rInit(sleftv* pn, sleftv* rv, sleftv* ord);
216idhdl  rDefault(const char *s);
217
218idhdl rSimpleFindHdl(ring r, idhdl root, idhdl n=NULL);
219idhdl rFindHdl(ring r, idhdl n, idhdl w);
220void   rKill(idhdl h);
221void   rKill(ring r);
222lists scIndIndset(ideal S, BOOLEAN all, ideal Q);
223BOOLEAN mpKoszul(leftv res,leftv c/*ip*/, leftv b/*in*/, leftv id);
224BOOLEAN mpJacobi(leftv res,leftv a);
225BOOLEAN jjRESULTANT(leftv res, leftv u, leftv v, leftv w);
226BOOLEAN kQHWeight(leftv res,leftv v);
227BOOLEAN kWeight(leftv res,leftv id);
228BOOLEAN loSimplex( leftv res, leftv args );
229BOOLEAN loNewtonP( leftv res, leftv arg1 );
230BOOLEAN nuMPResMat( leftv res, leftv arg1, leftv arg2 );
231BOOLEAN nuLagSolve( leftv res, leftv arg1, leftv arg2, leftv arg3 );
232BOOLEAN nuVanderSys( leftv res, leftv arg1, leftv arg2, leftv arg3);
233BOOLEAN nuUResSolve( leftv res, leftv args );
234
235BOOLEAN jjCHARSERIES(leftv res, leftv u);
236/*
237BOOLEAN jjRESULTANT(leftv res, leftv u, leftv v, leftv w);
238#if 0
239BOOLEAN jjIS_SQR_FREE(leftv res, leftv u);
240#endif
241*/
242
243
244#endif
245
Note: See TracBrowser for help on using the repository browser.