Open riannella opened 5 months ago
@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 https://github.com/w3c/poe/issues/282):
- constraints that describe the world state under which a rule becomes effective (Rule --odrl:constraint--> Constraint),
- 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:
- https://github.com/w3c/poe/issues/211#issuecomment-325198929
- https://github.com/w3c/poe/issues/191#issuecomment-315283129
- https://github.com/w3c/poe/issues/112
- https://github.com/w3c/poe/issues/226 (discussion about refinements at the end)
therefore the difference is only philosophical to me
well, we explicitly prohibit outcomes of refinements to result in the empty set, see e.g.
- https://w3c.github.io/poe/model/#constraint-action
- Note: The outcome of applying refinements to an Action SHOULD NOT result in a null operation.
- https://w3c.github.io/poe/model/#constraint-asset
- Note: The outcome of applying refinements to an AssetCollection SHOULD NOT result in a null set.
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
:)
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.
"assignee": {
"@type": "PartyCollection",
"source": "http://example.com/users",
"refinement": [{
"leftOperand": "ex:online-status",
"operator": "eq",
"rightOperand": { "@value": "true", "@type": "xsd:boolean" }
}]
},
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.
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 ? https://github.com/w3c/odrl/issues/60#issuecomment-2367036417 What was the meaning of last @joshcornejo comment? I am sorry I did not fully grasp it...
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".
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