diff --git a/C/cdmgr.c b/C/cdmgr.c index 5570a7fa3..35dac084b 100644 --- a/C/cdmgr.c +++ b/C/cdmgr.c @@ -11,8 +11,11 @@ * File: cdmgr.c * * comments: Code manager * * * -* Last rev: $Date: 2008-03-25 16:45:53 $,$Author: vsc $ * +* Last rev: $Date: 2008-03-31 22:56:21 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.223 2008/03/25 16:45:53 vsc +* make or-parallelism compile again +* * Revision 1.222 2008/03/24 23:48:47 vsc * fix maximum number of threads open error * @@ -828,7 +831,7 @@ split_megaclause(PredEntry *ap) } } Yap_ClauseSpace += sizeof(StaticClause)+mcl->ClItemSize; - new->ClFlags = FactMask; + new->ClFlags = StaticMask|FactMask; new->ClSize = mcl->ClItemSize; new->usc.ClPred = ap; new->ClNext = NULL; diff --git a/LGPL/chr/chr_swi.pl b/LGPL/chr/chr_swi.pl index 3d104a063..db0343015 100644 --- a/LGPL/chr/chr_swi.pl +++ b/LGPL/chr/chr_swi.pl @@ -1,4 +1,4 @@ -/* $Id: chr_swi.pl,v 1.5 2008-03-13 17:43:13 vsc Exp $ +/* $Id: chr_swi.pl,v 1.6 2008-03-31 22:56:21 vsc Exp $ Part of CHR (Constraint Handling Rules) @@ -53,12 +53,12 @@ chr_leash/1 % +Ports ]). +:- expects_dialect(swi). + :- if(current_prolog_flag(dialect, yap)). :- hide(atomic_concat). :- endif. -:- expects_dialect(swi). - :- set_prolog_flag(generate_debug_info, false). :- multifile user:file_search_path/2. diff --git a/Makefile.in b/Makefile.in index fac9890a7..76c055027 100644 --- a/Makefile.in +++ b/Makefile.in @@ -566,6 +566,7 @@ all: startup @INSTALL_DLLS@ (cd library/rltree; make) @INSTALL_DLLS@ (cd library/system; make) @INSTALL_DLLS@ (cd library/tries; make) + @INSTALL_DLLS@ (cd library/rltrees; make) @INSTALL_DLLS@ (cd library/lammpi; make) @INSTALL_DLLS@ (cd library/matrix; make) @INSTALL_MATLAB@ (cd library/matlab; make) diff --git a/docs/yap.tex b/docs/yap.tex index 91c236a86..2fb0d3b41 100644 --- a/docs/yap.tex +++ b/docs/yap.tex @@ -7568,7 +7568,7 @@ default for YAP is @code{off}, unless we are in @code{sicstus} or @code{iso} mode. @item strict_iso -@findex strict_iso (prolog_flag/2 option) +@findex strict_iso (yap_flag/2 option) @* If @var{Value} is unbound, tell whether strict ISO compatibility mode is @code{on} or @code{off}. If @var{Value} is bound to @code{on} set @@ -7740,7 +7740,14 @@ corresponding to the Unix @code{stdout} stream. If @code{normal} allow printing of informational and banner messages, such as the ones that are printed when consulting. If @code{silent} disable printing these messages. It is @code{normal} by default except if -YAP is booted with the @code{-L} flag. +YAP is booted with the @code{-q} or @code{-L} flag. + +@item verbose_load +@findex verbose_load (yap_flag/2 option) +@* If @code{true} allow printing of informational messages when +consulting files. If @code{false} disable printing these messages. It +is @code{normal} by default except if YAP is booted with the @code{-L} +flag. @item version @findex version (yap_flag/2 option) diff --git a/library/Makefile.in b/library/Makefile.in index 81b0f1593..3645fb58a 100644 --- a/library/Makefile.in +++ b/library/Makefile.in @@ -51,6 +51,7 @@ PROGRAMS= $(srcdir)/apply_macros.yap \ $(srcdir)/rbtrees.yap \ $(srcdir)/readutil.yap \ $(srcdir)/regexp.yap \ + $(srcdir)/rltree.yap \ $(srcdir)/splay.yap \ $(srcdir)/stringutils.yap \ $(srcdir)/swi.yap \ diff --git a/pl/checker.yap b/pl/checker.yap index ba9528d5f..86bd926be 100644 --- a/pl/checker.yap +++ b/pl/checker.yap @@ -11,8 +11,11 @@ * File: checker.yap * * comments: style checker for Prolog * * * -* Last rev: $Date: 2007-11-26 23:43:09 $,$Author: vsc $ * +* Last rev: $Date: 2008-03-31 22:56:22 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.23 2007/11/26 23:43:09 vsc +* fixes to support threads and assert correctly, even if inefficiently. +* * Revision 1.22 2006/11/17 12:10:46 vsc * style_checker was failing on DCGs * @@ -180,6 +183,9 @@ no_style_check([H|T]) :- no_style_check(H), no_style_check(T). '$handle_discontiguous'(F,A,M) :- recorded('$discontiguous_defs','$df'(F,A,M),_), !. +'$handle_discontiguous'(F,A,M) :- + functor(Head, F, A), !, + '$is_multifile'(Head, M). '$handle_discontiguous'(F,A,M) :- '$in_this_file_before'(F,A,M), print_message(warning,clauses_not_together((M:F/A))). diff --git a/pl/debug.yap b/pl/debug.yap index abab79763..ac0374b93 100644 --- a/pl/debug.yap +++ b/pl/debug.yap @@ -122,16 +122,22 @@ '$pred_being_spied'(G, M) :- recorded('$spy','$spy'(G,M),_), !. +spy Spec :- + prolog:debug_action_hook(spy(Spec)), !. spy L :- '$current_module'(M), '$suspy'(L, spy, M), fail. spy _ :- debug. +nospy Spec :- + prolog:debug_action_hook(nospy(Spec)), !. nospy L :- '$current_module'(M), '$suspy'(L, nospy, M), fail. nospy _. +nospyall :- + prolog:debug_action_hook(nospyall), !. nospyall :- recorded('$spy','$spy'(T,M),_), functor(T,F,N), '$suspy'(F/N,nospy,M), fail. nospyall. @@ -222,6 +228,8 @@ leash(X) :- -----------------------------------------------------------------------------*/ +debugging :- + prolog:debug_action_hook(nospyall), !. debugging :- ( nb_getval('$debug',on) -> print_message(help,debug(debug)) diff --git a/pl/directives.yap b/pl/directives.yap index f2164f52f..8a921e084 100644 --- a/pl/directives.yap +++ b/pl/directives.yap @@ -786,6 +786,17 @@ yap_flag(fileerrors,X) :- yap_flag(host_type,X) :- '$host_type'(X). +yap_flag(verbose_load,X) :- + var(X), !, + ( get_value('$lf_verbose',silent) -> X = false ; X = true ). +yap_flag(verbose_load,true) :- !, + set_value('$lf_verbose',informational). +yap_flag(verbose_load,false) :- !, + set_value('$lf_verbose',silent), + '$set_yap_flags'(7,1). +yap_flag(verbose_load,X) :- + '$do_error'(domain_error(flag_value,verbose_auto_load+X),yap_flag(verbose_auto_load,X)). + yap_flag(verbose_auto_load,X) :- var(X), !, ( get_value('$verbose_auto_load',true) -> X = true ; X = false ). diff --git a/pl/init.yap b/pl/init.yap index e8b5a72e6..061980b8c 100644 --- a/pl/init.yap +++ b/pl/init.yap @@ -76,6 +76,9 @@ otherwise. :- dynamic prolog:'$user_defined_flag'/2. +:- multifile prolog:debug_action_hook/1. + +:- source. lists:append([], L, L). lists:append([H|T], L, [H|R]) :- @@ -99,6 +102,8 @@ lists:member(X,[X|_]). lists:member(X,[_|L]) :- lists:member(X,L). +:- no_source. + :- ['protect.yap'].