tr_utils.h

00001 /* File:      tr_utils.h
00002 ** Author(s): 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: tr_utils.h,v 1.40 2006/04/27 21:08:48 tswift Exp $
00022 ** 
00023 */
00024 
00025 #ifndef __TR_UTILS_H__
00026 #define __TR_UTILS_H__
00027 
00028 #include "context.h"
00029 
00030 extern VariantSF get_variant_sf(CTXTdeclc Cell, TIFptr, Cell *);
00031 extern SubProdSF get_subsumer_sf(CTXTdeclc Cell, TIFptr, Cell *);
00032 extern BTNptr get_trie_root(BTNptr);
00033 extern VariantSF get_call(CTXTdeclc Cell, Cell *);
00034 extern Cell build_ret_term(CTXTdeclc int, Cell[]);
00035 extern void construct_answer_template(CTXTdeclc Cell, SubProdSF, Cell[]);
00036 extern void breg_retskel(CTXTdecl);
00037 extern void delete_predicate_table(CTXTdeclc TIFptr);
00038 extern void reclaim_del_ret_list(CTXTdeclc VariantSF);
00039 extern void delete_return(CTXTdeclc BTNptr, VariantSF);
00040 extern void init_newtrie(CTXTdecl);
00041 extern void delete_branch(CTXTdeclc BTNptr, BTNptr *);
00042 extern void safe_delete_branch(BTNptr);
00043 extern void undelete_branch(BTNptr);
00044 extern void reclaim_uninterned_nr(CTXTdeclc long rootidx);
00045 extern void delete_trie(CTXTdeclc BTNptr);
00046 extern xsbBool is_completed_table(TIFptr);
00047 
00048 extern xsbBool has_unconditional_answers(VariantSF);
00049 
00050 extern Integer  newtrie(CTXTdecl);
00051 extern void trie_intern(CTXTdecl);
00052 extern int  trie_interned(CTXTdecl);
00053 extern void trie_dispose(CTXTdecl);
00054 extern void trie_dispose_nr(CTXTdecl);
00055 extern void delete_interned_trie(CTXTdeclc Integer);
00056 extern void trie_undispose(CTXTdeclc long, BTNptr);
00057 // extern xsbBool check_table_cut;
00058 
00059 extern int abolish_table_predicate(CTXTdeclc Psc);
00060 extern int fast_abolish_table_predicate(CTXTdeclc Psc);
00061 extern int abolish_table_call(CTXTdeclc VariantSF);
00062 extern void abolish_private_tables(CTXTdecl);
00063 extern void abolish_shared_tables(CTXTdecl);
00064 extern int gc_tabled_preds(CTXTdecl);
00065 extern void delete_variant_sf_and_answers(CTXTdeclc VariantSF pSF);
00066 extern void abolish_table_info(CTXTdecl);
00067 extern int abolish_usermod_tables(CTXTdecl);
00068 extern int abolish_module_tables(CTXTdeclc const char *module_name);
00069 
00070 
00071 #endif /* __TR_UTILS_H__ */

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