projog

3.14. pj_add_clp_expression(X,Y) - defines a Java class as an CLP expression.

X represents the name and arity of the expression. Y represents the full class name of an implementation of org.projog.core.predicate.builtin.clp.ExpressionFactory.

Examples

?- 7 #= sum(X, 4).

Cannot find CLP expression: sum/2

?- pj_add_clp_expression(sum/2, 'org.projog.core.predicate.builtin.clp.CommonExpression/add').

yes

?- 7 #= sum(X, 4).
X = 3

yes