source: git/Singular/ipshell.h @ 5c5638

spielwiese
Last change on this file since 5c5638 was 5c5638, checked in by Hans Schönemann <hannes@…>, 18 years ago
*hannes: code cleanup, keyword cleanup git-svn-id: file:///usr/local/Singular/svn/trunk@8069 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 5.0 KB
Line 
1#ifndef IPSHELL_H
2#define IPSHELL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: ipshell.h,v 1.39 2005-05-06 12:39:48 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);
81/* ================================================================== */
82/* Expressions : */
83BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
84BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
85                     BOOLEAN proccall=FALSE);
86BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
87BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
88
89typedef BOOLEAN (*proc1)(leftv,leftv);
90
91#ifdef __GNUC__
92#if (__GNUC__ < 3)
93#define INIT_BUG 1
94void    jjInitTab1();
95#endif
96#endif
97
98#ifdef GENTABLE
99typedef char * (*Proc1)(char *);
100struct sValCmd1
101{
102  proc1 p;
103  short cmd;
104  short res;
105  short arg;
106#ifdef HAVE_PLURAL 
107  short valid_for_plural;
108#endif 
109};
110
111typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
112struct sValCmd2
113{
114  proc2 p;
115  short cmd;
116  short res;
117  short arg1;
118  short arg2;
119#ifdef HAVE_PLURAL 
120  short valid_for_plural;
121#endif 
122};
123
124typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
125struct sValCmd3
126{
127  proc3 p;
128  short cmd;
129  short res;
130  short arg1;
131  short arg2;
132  short arg3;
133#ifdef HAVE_PLURAL 
134  short valid_for_plural;
135#endif 
136};
137struct sValCmdM
138{
139  proc1 p;
140  short cmd;
141  short res;
142  short number_of_args; /* -1: any, -2: any >0, .. */
143#ifdef HAVE_PLURAL 
144  short valid_for_plural;
145#endif 
146};
147extern struct sValCmd2 dArith2[];
148extern struct sValCmd1 dArith1[];
149extern struct sValCmd3 dArith3[];
150extern struct sValCmdM dArithM[];
151#endif
152
153/* ================================================================== */
154/* Assigments : */
155BOOLEAN iiAssign(leftv left, leftv right);
156
157typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
158struct sValAssign_sys
159{
160  proc1 p;
161  short res;
162  short arg;
163};
164
165struct sValAssign
166{
167  proci p;
168  short res;
169  short arg;
170};
171
172BOOLEAN iiParameter(leftv p);
173/* ================================================================== */
174int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
175  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
176#ifdef HAVE_NS
177sleftv * iiMake_proc(idhdl pn, package pack, sleftv* sl);
178#else /* HAVE_NS */
179sleftv * iiMake_proc(idhdl pn, sleftv* sl);
180#endif /* HAVE_NS */
181// from misc.cc:
182char *  showOption();
183BOOLEAN setOption(leftv res, leftv v);
184/* ================================================================== */
185char * versionString();
186/* ================================================================== */
187void  singular_example(char *str);
188
189BOOLEAN iiTryLoadLib(leftv v, char *id);
190
191#ifdef HAVE_NS
192void listall(int showproc=1);
193void iiCheckPack(package &p);
194#ifndef NDEBUG
195void checkall();
196#endif
197#endif
198#endif
199
Note: See TracBrowser for help on using the repository browser.