This commit is contained in:
Vitor Santos Costa 2018-07-31 22:13:30 +01:00
parent bf712034a9
commit 55b2325b2e
14 changed files with 361 additions and 365 deletions

View File

@ -984,6 +984,7 @@ void Yap_InitCPredBack_(const char *Name, arity_t Arity, arity_t Extra,
static void InitStdPreds(struct yap_boot_params *yapi) static void InitStdPreds(struct yap_boot_params *yapi)
{ {
CurrentModule = PROLOG_MODULE;
Yap_InitCPreds(); Yap_InitCPreds();
Yap_InitBackCPreds(); Yap_InitBackCPreds();
BACKUP_MACHINE_REGS(); BACKUP_MACHINE_REGS();

View File

@ -1,6 +1,10 @@
site_name: 'YAP' site_name: 'YAP'
theme: 'readthedocs' theme: 'readthedocs'
markdown_extensions: markdown_extensions:
- smarty
- toc:
permalink: True
- sane_lists
use_directory_urls: false use_directory_urls: false
plugins: plugins:
- search - search

View File

@ -1551,11 +1551,7 @@ FILE *Yap_FileDescriptorFromStream(Term t) {
return rc; return rc;
} }
void void Yap_InitBackIO(void)
Yap_InitBackIO (
void)
{ {
Yap_InitCPredBack("stream_property", 2, 2, stream_property, Yap_InitCPredBack("stream_property", 2, 2, stream_property,
cont_stream_property, SafePredFlag | SyncPredFlag); cont_stream_property, SafePredFlag | SyncPredFlag);

View File

@ -680,28 +680,13 @@ void Yap_MYDDAS_delete_all_myddas_structs(void) {
void init_myddas(void) { void init_myddas(void) {
CACHE_REGS CACHE_REGS
if (myddas_initialised)
{
return;
}
#if USE_MYDDAS
Term cm=CurrentModule; Term cm=CurrentModule;
CurrentModule = USER_MODULE; CurrentModule = USER_MODULE;
if (myddas_initialised)
return;
#ifdef __ANDROID__
init_sqlite3();
#endif
#if defined MYDDAS_ODBC
Yap_InitBackMYDDAS_ODBCPreds();
#endif
#endif
#if defined MYDDAS_ODBC
Yap_InitMYDDAS_ODBCPreds();
#endif
#if defined USE_MYDDAS
Yap_InitMYDDAS_SharedPreds();
#endif
#if defined MYDDAS_TOP_LEVEL && \
defined MYDDAS_MYSQL // && defined HAVE_LIBREADLINE
Yap_InitMYDDAS_TopLevelPreds();
#endif
#if USE_MYDDAS
#define stringify(X) _stringify(X) #define stringify(X) _stringify(X)
#define _stringify(X) #X #define _stringify(X) #X
Yap_REGS.MYDDAS_GLOBAL_POINTER = NULL; Yap_REGS.MYDDAS_GLOBAL_POINTER = NULL;
@ -709,12 +694,28 @@ void init_myddas(void) {
MkAtomTerm(Yap_LookupAtom(stringify(MYDDAS_VERSION)))); MkAtomTerm(Yap_LookupAtom(stringify(MYDDAS_VERSION))));
Yap_HaltRegisterHook((HaltHookFunc)Yap_MYDDAS_delete_all_myddas_structs, Yap_HaltRegisterHook((HaltHookFunc)Yap_MYDDAS_delete_all_myddas_structs,
NULL); NULL);
Yap_InitMYDDAS_SharedPreds();
Yap_InitBackMYDDAS_SharedPreds();
#undef stringify #undef stringify
#undef _stringify #undef _stringify
Yap_MYDDAS_delete_all_myddas_structs(); Yap_MYDDAS_delete_all_myddas_structs();
#if defined MYDDAS_ODBC
Yap_InitBackMYDDAS_ODBCPreds();
#endif
#endif
#if defined MYDDAS_ODBC
Yap_InitMYDDAS_ODBCPreds();
#endif
#if defined MYDDAS_TOP_LEVEL && \
defined MYDDAS_MYSQL // && defined HAVE_LIBREADLINE
Yap_InitMYDDAS_TopLevelPreds();
#endif #endif
c_db_initialize_myddas(PASS_REGS1); c_db_initialize_myddas(PASS_REGS1);
myddas_initialised = TRUE; #ifdef __ANDROiD__
init_sqlite3();
#endif
#endif
myddas_initialised = true;
CurrentModule = cm; CurrentModule = cm;
} }

View File

@ -22,6 +22,7 @@
#ifdef DEBUG #ifdef DEBUG
:- yap_flag(single_var_warnings,on). :- yap_flag(single_var_warnings,on).
:- yap_flag(write_strings,on).
#endif #endif
#define SWITCH(Contype, G) \ #define SWITCH(Contype, G) \
@ -181,7 +182,7 @@
member/2 member/2
]). ]).
:- set(verbose,silent). :- set_prolog_flag(verbose,silent).
@ -331,7 +332,7 @@ db_stats(Protocol,List):-
#ifdef DEBUG #ifdef DEBUG
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% db_stats_time(+,-) % db_stats_time(+,-)
% Reference is C pointer (memory reference) % Reference is C puuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uuuuu;ointer (memory reference)
% %
db_stats_time(Reference,Time):- db_stats_time(Reference,Time):-
'$error_checks'(db_stats_time(Reference,Time)), '$error_checks'(db_stats_time(Reference,Time)),
@ -449,7 +450,6 @@ db_assert(Connection,PredName):-
'$error_checks'(db_insert2(Connection,PredName,Code)), '$error_checks'(db_insert2(Connection,PredName,Code)),
'$get_values_for_insert'(Code,ValuesList,RelName), '$get_values_for_insert'(Code,ValuesList,RelName),
'$make_atom'(['INSERT INTO `',RelName,'` VALUES '|ValuesList],SQL), '$make_atom'(['INSERT INTO `',RelName,'` VALUES '|ValuesList],SQL),
get_value(Connection,Con), get_value(Connection,Con),
c_db_connection_type(Con,ConType), c_db_connection_type(Con,ConType),
'$write_or_not'(SQL), '$write_or_not'(SQL),
@ -685,17 +685,18 @@ db_describe(Connection,Y,Z) :-
db_datalog_show_tables :- db_datalog_show_tables :-
db_datalog_show_tables(myddas). db_datalog_show_tables(myddas).
db_show_tables :-
'$error_checks'(db_datalog_show_tables),
get_value(myddas,Con),
c_db_connection_type(Con,DBMS),
DBMS:datalog_show_tables.
db_datalog_show_tables(Connection) :- db_datalog_show_tables(Connection) :-
'$error_checks'(db_datalog_show_tables(Connection) ), '$error_checks'(db_datalog_show_tables(Connection) ),
get_value(Connection,Con), get_value(Connection,Con),
c_db_connection_type(Con,DBMS), c_db_connection_type(Con,DBMS),
switch( DBMS, datalog_show_tables(Connection) ). switch( DBMS, datalog_show_tables(Connection) ).
db_datalog_show_tables :-
'$error_checks'(db_datalog_show_tables),
get_value(myddas,Con),
c_db_connection_type(Con,DBMS),
DBMS:datalog_show_tables.
/** /**
@pred db_show_tables(+,?). @pred db_show_tables(+,?).

View File

@ -230,7 +230,7 @@ db_abolish(PredName,Arity):-
% %
db_listing:- db_listing:-
c_db_connection(Con), c_db_connection(Con),
c_db_preds_conn(Con,Module,Name,Arity), user:c_db_preds_conn(Con,Module,Name,Arity),
listing(Module:Name/Arity), listing(Module:Name/Arity),
fail. fail.
db_listing. db_listing.
@ -243,15 +243,15 @@ db_listing.
% %
db_listing(Module:Name/Arity):-!, db_listing(Module:Name/Arity):-!,
c_db_connection(Con), c_db_connection(Con),
c_db_preds_conn(Con,Module,Name,Arity), user:c_db_preds_conn(Con,Module,Name,Arity),
listing(Module:Name/Arity). listing(Module:Name/Arity).
db_listing(Name/Arity):-!, db_listing(Name/Arity):-!,
c_db_connection(Con), c_db_connection(Con),
c_db_preds_conn(Con,Module,Name,Arity), user:c_db_preds_conn(Con,Module,Name,Arity),
listing(Module:Name/Arity). listing(Module:Name/Arity).
db_listing(Name):- db_listing(Name):-
c_db_connection(Con), c_db_connection(Con),
c_db_preds_conn(Con,Module,Name,Arity), user:c_db_preds_conn(Con,Module,Name,Arity),
listing(Module:Name/Arity). listing(Module:Name/Arity).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -260,13 +260,12 @@ db_listing(Name):-
% %
table_arity( Con, ConType, RelationName, Arity ) :- table_arity( Con, ConType, RelationName, Arity ) :-
c_db_connection_type(Con,ConType), c_db_connection_type(Con,ConType),
writeln( ConType ),
% get relation arity % get relation arity
( ConType == mysql -> ( ConType == mysql ->
c_db_my_number_of_fields(RelationName,Con,Arity) c_db_my_number_of_fields(RelationName,Con,Arity)
; ;
ConType == postgres -> ConType == postgres ->
c_postgres_number_of_fields(RelationName,Con,Arity) c_postgres_number_of_fields(RelationName,Con,Arit)
; ;
ConType == odbc -> ConType == odbc ->
c_odbc_number_of_fields(RelationName,Con,Arity) c_odbc_number_of_fields(RelationName,Con,Arity)

View File

@ -28,7 +28,7 @@
#define NAME() 'YAPodbc' #define NAME() 'YAPodbc'
#define MODULE() user #define MODULE() user
#define INIT() init_odbc #define INIT() init_odbc
#elif defined( postgres ) #elif defined( postrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrs )
#undef postgres #undef postgres
#define DBMS(x) postgres_##x #define DBMS(x) postgres_##x
#define c_DBMS(x) c_postgres_##x #define c_DBMS(x) c_postgres_##x
@ -101,7 +101,6 @@ DBMS(result_set)(store_result):-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DBMS(db_datalog_describe)/2 % DBMS(db_datalog_describe)/2
% %

View File

@ -14,6 +14,9 @@ main_ :-
fail. fail.
main_ . main_ .
init :-
catch(db_open(sqlite3,'chinook.db',_,_), _, fail),
!.
init :- init :-
db_open(sqlite3, '/data/user/0/pt.up.yap.yapdroid/files/Yap/chinook.db', _, _), db_open(sqlite3, '/data/user/0/pt.up.yap.yapdroid/files/Yap/chinook.db', _, _),
% db_open(sqlite3, 'chinook.db', _, _), % db_open(sqlite3, 'chinook.db', _, _),

View File

@ -6,7 +6,9 @@
#define PY4YAP_H 1 #define PY4YAP_H 1
#define PASS_REGS #define PASS_REGS
#define USES_REGSg #define USES_REGS
#include "Yap.h"
//@{ //@{

View File

@ -570,7 +570,7 @@ static int python_import(term_t mname, term_t mod) {
const char *sn, *as = NULL; const char *sn, *as = NULL;
Term t = Deref(ARG1), sm; Term t = Deref(ARG1), sm;
if (IsApplTerm(t)) { if (IsApplTerm(t)) {
Functor f = FunctorOfTerm(t); Functor f = (Functor)*RepAppl(t);
if (f != FunctorAs) if (f != FunctorAs)
return false; return false;
do_as = true; do_as = true;

View File

@ -54,7 +54,6 @@ endif()
COMMAND ${SWIG_EXECUTABLE} -c++ -python -O -py3 -module "yap" -addextern -I${CMAKE_SOURCE_DIR}/H -I${CMAKE_SOURCE_DIR}/H/generated -I${CMAKE_SOURCE_DIR}/include COMMAND ${SWIG_EXECUTABLE} -c++ -python -O -py3 -module "yap" -addextern -I${CMAKE_SOURCE_DIR}/H -I${CMAKE_SOURCE_DIR}/H/generated -I${CMAKE_SOURCE_DIR}/include
-I${CMAKE_SOURCE_DIR}/OPTYap -I${CMAKE_SOURCE_DIR}/os -I${CMAKE_SOURCE_DIR}/utf8proc -I.././.. -I${CMAKE_SOURCE_DIR}/CXX -I${CMAKE_SOURCE_DIR}/packages/python -I${CMAKE_SOURCE_DIR}/OPTYap -I${CMAKE_SOURCE_DIR}/os -I${CMAKE_SOURCE_DIR}/utf8proc -I.././.. -I${CMAKE_SOURCE_DIR}/CXX -I${CMAKE_SOURCE_DIR}/packages/python
-outdir ${CMAKE_CURRENT_BINARY_DIR}/yap4py -I${GMP_INCLUDE_DIRS} -DX_API="" -o ${CMAKE_CURRENT_BINARY_DIR}/yap4py/yap_wrap.cxx -oh ${CMAKE_CURRENT_BINARY_DIR}/yap4py/yap_wrap.hh ${SWIG_SOURCES} -outdir ${CMAKE_CURRENT_BINARY_DIR}/yap4py -I${GMP_INCLUDE_DIRS} -DX_API="" -o ${CMAKE_CURRENT_BINARY_DIR}/yap4py/yap_wrap.cxx -oh ${CMAKE_CURRENT_BINARY_DIR}/yap4py/yap_wrap.hh ${SWIG_SOURCES}
COMMAND ${PYTHON_EXECUTABLE} setup.py sdist ${bdist}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${SWIG_SOURCES} Py4YAP YAP++ yap4py/yapi.cpp YAP4PY_PY DEPENDS ${SWIG_SOURCES} Py4YAP YAP++ yap4py/yapi.cpp YAP4PY_PY
) )
@ -70,7 +69,9 @@ endif()
DEPENDS ${PYTHON_SOURCES} DEPENDS ${PYTHON_SOURCES}
) )
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install ${PYTHON_USER_INSTALL} --ignore-installed . install(CODE "execute_process(
COMMAND ${PYTHON_EXECUTABLE} setup.py sdist ${bdist}
COMMAND ${PYTHON_EXECUTABLE} -m pip install ${PYTHON_USER_INSTALL} --ignore-installed .
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"
DEPENDS Py4YAP ${CMAKE_BINARY_DIR}/${YAP_STARTUP} ${YAP_INSTALL_DLLDIR} ) DEPENDS Py4YAP ${CMAKE_BINARY_DIR}/${YAP_STARTUP} ${YAP_INSTALL_DLLDIR} )

View File

@ -84,8 +84,8 @@ native_sources = ["yap4py/yap_wrap.cxx","yap4py/yapi.cpp"]
extensions = [Extension('_yap', native_sources, extensions = [Extension('_yap', native_sources,
define_macros=[('MAJOR_VERSION', '1'), define_macros=[('MAJOR_VERSION', '@YAP_MAJOR_VERSION@'),
('MINOR_VERSION', '0'), ('MINOR_VERSION', '@YAP_MINOR_VERSION@'),
('_YAP_NOT_INSTALLED_', '1'), ('_YAP_NOT_INSTALLED_', '1'),
('YAP_PYTHON', '1'), ('YAP_PYTHON', '1'),
('PYTHONSWIG', '1'), ('PYTHONSWIG', '1'),
@ -104,7 +104,7 @@ extensions = [Extension('_yap', native_sources,
'${CMAKE_SOURCE_DIR}/os', '${CMAKE_SOURCE_DIR}/os',
'${CMAKE_SOURCE_DIR}/utf8proc', '${CMAKE_SOURCE_DIR}/utf8proc',
'${CMAKE_SOURCE_DIR}/packages/python', '${CMAKE_SOURCE_DIR}/packages/python',
'../../..', '${CMAKE_BINARY_DIR}',
'${CMAKE_SOURCE_DIR}/CXX' ] '${CMAKE_SOURCE_DIR}/CXX' ]
)] )]

View File

@ -185,7 +185,6 @@ yap_ipython/sphinxext/ipython_console_highlighting.py
yap_ipython/sphinxext/ipython_directive.py yap_ipython/sphinxext/ipython_directive.py
yap_ipython/nbformat.py yap_ipython/nbformat.py
yap_ipython/paths.py yap_ipython/paths.py
yap_ipython/_version.py
yap_ipython/nbconvert.py yap_ipython/nbconvert.py
yap_ipython/qt.py yap_ipython/qt.py
yap_ipython/html.py yap_ipython/html.py
@ -413,23 +412,12 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/kerne
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kernel.js DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kernel.js
) )
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/meta.js
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/misc/editors/meta.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/
DEPENDS ${CMAKE_SOURCE_DIR}/misc/editors/meta.js
)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/prolog.js add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/prolog.js
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/misc/editors/yap.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/prolog.js COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/misc/editors/yap.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/prolog.js
DEPENDS ${CMAKE_SOURCE_DIR}/misc/editors/yap.js DEPENDS ${CMAKE_SOURCE_DIR}/misc/editors/yap.js
) )
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/mode.js
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/misc/editors/mode.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/
DEPENDS ${CMAKE_SOURCE_DIR}/misc/editors/mode.js
)
foreach(f ${FILES}) foreach(f ${FILES})
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${f} add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${f}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${f} ${CMAKE_CURRENT_BINARY_DIR}/${f} COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${f} ${CMAKE_CURRENT_BINARY_DIR}/${f}
@ -441,13 +429,13 @@ endforeach()
add_custom_target(YAP_KERNEL ALL add_custom_target(YAP_KERNEL ALL
COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} build sdist bdist
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/logo-32x32.png ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/logo-64x64.png ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/kernel.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/meta.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/prolog.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/mode.js ${OUTS} YAP4PY DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/logo-32x32.png ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/logo-64x64.png ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/kernel.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/prolog.js ${OUTS} YAP4PY
) )
install(CODE "execute_process( install(CODE "execute_process(
COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} build sdist bdist
COMMAND ${PYTHON_EXECUTABLE} -m pip install ${PYTHON_USER_INSTALL} --ignore-installed --no-deps . COMMAND ${PYTHON_EXECUTABLE} -m pip install ${PYTHON_USER_INSTALL} --ignore-installed --no-deps .
COMMAND ${PYTHON_EXECUTABLE} -m yap_kernel.kernelspec COMMAND ${PYTHON_EXECUTABLE} -m yap_kernel.kernelspec
ERROR_VARIABLE setupErr ERROR_VARIABLE setupErr

View File

@ -293,7 +293,7 @@ abolish(X0) :-
'$old_abolish'(X,M). '$old_abolish'(X,M).
'$new_abolish'(V,M) :- var(V), !, '$new_abolish'(V,M) :- var(V), !,
'$abolish_all'(M). '$abolish_all_in_module'(M).
'$new_abolish'(A/V,M) :- atom(A), var(V), !, '$new_abolish'(A/V,M) :- atom(A), var(V), !,
'$abolish_all_atoms'(A,M). '$abolish_all_atoms'(A,M).
'$new_abolish'(Na//Ar1, M) :- '$new_abolish'(Na//Ar1, M) :-
@ -313,12 +313,12 @@ abolish(X0) :-
'$new_abolish'(T, M) :- '$new_abolish'(T, M) :-
'$do_error'(type_error(predicate_indicator,T),abolish(M:T)). '$do_error'(type_error(predicate_indicator,T),abolish(M:T)).
'$abolish_all'(M) :- '$abolish_all_in_module'(M) :-
'$current_predicate'(Na, M, S, _), '$current_predicate'(Na, M, S, _),
functor(S, Na, Ar), functor(S, Na, Ar),
'$new_abolish'(Na/Ar, M), '$new_abolish'(Na/Ar, M),
fail. fail.
'$abolish_all'(_). '$abolish_all_in_module'(_).
'$abolish_all_atoms'(Na, M) :- '$abolish_all_atoms'(Na, M) :-
'$current_predicate'(Na,M,S,_), '$current_predicate'(Na,M,S,_),
@ -817,3 +817,4 @@ clause_property(ClauseRef, predicate(PredicateIndicator)) :-
/** /**
@} @}
*/ */