SWRL Issue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SWRL Issue

Michael DeBellis-2
I decided to just take a quick and dirty first cut at a graph theory ontology and have come across something in SWRL I can't understand. I'm using Protege version 5.2.0 running on Windows 10 Home version 1803 and Java 8 Update 191. I'm using Pellet as my Reasoner. 

I'm attaching the ontology and a PDF that shows the tree graph I'm using as my first graph. 

I have a class called Edge that connects one node to another with properties fromNode and toNode. Then I defined a transitive property called hasSuccessor. My idea was to just use a SWRL rule to define the basic successors of nodes directly connected by an edge and then the fact that hasSuccessor is transitive will take care of the rest. So my rule is:

fromNode(?e1, ?n1) ^ toNode(?e1, ?n2) -> hasSuccessor(?n1, ?n2)

This seemed to work except for some reason SWRL doesn't seem to be picking up the first Edge: E1 that connects N1 and N2. I also ran a SQWRL rule: 

fromNode(?e1, ?n1) ^ toNode(?e1, ?n2) -> sqwrl:select(?n1, ?n2)  

And it fired for Edges 2-4 but not Edge 1. (Also, I'm getting that autogen0 prefix thing again but I don't think that effects the reasoning). 

Michael

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

Graph1.pdf (51K) Download Attachment
GraphTheoryOntology.owl (24K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: SWRL Issue

Jim Balhoff-3
Hi Michael,

I looked at your ontology and was perplexed for a little while, but then I noticed that E1 has NEGATIVE object property assertions to N1 and N2. :-)

Best regards,
Jim


> On Nov 29, 2018, at 12:41 PM, Michael DeBellis <[hidden email]> wrote:
>
> I decided to just take a quick and dirty first cut at a graph theory ontology and have come across something in SWRL I can't understand. I'm using Protege version 5.2.0 running on Windows 10 Home version 1803 and Java 8 Update 191. I'm using Pellet as my Reasoner.
>
> I'm attaching the ontology and a PDF that shows the tree graph I'm using as my first graph.
>
> I have a class called Edge that connects one node to another with properties fromNode and toNode. Then I defined a transitive property called hasSuccessor. My idea was to just use a SWRL rule to define the basic successors of nodes directly connected by an edge and then the fact that hasSuccessor is transitive will take care of the rest. So my rule is:
>
> fromNode(?e1, ?n1) ^ toNode(?e1, ?n2) -> hasSuccessor(?n1, ?n2)
>
> This seemed to work except for some reason SWRL doesn't seem to be picking up the first Edge: E1 that connects N1 and N2. I also ran a SQWRL rule:
>
> fromNode(?e1, ?n1) ^ toNode(?e1, ?n2) -> sqwrl:select(?n1, ?n2)  
>
> And it fired for Edges 2-4 but not Edge 1. (Also, I'm getting that autogen0 prefix thing again but I don't think that effects the reasoning).
>
> Michael
> <Graph1.pdf><GraphTheoryOntology.owl>_______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: SWRL Issue

Michael DeBellis-2
D'oH!   Can't believe I missed that. Thanks!!!

Michael

On Thu, Nov 29, 2018 at 9:58 AM Jim Balhoff <[hidden email]> wrote:
Hi Michael,

I looked at your ontology and was perplexed for a little while, but then I noticed that E1 has NEGATIVE object property assertions to N1 and N2. :-)

Best regards,
Jim


> On Nov 29, 2018, at 12:41 PM, Michael DeBellis <[hidden email]> wrote:
>
> I decided to just take a quick and dirty first cut at a graph theory ontology and have come across something in SWRL I can't understand. I'm using Protege version 5.2.0 running on Windows 10 Home version 1803 and Java 8 Update 191. I'm using Pellet as my Reasoner.
>
> I'm attaching the ontology and a PDF that shows the tree graph I'm using as my first graph.
>
> I have a class called Edge that connects one node to another with properties fromNode and toNode. Then I defined a transitive property called hasSuccessor. My idea was to just use a SWRL rule to define the basic successors of nodes directly connected by an edge and then the fact that hasSuccessor is transitive will take care of the rest. So my rule is:
>
> fromNode(?e1, ?n1) ^ toNode(?e1, ?n2) -> hasSuccessor(?n1, ?n2)
>
> This seemed to work except for some reason SWRL doesn't seem to be picking up the first Edge: E1 that connects N1 and N2. I also ran a SQWRL rule:
>
> fromNode(?e1, ?n1) ^ toNode(?e1, ?n2) -> sqwrl:select(?n1, ?n2) 
>
> And it fired for Edges 2-4 but not Edge 1. (Also, I'm getting that autogen0 prefix thing again but I don't think that effects the reasoning).
>
> Michael
> <Graph1.pdf><GraphTheoryOntology.owl>_______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user