nemo icon indicating copy to clipboard operation
nemo copied to clipboard

Built-in functions should work as atoms

Open mkroetzsch opened this issue 10 months ago • 1 comments

Built-in functions should also work as atoms. In particular, boolean functions, such as isIri, should be allowed in rule bodies without having to compare their output to "true". For non-boolean functions, this can also be allowed by using the Effective Boolean Value (EBV) to decide if a value counts as "true", in essence:

  • Strings are false when empty, otherwise true.
  • Numbers are false when 0, otherwise true (we don't have NaN in Nemo).
  • All other values, including IRIs and language-tagged strings, are always an error (which is effectively false when used in atoms, but should be interpreted differently if used in boolean NOT).

This issue does not ask for allowing these built-in atoms to be negated. If this were supported syntactically, it should behave as if the function had been wrapped in NOT (but also using the EBV to interpret the input to NOT, as, in general, all boolean functions should do, which would also be another issue but less pressing).

mkroetzsch avatar Apr 05 '24 19:04 mkroetzsch