Michael DeBellis
2018-11-29 17:41:18 UTC
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
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