s-webber / projog

Prolog programming for the Java platform.
Apache License 2.0
34 stars 9 forks source link

Add methods to API to add predicates and operators. #180

Closed s-webber closed 3 years ago

s-webber commented 3 years ago

Add addPredicateFactory(PredicateKey, PredicateFactory) and addArithmeticOperator(PredicateKey, ArithmeticOperator) methods to org.projog.api.Projog.

This will allow users of the API to plug-in their own Java versions of predicates and arithmetic operators which can then be called from Prolog. Adding methods to Projog will provide a convenient alternative to using the pj_add_predicate/2 and pj_add_arithmetic_operator/2 predicates.