source: git/Singular/ipshell.h @ 609ba11

spielwiese
Last change on this file since 609ba11 was 64d729, checked in by Hans Schönemann <hannes@…>, 25 years ago
* hannes: introduced debugger (hook and first implementation) git-svn-id: file:///usr/local/Singular/svn/trunk@2983 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.4 KB
Line 
1#ifndef IPSHELL_H
2#define IPSHELL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: ipshell.h,v 1.17 1999-04-15 17:28:05 Singular Exp $ */
7/*
8* ABSTRACT
9*/
10#include <stdio.h>
11#include "structs.h"
12#include "subexpr.h"
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 int iiOp; /* the current operation*/
24extern int  myynest;
25extern char *  currid;
26extern char * thisfile;
27extern int     iiRETURNEXPR_len;
28extern sleftv *iiRETURNEXPR;
29#ifdef USE_IILOCALRING
30extern ring   *iiLocalRing;
31#endif
32extern cmdnames cmds[];
33extern char *lastreserved;
34
35int     IsCmd(char *n, int & tok);
36BOOLEAN iiPStart(idhdl pn, sleftv * sl);
37BOOLEAN iiEStart(char* example, procinfo *pi);
38void    type_cmd(idhdl h);
39void    test_cmd(int i);
40void    list_cmd(int typ, const char* what, char * prefix, BOOLEAN iterate,
41                 BOOLEAN fullname=FALSE);
42void    iiWriteMatrix(matrix im, const char *n, int dim, int spaces=0);
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_NAMESPACES
53BOOLEAN iiExport(leftv v, int toLev, idhdl roothdl);
54BOOLEAN iiInternalExport (leftv v, int toLev, idhdl roothdl);
55#endif /* HAVE_NAMESPACES */
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);
60#ifdef HAVE_NAMESPACES
61BOOLEAN iiLibCmd( char *newlib, BOOLEAN autoexport=TRUE, BOOLEAN tellerror=TRUE );
62#else /* HAVE_NAMESPACES */
63BOOLEAN iiLibCmd( char *newlib, BOOLEAN tellerror=TRUE );
64#endif /* HAVE_NAMESPACES */
65leftv   iiMap(map theMap, char * what);
66void    iiMakeResolv(resolvente r, int length, int rlen, char * name, int typ0,
67           intvec ** weights=NULL);
68BOOLEAN jjMINRES(leftv res, leftv v);
69BOOLEAN jjBETTI(leftv res, leftv v);
70int     iiRegularity(lists L);
71leftv   singular_system(sleftv h);
72BOOLEAN jjSYSTEM(leftv res, leftv v);
73void    iiDebug();
74BOOLEAN iiCheckRing(int i);
75poly    iiHighCorner(ideal i, int ak);
76/* ================================================================== */
77/* Expressions : */
78BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
79BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
80                     BOOLEAN proccall=FALSE);
81BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
82BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
83
84typedef BOOLEAN (*proc1)(leftv,leftv);
85
86#ifdef INIT_BUG
87void    jjInitTab1();
88#endif
89#ifdef GENTABLE
90typedef char * (*Proc1)(char *);
91struct sValCmd1
92{
93  proc1 p;
94  short cmd;
95  short res;
96  short arg;
97};
98
99typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
100struct sValCmd2
101{
102  proc2 p;
103  short cmd;
104  short res;
105  short arg1;
106  short arg2;
107#ifdef PROFILING
108  short cnt;
109  int   t;
110#endif
111};
112
113typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
114struct sValCmd3
115{
116  proc3 p;
117  short cmd;
118  short res;
119  short arg1;
120  short arg2;
121  short arg3;
122};
123struct sValCmdM
124{
125  proc1 p;
126  short cmd;
127  short res;
128  short number_of_args; /* -1: any, -2: any >0, .. */
129};
130extern struct sValCmd2 dArith2[];
131extern struct sValCmd1 dArith1[];
132extern struct sValCmd3 dArith3[];
133extern struct sValCmdM dArithM[];
134#endif
135
136/* ================================================================== */
137/* Assigments : */
138BOOLEAN iiAssign(leftv left, leftv right);
139
140typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
141struct sValAssign_sys
142{
143  proc1 p;
144  short res;
145  short arg;
146};
147
148struct sValAssign
149{
150  proci p;
151  short res;
152  short arg;
153};
154
155BOOLEAN iiParameter(leftv p);
156/* ================================================================== */
157int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
158  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
159#ifdef HAVE_NAMESPACES
160sleftv * iiMake_proc(idhdl pn, sleftv* slpn, sleftv* sl);
161#else /* HAVE_NAMESPACES */
162sleftv * iiMake_proc(idhdl pn, sleftv* sl);
163#endif /* HAVE_NAMESPACES */
164// from misc.cc:
165char *  showOption();
166BOOLEAN setOption(leftv res, leftv v);
167/* ================================================================== */
168char * versionString();
169#endif
170
Note: See TracBrowser for help on using the repository browser.