tries.h File Reference


Data Structures

struct  InstructionPlusTypeFrame
struct  Basic_Trie_Node
struct  Time_Stamped_Trie_Node
struct  Answer_List_Node
struct  Tabled_Call_Info_Record
struct  Call_Check_Insert_Results
struct  VariantContinuation
struct  VariantContinuation::subterms_desc
struct  VariantContinuation::subterms_desc::termstack_desc
struct  VariantContinuation::bindings_desc
struct  VariantContinuation::bindings_desc::trail_desc
struct  VariantContinuation::bindings_desc::trail_desc::frame
struct  tstCallChoicePointFrame
struct  tstCCPStack_t
struct  tstChoicePointFrame
struct  tstCPStack_t
struct  InternGarbageLeafFrame
struct  InternGarbageRootFrame

Defines

#define TN_Instr(pTN)   TSC_Instr(pTN)
#define TN_Status(pTN)   TSC_Status(pTN)
#define TN_TrieType(pTN)   TSC_TrieType(pTN)
#define TN_NodeType(pTN)   TSC_NodeType(pTN)
#define TN_Parent(pTN)   ( (pTN)->parent )
#define TN_Child(pTN)   ( (pTN)->child )
#define TN_Sibling(pTN)   ( (pTN)->sibling )
#define TN_Symbol(pTN)   ( (pTN)->symbol )
#define TSC_Instr(pTSC)   IPT_Instr((pTSC)->info)
#define TSC_Status(pTSC)   IPT_Status((pTSC)->info)
#define TSC_TrieType(pTSC)   IPT_TrieType((pTSC)->info)
#define TSC_NodeType(pTSC)   IPT_NodeType((pTSC)->info)
#define TN_SetHashHdr(pTN, pTHT)   TN_Child(pTN) = (void *)(pTHT)
#define TN_GetHashHdr(pTN)   TN_Child(pTN)
#define FREE_TRIE_NODE_MARK   -1
#define FREE_TRIE_BLOCK_MARK   -2
#define IPT_Instr(IPT)   ((IPT).instr)
#define IPT_Status(IPT)   ((IPT).status)
#define IPT_TrieType(IPT)   ((IPT).trie_type)
#define IPT_NodeType(IPT)   ((IPT).node_type)
#define BTN_NAME   0
#define BTHT_NAME   1
#define PRODSF_NAME   2
#define CONSSF_NAME   3
#define TSTNSF_NAME   4
#define TSINSF_NAME   5
#define TSTHT_NAME   6
#define BTN_Instr(pBTN)   TN_Instr(pBTN)
#define BTN_Status(pBTN)   TN_Status(pBTN)
#define BTN_TrieType(pBTN)   TN_TrieType(pBTN)
#define BTN_NodeType(pBTN)   TN_NodeType(pBTN)
#define BTN_Parent(pBTN)   TN_Parent(pBTN)
#define BTN_Child(pBTN)   TN_Child(pBTN)
#define BTN_Sibling(pBTN)   TN_Sibling(pBTN)
#define BTN_Symbol(pBTN)   TN_Symbol(pBTN)
#define Instr(X)   BTN_Instr(X)
#define TrieType(X)   BTN_TrieType(X)
#define NodeType(X)   BTN_NodeType(X)
#define Parent(X)   BTN_Parent(X)
#define Child(X)   BTN_Child(X)
#define Sibl(X)   BTN_Sibling(X)
#define Atom(X)   BTN_Symbol(X)
#define TSTN_Instr(pTSTN)   TN_Instr(pTSTN)
#define TSTN_Status(pTSTN)   TN_Status(pTSTN)
#define TSTN_TrieType(pTSTN)   TN_TrieType(pTSTN)
#define TSTN_NodeType(pTSTN)   TN_NodeType(pTSTN)
#define TSTN_Parent(pTSTN)   TN_Parent(pTSTN)
#define TSTN_Child(pTSTN)   TN_Child(pTSTN)
#define TSTN_Sibling(pTSTN)   TN_Sibling(pTSTN)
#define TSTN_Symbol(pTSTN)   TN_Symbol(pTSTN)
#define TSTN_TimeStamp(pTSTN)   ( (pTSTN)->ts )
#define ALN_Next(pALN)   ((pALN)->link)
#define ALN_Answer(pALN)   ((pALN)->answer_leaf)
#define CallInfo_TableInfo(CallInfo)   ( (CallInfo).table_info_record )
#define CallInfo_CallArity(CallInfo)   ( (CallInfo).call_arity )
#define CallInfo_Arguments(CallInfo)   ( (CallInfo).arg_vector )
#define CallInfo_VarVectorLoc(CallInfo)   ( (CallInfo).var_vector_loc )
#define CallLUR_Leaf(CLUR)   ( (CLUR).call_trie_term )
#define CallLUR_Subsumer(CLUR)   ( (CLUR).subsumers_sgf )
#define CallLUR_VariantFound(CLUR)   ( (CLUR).variant_found )
#define CallLUR_VarVector(CLUR)   ( (CLUR).var_vector )
#define trie_expand_array(ArrType, ArrayNam, ArraySz, NeededSz, Nam)
#define will_overflow_reg_array(x)
#define pushreg(X)
#define NUM_TRIEVARS   400
#define DEFAULT_ARRAYSIZ   16
#define CALL_CPSTACK_SIZE   1024
#define TST_CPSTACK_SIZE   1024

Typedefs

typedef InstructionPlusTypeFrame InstrPlusType
typedef Basic_Trie_NodeBTNptr
typedef Basic_Trie_Node BasicTrieNode
typedef Basic_Trie_NodeNODEptr
typedef unsigned long TimeStamp
typedef Time_Stamped_Trie_NodeTSTNptr
typedef Time_Stamped_Trie_Node TS_TrieNode
typedef Answer_List_NodeALNptr
typedef Answer_List_Node AnsListNode
typedef Tabled_Call_Info_Record TabledCallInfo
typedef Call_Check_Insert_Results CallLookupResults
typedef enum Trie_Path_Type TriePathType
typedef tstCallChoicePointFramepCPFrame
typedef InternGarbageRootFrameIGRptr
typedef InternGarbageLeafFrameIGLptr
typedef InternGarbageLeafFrame InternGarbageLeaf
typedef InternGarbageRootFrame InternGarbageRoot

Enumerations

enum  Trie_Path_Type { NO_PATH, VARIANT_PATH, SUBSUMPTIVE_PATH }

Functions

BTNptr newBasicTrie (Cell, int)
bytetrie_get_calls (void)
Cell get_lastnode_cs_retskel (Cell)
bytetrie_get_returns (struct subgoal_frame *, Cell)
void remove_incomplete_tries (CPtr)
void init_trie_aux_areas (void)
void free_trie_aux_areas (void)
void load_solution_trie (int, int, CPtr, BTNptr)
void variant_call_search (TabledCallInfo *, CallLookupResults *)
BTNptr one_term_chk_ins (CPtr, BTNptr, int *)
BTNptr whole_term_chk_ins (Cell, BTNptr *, int *)
BTNptr variant_answer_search (int, int, CPtr, struct subgoal_frame *, xsbBool *)
BTNptr delay_chk_insert (int, CPtr, CPtr *)
void undo_answer_bindings (void)
void load_delay_trie (int, CPtr, BTNptr)
xsbBool bottom_up_unify (void)
void consume_subsumptive_answer (BTNptr, int, CPtr)
ALNptr tst_collect_relevant_answers (TSTNptr, TimeStamp, int, CPtr)
void delete_subsumptive_table (struct Table_Info_Frame *)
void tstShrinkDynStacks (void)
TSTNptr subsumptive_tst_search (TSTNptr, int, CPtr, xsbBool, xsbBool *)
BTNptr subsumptive_bt_search (BTNptr, int, CPtr, xsbBool *)
TSTNptr variant_tst_search (TSTNptr, int, CPtr, xsbBool, xsbBool *)
BTNptr variant_bt_search (BTNptr, int, CPtr, xsbBool *)
void * subsumptive_trie_lookup (void *root, int, CPtr, TriePathType *, Cell[])
void * variant_trie_lookup (void *root, int, CPtr, Cell[])

Variables

char * trie_node_type_table [9]
char * trie_trie_type_table [6]
char * TrieSMNameTable [7]
BTNptr get_next_trie_solution (ALNptr *)
CPtr ans_var_pos_reg
int num_vars_in_var_regs
int global_num_vars
long subg_chk_ins
long subg_inserts
long ans_chk_ins
long ans_inserts
BTNptr Last_Nod_Sav
BTNptr Paren
CPtr reg_arrayptr
CPtr var_regs []
int num_heap_term_vars
CPtrvar_addr
int var_addr_arraysz
Cellreg_array
int reg_array_size
int delay_it
CPtrcopy_of_var_addr
int copy_of_num_heap_term_vars

Define Documentation

#define ALN_Answer pALN   )     ((pALN)->answer_leaf)
 

#define ALN_Next pALN   )     ((pALN)->link)
 

#define Atom X   )     BTN_Symbol(X)
 

#define BTHT_NAME   1
 

#define BTN_Child pBTN   )     TN_Child(pBTN)
 

#define BTN_Instr pBTN   )     TN_Instr(pBTN)
 

#define BTN_NAME   0
 

#define BTN_NodeType pBTN   )     TN_NodeType(pBTN)
 

#define BTN_Parent pBTN   )     TN_Parent(pBTN)
 

#define BTN_Sibling pBTN   )     TN_Sibling(pBTN)
 

#define BTN_Status pBTN   )     TN_Status(pBTN)
 

#define BTN_Symbol pBTN   )     TN_Symbol(pBTN)
 

#define BTN_TrieType pBTN   )     TN_TrieType(pBTN)
 

#define CALL_CPSTACK_SIZE   1024
 

#define CallInfo_Arguments CallInfo   )     ( (CallInfo).arg_vector )
 

#define CallInfo_CallArity CallInfo   )     ( (CallInfo).call_arity )
 

#define CallInfo_TableInfo CallInfo   )     ( (CallInfo).table_info_record )
 

#define CallInfo_VarVectorLoc CallInfo   )     ( (CallInfo).var_vector_loc )
 

#define CallLUR_Leaf CLUR   )     ( (CLUR).call_trie_term )
 

#define CallLUR_Subsumer CLUR   )     ( (CLUR).subsumers_sgf )
 

#define CallLUR_VariantFound CLUR   )     ( (CLUR).variant_found )
 

#define CallLUR_VarVector CLUR   )     ( (CLUR).var_vector )
 

#define Child X   )     BTN_Child(X)
 

#define CONSSF_NAME   3
 

#define DEFAULT_ARRAYSIZ   16
 

#define FREE_TRIE_BLOCK_MARK   -2
 

#define FREE_TRIE_NODE_MARK   -1
 

#define Instr X   )     BTN_Instr(X)
 

#define IPT_Instr IPT   )     ((IPT).instr)
 

#define IPT_NodeType IPT   )     ((IPT).node_type)
 

#define IPT_Status IPT   )     ((IPT).status)
 

#define IPT_TrieType IPT   )     ((IPT).trie_type)
 

#define NodeType X   )     BTN_NodeType(X)
 

#define NUM_TRIEVARS   400
 

#define Parent X   )     BTN_Parent(X)
 

#define PRODSF_NAME   2
 

#define pushreg X   ) 
 

Value:

#define Sibl X   )     BTN_Sibling(X)
 

#define TN_Child pTN   )     ( (pTN)->child )
 

#define TN_GetHashHdr pTN   )     TN_Child(pTN)
 

#define TN_Instr pTN   )     TSC_Instr(pTN)
 

#define TN_NodeType pTN   )     TSC_NodeType(pTN)
 

#define TN_Parent pTN   )     ( (pTN)->parent )
 

#define TN_SetHashHdr pTN,
pTHT   )     TN_Child(pTN) = (void *)(pTHT)
 

#define TN_Sibling pTN   )     ( (pTN)->sibling )
 

#define TN_Status pTN   )     TSC_Status(pTN)
 

#define TN_Symbol pTN   )     ( (pTN)->symbol )
 

#define TN_TrieType pTN   )     TSC_TrieType(pTN)
 

#define trie_expand_array ArrType,
ArrayNam,
ArraySz,
NeededSz,
Nam   ) 
 

Value:

{\
    int Siz = ArraySz;\
    if (Siz == 0) ArraySz = DEFAULT_ARRAYSIZ;\
    else ArraySz = 2 * ArraySz;\
    if (ArraySz < NeededSz) ArraySz = NeededSz;\
    ArrayNam = mem_realloc(ArrayNam,Siz*sizeof(ArrType),ArraySz*sizeof(ArrType),TABLE_SPACE);\
    if (ArrayNam == NULL) \
      xsb_exit("No More memory for reallocating Array");\
}

#define TrieType X   )     BTN_TrieType(X)
 

#define TSC_Instr pTSC   )     IPT_Instr((pTSC)->info)
 

#define TSC_NodeType pTSC   )     IPT_NodeType((pTSC)->info)
 

#define TSC_Status pTSC   )     IPT_Status((pTSC)->info)
 

#define TSC_TrieType pTSC   )     IPT_TrieType((pTSC)->info)
 

#define TSINSF_NAME   5
 

#define TST_CPSTACK_SIZE   1024
 

#define TSTHT_NAME   6
 

#define TSTN_Child pTSTN   )     TN_Child(pTSTN)
 

#define TSTN_Instr pTSTN   )     TN_Instr(pTSTN)
 

#define TSTN_NodeType pTSTN   )     TN_NodeType(pTSTN)
 

#define TSTN_Parent pTSTN   )     TN_Parent(pTSTN)
 

#define TSTN_Sibling pTSTN   )     TN_Sibling(pTSTN)
 

#define TSTN_Status pTSTN   )     TN_Status(pTSTN)
 

#define TSTN_Symbol pTSTN   )     TN_Symbol(pTSTN)
 

#define TSTN_TimeStamp pTSTN   )     ( (pTSTN)->ts )
 

#define TSTN_TrieType pTSTN   )     TN_TrieType(pTSTN)
 

#define TSTNSF_NAME   4
 

#define will_overflow_reg_array  ) 
 

Value:

{\
   if (x >= reg_array+reg_array_size) {\
     int idx = reg_arrayptr - reg_array;\
     trie_expand_array(Cell,reg_array,reg_array_size,x-reg_array,"reg_array");\
     reg_arrayptr = reg_array + idx;\
   }\
}


Typedef Documentation

typedef struct Answer_List_Node* ALNptr
 

typedef struct Answer_List_Node AnsListNode
 

typedef struct Basic_Trie_Node BasicTrieNode
 

typedef struct Basic_Trie_Node* BTNptr
 

typedef struct Call_Check_Insert_Results CallLookupResults
 

typedef struct InternGarbageLeafFrame* IGLptr
 

typedef struct InternGarbageRootFrame* IGRptr
 

typedef struct InstructionPlusTypeFrame InstrPlusType
 

typedef struct InternGarbageLeafFrame InternGarbageLeaf
 

typedef struct InternGarbageRootFrame InternGarbageRoot
 

typedef struct Basic_Trie_Node* NODEptr
 

typedef tstCallChoicePointFrame* pCPFrame
 

typedef struct Tabled_Call_Info_Record TabledCallInfo
 

typedef unsigned long TimeStamp
 

typedef enum Trie_Path_Type TriePathType
 

typedef struct Time_Stamped_Trie_Node TS_TrieNode
 

typedef struct Time_Stamped_Trie_Node* TSTNptr
 


Enumeration Type Documentation

enum Trie_Path_Type
 

Enumerator:
NO_PATH 
VARIANT_PATH 
SUBSUMPTIVE_PATH 


Function Documentation

xsbBool bottom_up_unify void   ) 
 

void consume_subsumptive_answer BTNptr  ,
int  ,
CPtr 
 

BTNptr delay_chk_insert int  ,
CPtr  ,
CPtr
 

void delete_subsumptive_table struct Table_Info_Frame  ) 
 

void free_trie_aux_areas void   ) 
 

Cell get_lastnode_cs_retskel Cell   ) 
 

void init_trie_aux_areas void   ) 
 

void load_delay_trie int  ,
CPtr  ,
BTNptr 
 

void load_solution_trie int  ,
int  ,
CPtr  ,
BTNptr 
 

BTNptr newBasicTrie Cell  ,
int 
 

BTNptr one_term_chk_ins CPtr  ,
BTNptr  ,
int
 

void remove_incomplete_tries CPtr   ) 
 

BTNptr subsumptive_bt_search BTNptr  ,
int  ,
CPtr  ,
xsbBool
 

void* subsumptive_trie_lookup void *  root,
int  ,
CPtr  ,
TriePathType ,
Cell  []
 

TSTNptr subsumptive_tst_search TSTNptr  ,
int  ,
CPtr  ,
xsbBool  ,
xsbBool
 

byte* trie_get_calls void   ) 
 

byte* trie_get_returns struct subgoal_frame ,
Cell 
 

ALNptr tst_collect_relevant_answers TSTNptr  ,
TimeStamp  ,
int  ,
CPtr 
 

void tstShrinkDynStacks void   ) 
 

void undo_answer_bindings void   ) 
 

BTNptr variant_answer_search int  ,
int  ,
CPtr  ,
struct subgoal_frame ,
xsbBool
 

BTNptr variant_bt_search BTNptr  ,
int  ,
CPtr  ,
xsbBool
 

void variant_call_search TabledCallInfo ,
CallLookupResults
 

void* variant_trie_lookup void *  root,
int  ,
CPtr  ,
Cell  []
 

TSTNptr variant_tst_search TSTNptr  ,
int  ,
CPtr  ,
xsbBool  ,
xsbBool
 

BTNptr whole_term_chk_ins Cell  ,
BTNptr ,
int
 


Variable Documentation

long ans_chk_ins
 

long ans_inserts
 

CPtr ans_var_pos_reg
 

int copy_of_num_heap_term_vars
 

CPtr* copy_of_var_addr
 

int delay_it
 

BTNptr get_next_trie_solution(ALNptr *)
 

int global_num_vars
 

BTNptr Last_Nod_Sav
 

int num_heap_term_vars
 

int num_vars_in_var_regs
 

BTNptr Paren
 

Cell* reg_array
 

int reg_array_size
 

CPtr reg_arrayptr
 

long subg_chk_ins
 

long subg_inserts
 

char* trie_node_type_table[9]
 

char* trie_trie_type_table[6]
 

char* TrieSMNameTable[7]
 

CPtr* var_addr
 

int var_addr_arraysz
 

CPtr var_regs[]
 


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