new built-in predicate abolish_all_frozen_choice_points/0
This commit is contained in:
parent
a98cc1ac65
commit
6dbc6f09fa
@ -65,8 +65,9 @@ static Int p_worker(void);
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef TABLING
|
||||
static Int p_freeze(void);
|
||||
static Int p_wake(void);
|
||||
static Int p_freeze_choice_point(void);
|
||||
static Int p_wake_choice_point(void);
|
||||
static Int p_abolish_all_frozen_choice_points(void);
|
||||
static Int p_table(void);
|
||||
static Int p_tabling_mode(void);
|
||||
static Int p_abolish_table(void);
|
||||
@ -139,8 +140,9 @@ void Yap_init_optyap_preds(void) {
|
||||
Yap_InitCPred("or_statistics", 0, p_or_statistics, SafePredFlag|SyncPredFlag);
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
Yap_InitCPred("freeze_choice_point", 1, p_freeze, SafePredFlag|SyncPredFlag);
|
||||
Yap_InitCPred("wake_choice_point", 1, p_wake, SafePredFlag|SyncPredFlag);
|
||||
Yap_InitCPred("freeze_choice_point", 1, p_freeze_choice_point, SafePredFlag|SyncPredFlag);
|
||||
Yap_InitCPred("wake_choice_point", 1, p_wake_choice_point, SafePredFlag|SyncPredFlag);
|
||||
Yap_InitCPred("abolish_all_frozen_choice_points", 0, p_abolish_all_frozen_choice_points, SafePredFlag|SyncPredFlag);
|
||||
Yap_InitCPred("$c_table", 2, p_table, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
||||
Yap_InitCPred("$c_tabling_mode", 3, p_tabling_mode, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
||||
Yap_InitCPred("$c_abolish_table", 2, p_abolish_table, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
||||
@ -552,7 +554,8 @@ Int p_or_statistics(void) {
|
||||
|
||||
|
||||
#ifdef TABLING
|
||||
static Int p_freeze(void) {
|
||||
static
|
||||
Int p_freeze_choice_point(void) {
|
||||
Term term_arg, term_cp;
|
||||
|
||||
term_arg = Deref(ARG1);
|
||||
@ -565,7 +568,8 @@ static Int p_freeze(void) {
|
||||
}
|
||||
|
||||
|
||||
static Int p_wake(void) {
|
||||
static
|
||||
Int p_wake_choice_point(void) {
|
||||
Term term_arg;
|
||||
|
||||
term_arg = Deref(ARG1);
|
||||
@ -577,6 +581,13 @@ static Int p_wake(void) {
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
Int p_abolish_all_frozen_choice_points(void) {
|
||||
abolish_all_frozen_cps();
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
Int p_table(void) {
|
||||
Term mod, t;
|
||||
|
@ -35,6 +35,7 @@ STD_PROTO(static inline void free_subgoal_trie_hash_chain, (sg_hash_ptr));
|
||||
STD_PROTO(static inline void free_answer_trie_hash_chain, (ans_hash_ptr));
|
||||
STD_PROTO(static inline choiceptr freeze_current_cp, (void));
|
||||
STD_PROTO(static inline void resume_frozen_cp, (choiceptr));
|
||||
STD_PROTO(static inline void abolish_all_frozen_cps, (void));
|
||||
|
||||
#ifdef YAPOR
|
||||
STD_PROTO(static inline void pruning_over_tabling_data_structures, (void));
|
||||
@ -815,6 +816,15 @@ void resume_frozen_cp(choiceptr frozen_cp) {
|
||||
}
|
||||
|
||||
|
||||
static inline
|
||||
void abolish_all_frozen_cps(void) {
|
||||
B_FZ = B_BASE;
|
||||
H_FZ = H_BASE;
|
||||
TR_FZ = TR_BASE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#ifdef YAPOR
|
||||
static inline
|
||||
void pruning_over_tabling_data_structures(void) {
|
||||
|
Reference in New Issue
Block a user