fix debugging procedures for tabling
This commit is contained in:
parent
981bee74f0
commit
375f3b7bc6
@ -813,17 +813,10 @@
|
||||
}
|
||||
#ifdef TABLING_ERRORS
|
||||
{
|
||||
sg_fr_ptr aux_sg_fr;
|
||||
int i, j, arity_args, arity_subs;
|
||||
CELL *aux_args;
|
||||
CELL *aux_subs;
|
||||
|
||||
aux_sg_fr = LOCAL_top_sg_fr;
|
||||
while (aux_sg_fr && aux_sg_fr != sg_fr)
|
||||
aux_sg_fr = SgFr_next(aux_sg_fr);
|
||||
if (aux_sg_fr == NULL)
|
||||
TABLING_ERROR_MESSAGE("aux_sg_fr == NULL (table_new_answer)");
|
||||
|
||||
arity_args = PREG->u.s.s;
|
||||
arity_subs = *subs_ptr;
|
||||
aux_args = (CELL *)(GEN_CP(gcp) + 1);
|
||||
|
@ -821,12 +821,12 @@ ans_node_ptr answer_search(sg_fr_ptr sg_fr, CELL *subs_ptr) {
|
||||
current_ans_node = SgFr_answer_trie(sg_fr);
|
||||
|
||||
for (i = subs_arity; i >= 1; i--) {
|
||||
#ifdef TABLING_ERRORS
|
||||
if (IsNonVarTerm(*(subs_ptr + i)))
|
||||
TABLING_ERROR_MESSAGE("IsNonVarTem(*(subs_ptr + i)) (answer_search)");
|
||||
#endif /* TABLING_ERRORS */
|
||||
STACK_CHECK_EXPAND(stack_terms, stack_vars, stack_terms_base);
|
||||
STACK_PUSH_UP(Deref(*(subs_ptr + i)), stack_terms);
|
||||
#ifdef TABLING_ERRORS
|
||||
if (IsNonVarTerm(*stack_terms))
|
||||
TABLING_ERROR_MESSAGE("IsNonVarTem(*stack_terms) (answer_search)");
|
||||
#endif /* TABLING_ERRORS */
|
||||
do {
|
||||
Term t = STACK_POP_DOWN(stack_terms);
|
||||
if (IsVarTerm(t)) {
|
||||
|
Reference in New Issue
Block a user