source: git/Singular/ipshell.h @ f5a3a23

spielwiese
Last change on this file since f5a3a23 was f5a3a23, checked in by Martin Lee <martinlee84@…>, 13 years ago
added typedef lists from kernel/structs.h to lists.h changed pVariables to currRing->N and idRankFreeModule(arg) to id_RankFreeModule(arg,currRing) in lists.cc added include lists.h to ipshell.h and commented out include structs.h
  • Property mode set to 100644
File size: 5.2 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
88/* ================================================================== */
89/* Expressions : */
90BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
91BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
92                     BOOLEAN proccall=FALSE);
93BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
94BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
95
96typedef BOOLEAN (*proc1)(leftv,leftv);
97
98#ifdef __GNUC__
99#if (__GNUC__ < 3)
100#define INIT_BUG 1
101void    jjInitTab1();
102#endif
103#endif
104
105#ifdef GENTABLE
106typedef char * (*Proc1)(char *);
107struct sValCmd1
108{
109  proc1 p;
110  short cmd;
111  short res;
112  short arg;
113  short valid_for;
114};
115
116typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
117struct sValCmd2
118{
119  proc2 p;
120  short cmd;
121  short res;
122  short arg1;
123  short arg2;
124  short valid_for;
125};
126
127typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
128struct sValCmd3
129{
130  proc3 p;
131  short cmd;
132  short res;
133  short arg1;
134  short arg2;
135  short arg3;
136  short valid_for;
137};
138struct sValCmdM
139{
140  proc1 p;
141  short cmd;
142  short res;
143  short number_of_args; /* -1: any, -2: any >0, .. */
144  short valid_for;
145};
146extern struct sValCmd2 dArith2[];
147extern struct sValCmd1 dArith1[];
148extern struct sValCmd3 dArith3[];
149extern struct sValCmdM dArithM[];
150#endif
151
152/* ================================================================== */
153/* Assigments : */
154BOOLEAN iiAssign(leftv left, leftv right);
155
156typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
157struct sValAssign_sys
158{
159  proc1 p;
160  short res;
161  short arg;
162};
163
164struct sValAssign
165{
166  proci p;
167  short res;
168  short arg;
169};
170
171BOOLEAN iiParameter(leftv p);
172BOOLEAN iiAlias(leftv p);
173/* ================================================================== */
174int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
175  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
176sleftv * iiMake_proc(idhdl pn, package pack, sleftv* sl);
177// from misc.cc:
178char *  showOption();
179BOOLEAN setOption(leftv res, leftv v);
180/* ================================================================== */
181char * versionString();
182/* ================================================================== */
183void  singular_example(char *str);
184
185BOOLEAN iiTryLoadLib(leftv v, const char *id);
186
187int iiAddCproc(char *libname, char *procname, BOOLEAN pstatic,
188               BOOLEAN(*func)(leftv res, leftv v));
189
190void iiCheckPack(package &p);
191#ifndef NDEBUG
192void checkall();
193#endif
194#endif
195
Note: See TracBrowser for help on using the repository browser.