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

Add negation operator #27

Open
besteves4 opened this issue Oct 27, 2022 · 7 comments
Open

Add negation operator #27

besteves4 opened this issue Oct 27, 2022 · 7 comments
Assignees

Comments

@besteves4
Copy link
Collaborator

Hi!

There is a not equal (odrl:neq) operator to express "that a given value is not equal to the right operand of the Constraint".

A similar negation operator could be useful for other operators such as having a "is Not A" operator to indicate that a given left operand is not an instance of the right operand of the Constraint. The same exercise can be done for other operators, e.g. odrl:isPartOf -> have a isNotPartOf

To not explode the number of operators, the creation of a "not" operator to be used together with the existent ones, e.g., using the existent odrl:isA with a new odrl:not, could also be considered.

@coolharsh55
Copy link

A note on this in terms of the other issue (#28) where the proposed isNotA operator would only cover nos.2 for constraints, and therefore there should be something that covers all of: 1) should not be the same IRI (neq), 2) should not be a subclass (isNotPartOf), and 3) should not be an instance (isNotA).

@riannella
Copy link
Collaborator

Would odrl:isNoneOf meet this requirement?

@coolharsh55
Copy link

I have limited knowledge, I thought isNoneOf means none of those from a list.

@riannella
Copy link
Collaborator

Alternatives includes:

  1. Create a Prohibition (everything is a 'not')

  2. Use SHACL constraint operators: https://www.w3.org/TR/shacl/#core-components

@coolharsh55
Copy link

A simpler alternative as @besteves4 states is to have a isNotA operator as the negation of isA operator - which would give isA/isNotA to be similar to other operator pairs eq/neq, isAllOf/isNoneOf, and gt/lt.

@besteves4
Copy link
Collaborator Author

As @coolharsh55 has also expressed before, my interpretation of the isPartOf/isAllOf/isAnyOf/isNoneOf operators is that the corresponding right operand would have to be a list.
If not, it is not clear to me the actual difference between the neq or the isNoneOf operators for instance.

Also, creating a prohibition is not a solution for permission-based systems, e.g. Solid, where a permission needs to be present to grant access to a resource.

@simonstey
Copy link
Collaborator

Isn't A isNotA B equivalent to A isNoneOf [B] where [B] is a list of length 1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants