Adding tabling support for mixed strategy evaluation (batched and local scheduling)

UPDATE: compilation flags -DTABLING_BATCHED_SCHEDULING and -DTABLING_LOCAL_SCHEDULING removed. To support tabling use -DTABLING in the Makefile or --enable-tabling in configure.
  NEW: yap_flag(tabling_mode,MODE) changes the tabling execution mode of all tabled predicates to MODE (batched, local or default).
  NEW: tabling_mode(PRED,MODE) changes the default tabling execution mode of predicate PRED to MODE (batched or local).


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1268 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
ricroc
2005-04-07 17:56:58 +00:00
parent b089ae2575
commit de17f5cca4
31 changed files with 1082 additions and 930 deletions

View File

@@ -117,7 +117,7 @@ void move_up_to_prune_request(void) {
CUT_reset_prune_request();
#ifdef TABLING
LOCAL_top_cp_on_stack = LOCAL_top_cp;
abolish_incomplete_subgoals(LOCAL_top_cp);
abolish_incomplete_subgoals(LOCAL_top_cp - 1); /* do not include LOCAL_top_cp */
#endif /* TABLIG */
return;
@@ -277,13 +277,18 @@ int move_up_one_node(or_fr_ptr nearest_livenode) {
if (OrFr_pend_prune_cp(LOCAL_top_or_fr)
&& ! LOCAL_prune_request
&& CUT_last_worker_left_pending_prune(LOCAL_top_or_fr)) {
#ifdef TABLING
choiceptr aux_cp = LOCAL_top_cp;
#endif /* TABLIG */
choiceptr prune_cp = OrFr_pend_prune_cp(LOCAL_top_or_fr);
OrFr_pend_prune_cp(LOCAL_top_or_fr) = NULL;
BRANCH(worker_id, OrFr_depth(LOCAL_top_or_fr)) = OrFr_pend_prune_ltt(LOCAL_top_or_fr);
UNLOCK_OR_FRAME(LOCAL_top_or_fr);
prune_shared_branch(prune_cp);
#ifdef TABLING
abolish_incomplete_subgoals(LOCAL_top_cp);
while (YOUNGER_CP(aux_cp->cp_b, LOCAL_top_cp))
aux_cp = aux_cp->cp_b;
abolish_incomplete_subgoals(aux_cp);
#endif /* TABLIG */
return FALSE;
}