Aleph uses system_predicate/2

This commit is contained in:
Vitor Santos Costa 2016-05-10 09:25:52 +01:00
parent 18ed15a4ce
commit 91e5f03121

View File

@ -652,6 +652,26 @@ system_predicate(P0) :-
system_predicate(P0))
).
/** @pred system_predicate( ?A, ?P )
Succeeds if _A_ is the name of the system predicate _P_. It can be used to test and to enumerate all system predicates.
YAP also supports the ISO standard built-in system_predicate/1, that
provides similar functionality and is compatible with most other Prolog
systems.
*/
system_predicate(A, P0) :-
'$yap_strip_module'(P0, M, P),
(
nonvar(P)
->
'$current_predicate'(A, M, P, system),
'$is_system_predicate'( P, M)
;
'$current_predicate'(A, M, P, system)
).
/**
@pred current_predicate( _F_) is iso