On Tue, 2011-09-13 at 16:25 +0000, David Jordan wrote: 
> The "bounding expression" would be the fact that we were doing an 
> intersection with A at a higher level. 

Yes.

> My question was whether there was any optimization that would take that into 
> account.

As I tried to say I'm guessing that for DL reasoners the answer is yes.
Not because there is some specific optimization for that but because the
reasoner is not trying to materialize the complementOf at all but trying
to work out the circumstances under which the A-B expression is true.

> I don't fully follow everything you are saying...

Sorry about that.

> A few questions:
> 1. Is there a way to compute set difference (A - B) ?

What do you mean by compute here?

As you've said yourself you can use the owl:intersectionOf and
owl:complementOf to do this and a reasoner that supports those (e.g.
Pellet) will do this.

You can clearly also compute set difference by:
   - SPARQL query
   - java code
   - rules

Depends whether your requirement is to retrieve the difference from a
Model or to declare a class relationship based on the set difference in
your ontology so it can be used in declaring further class relations.

> 2. Is there a way in a owl:Restriction on a property to state there are no 
> values from a set.
>       Essentially a negation on owl:someValuesFrom.

Just put the owl:complementOf of the class in your owl:someValuesFrom.

Dave

> I want to get all items that are have a property with values from A, but not 
> from B.
> 
> 
> -----Original Message-----
> From: Dave Reynolds [mailto:[email protected]] 
> Sent: Tuesday, September 13, 2011 3:52 AM
> To: [email protected]
> Subject: Re: set difference
> 
> On Mon, 2011-09-12 at 15:49 +0000, David Jordan wrote: 
> > I want to express set difference in OWL, I was a bit surprised that this is 
> > not directly supported.
> > I’d be interested in hearing whether the following would work, and how 
> > efficient it will be to compute.
> > Assume you have sets A and B.
> > I can define the union and intersection of A and B in OWL, we can call them 
> > AUB and AIB, respectively.
> > Then I am guessing that A – B would be defined as follows:
> > A_B owl:intersectionOf (
> >         A
> >         [ a owl:Class ; owl:complementOf AIB ] ).
> > 
> > My big concern is the computing of the owl:complementOf AIB.
> > Is the implementation going to take into account that the outer expression 
> > is doing an intersection with A, so that it strictly takes the elements in 
> > AIB and subtracts them from A?
> 
> In the case of Jena rules then irrelevant because we don't support 
> complementOf :)
> 
> For an mythical OWL full reasoner that attempted to aggressively materialize 
> inferences then the extension of the b-node would be part of the closure. But 
> in general you can't enumerate a complementOf anyway unless there is some 
> bounding expression (remember the Open World assumption).
> 
> For a DL reasoner that it should treat the b-node simply as syntax and will 
> be attempting to prove membership of the (A intersect (¬B)) expression. 
> 
> Dave
> 
> 
> 



Reply via email to