Macros | Functions
mod2.h File Reference
#include <singularconfig.h>
#include <misc/auxiliary.h>

Go to the source code of this file.

Macros

#define VERSION   "4.1.0"
 
#define SINGULAR_MAJOR_VERSION   4
 
#define SINGULAR_MINOR_VERSION   1
 
#define SINGULAR_SUB_VERSION   0
 
#define S_ROOT_DIR   ""
 
#define HAVE_GETTIMEOFDAY   1
 
#define TIME_WITH_SYS_TIME   1
 
#define HAVE_SYS_TIME_H   1
 
#define TIMER_RESOLUTION   1
 
#define SIQ   1
 
#define FAST_AND_DIRTY
 
#define HAVE_EIGENVAL   1
 
#define HAVE_GMS   1
 
#define HAVE_SIMPLEIPC   1
 
#define HAVE_PCV   1
 
#define HAVE_UNITS
 
#define HAVE_LIBPARSER
 
#define PROFILER
 
#define HAVE_SPECTRUM   1
 
#define SINGULAR_PATCHLEVEL   3
 
#define SINGULAR_VERSION   ((SINGULAR_MAJOR_VERSION*1000 + SINGULAR_MINOR_VERSION*100 + SINGULAR_SUB_VERSION*10)+SINGULAR_PATCHLEVEL)
 
#define YYLPDEBUG   1
 
#define SEEK_END   2
 
#define SEEK_SET   0
 
#define HALT()   m2_end(2)
 
#define LINKAGE
 
#define NO_INLINE
 
#define HAVE_ASSUME
 
#define MDEBUG   0
 
#define OM_TRACK   4
 
#define OM_CHECK   1
 
#define OM_KEEP   0
 
#define OM_SING_KEEP   1000
 
#define KDEBUG   0
 
#define LDEBUG
 
#define RDEBUG
 
#define TEST
 
#define YYDEBUG   1
 
#define assume_violation(s, f, l)   dReportError("assume violation at %s:%d condition: %s", f,l,s)
 
#define assume(x)   _assume(x, __FILE__, __LINE__)
 
#define r_assume(x)   _r_assume(x, __FILE__, __LINE__)
 
#define _assume(x, f, l)
 
#define _r_assume(x, f, l)
 
#define __attribute__(x)   /*NOTHING*/
 
#define STRINGIFY(name)   #name
 
#define EXPANDED_STRINGIFY(name)   STRINGIFY(name)
 

Functions

int dReportError (const char *fmt,...)
 
void dErrorBreak ()
 

Macro Definition Documentation

◆ __attribute__

#define __attribute__ (   x)    /*NOTHING*/

Definition at line 434 of file mod2.h.

◆ _assume

#define _assume (   x,
  f,
  l 
)
Value:
do \
{ \
if (! (x)) \
{ \
assume_violation(#x, f, l); \
} \
} \
while (0)
FILE * f
Definition: checklibs.c:9
Variable x
Definition: cfModGcd.cc:4023
int l
Definition: cfEzgcd.cc:94

Definition at line 397 of file mod2.h.

◆ _r_assume

#define _r_assume (   x,
  f,
  l 
)
Value:
do \
{ \
if (! (x)) \
{ \
assume_violation(#x, f, l); \
return 0; \
} \
} \
while (0)
FILE * f
Definition: checklibs.c:9
Variable x
Definition: cfModGcd.cc:4023
int l
Definition: cfEzgcd.cc:94

Definition at line 407 of file mod2.h.

◆ assume

#define assume (   x)    _assume(x, __FILE__, __LINE__)

Definition at line 394 of file mod2.h.

◆ assume_violation

#define assume_violation (   s,
  f,
  l 
)    dReportError("assume violation at %s:%d condition: %s", f,l,s)

Definition at line 391 of file mod2.h.

◆ EXPANDED_STRINGIFY

#define EXPANDED_STRINGIFY (   name)    STRINGIFY(name)

Definition at line 438 of file mod2.h.

◆ FAST_AND_DIRTY

#define FAST_AND_DIRTY

Definition at line 38 of file mod2.h.

◆ HALT

#define HALT ( )    m2_end(2)

Definition at line 117 of file mod2.h.

◆ HAVE_ASSUME

#define HAVE_ASSUME

Definition at line 158 of file mod2.h.

◆ HAVE_EIGENVAL

#define HAVE_EIGENVAL   1

Definition at line 41 of file mod2.h.

◆ HAVE_GETTIMEOFDAY

#define HAVE_GETTIMEOFDAY   1

Definition at line 27 of file mod2.h.

◆ HAVE_GMS

#define HAVE_GMS   1

Definition at line 44 of file mod2.h.

◆ HAVE_LIBPARSER

#define HAVE_LIBPARSER

Definition at line 65 of file mod2.h.

◆ HAVE_PCV

#define HAVE_PCV   1

Definition at line 51 of file mod2.h.

◆ HAVE_SIMPLEIPC

#define HAVE_SIMPLEIPC   1

Definition at line 47 of file mod2.h.

◆ HAVE_SPECTRUM

#define HAVE_SPECTRUM   1

Definition at line 78 of file mod2.h.

◆ HAVE_SYS_TIME_H

#define HAVE_SYS_TIME_H   1

Definition at line 29 of file mod2.h.

◆ HAVE_UNITS

#define HAVE_UNITS

Definition at line 62 of file mod2.h.

◆ KDEBUG

#define KDEBUG   0

Definition at line 309 of file mod2.h.

◆ LDEBUG

#define LDEBUG

Definition at line 312 of file mod2.h.

◆ LINKAGE

#define LINKAGE

Definition at line 142 of file mod2.h.

◆ MDEBUG

#define MDEBUG   0

Definition at line 185 of file mod2.h.

◆ NO_INLINE

#define NO_INLINE

Definition at line 155 of file mod2.h.

◆ OM_CHECK

#define OM_CHECK   1

Definition at line 283 of file mod2.h.

◆ OM_KEEP

#define OM_KEEP   0

Definition at line 289 of file mod2.h.

◆ OM_SING_KEEP

#define OM_SING_KEEP   1000

Definition at line 295 of file mod2.h.

◆ OM_TRACK

#define OM_TRACK   4

Definition at line 279 of file mod2.h.

◆ PROFILER

#define PROFILER

Definition at line 71 of file mod2.h.

◆ r_assume

#define r_assume (   x)    _r_assume(x, __FILE__, __LINE__)

Definition at line 395 of file mod2.h.

◆ RDEBUG

#define RDEBUG

Definition at line 314 of file mod2.h.

◆ S_ROOT_DIR

#define S_ROOT_DIR   ""

Definition at line 20 of file mod2.h.

◆ SEEK_END

#define SEEK_END   2

Definition at line 110 of file mod2.h.

◆ SEEK_SET

#define SEEK_SET   0

Definition at line 114 of file mod2.h.

◆ SINGULAR_MAJOR_VERSION

#define SINGULAR_MAJOR_VERSION   4

Definition at line 17 of file mod2.h.

◆ SINGULAR_MINOR_VERSION

#define SINGULAR_MINOR_VERSION   1

Definition at line 18 of file mod2.h.

◆ SINGULAR_PATCHLEVEL

#define SINGULAR_PATCHLEVEL   3

Definition at line 85 of file mod2.h.

◆ SINGULAR_SUB_VERSION

#define SINGULAR_SUB_VERSION   0

Definition at line 19 of file mod2.h.

◆ SINGULAR_VERSION

Definition at line 86 of file mod2.h.

◆ SIQ

#define SIQ   1

Definition at line 35 of file mod2.h.

◆ STRINGIFY

#define STRINGIFY (   name)    #name

Definition at line 437 of file mod2.h.

◆ TEST

#define TEST

Definition at line 316 of file mod2.h.

◆ TIME_WITH_SYS_TIME

#define TIME_WITH_SYS_TIME   1

Definition at line 28 of file mod2.h.

◆ TIMER_RESOLUTION

#define TIMER_RESOLUTION   1

Definition at line 32 of file mod2.h.

◆ VERSION

#define VERSION   "4.1.0"

Definition at line 16 of file mod2.h.

◆ YYDEBUG

#define YYDEBUG   1

Definition at line 321 of file mod2.h.

◆ YYLPDEBUG

#define YYLPDEBUG   1

Definition at line 94 of file mod2.h.

Function Documentation

◆ dErrorBreak()

void dErrorBreak ( )

Definition at line 141 of file dError.cc.

142 {}

◆ dReportError()

int dReportError ( const char *  fmt,
  ... 
)

Definition at line 45 of file dError.cc.

46 {
47 #if 0
48 #ifdef HAVE_EXECINFO_H
49 #define SIZE 50
50  void *buffer[SIZE+1]; int ret;
51 #endif
52 #endif
53 
54  va_list ap;
55  va_start(ap, fmt);
56 #ifndef MAKE_DISTRIBUTION
57  fprintf(stderr, "\n// ***dError: ");
58  vfprintf(stderr, fmt, ap);
59 #if !defined(OM_NDEBUG)
60  #ifdef omPrintCurrentBackTraceMax
61  fprintf(stderr, " occurred at: \n");
62  omPrintCurrentBackTraceMax(stderr, 8);
63  #endif
64 #endif
65 
66 #if 0
67 #ifdef HAVE_EXECINFO_H
68  ret = backtrace( buffer, SIZE ); // execinfo.h
69  fprintf(stderr, "\nExecinfo backtrace (with %zd stack frames): \n", ret);
70 
71 #ifndef HAVE_GCC_ABI_DEMANGLE
72  backtrace_symbols_fd(buffer, ret, STDERR_FILENO); // execinfo.h
73 #else
74  char **ptr = backtrace_symbols( buffer, ret ); // execinfo.h
75 
76  int status;
77  char *demangledName;
78  char *s;
79  char *ss;
80  for (int i = 0; i < ret; i++)
81  {
82  status = -1;
83 
84  s = ptr[i];
85 // fprintf (stderr, " #%02d: %s\n", i, s);
86 
87  ss = index(s, '(');
88  ss[0] = 0;
89  fprintf (stderr, " #%02d: '%s': ", i, s);
90  ss[0] = '('; s = ss + 1;
91 
92  ss = index(s, '+');
93 
94  if ( ss != NULL )
95  {
96  ss[0] = 0;
97  demangledName = abi::__cxa_demangle( s, NULL, NULL, &status ); // cxxabi.h!
98  if( status == 0 && demangledName != NULL )
99  fprintf (stderr, " '%s'", (demangledName[0] != 0)? demangledName: s);
100  else
101  fprintf (stderr, " '%s'", s);
102 
103  malloc_free( demangledName );
104  ss[0] = '+';
105  s = ss + 1;
106  }
107 
108  ss = index(s, ')');
109  if( s != ss)
110  {
111  ss[0] = 0;
112  fprintf (stderr, " + %s", s);
113  ss[0] = ')';
114  }
115 
116  fprintf (stderr, " %s\n", ss + 2);
117  }
118  malloc_free (ptr);
119 #endif
120 #endif
121 
122 #undef SIZE
123 #endif
124 
125  dErrorBreak();
126 #else
127  fprintf(stderr, "\n// !!! YOU HAVE FOUND A BUG IN SINGULAR.");
128  fprintf(stderr, "// !!! Please, email the input\n// and the following error message to singular@mathematik.uni-kl.de")
129  vfprintf(stderr, fmt, ap);
130 #endif
131  return 0;
132 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
void dErrorBreak()
Definition: dError.cc:141
int omPrintCurrentBackTraceMax(FILE *fd, int max)
Definition: omRet2Info.c:165
static void malloc_free(void *ptr)
Definition: dError.cc:24
int i
Definition: cfEzgcd.cc:123
static int index(p_Length length, p_Ord ord)
Definition: p_Procs_Impl.h:592
#define NULL
Definition: omList.c:10
int * status
Definition: si_signals.h:51