tries.h

00001 /* File:      tries.h
00002 ** Author(s): Ernie Johnson, Prasad Rao, Kostis Sagonas
00003 ** Contact:   xsb-contact@cs.sunysb.edu
00004 ** 
00005 ** Copyright (C) The Research Foundation of SUNY, 1986, 1993-1998
00006 ** 
00007 ** XSB is free software; you can redistribute it and/or modify it under the
00008 ** terms of the GNU Library General Public License as published by the Free
00009 ** Software Foundation; either version 2 of the License, or (at your option)
00010 ** any later version.
00011 ** 
00012 ** XSB is distributed in the hope that it will be useful, but WITHOUT ANY
00013 ** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00014 ** FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for
00015 ** more details.
00016 ** 
00017 ** You should have received a copy of the GNU Library General Public License
00018 ** along with XSB; if not, write to the Free Software Foundation,
00019 ** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00020 **
00021 ** $Id: tries.h,v 1.40 2006/03/24 16:40:29 tswift Exp $
00022 ** 
00023 */
00024 
00025 
00026 #ifndef PUBLIC_TRIE_DEFS
00027 
00028 
00029 #define PUBLIC_TRIE_DEFS
00030 
00031 /*===========================================================================*/
00032 
00033 /*
00034  *      A B S T R A C T E D   T R I E   R E P R E S E N T A T I O N
00035  *      ===========================================================
00036  *
00037  *  There are several types of operations which are common to any trie,
00038  *  either to the structure as a whole, or to its components.  Likewise,
00039  *  there are places in the engine where it won't be apparent what type
00040  *  of trie (respectively, component) one is inspecting.  Although this
00041  *  can be ascertained, adherence to the following guidelines will make
00042  *  this unnecessary, as well as the need for any type-dependent special
00043  *  processing.  A set of macros are supplied for use in these "don't
00044  *  know" or "don't care" situations.
00045  *
00046  *  All types of trie nodes must be laid out in the same fashion, with
00047  *  common fields appearing in the same order.  Fields which point to
00048  *  like-component records may have different types, but the others
00049  *  (Info and Symbol) are fixed.  Currently, the layout is as indicated
00050  *  below.  Except for the Info field which MUST be first, the ordering
00051  *  of the other fields is arbitrary.  Field names have also been
00052  *  standardized to help ensure conformity.
00053  *
00054  *  We use the following notation:
00055  *    TN_*         Trie Node operation
00056  *    TrieHT_*     Trie Hash Table operation  (see trie_internals.h)
00057  *    TSC_*        Trie SubComponent operation (applicable to a TN or THT)
00058  *    pTN          pointer to a Trie Node
00059  *    pTHT         pointer to a Trie Hash Table
00060  *    pTSC pointer to a Trie SubComponent
00061  */
00062 
00063 #define TN_Instr(pTN)           TSC_Instr(pTN)
00064 #define TN_Status(pTN)          TSC_Status(pTN)
00065 #define TN_TrieType(pTN)        TSC_TrieType(pTN)
00066 #define TN_NodeType(pTN)        TSC_NodeType(pTN)
00067 #define TN_Parent(pTN)          ( (pTN)->parent )
00068 #define TN_Child(pTN)           ( (pTN)->child )
00069 #define TN_Sibling(pTN)         ( (pTN)->sibling )
00070 #define TN_Symbol(pTN)          ( (pTN)->symbol )
00071 
00072 #define TSC_Instr(pTSC)         IPT_Instr((pTSC)->info)
00073 #define TSC_Status(pTSC)        IPT_Status((pTSC)->info)
00074 #define TSC_TrieType(pTSC)      IPT_TrieType((pTSC)->info)
00075 #define TSC_NodeType(pTSC)      IPT_NodeType((pTSC)->info)
00076 
00077 
00078 #define TN_SetHashHdr(pTN,pTHT)         TN_Child(pTN) = (void *)(pTHT)
00079 #define TN_GetHashHdr(pTN)              TN_Child(pTN)
00080 
00081 #define FREE_TRIE_NODE_MARK -1
00082 #define FREE_TRIE_BLOCK_MARK -2
00083 
00084 /*===========================================================================*/
00085 
00086 /*
00087  *                      Trie Component Info Field
00088  *                      =========================
00089  *
00090  *  Defines a field one word in size which contains miscellaneous info
00091  *  needed for maximizing trie use: An instruction field allows tries to
00092  *  be traversed for term unification with speeds comparable to code
00093  *  execution for facts.  A status field signifies whether a particular
00094  *  node represents a valid subbranch of the trie.  Nodes (paths) may
00095  *  temporarily be marked as deleted until such time they can be safely
00096  *  removed from the trie.  Two type fields contain annotations which
00097  *  describe the type of trie in which a structure resides and the role
00098  *  the structure plays within this trie, respectively.
00099  *
00100  *  Each of the two main components of a trie contain this field: trie
00101  *  nodes and hash table headers.
00102  *
00103  *  For valid trie-embedded instruction values, see file "inst_xsb.h".  */
00104 
00105 typedef struct InstructionPlusTypeFrame {
00106   byte instr;           /* contains compiled trie code */
00107   byte status;          /* whether the node has been deleted */
00108   byte trie_type;       /* global info: what type of trie is this? */
00109   byte node_type;       /* local info: what is the role of this struct? */
00110 #ifdef BITS64
00111   byte padding[4];
00112 #endif
00113 } InstrPlusType;
00114 
00115 #define IPT_Instr(IPT)          ((IPT).instr)
00116 #define IPT_Status(IPT)         ((IPT).status)
00117 #define IPT_TrieType(IPT)       ((IPT).trie_type)
00118 #define IPT_NodeType(IPT)       ((IPT).node_type)
00119 
00120 extern char *trie_node_type_table[9];
00121 extern char *trie_trie_type_table[6];
00122 
00123 /* Information for initializing dynamic trie structure managers */
00124 
00125 #define  BTN_NAME       0
00126 #define  BTHT_NAME      1
00127 #define  PRODSF_NAME    2
00128 #define  CONSSF_NAME    3
00129 #define  TSTNSF_NAME    4
00130 #define  TSINSF_NAME    5
00131 #define  TSTHT_NAME     6
00132 
00133 extern char *TrieSMNameTable[7];
00134 
00135 /*===========================================================================*/
00136 
00137 /*
00138  *                         B A S I C   T R I E S
00139  *                         =====================
00140  *
00141  *  Each symbol in a term is maintained in a separate node in a trie.
00142  *  Paths from the root to the leaves trace out the terms stored in the
00143  *  trie.  Sharing between terms takes place only high-up within a trie,
00144  *  corresponding to left-to-right term factoring.
00145  *
00146  *  Children of a particular node are maintained in a linked-list pointed
00147  *  to by the Child field.  This list is maintained through the Sibling
00148  *  fields of the child nodes.  To facilitate rapid access when the
00149  *  number of children becomes large, a hash table is employed.  In this
00150  *  case, the parent node's Child field points to a header structure for
00151  *  the hash table, rather than directly to one of the children.
00152  *
00153  *  When used to build Call Tries, the Child field of a leaf trie node
00154  *  points to a SubgoalFrame which contains additional info for that call.
00155  */
00156 
00157 typedef struct Basic_Trie_Node *BTNptr;
00158 typedef struct Basic_Trie_Node {
00159   InstrPlusType info;
00160   BTNptr sibling;
00161   BTNptr child;
00162   BTNptr parent;
00163   Cell symbol;
00164 } BasicTrieNode;
00165 
00166 /* - - Preferred macros - - - - */
00167 #define BTN_Instr(pBTN)         TN_Instr(pBTN)
00168 #define BTN_Status(pBTN)        TN_Status(pBTN)
00169 #define BTN_TrieType(pBTN)      TN_TrieType(pBTN)
00170 #define BTN_NodeType(pBTN)      TN_NodeType(pBTN)
00171 #define BTN_Parent(pBTN)        TN_Parent(pBTN)
00172 #define BTN_Child(pBTN)         TN_Child(pBTN)
00173 #define BTN_Sibling(pBTN)       TN_Sibling(pBTN)
00174 #define BTN_Symbol(pBTN)        TN_Symbol(pBTN)
00175 
00176 /* - - For backwards compatibility - - - - */
00177 typedef struct Basic_Trie_Node *NODEptr;
00178 #define Instr(X)        BTN_Instr(X)
00179 #define TrieType(X)     BTN_TrieType(X)
00180 #define NodeType(X)     BTN_NodeType(X)
00181 #define Parent(X)       BTN_Parent(X)
00182 #define Child(X)        BTN_Child(X)
00183 #define Sibl(X)         BTN_Sibling(X)
00184 #define Atom(X)         BTN_Symbol(X)
00185 
00186 /*===========================================================================*/
00187 
00188 /*
00189  *                  T I M E - S T A M P E D   T R I E S
00190  *                  ===================================
00191  *
00192  *  Similar in construction and maintenance to normal tries, these extend
00193  *  the basic design in order to support answer subsumption.  Conditions
00194  *  under which hash tables are created and the way symbols are stored in
00195  *  the nodes are identical.  (See the file trie_internals.h for details.)
00196  *
00197  *  A timestamp is maintained in each node of the Time-Stamped Trie (TST).
00198  *  When used for Answer Sets, the timestamp kept in each node is the
00199  *  maximum of the timestamps of its children.  Since timestamps
00200  *  monotonically increase as terms are entered, this property can be
00201  *  easily maintained by propagating the timestamp of a newly interned
00202  *  term from the leaf to the root.  Hence, the root ALWAYS contains the
00203  *  timestamp of the largest-timestamped answer contained in the Answer
00204  *  Set.
00205  *
00206  *  For facilitating certain subsumptive operations, it is important to
00207  *  quickly identify nodes having a timestamp greater than a given one.
00208  *  When a sibling chain becomes long, it is no longer acceptable to
00209  *  perform a linear scan in order to identify these timestamp-valid
00210  *  nodes.  Therefore, when we create a hash table for a group of nodes,
00211  *  we also create an auxiliary structure which maintains the nodes in
00212  *  decreasing timestamp order.  Each node's TimeStamp field is then used
00213  *  for pointing to an associated frame in this structure, where the
00214  *  timestamp is now kept.  The hash header is extended -- over the basic
00215  *  trie hash header -- to contain fields for maintaining these frames in
00216  *  a doubly linked list.  Once the Answer Set is completed, these
00217  *  structures can be disposed.  To facilitate this, hash tables, within
00218  *  a particular TST, are chained together from the root, accessible from
00219  *  its Sibling field.  Lazy evaluation...
00220  */
00221 
00222 typedef unsigned long  TimeStamp;
00223 
00224 typedef struct Time_Stamped_Trie_Node *TSTNptr;
00225 typedef struct Time_Stamped_Trie_Node {
00226   InstrPlusType info;
00227   TSTNptr sibling;
00228   TSTNptr child;
00229   TSTNptr parent;
00230   Cell symbol;
00231   TimeStamp ts;
00232 } TS_TrieNode;
00233 
00234 /* Field Access Macros
00235    ------------------- */
00236 #define TSTN_Instr(pTSTN)       TN_Instr(pTSTN)
00237 #define TSTN_Status(pTSTN)      TN_Status(pTSTN)
00238 #define TSTN_TrieType(pTSTN)    TN_TrieType(pTSTN)
00239 #define TSTN_NodeType(pTSTN)    TN_NodeType(pTSTN)
00240 #define TSTN_Parent(pTSTN)      TN_Parent(pTSTN)
00241 #define TSTN_Child(pTSTN)       TN_Child(pTSTN)
00242 #define TSTN_Sibling(pTSTN)     TN_Sibling(pTSTN)
00243 #define TSTN_Symbol(pTSTN)      TN_Symbol(pTSTN)
00244 #define TSTN_TimeStamp(pTSTN)   ( (pTSTN)->ts )
00245 
00246 /*===========================================================================*/
00247 
00248 /*
00249  *                             Answer List Node
00250  *                             ================
00251  *
00252  *  A global resource for ALNs is currently implemented.  Blocks of memory
00253  *  for ALN storage are allocated whenever this resource is depleted.  All
00254  *  ALNs are allocated from this resource.  To allow rapid deallocation of
00255  *  these block-malloc'ed structures, the first word in the structure must
00256  *  contain the field used to link them into a chain when in use.
00257  */
00258 
00259 typedef struct Answer_List_Node *ALNptr;
00260 typedef struct Answer_List_Node {
00261   ALNptr link;
00262   BTNptr answer_leaf;
00263 } AnsListNode;
00264 
00265 #define ALN_Next(pALN)          ((pALN)->link)
00266 #define ALN_Answer(pALN)        ((pALN)->answer_leaf)
00267 
00268 /*===========================================================================*/
00269 
00270 /*
00271  *                      Tabled-Call Lookup Structures
00272  *                      =============================
00273  *
00274  *  Data structures for parameter passing to and from the call
00275  *  check/insert routines.
00276  */
00277 
00278 typedef struct Tabled_Call_Info_Record {
00279   struct Table_Info_Frame *table_info_record;
00280   int call_arity;
00281   CPtr arg_vector;
00282   CPtr var_vector_loc;     /* location to store the call var vector */
00283 } TabledCallInfo;
00284 
00285 #define CallInfo_TableInfo(CallInfo)    ( (CallInfo).table_info_record )
00286 #define CallInfo_CallArity(CallInfo)    ( (CallInfo).call_arity )
00287 #define CallInfo_Arguments(CallInfo)    ( (CallInfo).arg_vector )
00288 #define CallInfo_VarVectorLoc(CallInfo) ( (CallInfo).var_vector_loc )
00289 
00290 
00291 typedef struct Call_Check_Insert_Results {
00292   BTNptr call_trie_term;
00293   struct subgoal_frame *subsumers_sgf;
00294   int variant_found;
00295   CPtr var_vector;         /* pointer to the vector of call variables */
00296 } CallLookupResults;
00297 
00298 #define CallLUR_Leaf(CLUR)              ( (CLUR).call_trie_term )
00299 #define CallLUR_Subsumer(CLUR)          ( (CLUR).subsumers_sgf )
00300 #define CallLUR_VariantFound(CLUR)      ( (CLUR).variant_found )
00301 #define CallLUR_VarVector(CLUR)         ( (CLUR).var_vector )
00302 
00303 /*===========================================================================*/
00304 
00305 
00306 /*-- exported trie functions ------------------------------------------*/
00307 
00308 #ifndef MULTI_THREAD
00309 extern BTNptr   newBasicTrie(Cell,int);
00310 extern byte *   trie_get_calls(void);
00311 extern Cell     get_lastnode_cs_retskel(Cell);
00312 extern byte *   trie_get_returns(struct subgoal_frame *, Cell);
00313 extern void     remove_incomplete_tries(CPtr);
00314 extern void     init_trie_aux_areas(void);
00315 extern void     free_trie_aux_areas(void);
00316 extern void     load_solution_trie(int, int, CPtr, BTNptr);
00317 extern void     variant_call_search(TabledCallInfo *, CallLookupResults *);
00318 extern BTNptr   one_term_chk_ins(CPtr, BTNptr, int *);
00319 extern BTNptr   whole_term_chk_ins(Cell, BTNptr *, int *);
00320 extern BTNptr   get_next_trie_solution(ALNptr *);
00321 extern BTNptr   variant_answer_search(int, int, CPtr, struct subgoal_frame *,
00322                                       xsbBool *);
00323 extern BTNptr   delay_chk_insert(int, CPtr, CPtr *);
00324 extern void     undo_answer_bindings(void);
00325 extern void     load_delay_trie(int, CPtr, BTNptr);
00326 extern xsbBool  bottom_up_unify(void);
00327 #else
00328 struct th_context ;
00329 extern BTNptr   newBasicTrie(struct th_context *, Cell,int);
00330 extern byte *   trie_get_calls(struct th_context *);
00331 extern Cell     get_lastnode_cs_retskel(struct th_context *, Cell);
00332 extern byte *   trie_get_returns(struct th_context *, struct subgoal_frame *, Cell);
00333 extern void     remove_incomplete_tries(struct th_context *, CPtr);
00334 extern void     init_trie_aux_areas(struct th_context *);
00335 extern void     free_trie_aux_areas(struct th_context *);
00336 extern void     load_solution_trie(struct th_context *, int, int, CPtr, BTNptr);
00337 extern void     variant_call_search(struct th_context *, TabledCallInfo *, CallLookupResults *);
00338 extern BTNptr   one_term_chk_ins(struct th_context *, CPtr, BTNptr, int *);
00339 extern BTNptr   whole_term_chk_ins(struct th_context *, Cell, BTNptr *, int *);
00340 extern BTNptr   get_next_trie_solution(ALNptr *);
00341 extern BTNptr   variant_answer_search(struct th_context *, int, int, CPtr, 
00342                                       struct subgoal_frame *, xsbBool *);
00343 extern BTNptr   delay_chk_insert(struct th_context *, int, CPtr, CPtr *);
00344 extern void     undo_answer_bindings(struct th_context *);
00345 extern void     load_delay_trie(struct th_context *, int, CPtr, BTNptr);
00346 extern xsbBool  bottom_up_unify(struct th_context *);
00347 #endif
00348 
00349 #ifndef MULTI_THREAD
00350 extern void    consume_subsumptive_answer(BTNptr, int, CPtr);
00351 extern ALNptr  tst_collect_relevant_answers(TSTNptr, TimeStamp, int, CPtr);
00352 extern void    delete_subsumptive_table(struct Table_Info_Frame *);
00353 #else
00354 extern void    consume_subsumptive_answer(struct th_context *, BTNptr, int, CPtr);
00355 extern ALNptr  tst_collect_relevant_answers(struct th_context *, TSTNptr, TimeStamp, int, CPtr);
00356 extern void    delete_subsumptive_table(struct th_context *, struct Table_Info_Frame *);
00357 #endif
00358 
00359 #ifndef MULTI_THREAD
00360 extern void    tstShrinkDynStacks(void);
00361 
00362 extern TSTNptr subsumptive_tst_search(TSTNptr, int, CPtr, xsbBool, xsbBool *);
00363 extern BTNptr  subsumptive_bt_search(BTNptr, int, CPtr, xsbBool *);
00364 extern TSTNptr variant_tst_search(TSTNptr, int, CPtr, xsbBool, xsbBool *);
00365 extern BTNptr  variant_bt_search(BTNptr, int, CPtr, xsbBool *);
00366 #else
00367 extern void    tstShrinkDynStacks(struct th_context *);
00368 
00369 extern TSTNptr subsumptive_tst_search(struct th_context *,
00370                                 TSTNptr, int, CPtr, xsbBool, xsbBool *);
00371 extern BTNptr  subsumptive_bt_search(struct th_context *,
00372                                 BTNptr, int, CPtr, xsbBool *);
00373 extern TSTNptr variant_tst_search(struct th_context *,
00374                                 TSTNptr, int, CPtr, xsbBool, xsbBool *);
00375 extern BTNptr  variant_bt_search(struct th_context *,
00376                                  BTNptr, int, CPtr, xsbBool *);
00377 #endif
00378 
00379 
00380 typedef enum Trie_Path_Type {
00381   NO_PATH, VARIANT_PATH, SUBSUMPTIVE_PATH
00382 } TriePathType;
00383 
00384 #ifndef MULTI_THREAD
00385 extern void *subsumptive_trie_lookup(void *root, int, CPtr,
00386                                      TriePathType *, Cell[]);
00387 extern void *variant_trie_lookup(void *root, int, CPtr, Cell[]);
00388 #else
00389 extern void *subsumptive_trie_lookup(struct th_context *th, void *root, int, CPtr,
00390                                      TriePathType *, Cell[]);
00391 extern void *variant_trie_lookup(struct th_context *th, void *root, int, CPtr, Cell[]);
00392 #endif
00393 
00394 /*---------------------------------------------------------------------*/
00395 
00396 /* slg variables */
00397 #ifndef MULTI_THREAD
00398 extern CPtr ans_var_pos_reg;
00399 extern int  num_vars_in_var_regs;
00400 extern int  global_num_vars;
00401 #endif
00402 
00403 /* used for statistics */
00404 extern long subg_chk_ins, subg_inserts, ans_chk_ins, ans_inserts;
00405 
00406 /* trie routine variables */
00407 extern BTNptr Last_Nod_Sav, Paren;
00408 
00409 /* registers for trie backtracking */
00410 extern CPtr reg_arrayptr, var_regs[];
00411 
00412 /*----------------------------------------------------------------------*/
00413 
00414 /* expand (or allocate) the array by doubling its size or the size needed, whichever is larger*/
00415 #define trie_expand_array(ArrType,ArrayNam, ArraySz, NeededSz, Nam) {\
00416     int Siz = ArraySz;\
00417     if (Siz == 0) ArraySz = DEFAULT_ARRAYSIZ;\
00418     else ArraySz = 2 * ArraySz;\
00419     if (ArraySz < NeededSz) ArraySz = NeededSz;\
00420     ArrayNam = mem_realloc(ArrayNam,Siz*sizeof(ArrType),ArraySz*sizeof(ArrType),TABLE_SPACE);\
00421     if (ArrayNam == NULL) \
00422       xsb_exit("No More memory for reallocating Array");\
00423 }
00424 
00425 #define will_overflow_reg_array(x) {\
00426    if (x >= reg_array+reg_array_size) {\
00427      int idx = reg_arrayptr - reg_array;\
00428      trie_expand_array(Cell,reg_array,reg_array_size,x-reg_array,"reg_array");\
00429      reg_arrayptr = reg_array + idx;\
00430    }\
00431 }
00432 
00433 #define pushreg(X) {\
00434    will_overflow_reg_array(reg_arrayptr+1);\
00435    (*(++reg_arrayptr)) = (Cell) X;\
00436 }
00437 /*----------------------------------------------------------------------*/
00438 
00439 extern int  num_heap_term_vars;
00440 extern CPtr *var_addr;
00441 extern int  var_addr_arraysz;
00442 
00443 /*----------------------------------------------------------------------*/
00444 
00445 extern Cell * reg_array;
00446 extern int reg_array_size;
00447 extern int delay_it;
00448 
00449 #define NUM_TRIEVARS 400
00450 //#define DEFAULT_ARRAYSIZ 512 
00451 #define DEFAULT_ARRAYSIZ 16
00452 
00453 extern CPtr *copy_of_var_addr;
00454 extern int  copy_of_num_heap_term_vars;
00455 
00456 /*=========================================================================*/
00457 
00458 struct VariantContinuation {
00459   BTNptr last_node_matched;
00460   struct subterms_desc {
00461     counter num;                /* number of subterms in the stack */
00462     struct termstack_desc{
00463       size_t size;              /* number of elements in the stack */
00464       Cell *ptr;                /* dynamic memory allocated for the stack */
00465     } stack;
00466   } subterms;
00467   struct bindings_desc {
00468     counter num;                /* number of bindings in the trail */
00469     struct trail_desc{
00470       size_t size;              /* number of elements in the trail */
00471       struct frame {
00472         CPtr var;
00473         Cell value;
00474       } *ptr;                   /* dynamic memory allocated for the trail */
00475     } stack;
00476   } bindings;
00477 };
00478 
00479 typedef struct {
00480   BTNptr alt_node;      /* node from which to continue the search */
00481   BTNptr var_chain;     /* beginning of variable chain */
00482   int termstk_top_index;  /* current top-of-tstTermStack at CP creation */
00483   int log_top_index;    /* current top-of-tstTermStackLog at CP creation */
00484   int trail_top_index;  /* current top-of-tstTrail at CP creation */
00485 } tstCallChoicePointFrame;
00486 
00487 typedef tstCallChoicePointFrame *pCPFrame;
00488 #define CALL_CPSTACK_SIZE   1024
00489 
00490 struct tstCCPStack_t {
00491   pCPFrame top;          /* next available location to place an entry */
00492   pCPFrame ceiling;      /* overflow pointer: ptr to CPF off array end */
00493   tstCallChoicePointFrame base[CALL_CPSTACK_SIZE];
00494 };
00495 
00496 typedef struct {
00497   TSTNptr alt_node;     /* sibling of the TSTN whose child ptr we took */
00498   int ts_top_index;     /* current top-of-tstTermStack at CP creation */
00499   int log_top_index;    /* current top-of-tstTermStackLog at CP creation */
00500   CPtr *trail_top;      /* current top-of-trail at CP creation */
00501   CPtr heap_bktrk;      /* current hbreg at time of CP creation */
00502 } tstChoicePointFrame;
00503 
00504 #define TST_CPSTACK_SIZE   1024
00505 
00506 struct tstCPStack_t {
00507   tstChoicePointFrame *top;     /* next available location to place an entry */
00508   tstChoicePointFrame *ceiling; /* overflow pointer: points beyond array end */
00509   tstChoicePointFrame base[TST_CPSTACK_SIZE];
00510 };
00511 
00512 /* Prasad's changes */
00513 
00514 typedef struct InternGarbageRootFrame *IGRptr;
00515 typedef struct InternGarbageLeafFrame *IGLptr;
00516 
00517 typedef struct InternGarbageLeafFrame{
00518   BTNptr leaf;
00519   IGLptr next;  
00520 } InternGarbageLeaf;
00521 
00522 typedef struct InternGarbageRootFrame{
00523   long root;
00524   IGLptr leaves;
00525   IGRptr next;
00526 } InternGarbageRoot;
00527 
00528 #endif

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