source: git/Singular/ipshell.h @ ee9485

spielwiese
Last change on this file since ee9485 was ee9485, checked in by Hans Schönemann <hannes@…>, 15 years ago
*hannes: test for ring coeff git-svn-id: file:///usr/local/Singular/svn/trunk@11977 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 5.3 KB
Line 
1#ifndef IPSHELL_H
2#define IPSHELL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: ipshell.h,v 1.54 2009-07-13 16:35:56 Singular Exp $ */
7/*
8* ABSTRACT
9*/
10#include <stdio.h>
11#include "structs.h"
12
13
14extern int  traceit ;
15#define TRACE_SHOW_PROC   1
16#define TRACE_SHOW_LINENO 2
17#define TRACE_SHOW_LINE   4
18#define TRACE_SHOW_RINGS  8
19#define TRACE_SHOW_LINE1  16
20#define TRACE_BREAKPOINT  32
21#define TRACE_TMP_BREAKPOINT  64
22extern leftv iiCurrArgs;
23extern idhdl iiCurrProc;
24extern int iiOp; /* the current operation*/
25extern int  myynest;
26extern const char *  currid;
27extern int     iiRETURNEXPR_len;
28extern sleftv *iiRETURNEXPR;
29#ifdef USE_IILOCALRING
30extern ring   *iiLocalRing;
31#endif
32extern cmdnames cmds[];
33extern const char *lastreserved;
34extern const char *singular_date;
35
36extern BOOLEAN yyInRingConstruction; /* 1: during ring construction */
37
38int     IsCmd(const char *n, int & tok);
39short   IsCmdToken(short tok);
40
41BOOLEAN iiPStart(idhdl pn, sleftv * sl);
42BOOLEAN iiEStart(char* example, procinfo *pi);
43void    type_cmd(idhdl h);
44void    test_cmd(int i);
45void    list_cmd(int typ, const char* what, const char * prefix,
46                 BOOLEAN iterate, BOOLEAN fullname=FALSE);
47//char *  iiStringMatrix(matrix im, int dim, char ch=',');
48void    killlocals(int v);
49int     exprlist_length(leftv v);
50const char *  Tok2Cmdname(int i);
51const char *  iiTwoOps(int t);
52int     IsPrime(int i);
53
54BOOLEAN iiWRITE(leftv res,leftv exprlist);
55BOOLEAN iiExport(leftv v, int toLev);
56#ifdef HAVE_NS
57BOOLEAN iiExport(leftv v, int toLev, idhdl roothdl);
58BOOLEAN iiInternalExport (leftv v, int toLev, idhdl roothdl);
59#endif /* HAVE_NS */
60char *  iiGetLibName(procinfov v);
61char *  iiGetLibProcBuffer( procinfov pi, int part=1 );
62char *  iiProcName(char *buf, char & ct, char* &e);
63char *  iiProcArgs(char *e,BOOLEAN withParenth);
64BOOLEAN iiLibCmd( char *newlib, BOOLEAN autoexport, BOOLEAN tellerror, BOOLEAN force );
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);
70leftv   iiMap(map theMap, const char * what);
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);
75BOOLEAN jjBETTI2(leftv res, leftv u, leftv v);
76BOOLEAN jjBETTI2_ID(leftv res, leftv u, leftv v);
77BOOLEAN jjIMPORTFROM(leftv res, leftv u, leftv v);
78
79BOOLEAN jjVARIABLES_P(leftv res, leftv u);
80BOOLEAN jjVARIABLES_ID(leftv res, leftv u);
81
82int     iiRegularity(lists L);
83leftv   singular_system(sleftv h);
84BOOLEAN jjSYSTEM(leftv res, leftv v);
85void    iiDebug();
86BOOLEAN iiCheckRing(int i);
87poly    iiHighCorner(ideal i, int ak);
88char *  iiConvName(const char *libname);
89BOOLEAN iiLoadLIB(FILE *fp, char *libnamebuf, char *newlib,
90                         idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror);
91
92
93/* ================================================================== */
94/* Expressions : */
95BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
96BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
97                     BOOLEAN proccall=FALSE);
98BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
99BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
100
101typedef BOOLEAN (*proc1)(leftv,leftv);
102
103#ifdef __GNUC__
104#if (__GNUC__ < 3)
105#define INIT_BUG 1
106void    jjInitTab1();
107#endif
108#endif
109
110#ifdef GENTABLE
111typedef char * (*Proc1)(char *);
112struct sValCmd1
113{
114  proc1 p;
115  short cmd;
116  short res;
117  short arg;
118  short valid_for;
119};
120
121typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
122struct sValCmd2
123{
124  proc2 p;
125  short cmd;
126  short res;
127  short arg1;
128  short arg2;
129  short valid_for;
130};
131
132typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
133struct sValCmd3
134{
135  proc3 p;
136  short cmd;
137  short res;
138  short arg1;
139  short arg2;
140  short arg3;
141  short valid_for;
142};
143struct sValCmdM
144{
145  proc1 p;
146  short cmd;
147  short res;
148  short number_of_args; /* -1: any, -2: any >0, .. */
149  short valid_for;
150};
151extern struct sValCmd2 dArith2[];
152extern struct sValCmd1 dArith1[];
153extern struct sValCmd3 dArith3[];
154extern struct sValCmdM dArithM[];
155#endif
156
157/* ================================================================== */
158/* Assigments : */
159BOOLEAN iiAssign(leftv left, leftv right);
160
161typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
162struct sValAssign_sys
163{
164  proc1 p;
165  short res;
166  short arg;
167};
168
169struct sValAssign
170{
171  proci p;
172  short res;
173  short arg;
174};
175
176BOOLEAN iiParameter(leftv p);
177/* ================================================================== */
178int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
179  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
180#ifdef HAVE_NS
181sleftv * iiMake_proc(idhdl pn, package pack, sleftv* sl);
182#else /* HAVE_NS */
183sleftv * iiMake_proc(idhdl pn, sleftv* sl);
184#endif /* HAVE_NS */
185// from misc.cc:
186char *  showOption();
187BOOLEAN setOption(leftv res, leftv v);
188/* ================================================================== */
189char * versionString();
190/* ================================================================== */
191void  singular_example(char *str);
192
193BOOLEAN iiTryLoadLib(leftv v, const char *id);
194
195#ifdef HAVE_NS
196void listall(int showproc=1);
197void iiCheckPack(package &p);
198#ifndef NDEBUG
199void checkall();
200#endif
201#endif
202#endif
203
Note: See TracBrowser for help on using the repository browser.