1 #ifndef OPTIONS_H 2 #define OPTIONS_H 3 /***************************************** 4 * * Computer Algebra System SINGULAR * 5 * *****************************************/ 6 /* 7 * ABSTRACT: macros for global options 8 */ 9 #include "misc/auxiliary.h" /*for BOOLEAN*/ 10 /*the general set of std-options : si_opt_1(test) */ 11 /*the general set of verbose-options : si_opt_2(verbose) */ 12 #ifdef __cplusplus 13 extern "C" VAR unsigned si_opt_1; //< NOTE: Original option variable name: test 14 extern "C" VAR unsigned si_opt_2; //< NOTE: Original option variable name: verbose 15 #else 16 EXTERN_VAR unsigned si_opt_1; 17 EXTERN_VAR unsigned si_opt_2; 18 #endif 19 EXTERN_VAR BOOLEAN siCntrlc; 20 #define SI_SAVE_OPT(A,B) { A=si_opt_1; B=si_opt_2; } 21 #define SI_SAVE_OPT1(A) { A=si_opt_1; } 22 #define SI_SAVE_OPT2(A) { A=si_opt_2; } 23 #define SI_RESTORE_OPT(A,B) { si_opt_1=A; si_opt_2=B; } 24 #define SI_RESTORE_OPT1(A) { si_opt_1=A; } 25 #define SI_RESTORE_OPT2(A) { si_opt_2=A; } 26 27 /* 28 ** Set operations (small sets only) 29 */ 30 31 #define Sy_bit(x) ((unsigned)1<<(x)) 32 #define Sy_inset(x,s) ((Sy_bit(x)&(s))?TRUE:FALSE) 33 #define BTEST1(a) Sy_inset((a), si_opt_1) 34 #define BVERBOSE(a) Sy_inset((a), si_opt_2) 35 36 /* 37 ** defines for BITSETs 38 */ 39 40 #define V_QUIET 0 41 #define V_QRING 1 42 #define V_SHOW_MEM 2 43 #define V_YACC 3 44 #define V_REDEFINE 4 45 #define V_READING 5 46 #define V_LOAD_LIB 6 47 #define V_DEBUG_LIB 7 48 #define V_LOAD_PROC 8 49 #define V_DEF_RES 9 50 51 #define V_SHOW_USE 11 52 #define V_IMAP 12 53 #define V_PROMPT 13 54 #define V_NSB 14 55 #define V_CONTENTSB 15 56 #define V_CANCELUNIT 16 57 #define V_MODPSOLVSB 17 58 #define V_UPTORADICAL 18 59 #define V_FINDMONOM 19 60 #define V_COEFSTRAT 20 61 // set V_IDLIFT for liftstd(A,B) command (no syzygies wanted) 62 #define V_IDLIFT 21 63 #define V_LENGTH 22 64 //#define V_REPORT_STD 23 65 /*23: kDebugPrint */ 66 #define V_ALLWARN 24 67 #define V_INTERSECT_ELIM 25 68 #define V_INTERSECT_SYZ 26 69 #define V_ASSIGN_NONE 27 70 #define V_IDELIM 28 71 /* for tests: 29-30 */ 72 #define V_DEG_STOP 31 73 74 75 #define OPT_PROT 0 76 #define OPT_REDSB 1 77 #define OPT_NOT_BUCKETS 2 78 #define OPT_NOT_SUGAR 3 79 #define OPT_INTERRUPT 4 80 #define OPT_SUGARCRIT 5 81 #define OPT_DEBUG 6 82 #define OPT_REDTHROUGH 7 83 #define OPT_NO_SYZ_MINIM 8 84 #define OPT_RETURN_SB 9 85 #define OPT_FASTHC 10 86 #define OPT_OLDSTD 20 87 #define OPT_REDTAIL_SYZ 21 88 #define OPT_STAIRCASEBOUND 22 89 #define OPT_MULTBOUND 23 90 #define OPT_DEGBOUND 24 91 #define OPT_REDTAIL 25 92 #define OPT_INTSTRATEGY 26 93 #define OPT_FINDET 27 94 #define OPT_INFREDTAIL 28 95 #define OPT_SB_1 29 96 #define OPT_NOTREGULARITY 30 97 #define OPT_WEIGHTM 31 98 99 /* define ring dependent options */ 100 #define TEST_RINGDEP_OPTS \ 101 (Sy_bit(OPT_INTSTRATEGY) | Sy_bit(OPT_REDTHROUGH) | Sy_bit(OPT_REDTAIL)) 102 103 #define TEST_OPT_PROT BTEST1(OPT_PROT) 104 #define TEST_OPT_REDSB BTEST1(OPT_REDSB) 105 #define TEST_OPT_NOT_BUCKETS BTEST1(OPT_NOT_BUCKETS) 106 #define TEST_OPT_NOT_SUGAR BTEST1(OPT_NOT_SUGAR) 107 #define TEST_OPT_SUGARCRIT BTEST1(OPT_SUGARCRIT) 108 #define TEST_OPT_DEBUG BTEST1(OPT_DEBUG) 109 #define TEST_OPT_FASTHC BTEST1(OPT_FASTHC) 110 #define TEST_OPT_INTSTRATEGY BTEST1(OPT_INTSTRATEGY) 111 #define TEST_OPT_FINDET BTEST1(OPT_FINDET) 112 #define TEST_OPT_RETURN_SB BTEST1(OPT_RETURN_SB) 113 #define TEST_OPT_DEGBOUND BTEST1(OPT_DEGBOUND) 114 #define TEST_OPT_MULTBOUND BTEST1(OPT_MULTBOUND) 115 #define TEST_OPT_STAIRCASEBOUND BTEST1(OPT_STAIRCASEBOUND) 116 #define TEST_OPT_REDTAIL BTEST1(OPT_REDTAIL) 117 #define TEST_OPT_REDTAIL_SYZ BTEST1(OPT_REDTAIL_SYZ) 118 #define TEST_OPT_INFREDTAIL BTEST1(OPT_INFREDTAIL) 119 #define TEST_OPT_SB_1 BTEST1(OPT_SB_1) 120 #define TEST_OPT_NOTREGULARITY BTEST1(OPT_NOTREGULARITY) 121 #define TEST_OPT_WEIGHTM BTEST1(OPT_WEIGHTM) 122 #define TEST_OPT_REDTHROUGH BTEST1(OPT_REDTHROUGH) 123 #define TEST_OPT_OLDSTD BTEST1(OPT_OLDSTD) 124 #define TEST_OPT_NO_SYZ_MINIM BTEST1(OPT_NO_SYZ_MINIM) 125 126 127 #define TEST_OPT_CONTENTSB BVERBOSE(V_CONTENTSB) 128 #define TEST_OPT_CANCELUNIT BVERBOSE(V_CANCELUNIT) 129 #define TEST_OPT_IDLIFT BVERBOSE(V_IDLIFT) 130 #define TEST_OPT_IDELIM BVERBOSE(V_IDELIM) 131 #define TEST_OPT_LENGTH BVERBOSE(V_LENGTH) 132 #define TEST_V_QRING BVERBOSE(V_QRING) 133 #define TEST_V_NSB BVERBOSE(V_NSB) 134 #define TEST_V_QUIET BVERBOSE(V_QUIET) 135 #define TEST_V_ASSIGN_NONE BVERBOSE(V_ASSIGN_NONE) 136 137 #define TEST_VERB_NSB BVERBOSE(V_NSB) 138 #define TEST_V_DEG_STOP BVERBOSE(V_DEG_STOP) 139 #define TEST_V_MODPSOLVSB BVERBOSE(V_MODPSOLVSB) 140 #define TEST_V_COEFSTRAT BVERBOSE(V_COEFSTRAT) 141 #define TEST_V_UPTORADICAL BVERBOSE(V_UPTORADICAL) 142 #define TEST_V_FINDMONOM BVERBOSE(V_FINDMONOM) 143 #define TEST_V_ALLWARN BVERBOSE(V_ALLWARN) 144 #define TEST_V_INTERSECT_ELIM BVERBOSE(V_INTERSECT_ELIM) 145 #define TEST_V_INTERSECT_SYZ BVERBOSE(V_INTERSECT_SYZ) 146 147 148 #endif 149