W3C home > Mailing lists > Public > public-owl-dev@w3.org > July to September 2011

Re: checking data property on every individual in a transitive object property

From: Alan Rector <rector@cs.man.ac.uk>
Date: Mon, 11 Jul 2011 10:09:53 +0100
Cc: Jonathan Conrad <jcsneaker@googlemail.com>, public-owl-dev@w3.org
Message-Id: <716E84F6-0913-4C2B-AAB1-6FA1C0FE479F@cs.man.ac.uk>
To: Uli Sattler <sattler@cs.man.ac.uk>
Jonathan, Uli

(Uli, please check me if I am wrong)

It's a bit awkward, but I think you can do this with a variant of the the list pattern.  What you get is the class of lists from A that only have contents with max wt > 3.  There is a question of whether you want to make them terminated or not.

 The basic idea is the same as in LISP.  A list is really a cell with contents and a tail (i.e. the next cell) that can either be another cell or the empty list.

Every list has a contents (head) that is exactly one thing.

So a sketch would be something like: 

Class: List
Property: has_contents functional domain: List
Property: has_next functional domain:List
DatatypeProperty: hasMaxWt

List_via_3_plus ==
    List AND has_contents SOME (hasMaxWt some [>3]) AND
    has_next SOME (List_via_3_plus OR EmptyList)
 List_from_A_via_3_plus ==
    List THAT has_contents VALUE A AND
    has_next SOME List_via_3_plus 

Since has_next and has_contents are functional, the "ONLY" is implicit.
The "SOME" avoids trivial solutions in which there are cells with no contents.

Needs some tidying and I haven't had time to test this specific example, but variants work and have been used to do real work in molecular biology.  They aren't efficient, but they aren't as inefficient as they might look.  At one point we had an OWL plugin or similar for a sensible notation for lists but I think it has rusted away to nothing.
The results look horrible without some syntactic sugar 



> On 4 Jul 2011, at 20:23, Jonathan Conrad wrote:
>> hello everyone,
>> I want to model things being connected, ie reachable from each other.
>> For this i have a transitive "reachable" property which works fine alone.
>> For the reachability to be valid in certain cases i must also check if every individual in the transitive chain has a certain dataproperty like "canHoldMaximumWeight > 5".
>> Example:
>> A -reaches-> B -reaches-> C
>> A hasMaximumWeight 3
>> B hasMaximumWeight 2
>> C hasMaximumWeight 4
>> So i want to ask all individuals that are reachable from A, but only using individuals that can hold a weight of 3 or greater.
>> If i try to write this in DL: hasMaximumWeight some integer [>=3] and reaches some Thing.
> what happens if you add a conjunct with 'only'? Because, as you say, you want all individuals that are reachable from A, but only using individuals that, i.e., as
> hasMaximumWeight some integer [>=3] and
> hasMaximumWeight only integer [>=3] and reaches some Thing.
> now one thing that isn't clear is where the 'A' has gone in your query - that might need fixing. If you know about predicate logic, the 'some' is a (guarded) existential quantifier, and the 'only' a (guarded) universal one -- and your query clearly asks for at least the universal one.
> Cheers, Uli
>> I get the answer of C, but the only way to reach C is through B, which i want to exclude from the "transitivity" because of the weight issue
>> Is this possible in OWL (using Protege?)? Am I going all wrong about the modelling of this?
>> I have found property chains, but as far as i see i can only combine object properties this way and not mix them with data properties!?
>> Thanks,
>> Jonathan

Alan Rector
Professor of Medical Informatics
School of Computer Science
University of Manchester
Manchester M13 9PL, UK
TEL +44 (0) 161 275 6149/6188
FAX +44 (0) 161 275 6204
Received on Monday, 11 July 2011 09:10:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:20 UTC