2017-04-08 127 views
0

你知道如何翻译SWRL中的递归吗?例如,这种类型的Prolog的规则:(祖先是父或母体的祖先递归:从Prolog到SWRL

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

回答

0

在本质上,SWRL是Datalog只需扭转头部和身体:。

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

SWRLTab在门徒新:

swrltab

初始屁股ertions:

asserted

推断(通过小球)的断言:

inferred

当然,纯OWL溶液同样存在。