13/07/16 18:24, Paul Houle wrote:
In the following docs:

https://jena.apache.org/documentation/inference/

The arithmetic builtins are described as such:

"Note that these do not run backwards, if in sum a and c are bound and b
is unbound then the test will fail rather than bind b to (c-a). This
could be fixed."

This is repeated in the source code for said functions.

https://github.com/apache/jena/blob/master/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/builtins/Sum.java

in that case at line 78.

My question is:  is the only reason this does not work because the
Builtin doesn't handle it,  or because the engine wouldn't be able to
work correctly if the Builtin was fixed?

If I remember correctly the engine requires a deterministic answer from the builtin - it doesn't support builtins that expand the search space (doesn't support return of a set of legal answers). So specific cases where there's only one unbound to an arithmetic builtin and only one result to bind could be supported. However, in general once you allow arithmetic expressions to run backwards you are getting into equational constraint solve territory.

Dave

Reply via email to