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
RevLine 
[0e1846]1#ifndef IPSHELL_H
2#define IPSHELL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/*
7* ABSTRACT
8*/
9#include <stdio.h>
[f5a3a23]10//#include <kernel/structs.h>
[599326]11#include <kernel/ideals.h>
[f5a3a23]12#include <Singular/lists.h>
[508937]13
[0e051f]14struct _ssubexpr;
15typedef struct _ssubexpr *Subexpr;
16
[47a4c2]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 );
[0e1846]23
24extern leftv iiCurrArgs;
[f71681]25extern idhdl iiCurrProc;
[0e1846]26extern int iiOp; /* the current operation*/
[85e68dd]27extern const char *  currid;
[0e1846]28extern int     iiRETURNEXPR_len;
29extern sleftv *iiRETURNEXPR;
[0a3ddd]30#ifdef USE_IILOCALRING
[0e1846]31extern ring   *iiLocalRing;
[77ff8e]32#endif
[2617dd5]33//extern cmdnames cmds[];
[85e68dd]34extern const char *lastreserved;
[995a6a]35extern const char *singular_date; /* tesths.cc, set by final compile */
[923c27]36
[34fbd93]37extern BOOLEAN yyInRingConstruction; /* 1: during ring construction */
[0e1846]38
[2c52262]39int     IsCmd(const char *n, int & tok);
[6bc5bb]40
[057e93c]41BOOLEAN iiPStart(idhdl pn, sleftv * sl);
42BOOLEAN iiEStart(char* example, procinfo *pi);
[ba73e9]43BOOLEAN iiAllStart(procinfov pi, char *p,feBufferTypes t, int l);
[103560]44void    type_cmd(leftv v);
[0e1846]45void    test_cmd(int i);
[7da3cd]46void    list_cmd(int typ, const char* what, const char * prefix,
47                 BOOLEAN iterate, BOOLEAN fullname=FALSE);
[8dde75]48//char *  iiStringMatrix(matrix im, int dim, char ch=',');
[0e1846]49void    killlocals(int v);
50int     exprlist_length(leftv v);
[85e68dd]51const char *  Tok2Cmdname(int i);
52const char *  iiTwoOps(int t);
[06c0b3]53int           iiOpsTwoChar(const char *s);
54
[0e1846]55int     IsPrime(int i);
56
57BOOLEAN iiWRITE(leftv res,leftv exprlist);
58BOOLEAN iiExport(leftv v, int toLev);
[bd4cb92]59BOOLEAN iiExport(leftv v, int toLev, idhdl roothdl);
60BOOLEAN iiInternalExport (leftv v, int toLev, idhdl roothdl);
[2ba9a6]61char *  iiGetLibName(procinfov v);
62char *  iiGetLibProcBuffer( procinfov pi, int part=1 );
[0e1846]63char *  iiProcName(char *buf, char & ct, char* &e);
64char *  iiProcArgs(char *e,BOOLEAN withParenth);
[22ed4c]65BOOLEAN iiLibCmd( char *newlib, BOOLEAN autoexport, BOOLEAN tellerror, BOOLEAN force );
[698457]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);
[85e68dd]71leftv   iiMap(map theMap, const char * what);
[0e1846]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);
[7f14f2]76BOOLEAN jjBETTI2(leftv res, leftv u, leftv v);
[709ab0]77BOOLEAN jjBETTI2_ID(leftv res, leftv u, leftv v);
[762bfd]78BOOLEAN jjIMPORTFROM(leftv res, leftv u, leftv v);
[146d90]79BOOLEAN jjLIST_PL(leftv res, leftv v);
[7f14f2]80
[f46646]81BOOLEAN jjVARIABLES_P(leftv res, leftv u);
82BOOLEAN jjVARIABLES_ID(leftv res, leftv u);
83
[0e1846]84int     iiRegularity(lists L);
85leftv   singular_system(sleftv h);
86BOOLEAN jjSYSTEM(leftv res, leftv v);
87void    iiDebug();
88BOOLEAN iiCheckRing(int i);
[f99917f]89poly    iiHighCorner(ideal i, int ak);
[f43a74]90char *  iiConvName(const char *libname);
[bf4ff72]91BOOLEAN iiLoadLIB(FILE *fp, char *libnamebuf, char *newlib,
92                         idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror);
93
[8fa9ea]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
[ae3ad6]101BOOLEAN syBetti1(leftv res, leftv u);
102BOOLEAN syBetti2(leftv res, leftv u, leftv w);
103
[0e1846]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
[637428]114#ifdef __GNUC__
115#if (__GNUC__ < 3)
116#define INIT_BUG 1
[0e1846]117void    jjInitTab1();
118#endif
[637428]119#endif
120
[0e1846]121#ifdef GENTABLE
122typedef char * (*Proc1)(char *);
123struct sValCmd1
124{
125  proc1 p;
126  short cmd;
127  short res;
128  short arg;
[ee9485]129  short valid_for;
[0e1846]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;
[ee9485]140  short valid_for;
[0e1846]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;
[ee9485]152  short valid_for;
[0e1846]153};
154struct sValCmdM
155{
156  proc1 p;
157  short cmd;
158  short res;
159  short number_of_args; /* -1: any, -2: any >0, .. */
[ee9485]160  short valid_for;
[0e1846]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);
[ea947e]188BOOLEAN iiAlias(leftv p);
[91ef34]189
190int iiTokType(int op);
[0e1846]191/* ================================================================== */
192int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
[0a3ddd]193  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
[a3bc95e]194sleftv * iiMake_proc(idhdl pn, package pack, sleftv* sl);
[0e1846]195// from misc.cc:
[979a09f]196char *  showOption();
[0e1846]197BOOLEAN setOption(leftv res, leftv v);
198/* ================================================================== */
[9ea9c6]199char * versionString();
[706c95]200/* ================================================================== */
201void  singular_example(char *str);
[a3bc95e]202
[85e68dd]203BOOLEAN iiTryLoadLib(leftv v, const char *id);
[5c5638]204
[ce0ca7]205int iiAddCproc(const char *libname, const char *procname, BOOLEAN pstatic,
[b90cc8]206               BOOLEAN(*func)(leftv res, leftv v));
207
[d66a7d]208void iiCheckPack(package &p);
[5c5638]209#ifndef NDEBUG
210void checkall();
211#endif
[2b7f4e]212
[88ece17]213void rSetHdl(idhdl h);
[db45a2]214ring rInit(sleftv* pn, sleftv* rv, sleftv* ord);
[2b7f4e]215idhdl  rDefault(const char *s);
216
[6cc7f5]217idhdl rSimpleFindHdl(ring r, idhdl root, idhdl n=NULL);
[db45a2]218idhdl rFindHdl(ring r, idhdl n, idhdl w);
[1085d4]219void   rKill(idhdl h);
220void   rKill(ring r);
[bf38a4]221lists scIndIndset(ideal S, BOOLEAN all, ideal Q);
222BOOLEAN mpKoszul(leftv res,leftv c/*ip*/, leftv b/*in*/, leftv id);
[15ff9a]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 );
[c10515]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 );
[15ff9a]233
[f0168a5]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
[88ece17]242
[a3bc95e]243#endif
[0e1846]244
Note: See TracBrowser for help on using the repository browser.