source: git/Singular/ipshell.h @ 6cf5e6

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