2017-04-08 2 views
0

Wissen Sie, wie Rekursion in SWRL zu übersetzen. Zum Beispiel diese Art von Prolog-Regeln: (ein Vorfahre ist ein Elternteil oder ein Vorfahre eines ElternteilRekursion: von Prolog zu SWRL

ancestor(X,Y):- parent (X,Y). 
ancestor(X,Y):- parent(X,Z), ancestor(Z,Y). 

Antwort

0

Im Wesentlichen SWRL ist Datalog Gerade umgekehrt Köpfe und Körper:..

hasParent(?x, ?y) -> hasAncestor(?x, ?y) 
hasAncestor(?y, ?z)^hasParent(?x, ?y) -> hasAncestor(?x, ?z) 

SWRLTab in Protégé:

swrltab

Initial ass ertions:

asserted

Inferred (via Pellet) Behauptungen:

inferred

Natürlich reine OWL Lösung existiert auch.