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

Proposal - multiple paths for evaluation of Constraints #66

Open
joshcornejo opened this issue Oct 22, 2024 · 0 comments
Open

Proposal - multiple paths for evaluation of Constraints #66

joshcornejo opened this issue Oct 22, 2024 · 0 comments

Comments

@joshcornejo
Copy link
Collaborator

I've been discussing refinements like this (modified from Krishnamurthy's emails in May):

{
     "@context": "http://www.w3.org/ns/odrl.jsonld",
     "@type": "Offer",
     "uid": "http://example.com/policy:6163",
     "profile": "http://example.com/odrl:profile:10",
     "permission": [{
        "target": "http://example.com/document:1234",
        "assigner": "http://example.com/org:616",
        "action": "distribute",
        "refinement": [{ "@id": "http://example.com/p:99/C1" }],
        "constraint": [{ "@id": "http://example.com/p:99/C1" }],
    }],
},
{
   "@context": "http://www.w3.org/ns/odrl.jsonld",
   "@type": "Constraint",
   "uid": "http://example.com/p:99/C1",
   "leftOperand": "count",
   "operator": "lt",
   "rightOperand":  { "@value": "3", "@type": "xsd:int" }
}

During the call on 21/Oct/2024, we agreed that in such cases "count" is considered a different variable for the constraint and the refinement. (note - we agreed that the majority of examples appear to make "no sense", but considering they are nodes in a graph, a grammatical checker/validator will either have to allow or revoke them for correctness and the evaluator will need to have consistent behaviour).

Another scenario pops up that is not in the examples and could be considered ambiguous:

{
     "@context": "http://www.w3.org/ns/odrl.jsonld",
     "@type": "Offer",
     "uid": "http://example.com/policy:6163",
     "profile": "http://example.com/odrl:profile:10",
     "permission": [{
        "target": "http://example.com/document:1234",
        "assigner": "http://example.com/org:616",
        "action": "distribute", "print",
        "refinement": [{
            "leftOperand": "count",
            "operator": "lt",
            "rightOperand":  { "@value": "3", "@type": "xsd:int" }
        }]
    }]
 }

This raises the question: Is this "count" separate? (Print three times / distribute three times?) or is it for a total for the combination of printing and distribution?

Based on examples 26 and unravelling in 27, I propose this is interpreted the same way and considered as separate for each element (i.e. three times, each action), and the interpretation is of "grouping, because of the same refinement" and not "grouped, refinement applied to group".

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

2 participants