flag_defs_xsb.h

00001 /* File:      flag_defs_xsb.h
00002 ** Author(s): Jiyang Xu, Kostis Sagonas, Ernie Johnson
00003 ** Contact:   xsb-contact@cs.sunysb.edu
00004 ** 
00005 ** Copyright (C) The Research Foundation of SUNY, 1986, 1993-1999
00006 ** Copyright (C) ECRC, Germany, 1990
00007 ** 
00008 ** XSB is free software; you can redistribute it and/or modify it under the
00009 ** terms of the GNU Library General Public License as published by the Free
00010 ** Software Foundation; either version 2 of the License, or (at your option)
00011 ** any later version.
00012 ** 
00013 ** XSB is distributed in the hope that it will be useful, but WITHOUT ANY
00014 ** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00015 ** FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for
00016 ** more details.
00017 ** 
00018 ** You should have received a copy of the GNU Library General Public License
00019 ** along with XSB; if not, write to the Free Software Foundation,
00020 ** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00021 **
00022 ** $Id: flag_defs_xsb.h,v 1.18 2006/07/08 18:49:11 tswift Exp $
00023 ** 
00024 */
00025 
00026 
00027 /* -------- system flags --------------------------------------------------*/
00028 
00029 /*      used by interpreter ->  Y/N ; read only -> R/W/N (no access)       */
00030 
00031 /* Thread private flags */
00032 
00033 #define STACK_REALLOC    1      /* 1 = allow realloc of stacks on Oflow YW */
00034 #define CURRENT_INPUT    2      /* current input file descriptor        NW */
00035 #define CURRENT_OUTPUT   3      /* current output file descriptor       NW */
00036 #define SYS_TIMER        4      /* XSB Timer                            MK */
00037 #define VERBOSENESS_LEVEL 5     /* how verbose debug messages should be    */
00038 #define GARBAGE_COLLECT  6      /* type of garbage collection employed:    */
00039                                 /* 0 = none; 1 = sliding; 2 = copying.  NW */
00040 #define CLAUSE_INT       7      /* for clause interrupt                 YW */
00041 #define BACKTRACE        8      /* for backtracing on error      Y/N       */
00042 /* the following three flags are only in effect when
00043    the system is compiled with --enable-debug         --lfcastro           */
00044 #define VERBOSE_GC       9      /* be verbose on garbage collection        */
00045 #define COUNT_CHAINS    10      /* count size of chains on GC              */
00046 #define EXAMINE_DATA    11      /* examine data on GC                      */
00047 #define PROFFLAG        12
00048 #define TABLING_METHOD  13      /* Default method used to evaluate tabled */
00049 #define CLAUSE_GARBAGE_COLLECT 14 /* Turn clause gc on or off */
00050 /* Flags 14-24 are open to use */
00051 
00052 /*
00053  *  Flags 25-41 are reserved for Interrupt Handler PSCs.
00054  */
00055 #define INT_HANDLERS_FLAGS_START   25  /* the first interrupt flag */
00056 
00057 /* ----------------------------------------------------------------------------
00058    The following exist/are defined in sig_xsb.h:
00059 
00060  MYSIG_UNDEF      0    // _$load_undef
00061  MYSIG_KEYB       1    // _$keyboard_int
00062  MYSIG_SPY        3    // _$deb_spy
00063  MYSIG_TRACE      4    // _$deb_trace
00064  MYSIG_ATTV       8    // _$attv_int
00065  MYSIG_CLAUSE    16    // _$clause_int
00066 
00067 These values are added to INT_HANDLERS_FLAGS_START to obtain the actual
00068 interrupt flag
00069 ---------------------------------------------------------------------------- */
00070 #define MAX_PRIVATE_FLAGS 42
00071 
00072 /* Thread shared flags */
00073 
00074 #define TRACE_STA       42      /* 1 = keep max stack size stats        YW */
00075 #define CURRENT_MODULE  43      /* current module. USERMOD_PSC=usermod  YW */
00076 #define MOD_LIST        44      /* the list of module (Psc) entries     YR */
00077 #define BANNER_CTL      45      /* Controls whether banner, "loaded" msgs
00078                                    are displayed; passed to Prolog side.
00079                                    Check BANNER_CTL values at the end      */
00080 #define CMD_LINE_GOAL   46      /* The Prolog goal passed on cmd 
00081                                    line with -e                            */
00082 #define USER_HOME       47      /* $HOME, if not null. Else INSTALL_DIR    */
00083 #define INSTALL_DIR     48      /* set dynamically in orient_xsb.c         */
00084 #define CONFIG_FILE     49      /* Where xsb_configuration.P lives         */
00085 /* loader uses CONFIG_NAME flag before xsb_configuration is loaded */
00086 #define CONFIG_NAME     50      /* this looks like this: cpu-vendor-os     */
00087 #define LETTER_VARS     51      /* For printing vars in the interpreter */
00088 #define BOOT_MODULE     52      /* First file loaded; usually loader.P  */
00089 #define CMD_LOOP_DRIVER 53      /* File that contains top-level command
00090                                      loop driver */
00091 #define NUM_THREADS     54      /* always 1 in the sequential system     NW*/
00092 #define THREAD_RUN      55      /* PSC for the thread handler predicate  NN*/
00093 #define STDERR_BUFFERED 56      /* Allow Cinterface to read Stderr back from buffer*/
00094 
00095 /* The following flags may be made private in the future */
00096 
00097 #define PIL_TRACE       57      /* 0 = pil trace off, 1 = on            YW */
00098 #define HITRACE         58      /* 0 = hitrace off, 1 = on              YW */
00099 #define DEBUG_ON        59      /* 1 = debug on; 0 = off                YW */
00100 #define HIDE_STATE      60      /* 0 = no hide, >0 = hide level         YW */
00101 #define TRACE           61      /* 1 = trace on, 0 = trace off          YW */
00102 #define INVOKE_NUM      62      /* debugger, the ordinal invoke number  NW */
00103 #define SKIPPING        63      /* debugger, 1 = skip, 0 = not          NW */
00104 #define QUASI_SKIPPING  64      /* debugger, 1 = quasi skip, 0 = not    NW */
00105 
00106 /* The following flags may be obsolete */
00107 
00108 #define DCG_MODE        65      /* DGC mode: standard or xsb               */
00109 
00110 /* This flag is used by the loader to tell itself whether it should look into
00111    user-supplied library search paths or not. If 0, the loader will look only
00112    in lib/syslib/cmplib. If 1, the loader will look in library_directory/1
00113    before checking the standard places. */
00114 #define LIBS_LOADED       66
00115 
00116 #define ORA_INPUTARRAY_LENGTH     67   /* max # simultaneous input tuples */
00117 #define ORA_INPUTARRAY_WIDTH      68   /* max size of each input value    */
00118 #define ORA_OUTPUTARRAY_LENGTH    69   /* max # simultaneous output tuples */
00119 
00120 
00121 
00122 #define MAX_FLAGS               75
00123 
00124 #define MAXTOINDEX 5              /* depth in term to go when using deep indexing */
00125 
00126 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
00127 
00128 /* Banner control values recognized on the Prolog side. 
00129    MUST BE PRIME NUMBERS */
00130 #define NOBANNER          2   /* don't display XSB banner */
00131 #define QUIETLOAD         3   /* don't display "module loaded" msgs */
00132 #define NOPROMPT          5   /* display no prompt--useful in spawned
00133                                  subprocesses */

Generated on Wed Jul 26 13:30:40 2006 for XSB by  doxygen 1.4.5