projog

3.89. pj_add_predicate(X,Y) - defines a Java class as a built-in predicate.

X represents the name and arity of the predicate. Y represents the full class name of an implementation of org.projog.core.PredicateFactory.

This predicate provides an easy way to configure and extend the functionality of Projog - including adding functionality not possible to define in pure Prolog syntax.

Examples

?- pj_add_predicate(xyz/1, 'org.projog.core.predicate.builtin.compound.Call').

yes

?- xyz(true).

yes

?- xyz(repeat(3)).

yes;

yes;

yes

?- xyz(fail).

no