Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] SWRL: Problem with swrlx:createOWLThing and differentFrom

Tobias Neumann neumannto at web.de
Tue Aug 14 03:00:21 PDT 2007


Hi,

I've a curious problem using swrlx:createOWLThing and differentFrom.

I created a sample ontology, only containing a class "Node" and two 
properties: "directConnection" and "indirectConnection", both with domain and 
range Node.

I created 6 individuals, N1, N2, ..., N6, all marked as owl:allDifferent. The 
properties are assigned as followed:

directConnection (N1,N2), directConnection (N2,N1), directConnection (N2,N3)
directConnection (N4,N5), directConnection (N5,N6)

I use the following SWRL-rule to determine the "indirectConnection":

directConnection (?x,?y) ^ directConnection (?y,?z) ^ differentFrom (?x,?z) -> 
indirectConnection (?x,?z)

That works fine, I get indirectConnection (N4,N6) and indirectConnection 
(N1,N3).

The problem arises when I want to create also a new individual with that rule. 
I added to the ontology a class "Pool" and a property "hasPool" with 
domain "Node" and range "Pool".
I want to create a new individual of that class for each "indirectConnection", 
using the following SWRL-rule:

directConnection (?x,?y) ^ directConnection (?y,?z) ^ differentFrom (?x,?z) ^ 
swrlx:createOWLThing (?p,?x,?z) -> indirectConnection (?x,?z) ^ Pool(?p) ^ 
hasPool(?x,?p)

But this doesn't work correct. Unlike the first example, I get only 
indirectConnection (N1,N3) and the according new individual, but the other 
indirectConnection (N4,N6) is not deduced. Why?

Searching for the cause, I removed differentFrom from the SWRL-rule:

directConnection (?x,?y) ^ directConnection (?y,?z) ^ 
swrlx:createOWLThing(?p,?x,?z) -> indirectConnection (?x,?z) ^ Pool(?p) ^ 
hasPool(?x,?p)

Then I get indirectConnection (N1,N3) and (N4,N6), but of cause also 
indirectConnection (N1,N1) and indirectConnection (N2,N2), which I want to 
prevent using differentFrom.

Is there a problem when combining differentFrom and swrlx:createOWLThing, or 
did I do something wrong? I'm using Protege 3.3, Build 414.

Thanks,
Tobias



More information about the protege-owl mailing list