From 7a9e7816c92d30ac4dd0cea6f8c77b679897b317 Mon Sep 17 00:00:00 2001 From: vsc Date: Fri, 8 Feb 2008 09:49:21 +0000 Subject: [PATCH] undo current_predicate changes and make iso fully use LU semantics. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2083 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/dbase.c | 4 ++-- library/Tries/base_tries.h | 2 +- pl/directives.yap | 4 ++-- pl/preds.yap | 16 ++++++++-------- pl/statistics.yap | 1 + 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/C/dbase.c b/C/dbase.c index d7ee4e40b..f7564842e 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -1962,7 +1962,7 @@ p_rcda(void) } UNLOCK(pe->PELock); } else { - TRef = 0L; + TRef = MkDBRefTerm(record(MkFirst, t1, t2, Unsigned(0))); } if (Yap_Error_TYPE != YAP_NO_ERROR) { if (recover_from_record_error(3)) { @@ -2073,7 +2073,7 @@ p_rcdz(void) } UNLOCK(pe->PELock); } else { - TRef = 0L; + TRef = MkDBRefTerm(record(MkLast, t1, t2, Unsigned(0))); } if (Yap_Error_TYPE != YAP_NO_ERROR) { if (recover_from_record_error(3)) { diff --git a/library/Tries/base_tries.h b/library/Tries/base_tries.h index 5f19683b1..fe2521dca 100644 --- a/library/Tries/base_tries.h +++ b/library/Tries/base_tries.h @@ -40,7 +40,7 @@ #define TRIE_MODE_STANDARD 0 #define TRIE_MODE_REVERSE 1 -#define AUXILIARY_TERM_STACK_SIZE 1000 +#define AUXILIARY_TERM_STACK_SIZE 100000 #define TRIE_PRINT_NORMAL 0 #define TRIE_PRINT_FLOAT 1 diff --git a/pl/directives.yap b/pl/directives.yap index af01a0152..9ff10b991 100644 --- a/pl/directives.yap +++ b/pl/directives.yap @@ -815,7 +815,7 @@ yap_flag(dialect,yap). '$set_yap_flags'(12,0), % disable character escapes. '$set_yap_flags'(14,1), '$set_fpu_exceptions', - unknown(_,error). + unknown(_,fail). '$adjust_language'(sicstus) :- '$switch_log_upd'(1), leash(full), @@ -833,7 +833,7 @@ yap_flag(dialect,yap). fileerrors, unknown(_,error). '$adjust_language'(iso) :- - '$switch_log_upd'(2), + '$switch_log_upd'(1), '$syntax_check_mode'(_,on), '$syntax_check_single_var'(_,on), '$syntax_check_discontiguous'(_,on), diff --git a/pl/preds.yap b/pl/preds.yap index bb9f2dc10..d450aae1d 100644 --- a/pl/preds.yap +++ b/pl/preds.yap @@ -939,29 +939,29 @@ system_predicate(P) :- -> functor(T,A,Arity), '$pred_exists'(T,M) - ; +% ; % '$current_predicate'(prolog,A,Arity) % -> % functor(T,A,Arity), % '$pred_exists'(T,M) % ; - recorded('$import','$import'(NM,M,G,T,A,Arity),_) - -> - '$pred_exists'(G,NM) +% recorded('$import','$import'(NM,M,G,T,A,Arity),_) +% -> +% '$pred_exists'(G,NM) ). '$current_predicate3'(M,A/Arity) :- !, ( '$current_predicate'(M,A,Arity), functor(T,A,Arity), '$pred_exists'(T,M) - ; +% ; % '$current_predicate'(prolog,A,Arity), % functor(T,A,Arity), % '$pred_exists'(T,M) % ; - recorded('$import','$import'(NM,M,G,T,A,Arity),_), - functor(T,A,Arity), - '$pred_exists'(G,NM) +% recorded('$import','$import'(NM,M,G,T,A,Arity),_), +% functor(T,A,Arity), +% '$pred_exists'(G,NM) ). '$current_predicate3'(M,BadSpec) :- % only for the predicate '$do_error'(type_error(predicate_indicator,BadSpec),current_predicate(M:BadSpec)). diff --git a/pl/statistics.yap b/pl/statistics.yap index 981f73d88..8fe5065be 100644 --- a/pl/statistics.yap +++ b/pl/statistics.yap @@ -132,6 +132,7 @@ key_statistics(Key, NOfEntries, TotalSize) :- % Based on the SWI-Prolog definition minus reporting the number of inferences, % which YAP does not currently supports + :- meta_predicate time(:). time(Goal) :-