#include "debugs/debug_delay.h"Data Structures | |
| struct | AS_info |
| struct | delay_element |
| struct | delay_list |
| struct | pos_neg_de_list |
Defines | |
| #define | NEG_DELAY 0 |
| #define | delay_negatively(SUBGOAL) |
| #define | delay_positively(SUBGOAL, ANSWER, MAKE_SUBSF) |
| #define | asi_pdes(X) (X) -> pdes |
| #define | asi_subgoal(X) (X) -> subgoal |
| #define | asi_dl_list(X) (X) -> dl_list |
| #define | create_as_info(ANS, SUBG) |
| #define | de_subgoal(X) (X) -> subgoal |
| #define | de_ans_subst(X) (X) -> ans_subst |
| #define | de_next(X) (X) -> next |
| #define | de_pnde(X) (X) -> pnde |
| #define | de_subs_fact_leaf(X) (X) -> subs_fact_leaf |
| #define | dl_de_list(X) (X) -> de_list |
| #define | dl_next(X) (X) -> next |
| #define | dl_asl(X) (X) -> asl |
| #define | pnde_dl(X) (X) -> dl |
| #define | pnde_de(X) (X) -> de |
| #define | pnde_prev(X) (X) -> prev |
| #define | pnde_next(X) (X) -> next |
| #define | UNCONDITIONAL_MARK 0x3 |
| #define | Delay(X) (ASI) ((word) (TN_Child(X)) & ~UNCONDITIONAL_MARK) |
| #define | is_conditional_answer(ANS) (Child(ANS) && !((word) (Child(ANS)) & UNCONDITIONAL_MARK)) |
| #define | is_unconditional_answer(ANS) (!Child(ANS) || ((word) (Child(ANS)) & UNCONDITIONAL_MARK)) |
| #define | was_simplifiable(SUBG, ANS) |
| #define | is_failing_delay_element(SUBG, ANS) |
| #define | mark_conditional_answer(ANS, SUBG, NEW_DL) |
| #define | unmark_conditional_answer(ANS) |
| #define | most_general_answer(ANS) IsEscapeNode(ANS) |
Typedefs | |
| typedef delay_element * | DE |
| typedef delay_list * | DL |
| typedef pos_neg_de_list * | PNDE |
| typedef AS_info * | ASI |
Functions | |
| xsbBool | answer_is_junk (CPtr) |
| void | abolish_wfs_space (void) |
| void | simplify_neg_fails (VariantSF) |
| void | do_delay_stuff (NODEptr, VariantSF, xsbBool) |
| unsigned long | allocated_de_space (int *num_blocks) |
| unsigned long | unused_de_space (void) |
| unsigned long | allocated_dl_space (int *num_blocks) |
| unsigned long | unused_dl_space (void) |
| void | simplify_pos_unsupported (NODEptr) |
| void | release_all_dls (ASI) |
Variables | |
| xsbBool | neg_delay |
|
|
|
|
|
|
|
|
|
|
|
Value: asi = (ASI) mem_alloc(sizeof(struct AS_info),TABLE_SPACE); \ Child(ANS) = (NODEptr) asi; \ asi_pdes(asi) = NULL; \ asi_subgoal(asi) = SUBG; \ asi_dl_list(asi) = NULL |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: { \
Cell new_delay_cons_cell; \
\
new_delay_cons_cell = makelist(hreg); \
sreg = hreg+2; \
follow(hreg++) = makecs(sreg); \
follow(hreg++) = (delayreg == NULL) ? makenil : (Cell) delayreg; \
new_heap_functor(sreg, delay_psc); \
cell(sreg) = makeaddr(SUBGOAL); sreg++; \
cell(sreg) = makeaddr(NEG_DELAY); sreg++; \
cell(sreg) = makeaddr(NEG_DELAY); sreg++; /* NOT STRINGS */ \
hreg = sreg; \
delayreg = (CPtr) new_delay_cons_cell; \
}
|
|
|
Value: { \
Cell new_delay_cons_cell; \
\
new_delay_cons_cell = makelist(hreg); \
sreg = hreg + 2; \
follow(hreg++) = makecs(sreg); \
follow(hreg++) = (delayreg == NULL) ? makenil : (Cell) delayreg; \
new_heap_functor(sreg, delay_psc); \
cell(sreg++) = makeaddr(SUBGOAL); \
cell(sreg++) = makeaddr(ANSWER); \
follow(sreg++) = MAKE_SUBSF; \
hreg = sreg; \
delayreg = (CPtr) new_delay_cons_cell; \
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: ((ANS == NULL) ? (is_completed(SUBG) && has_answer_code(SUBG) && \ subgoal_unconditionally_succeeds(SUBG)) \ : (IsDeletedNode(ANS))) |
|
|
|
|
|
Value: if (Child(ANS) == NULL) { \ create_as_info(ANS, SUBG); \ } \ else { \ asi = Delay(ANS); \ } \ dl_next(NEW_DL) = asi_dl_list(asi); \ asi_dl_list(asi) = NEW_DL; \ dl_asl(NEW_DL) = ANS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: /*-- NEEDS CHANGE --*/ \ Child(ANS) = (NODEptr) ((word) (Child(ANS)) | UNCONDITIONAL_MARK) |
|
|
Value: ((ANS == NULL) ? (is_completed(SUBG) && subgoal_fails(SUBG)) \ : (is_unconditional_answer(ANS))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.5