Re: an LDP ontology -- Was: MothersLovers - an OWL restriction question

On 14 Mar 2014, at 18:37, Uli Sattler <Ulrike.Sattler@manchester.ac.uk> wrote:

> Hi Henry and Brian, 
> 
> if i understand Henry's motivating example correctly, you want a class expression that describes those people who love their mothers, i.e., they are related by the 'loves' to their mothers, i.e., there is a person who they are related to by both the 'loves' property and the 'hasMother' property. 
> 
> If this is correct, here is a trick: 
> 
> - specify a sub-property chain axiom, saying that "loves o isMotherOf" is a Subpropertychain of "P" (notice I use the *inverse* of 'hasMother' here - so every MotherLover should be P-related to themselves - and possibly also to other things)
> 
> - define "MotherLover" as an EquivalentClass of "P some self" 
> 
> …that should do it in the following sense: if you happen to have a known person who loves their mother, they will be returned if you ask for instances of "MotherLover"…
> 
> It doesn't quite work, however, in the following sense: if you *declare* somebody to be an instance of MotherLover, then they won't necessarily have to love their mother (they will only be P-related to themselves - the subpropertychain is only an implication, not a bi-implication…)
> 
> All the best, cheers, Uli 

In the LDP case, which was behind the question in this thread, I write the following (see the
newly updated https://github.com/bblfish/ldp/blob/master/ldp.binding.ttl )

ldp:subjectToBindingRule a rdf:Property;
   owl:propertyChainAxiom ( ldp:subject ldp:bindingRule );
   rdfs:comment """
     artificial relation needed for ldp:ContainerRule owl:Restriction.
     This enables on to specify a relation from a subject to a bindingrule, so that
    one can set an owl:hasSelf restriction
   """.

Then I use it like this:

ldp:ContainerRule owl:equivalentClass [ owl:intersectionOf (
                [ a owl:Restriction;
                  rdfs:comment """
                    This restrictions is attempting to state that if one follows the
                 property subject then bindingRule one will arrive at the same rule
                 again at least once. That should be equivalent to saying that for this class
                 of objects the :subject relation is the same as the subject of the :bindingRule
                 relation.
                 """;
# Pellet does not like the following:
# problem with pellet reasoning on properties defined via property chains
                  owl:onProperty owl:subjectToBindingRule;
                  owl:hasSelf "true"^^xsd:boolean ]
                [ a owl:Restriction;
                  owl:onProperty ldp:relation;
                  owl:hasValue ldp:contains ]
                [ a owl:Restriction;
                  owl:onProperty ldp:contentRelation;
                  owl:hasValue ldp:MemberSubject
                ])];
   rdfs:label "ContainerRule";
   rdfs:comment """
     the rule that on POSTing creates an ldp:contains relation, etc...
   """.

I think that if I had a reasoner that could deal with that it would probably work out fine.

But I may have found out why things are weird. The current ontology is used like this:

<> a ldp:DirectContainer;
   dcterms:title "The assets of JohnZSmith";
   ldp:membershipResource <http://example.org/netWorth/nw1>;
   ldp:hasMemberRelation o:asset;
   ldp:insertedContentRelation ldp:MemberSubject.

<http://example.org/netWorth/nw1>
   a o:NetWorth;
   o:asset <a1>, <a3>, <a2>.

with the new binding rules one has instead

<> a ldp:DirectContainer;
   dcterms:title "The assets of JohnZSmith";
   ldp:bindingRule [ a ldp:DirectBindingRule;
        ldp:subject </netWorth/nw1>;
        ldp:relation o:asset;
      ];
   ldp:contains <a1>, <a2> <a3> .

<http://example.org/netWorth/nw1>
   a o:NetWorth;
   o:asset <a1>, <a3>, <a2>.

The nice thing as I mentioned is that one can have more than one bindingRule, which makes it generalisable.

I tried to map those old properties to the new ones but this ends up requiring me to create
a weird sameAsBindingRule relation

ldp:sameAsBindingRule owl:subPropertyOf ldp:bindingRule, owl:sameAs;
   skos:editorialNote """
      In LDP every Container is also a binding rule. One can define all the membership
    relations as a binding a ldp:bindingRule followed by the new membership relations.
   But if one does that then one cannot guarantee that each of the first parts of the
   composite relation will have the same bindingRule. Hence we need to define this
   ldp:sameAsBindingRule. see membershipResource,  hasMemberRelation, isMemberOfRelation,
   and insertedContentRelation for usages.
   This is where the old membership relations smell funny.
   """.

So that I can then later tie the old ldp:membershipResource to the bindingRule and the ldp:subject property in there

ldp:membershipResource a rdf:Property, owl:FunctionalProperty;
  rdfs:label "membershipResource";
  owl:propertyChainAxiom ( ldp:sameAsBindingRule ldp:subject ) ;
  rdfs:domain ldp:IndirectBindingRule;
  rdfs:range  rdfs:Resource .


From this it follows that in LDP all Containers are also binding rules. Which means that they won't 
be extendable easily. 

My feeling is that a more powerful owl reasoner would end up showing me an inconsistency in the ontology
after this transformation that I just pushed to github. It would help me make a case if I could walk people
through these inferences.

Sorry for this rather complicated example...

> 
> On 14 Mar 2014, at 15:45, "henry.story@bblfish.net" <henry.story@bblfish.net>
> wrote:
> 
>> 
>> On 14 Mar 2014, at 15:40, Brian Ulicny <bulicny@vistology.com> wrote:
>> 
>>> I think you are looking for a SELF-restriction here:
>>> 
>>> http://www.w3.org/2007/OWL/wiki/New_Features_and_Rationale#F4:_Self_Restriction
>>> 
>>> This is not part of OWL 2 RL, but you can easily write a rule for this.
>> 
>> Thanks Brian,
>> 
>>  that's how I started, then I had doubts, and paddled back. I just checked the formal definition 
>> on the owl-direct-semantics [1] page and as I read it, it seems to say that something 
>> has an owl:hasSelf if at least one relation relates back to it. I was not sure about that 
>> when I looked at the owl2-primer.
>> 
>> I have been developing a little ontology it order to see if the LDP group that is in LastCall 2 [0] has well defined
>> its model. There is something that has struck people as quite odd in the way the ontology is specified, especially
>> with the container hierarchy https://www.w3.org/2012/ldp/wiki/ContainerHierarchy 
>> 
>> So I tried to see if one could unify all the containers by introducing the notion of a binding rule, which would
>> show how the different container types can be specified by restrictions on the number and types of the 
>> ldp:bindingRule relation. This lead me to the following ontology:
>> 
>>  https://github.com/bblfish/ldp/blob/master/ldp.binding.ttl
>> 
>> A binding rule, relates a container to a statement about what happens as a rule
>> when one POSTs something to the container. So in philosophy of language 
>> it is similar to a specification of a speech act. ( When a priest utters the words "you are now
>> man and wife he is not describing reality, but he is making the statement true. Same when
>> a chair utters the words "the meeting is now closed" ).
>> 
>> This ontology uses an owl:hasSelf restriction on property defined via a propertyChainAxiom.
>> It gives the correct class hierarchy with Pellet, but since Pellet complains a lot I can't be
>> sure if this really is consistent.
>> 
>> Does anyone have a reasoner that could check the consistency of it?
>> 
>> $ sh pellet.sh classify --input-format  Turtle -l jena ../LDP/ldp.binding.ttl 
>> Mar 14, 2014 4:11:24 PM org.mindswap.pellet.RBox ignoreTransitivity
>> WARNING: Unsupported axiom: Ignoring transitivity and/or complex subproperty axioms for isMemberOfRelation
>> Mar 14, 2014 4:11:24 PM org.mindswap.pellet.RBox ignoreTransitivity
>> WARNING: Unsupported axiom: Ignoring transitivity and/or complex subproperty axioms for hasMemberRelation
>> Mar 14, 2014 4:11:24 PM org.mindswap.pellet.RBox ignoreTransitivity
>> WARNING: Unsupported axiom: Ignoring transitivity and/or complex subproperty axioms for insertedContentRelation
>> Mar 14, 2014 4:11:24 PM org.mindswap.pellet.RBox ignoreTransitivity
>> WARNING: Unsupported axiom: Ignoring transitivity and/or complex subproperty axioms for membershipResource
>> Classifying 14 elements
>> Classifying:  100% complete in 00:00
>> Classifying finished in 00:00
>> 
>> owl:Thing
>>    rdf:Property
>>    rdfs:Resource
>>    ldp:HTTPActionRule
>>       ldp:IndirectBindingRule
>>          ldp:DirectBindingRule
>>             ldp:ContainerRule
>>    ldp:Resource
>>       ldp:Source
>>          ldp:Container
>>             ldp:DirectContainer
>>                ldp:IndirectContainer
>>                   ldp:BasicContainer
>> 
>> Btw. the central networth example from the spec, can be re-written with the binding rule
>> as follows:
>> 
>> @prefix dcterms: <http://purl.org/dc/terms/>.
>> @prefix o: <http://example.org/ontology/>.
>> 
>> </netWorth/> a ldp:DirectContainer;
>>   dcterms:title "The assets of JohnZSmith";
>>   ldp:bindingRule [ a ldp:DirectBindingRule;
>>        ldp:subject </netWorth/nw1/>;
>>        ldp:relation o:asset;
>>      ];
>>   ldp:contains </netWorth/a1>, </netWorth/a2> .
>> 
>> 
>> 
>> ( So that was the more serious example I mentioned )
>> 
>> 
>> Henry
>> 
>> [0] http://www.w3.org/TR/ldp/
>> [1] http://www.w3.org/TR/2012/REC-owl2-direct-semantics-20121211/#Class_Expressions
>> 
>> 
>> 
>>> 
>>> Best regards,
>>> 
>>> Brian Ulicny, PhD
>>> Chief Scientist
>>> VIStology, Inc
>>> 
>>> 
>>> On Fri, Mar 14, 2014 at 10:31 AM, <henry.story@bblfish.net> wrote:
>>> 
>>> I would like to specify the class that is such that the object of one relation
>>> is the same ( or same domain ) as object of another relation.
>>> 
>>> Something that could be written like this ( were it to exist )
>>> 
>>> SomeType
>>> owl:equivalentClass
>>>      [ a owl:SameRangeRestriction;
>>>        owl:onProperty :rel1;
>>>        owl:onProperty :rel2
>>>      ] .
>>> 
>>> One could define the class of lovers of their mothers like that
>>> 
>>> MothersLovers owl:equivalentClass [ a owl:SameRangeRestriction
>>>                           owl:onProperty :lover
>>>                           owl:onProperty :mother ] .
>>> 
>>> As that SameRangeRestriction does not exist, I tried this:
>>> 
>>> MothersLovers
>>>   owl:equivalentClass [ a owl:Restriction;
>>>              owl:onProperty [ rdfs:subPropertyOf [ owl:propertyChainAxiom ( :lover [ owl:InverseOf :mother ] )];
>>>                               a owl:ReflexiveProperty ];
>>>              owl:minCardinality 1 ] .
>>> 
>>> 
>>> But Pellet does not like property chain axioms in Restrictions. ( perhaps other resoners allow this?)
>>> Is there some way to do this properly? ( I do have a real use case, but it's more complex to explain )
>>> 
>>> Henry
>> 
>> Social Web Architect
>> http://bblfish.net/
>> 
> 

Social Web Architect
http://bblfish.net/

Received on Friday, 14 March 2014 18:46:58 UTC