source: git/Singular/ipshell.h @ cffea8f

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