00001 00002 /* File: psc_defs.h 00003 ** Author(s): Jiyang Xu, Terry Swift, Kostis Sagonas 00004 ** Contact: xsb-contact@cs.sunysb.edu 00005 ** 00006 ** Copyright (C) The Research Foundation of SUNY, 1986, 1993-1998 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: psc_defs.h,v 1.11 2006/05/02 14:30:39 dwarren Exp $ 00023 ** 00024 */ 00025 00026 #ifndef _PSC_DEFS_ 00027 #define _PSC_DEFS_ 00028 00029 #define T_VISIBLE 0 00030 #define T_HIDDEN 1 00031 #define T_UNLOADED 2 00032 #define T_ENV 3 00033 #define T_TABLED 12 /* both bits may be on if it is known that pred is tabled, but not 00034 yet determined whether it is variant or subsumptive tabled */ 00035 #define T_TABLED_VAR 8 /* Variant tabled (unless T_TABLED_SUB is also on, in which case 00036 it is tabled, but not yet determined which kind.) */ 00037 #define T_TABLED_SUB 4 /* Subsumptive tabled (unless T_TABLED_VAR is also on, ...*/ 00038 #define T_TABLED_SUB_LOADFILE 64 /* Bit in the t_env byte in .xwam (objcode) file symtab 00039 that is used to set T_TABLED_SUB in the psc. 00040 (Nec since T_GLOBAL took 4, which would have been used.) */ 00041 #define T_SHARED 32 /* 0x20 (decimal for Prolog include) On: thread shared, Off: private */ 00042 #define T_SHARED_DET 16 /* 0x10 (decimal for Prolog include) On if T_SHARED bit determines 00043 sharedness. Off means sharedness not yet determined. 00044 Nec for error messages */ 00045 #define T_SPY 192 // 0xc0 use decimal for Prolog include 00046 00047 /* === type definition: (entry_type) ============================== */ 00048 00049 #define T_ORDI 0 /* constant-type: no ep definition, may be set later */ 00050 #define T_DYNA 1 /* constant-type: dynamic, code in buffer */ 00051 #define T_PRED 2 /* constant-type: ep points to compiled code */ 00052 00053 #define T_MODU 4 /* ep field is used to hold psc-list */ 00054 00055 /* TLS: PSCs should no longer represent files (or file descriptors). 00056 Use the stream table instead. By the way, I think I've gotten all of 00057 the PSC files out of the system, but now and then I come across one 00058 I've forgotten. */ 00059 //#define T_FILE 5 /* ep field could be file descriptor (not now) */ 00060 00061 #define T_UDEF 12 /* unloaded T_PRED */ 00062 #define T_FORN 13 /* predicate in foreign language */ 00063 00064 #define T_DEFI 128 /* bit to pass from compiler to loader that pred has clauses */ 00065 /* === loader definitions (module information) ==================== */ 00066 00067 #define T_EXPORTED 0 00068 #define T_LOCAL 1 00069 #define T_IMPORTED 2 00070 #define T_GLOBAL 4 00071 00072 00073 /* Global module */ 00074 00075 #define USERMOD_PSC 1 00076 00077 #endif /* _PSC_DEFS_ */