diff --git a/C/mavar.c b/C/mavar.c index 01472156a..253c13d4c 100644 --- a/C/mavar.c +++ b/C/mavar.c @@ -160,6 +160,11 @@ Term UpdateTimedVar(Term inv, Term new) else #endif tv->value = new; +#if defined(SBA) || defined(TABLING) + if (Unsigned((Int)(tv)-(Int)(HBREG)) > + Unsigned(BBREG)-(Int)(HBREG)) + TrailVal(timestmp-1) = new; +#endif } else { Term nclock = (Term)H; MaBind(&(tv->value), new); diff --git a/OPTYap/opt.preds.c b/OPTYap/opt.preds.c index 55d828140..c0e78fa7a 100644 --- a/OPTYap/opt.preds.c +++ b/OPTYap/opt.preds.c @@ -35,12 +35,12 @@ static qg_ans_fr_ptr actual_answer; ** Local functions declaration ** ** ------------------------------------- */ +static int p_default_sequential(void); #ifdef YAPOR static realtime current_time(void); static int yapor_on(void); static int start_yapor(void); static int p_sequential(void); -static int p_default_sequential(void); static int p_execution_mode(void); static int p_performance(void); static int p_parallel_new_answer(void); @@ -106,6 +106,39 @@ void finish_yapor(void) { ** Local functions ** ** ------------------------- */ +static +int p_default_sequential(void) { +#ifdef YAPOR + Term t; + t = Deref(ARG1); + if (IsVarTerm(t)) { + Term ta; + if (SEQUENTIAL_IS_DEFAULT) + ta = MkAtomTerm(LookupAtom("on")); + else + ta = MkAtomTerm(LookupAtom("off")); + Bind((CELL *)t, ta); + return(TRUE); + } + if (IsAtomTerm(t)) { + char *s; + s = RepAtom(AtomOfTerm(t))->StrOfAE; + if (strcmp(s, "on") == 0) { + SEQUENTIAL_IS_DEFAULT = TRUE; + return(TRUE); + } + if (strcmp(s,"off") == 0) { + SEQUENTIAL_IS_DEFAULT = FALSE; + return(TRUE); + } + } + return(FALSE); +#else + return(TRUE); +#endif +} + + #ifdef YAPOR static realtime current_time(void) { @@ -174,35 +207,6 @@ int p_sequential(void) { } -static -int p_default_sequential(void) { - Term t; - t = Deref(ARG1); - if (IsVarTerm(t)) { - Term ta; - if (SEQUENTIAL_IS_DEFAULT) - ta = MkAtomTerm(LookupAtom("on")); - else - ta = MkAtomTerm(LookupAtom("off")); - Bind((CELL *)t, ta); - return(TRUE); - } - if (IsAtomTerm(t)) { - char *s; - s = RepAtom(AtomOfTerm(t))->StrOfAE; - if (strcmp(s, "on") == 0) { - SEQUENTIAL_IS_DEFAULT = TRUE; - return(TRUE); - } - if (strcmp(s,"off") == 0) { - SEQUENTIAL_IS_DEFAULT = FALSE; - return(TRUE); - } - } - return(FALSE); -} - - static int p_execution_mode(void) { Term t; diff --git a/TO_DO b/TO_DO index 58c235897..3c3a5e7b8 100644 --- a/TO_DO +++ b/TO_DO @@ -13,7 +13,7 @@ BEFORE 4.4: - library(system) for WIN32 - document system(library) - document new interface functions. -- remove pl/nfr.yap and misc/yap.spec from CVS. +- ^C can break code. TO CHECK: - bad register allocation for a(X,Y) :- X is Y+2.3 ? @@ -21,6 +21,7 @@ TO CHECK: TABLING - pass all tabling tests from Kostis and Bart paper - handle floats, long ints and friends in tables. +- make gc work after mutable var changes. - knap-sack AFTER 4.4(?) @@ -32,7 +33,6 @@ AFTER 4.4(?) - garbage collector cleans up clauses and logical update DB. - atom garbage collector. - lpdoc. -- deterministic trail entries for multi-assignment variables. DONE: - compilation of bignums. @@ -72,3 +72,5 @@ DONE: - listing (Steve Moyle). - logtalk. - fix bugs from Nicos. +- remove pl/nfr.yap and misc/yap.spec from CVS. +- deterministic trail entries for multi-assignment variables. diff --git a/changes4.3.html b/changes4.3.html index 865ef8ec8..cc1d95dfc 100644 --- a/changes4.3.html +++ b/changes4.3.html @@ -16,6 +16,10 @@

Yap-4.3.19: