make consult meta-predicates
configuration changes git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@301 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
362455bc74
commit
a203cec0f5
@ -16,6 +16,14 @@
|
||||
|
||||
<h2>Yap-4.3.21:</h2>
|
||||
<ul>
|
||||
<li>FIXED: make consult, use_module and friends meta-predicates
|
||||
(Nicos Angelopoulos).</li>
|
||||
<li>FIXED: make use_module a directive.</li>
|
||||
<li>FIXED: predicate_property/2 to handle modules correctly
|
||||
(Nicos Angelopoulos).</li>
|
||||
<li>FIXED: stack expansion in meta-execution.</li>
|
||||
<li>FIXED: depth_limit was not handled correct in
|
||||
meta-execution of conjunctions (Rui Camacho).</li>
|
||||
<li>NEW: new option for error handling in the debugger.</li>
|
||||
<li>UPDATE: new version of logtalk.</li>
|
||||
<li>FIXED: heap library.</li>
|
||||
|
@ -44,6 +44,8 @@
|
||||
#undef HAVE_SIGNAL_H
|
||||
#undef HAVE_STDARG_H
|
||||
#undef HAVE_STRING_H
|
||||
#undef HAVE_STROPTS_H
|
||||
#undef HAVE_SYS_CONF_H
|
||||
#undef HAVE_SYS_FILE_H
|
||||
#undef HAVE_SYS_MMAN_H
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
@ -467,7 +467,8 @@ AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS(arpa/inet.h ctype.h direct.h dirent.h errno.h fcntl.h)
|
||||
AC_CHECK_HEADERS(fenv.h fpu_control.h ieeefp.h io.h limits.h memory.h)
|
||||
AC_CHECK_HEADERS(netdb.h netinet/in.h regex.h)
|
||||
AC_CHECK_HEADERS(siginfo.h signal.h stdarg.h string.h sys/file.h)
|
||||
AC_CHECK_HEADERS(siginfo.h signal.h stdarg.h string.h stropts.h)
|
||||
AC_CHECK_HEADERS(sys/conf.h sys/file.h)
|
||||
AC_CHECK_HEADERS(sys/mman.h sys/param.h sys/resource.h sys/select.h)
|
||||
AC_CHECK_HEADERS(sys/shm.h sys/socket.h sys/stat.h)
|
||||
AC_CHECK_HEADERS(sys/time.h sys/times.h sys/types.h)
|
||||
|
@ -36,6 +36,9 @@
|
||||
'$directive'(sequential(_)).
|
||||
'$directive'(block(_)).
|
||||
'$directive'(wait(_)).
|
||||
'$directive'(use_module(_)).
|
||||
'$directive'(use_module(_,_)).
|
||||
'$directive'(use_module(_,_,_)).
|
||||
|
||||
'$exec_directive'(multifile(D), _, M) :-
|
||||
'$system_catch'('$multifile'(D, M), M,
|
||||
@ -67,18 +70,24 @@
|
||||
op(P,OPSEC,OP).
|
||||
'$exec_directive'(set_prolog_flag(F,V), _, _) :-
|
||||
set_prolog_flag(F,V).
|
||||
'$exec_directive'(ensure_loaded(F), _, _) :-
|
||||
'$ensure_loaded'(F).
|
||||
'$exec_directive'(ensure_loaded(F), _, M) :-
|
||||
'$ensure_loaded'(M:F).
|
||||
'$exec_directive'(char_conversion(IN,OUT), _, _) :-
|
||||
char_conversion(IN,OUT).
|
||||
'$exec_directive'(public(P), _, M) :-
|
||||
'$public'(P, M).
|
||||
'$exec_directive'(compile(F), _, _) :-
|
||||
'$compile'(F).
|
||||
'$exec_directive'(reconsult(Fs), _, _) :-
|
||||
'$reconsult'(Fs).
|
||||
'$exec_directive'(consult(Fs), _, _) :-
|
||||
'$exec_directive'(compile(F), _, M) :-
|
||||
'$compile'(M:F).
|
||||
'$exec_directive'(reconsult(Fs), _, M) :-
|
||||
'$reconsult'(M:Fs).
|
||||
'$exec_directive'(consult(Fs), _, M) :-
|
||||
'$consult'(Fs).
|
||||
'$exec_directive'(use_module(Fs), _, M) :-
|
||||
'$use_module'(M:Fs).
|
||||
'$exec_directive'(use_module(Fs,I), _, M) :-
|
||||
'$use_module'(M:Fs,I).
|
||||
'$exec_directive'(use_module(Fs,F,I), _, M) :-
|
||||
'$use_module'(M:Fs,F,I).
|
||||
'$exec_directive'(block(BlockSpec), _, _) :-
|
||||
'$block'(BlockSpec).
|
||||
'$exec_directive'(wait(BlockSpec), _, _) :-
|
||||
|
@ -19,35 +19,41 @@
|
||||
|
||||
:- '$switch_log_upd'(1).
|
||||
|
||||
use_module(V) :- var(V), !,
|
||||
use_module(M) :-
|
||||
'$use_module'(M).
|
||||
|
||||
'$use_module'(V) :- var(V), !,
|
||||
throw(error(instantiation_error,use_module(V))).
|
||||
use_module([]) :- !.
|
||||
use_module([A|B]) :- !,
|
||||
use_module(A),
|
||||
use_module(B).
|
||||
use_module(M:F) :- atom(M), !,
|
||||
'$use_module'([]) :- !.
|
||||
'$use_module'([A|B]) :- !,
|
||||
'$use_module'(A),
|
||||
'$use_module'(B).
|
||||
'$use_module'(M:F) :- atom(M), !,
|
||||
'$current_module'(M0),
|
||||
'$change_module'(M),
|
||||
use_module(F),
|
||||
'$use_module'(F),
|
||||
'$change_module'(M0).
|
||||
use_module(File) :-
|
||||
'$use_module'(File) :-
|
||||
'$find_in_path'(File,X),
|
||||
( '$recorded'('$module','$module'(_,X,Publics),_) ->
|
||||
use_module(File,Publics)
|
||||
'$use_module'(File,Publics)
|
||||
;
|
||||
'$ensure_loaded'(File)
|
||||
).
|
||||
|
||||
use_module(File,Imports) :- var(File), !,
|
||||
use_module(M,I) :-
|
||||
'$use_module'(M, I).
|
||||
|
||||
'$use_module'(File,Imports) :- var(File), !,
|
||||
throw(error(instantiation_error,use_module(File,Imports))).
|
||||
use_module(File,Imports) :- var(Imports), !,
|
||||
'$use_module'(File,Imports) :- var(Imports), !,
|
||||
throw(error(instantiation_error,use_module(File,Imports))).
|
||||
use_module(M:F, Imports) :- atom(M), !,
|
||||
'$use_module'(M:F, Imports) :- atom(M), !,
|
||||
'$current_module'(M0),
|
||||
'$change_module'(M),
|
||||
use_module(F, Imports),
|
||||
'$use_module'(F, Imports),
|
||||
'$change_module'(M0).
|
||||
use_module(File,Imports) :-
|
||||
'$use_module'(File,Imports) :-
|
||||
atom(File), !,
|
||||
'$current_module'(M),
|
||||
'$find_in_path'(File,X),
|
||||
@ -71,7 +77,7 @@ use_module(File,Imports) :-
|
||||
;
|
||||
throw(error(permission_error(input,stream,X),use_module(X,Imports)))
|
||||
).
|
||||
use_module(library(File),Imports) :- !,
|
||||
'$use_module'(library(File),Imports) :- !,
|
||||
'$current_module'(M),
|
||||
'$find_in_path'(library(File),X),
|
||||
( '$open'(X,'$csult',Stream,0), !,
|
||||
@ -94,10 +100,13 @@ use_module(library(File),Imports) :- !,
|
||||
;
|
||||
throw(error(permission_error(input,stream,library(X)),use_module(library(X),Imports)))
|
||||
).
|
||||
use_module(V,Decls) :-
|
||||
'$use_module'(V,Decls) :-
|
||||
throw(error(type_error(atom,V),use_module(V,Decls))).
|
||||
|
||||
use_module(Module,File,Imports) :-
|
||||
use_module(M,F,I) :-
|
||||
'$use_module'(M,F,I).
|
||||
|
||||
'$use_module'(Module,File,Imports) :-
|
||||
'$current_module'(M),
|
||||
'$find_in_path'(File,X),
|
||||
( '$open'(X,'$csult',Stream,0), !,
|
||||
@ -120,7 +129,7 @@ use_module(Module,File,Imports) :-
|
||||
;
|
||||
throw(error(permission_error(input,stream,library(X)),use_module(Module,File,Imports)))
|
||||
).
|
||||
use_module(Module,V,Decls) :-
|
||||
'$use_module'(Module,V,Decls) :-
|
||||
throw(error(type_error(atom,V),use_module(Module,V,Decls))).
|
||||
|
||||
'$consulting_file_name'(Stream,F) :-
|
||||
@ -160,9 +169,9 @@ use_module(Module,V,Decls) :-
|
||||
throw(error(instantiation_error,M)).
|
||||
'$process_module_decls_option'(At,_) :-
|
||||
atom(At),
|
||||
use_module(At).
|
||||
'$use_module'(At).
|
||||
'$process_module_decls_option'(library(L),_) :-
|
||||
use_module(library(L)).
|
||||
'$use_module'(library(L)).
|
||||
'$process_module_decls_option'(hidden(Bool),M) :-
|
||||
'$process_hidden_module'(Bool, M).
|
||||
'$process_module_decls_option'(Opt,M) :-
|
||||
@ -567,6 +576,13 @@ source_module(Mod) :-
|
||||
bb_put(:,+),
|
||||
bb_delete(:,?),
|
||||
bb_update(:,?,?),
|
||||
use_module(:),
|
||||
use_module(:,?),
|
||||
use_module(?,:,?),
|
||||
consult(:),
|
||||
reconsult(:),
|
||||
compile(:),
|
||||
ensure_loaded(:),
|
||||
call_with_args(:),
|
||||
call_with_args(:,?),
|
||||
call_with_args(:,?,?),
|
||||
|
Reference in New Issue
Block a user