Error e631: The predicate '%', which is declared as '%', is actually '%'

This error/warning says that the implementation of a predicate does not match it declaration with regards to Predicate Mode.

Consider this code

class predicates myPred : (integer X) -> integer Z. clauses myPred(X) = Z :- Y = calculate(X), Y <> 0, % cannot divide by zero Z = 1/Y.

The predicate declaration does not state a predicate mode, so the predicate is a procedure. But if calculate returns 0 then the test Y <> 0 will fail, and then myPred will fail. However a procedure is not allowed to fail. This implementation of myPred can succeed or fail, so the implementation is determ. So in this case we will get the error: