source: git/Singular/ipshell.h @ 602926

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