source: git/Singular/ipshell.h @ 995a6a

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