[poe] Issue: ambiguous semantics of duty constraints marked as To Be Closed

riannella has just labeled an issue for https://github.com/w3c/poe as "To Be Closed":

== ambiguous semantics of duty constraints ==
reopening as https://github.com/w3c/poe/issues/112#issuecomment-290617968 and issues outlined in #191 are still not addressed..

## Issue

http://w3c.github.io/poe/model/#rule:
> For a **Rule** to become effective, it MUST be valid (i.e., all it's Constraints MUST be satisfied).

http://w3c.github.io/poe/model/#constraint:
>  For a **Rule**, if the Constraint is satisfied then the action becomes effective for the enclosing **Rule**. 
> [..] A **Rule** becomes effective if all of its Constraints are satisfied.

http://w3c.github.io/poe/model/#constraint-class:
> If the expression evaluates to **true** the Constraint is satisfied.

[effective (ɪˈfɛk tɪv) adj.](http://www.thefreedictionary.com/effective)
> 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. 

### Interpretation
```
1. A Rule becomes effective if all of its Constraints are satisfied
2. Duty is a type of Rule
3. in effect means in force/active 
4. A Constraint is satisfied if it evaluates to true
--------------
=> A Duty is only in force/active if all of its Constraints evaluate to true.
```
### Problematic Examples
```turtle
<http://example.com/policy:42>
    a odrl:Agreement ;
    odrl:obligation [ 
 # a odrl:Duty ;
        odrl:assignee <http://example.com/person:44> ;
        odrl:assigner <http://example.com/org:43> ;
        odrl:action odrl:compensate ;
        odrl:constraint [ 
            odrl:leftOperand odrl:payAmount ;
            odrl:operator odrl:eq ;
            odrl:rightOperand "500.00" ;
            odrl:unit <http://dbpedia.org/resource/Euro> ;   
        ]
    ] .
```
**should** => "person44 has the obligation to pay 500 euro to org43"
**is** => "As long as payAmount != 500 euro, the duty is not in effect hence no one has to pay anything"

---------------------
```turtle
<http://example.com/policy:42>
    a odrl:Agreement ;
    odrl:obligation [ 
 # a odrl:Duty ;
        odrl:assignee <http://example.com/person:44> ;
        odrl:assigner <http://example.com/org:43> ;
        odrl:action odrl:compensate ;
        odrl:constraint [ 
            odrl:leftOperand odrl:payAmount ;
            odrl:operator odrl:eq ;
            odrl:rightOperand "500.00" ;
            odrl:unit <http://dbpedia.org/resource/Euro> ;   
        ] ;
        odrl:constraint [ 
            odrl:leftOperand odrl:dateTime;
            odrl:operator odrl:gt ;
            odrl:rightOperand "2017-12-31" ;
        ]
    ] .
```
**should** => "Starting from 2018-01-01 onwards, person44 has the obligation to compensate org43. This duty is only considered to be fulfilled, if payed amount equals 500 euro"
**is** => "As long as payAmount != 500 euro or datetime <= 2017-12-31, the obligation to compensate org43 is not in effect"

--------
### Proposal

Distinguish between different interpretations of duty constraints:

`:duty odrl:constraint :c1` -> `:duty` is **in effect** iff `:c1` is satisfied
`:duty odrl:scope :c2` (or any other name for scope) -> `:duty` is **fulfilled** iff `:c2` is satisfied 

```turtle
<http://example.com/policy:42>
    a odrl:Agreement ;
    odrl:obligation [ 
 # a odrl:Duty ;
        odrl:assignee <http://example.com/person:44> ;
        odrl:assigner <http://example.com/org:43> ;
        odrl:action odrl:compensate ;
        odrl:scope [ 
            odrl:leftOperand odrl:payAmount ;
            odrl:operator odrl:eq ;
            odrl:rightOperand "500.00" ;
            odrl:unit <http://dbpedia.org/resource/Euro> ;   
        ] ;
        odrl:constraint [ 
            odrl:leftOperand odrl:dateTime;
            odrl:operator odrl:gt ;
            odrl:rightOperand "2017-12-31" ;
        ]
    ] .
```
**should** => "Starting from 2018-01-01 onwards, person44 has the obligation to compensate org43. This duty is only considered to be fulfilled, if payed amount equals 500 euro"
**is** => "Starting from 2018-01-01 onwards, person44 has the obligation to compensate org43. This duty is only considered to be fulfilled, if payed amount equals 500 euro"

See https://github.com/w3c/poe/issues/211

Received on Friday, 11 August 2017 03:09:13 UTC