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

What does it mean for permissions/prohibitions/duties if their constraint(s) are (un)satisfied? #112

Closed
riannella opened this issue Feb 28, 2017 · 18 comments

Comments

@riannella
Copy link
Contributor

TRACKER ISSUE-10: What does it mean for permissions/prohibitions/duties if their constraint(s) are (un)satisfied?

satisfiability of constraints

What does it mean for permissions/prohibitions/duties if their constraint(s) are (un)satisfied?

State:
RAISED
Product:
POE - Information Model
Raised by:
Simon Steyskal
Opened on:
2016-11-08
Description:
http://w3c.github.io/poe/model/#constraint states:

"[...] If multiple Constraint entities are linked to the same Permission, Prohibition, or Duty entity, then all of the Constraint entities MUST be satisfied. That is, all the Constraint entities are (boolean) anded. [...]"

Without actually explaining the concept of "satisfying a Constraint entity".

=> How can someone "satisfy a Constraint entity"?
=> What does it mean for permissions/prohibitions/duties if their constraints are unsatisfied?
=> Is a permission having an unsatisfied constraint equivalent to a prohibition? (and vice versa)
=> Should a permission/prohibition having an unsatisfied constraint simply be ignored? If so, is it possible for "ignored" perm/proh to become "active" again?

simon

@riannella riannella added this to the Information Model milestone Feb 28, 2017
@simonstey
Copy link
Contributor

In the meantime, the section on constraints was reworked and quoted paragraph now reads as follows:

If multiple Constraint entities are linked to the same Permission, Prohibition, or Duty entity, then all the Constraint entities within the Rule MUST be satisfied. That is, all the Constraint entities are (boolean) anded together.

What is the Rule referring to? I suggest replacing Permission, Prohibition, or Duty entity with Rule and aligning the rest with:

  • The Permission entity MAY refer to one or more constraints. The Permission becomes effective if all of the constraints are satisfied. [1]
  • The Prohibition entity MAY refer to one or more constraints. The Prohibition becomes effective if all of the constraints are satisfied. [2]
  • The Duty entity MAY refer to one or more constraints. The Duty becomes effective if all of the constraints are satisfied. [3]
    -> That's actually wrong.. A Duty is in effect from the very beginning, but the Permission a Duty is attached to isn't. Only if all constraints of a Duty are satisfied, is it considered to be fulfilled, and respective Permission may be in effect.

If the same Constraint is repeated within the same Rule, then these Constraints MUST be represented as a single Constraint entity using an appropriate operator value (for example, isAnyOf).

I'm not sure how isAnyOf could be used to achieve that as it is defined as [4]: "Indicating that a given value is any of the right operand of the Constraint."

Consider following example:

:p1 a odrl:Permission ;
	odrl:action odrl:distribute ;
	odrl:constraint :c1, :c1, :c2, :c3 . 

:c1 a odrl:Constraint ;
	odrl:leftOperand odrl:spatial ;
	odrl:operator odrl:eq ;
	odrl:rightOperand <http://ontologi.es/place/IT> .

:c2 a odrl:Constraint ;
	odrl:leftOperand odrl:spatial ;
	odrl:operator odrl:eq ;
	odrl:rightOperand <http://ontologi.es/place/IT> .

:c3 a odrl:Constraint ;
	odrl:leftOperand odrl:spatial ;
	odrl:operator odrl:eq ;
	odrl:rightOperand <http://ontologi.es/place/AUT> .

what constraints should be "merged" together and why are they considered to be the "same"?

[1] http://w3c.github.io/poe/model/#prohibition
[2] http://w3c.github.io/poe/model/#prohibition
[3] http://w3c.github.io/poe/model/#duty
[4] http://w3c.github.io/poe/vocab/#term-isAnyOf

@simonstey
Copy link
Contributor

related #68

@riannella
Copy link
Contributor Author

@simonstey I assume the first part of your comment above was just to replace "Permission, Prohibition, or Duty entity" with "Rule"?

@riannella
Copy link
Contributor Author

I don't think we need the second part now on "same constraint" (I cannot remember why we added it...but there was a reason ;-)

I will remove that text.

@simonstey
Copy link
Contributor

I assume the first part of your comment above was just to replace "Permission, Prohibition, or Duty entity" with "Rule"?

Kind of.. I suggest to replace:

If multiple Constraint entities are linked to the same Permission, Prohibition, or Duty entity, then all the Constraint entities within the Rule MUST be satisfied. That is, all the Constraint entities are (boolean) anded together.

with something along the lines of: "When multiple Constraints are attached to the same Rule they are interpreted as conjunction. A Rule becomes effective if all of its Constraints are satisfied."

I don't think we need the second part now on "same constraint" (I cannot remember why we added it...but there was a reason ;-)
I will remove that text.

+1

@riannella
Copy link
Contributor Author

Done

riannella added a commit that referenced this issue Mar 3, 2017
@simonstey
Copy link
Contributor

Done

The first part hasn't changed though..

riannella added a commit that referenced this issue Mar 3, 2017
@riannella
Copy link
Contributor Author

Sorry, fixed now

@simonstey
Copy link
Contributor

Section 3.6 Duty:

The Duty entity MAY refer to one or more constraints. The Duty becomes effective if all of the constraints are satisfied.

which means ->

{
   "@context": {
    "odrl": "http://www.w3.org/ns/odrl/2/"
    },
    "@type": "odrl:Offer",
    "@id": "http://example.com/policy:88",
    "permission": [{
        "assigner": "http://example.com/assigner:sony",
        "target": "http://example.com/music/1999.mp3",
        "action": "odrl:play",
        "duty": [{
            "action": "odrl:compensate",
            "constraint": [{
                "leftOperand": "odrl:payAmount",
                "operator": "odrl:eq",
                "rightOperand": "5.00",
                "unit": 
                  "https://www.currency-iso.org/dam/downloads/lists/list_one.xml#AUD"
            }],
            "constraint": [{
                "leftOperand": "odrl:event",
                "operator": "odrl:lt",
                "rightOperand": "odrl:policyUsage"
            }]
        }]
    }]
}  

as long as payamount != 5AUD, the duty is not in effect, hence the permission is granted

@riannella
Copy link
Contributor Author

Hi @simonstey - i'm sorry but I don't follow the outcome.
Is it because of the word "effective"?

Would it be better to state "If all constraints of a Duty are satisfied, then the Duty is considered to be fulfilled".

@simonstey
Copy link
Contributor

Is it because of the word "effective"?

Yes, see e.g. ->

effective (ɪˈfɛk tɪv) adj.

  1. adequate to accomplish a purpose; producing the intended or expected result: effective teaching methods.
  2. in operation or in force; functioning; operative: The law becomes effective at midnight.
  3. producing a deep or vivid impression; striking: an effective photograph.
  4. prepared and available for service, esp. military service.

Would it be better to state "If all constraints of a Duty are satisfied, then the Duty is considered to be fulfilled".

Yes.

  1. A duty is in effect as long as its associated permission is "valid" (i.e., the permission's constraints are satisfied).
  2. A duty is considered to be fulfilled if its constraints are satisfied.
  3. For a permission to become effective, it must be valid and all of the permission's duties must be fulfilled.

@riannella
Copy link
Contributor Author

Added 1) and 2) to Duty section and 3) to Permission section.

@riannella riannella self-assigned this Mar 31, 2017
@riannella
Copy link
Contributor Author

@simonstey Are you OK with this issue now?

@riannella riannella added this to Under Current Discussion in ODRL Deliverables Review Apr 29, 2017
@riannella riannella moved this from Under Current Discussion to Completed (Last Call) in ODRL Deliverables Review May 3, 2017
@simonstey
Copy link
Contributor

http://w3c.github.io/poe/model/#constraint still reads:

A Rule becomes effective if all of its Constraints are satisfied.

which is not the case for Duties

@riannella
Copy link
Contributor Author

I will change that para to now read:

"If there are multiple Constraints applied to a Rule, then they are interpreted as conjunction in that each Constraint MUST be satisfied."

@riannella riannella moved this from Completed (Last Call) to Proposed Solution in ODRL Deliverables Review May 8, 2017
@riannella
Copy link
Contributor Author

The last para of 3.6 Constraint section now reads:

"When multiple Constraints apply to the same Rule they are interpreted as conjunction. A Rule becomes effective if all of its Constraints are satisfied."

@simonstey ok?

@riannella riannella moved this from Proposed Solution to Completed (Last Call) in ODRL Deliverables Review Jun 6, 2017
@riannella riannella removed this from Completed (Last Call) in ODRL Deliverables Review Jun 16, 2017
@simonstey
Copy link
Contributor

reopen due to #211

@simonstey simonstey reopened this Jul 19, 2017
@riannella riannella added this to Under Current Discussion in ODRL Deliverables Review Jul 20, 2017
@riannella
Copy link
Contributor Author

@simonstey Why is still unresolved here? That is not in #211 ?

@riannella riannella moved this from Under Current Discussion to Proposed Solution in ODRL Deliverables Review Aug 1, 2017
@riannella riannella moved this from Proposed Solution to Completed (Last Call) in ODRL Deliverables Review Aug 8, 2017
@riannella riannella removed this from Completed (Last Call) in ODRL Deliverables Review Aug 15, 2017
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