Skip to content

ambiguous semantics of duty constraints #211

Description

@simonstey

reopening as #112 (comment) 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.

  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

<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"


<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

<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"

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions