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

Refinement V Constraint #60

Open
riannella opened this issue Jun 6, 2024 · 6 comments
Open

Refinement V Constraint #60

riannella opened this issue Jun 6, 2024 · 6 comments

Comments

@riannella
Copy link
Collaborator

It would be good to have examples of the use of Refinements versus Constraints.
That is, what are the typical use cases to use refinements/constraints and what are the differences....
(there is a lot of email discussions about these points)

https://lists.w3.org/Archives/Public/public-odrl/2024May/0035.html

https://lists.w3.org/Archives/Public/public-odrl/2022Apr/0007.html

@simonstey
Copy link
Collaborator

@victor

I do not see a great difference between refinement or constraint because
its interpretation is not defined (cf. examples in a testbed where an
algorithm must behave differently in each case),

well the idea was to make a distinction between (see discussion here
w3c/poe#282):

  1. constraints that describe the world state under which a rule becomes
    effective (Rule --odrl:constraint--> Constraint),
  2. constraints that refine party/asset/action of a rule such that the
    refined party/asset/action represents those affected by the Rule
    (Action/AC/PC --odrl:refinement--> Constraint)

[image: image.png]

here are a few links to our discussions back in the day:

therefore the difference is only philosophical to me

well, we explicitly prohibit outcomes of refinements to result in the empty
set, see e.g.

while this comes with its own slew of issues, restrictions that for example
can't be satisfied at all can technically not be used as refinements

Can someone suggest improved definitions/clarifications for these:

  • A Rule MAY include the constraint property to indicate a condition on
    the Rule.
  • An Action MAY include the refinement property to indicate a Constraint
    that narrows the semantics of the Action operation directly.

but not for:

  • An AssetCollection MAY include a refinement property to indicate the
    refinement context under which to identify individual Asset(s) of the
    complete collection.
  • A PartyCollection MAY include a refinement property to indicate the
    refinement context under which to identify individual Party(ies) of the
    complete collection.
    ?

Btw in the BP document, deliveryChannel is used as refinement on the action
https://w3c.github.io/odrl/bp/#x2-1-narrowing-the-applicability-of-an-action

cheers, simon

:)

@joshcornejo
Copy link
Collaborator

I was coming to write a couple of requests - one is that I believe refinements were originally intended to "refine" the sets from a collection. But I can see many cases where you want to refine an asset or party with state that is only available at evaluation time.

For example, ex:JohnDoe is not a member of an "in the office" PartyCollection (such party doesn't exist), this is only determined when he is online via a set of IP addresses.

And yes - I know you can represent this alternatively by constraining where the rule can be executed, in practice the semantic association is Party->Party's Location ... not Context->Party's Location.

Screenshot 2024-09-21 at 15 27 16

@riannella
Copy link
Collaborator Author

    "assignee": {
      "@type": "PartyCollection",
      "source":  "http://example.com/users",
      "refinement": [{
        "leftOperand": "ex:online-status",
        "operator": "eq",
        "rightOperand": { "@value": "true", "@type": "xsd:boolean" }
      }]
    },

@joshcornejo
Copy link
Collaborator

That example has two challenges:

  1. it can imply filtering from a collection, which can get complicated in the context of logical constraint evaluations.
  2. it is ambiguous (am I searching for a "subset" or a "property and its value")

Policy builders won't be set theory experts, and refining properties (at runtime!) at an entity level is easier to conceptualise and evaluate.

@vroddon
Copy link
Collaborator

vroddon commented Oct 21, 2024

I believe this clarification is necessary, for the discussion between "refinement" and "constraints" regularly appear; and I do appreciate the comments by @simonstey but still... what is the specific example (text + turtle) to be added?
Which text should accompany the example above by @riannella ? #60 (comment)
What was the meaning of last @joshcornejo comment? I am sorry I did not fully grasp it...

@joshcornejo
Copy link
Collaborator

In general, certain examples of refinement have practical challenges:

  1. is the interpretation of "filtering from a subset"
  2. am I refining from a subset, or properties within the current, referenced "refined element".

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