source: git/Singular/ipshell.h @ 47367fd

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