Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built-in functions should work as atoms #465

Open
mkroetzsch opened this issue Apr 5, 2024 · 1 comment
Open

Built-in functions should work as atoms #465

mkroetzsch opened this issue Apr 5, 2024 · 1 comment
Labels
builtins Issue related to built-in functions
Milestone

Comments

@mkroetzsch
Copy link
Member

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).

@mmarx mmarx added the builtins Issue related to built-in functions label Apr 5, 2024
@mmarx mmarx added this to the Release 0.6.0 milestone Apr 5, 2024
@aidan-bailey
Copy link
Contributor

This looks to be a very important feature. May I take a stab at implementing it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins Issue related to built-in functions
Projects
Status: Todo
Development

No branches or pull requests

3 participants