以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  swrl jess  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=76606)


--  作者:ring333666
--  发布时间:9/5/2009 3:26:00 PM

--  swrl jess

swrl规则转换成jess规则时,当使用规则hasParent(Jack, Lily)  ∧  hasSibling(Lily, Jim)  ∧  hasSex(Jim, male) → hasUncle(Jack, Jim)会得出结论,但是把它改成hasParent(?x, ?y)  ∧  hasSibling(?y, ?z)  ∧  hasSex(?z, male) → hasUncle(?x, ?z),就会报错,好像不识别变量,就装换不成功,不知道怎么办,向高手请教一下


错误提示:
Exception importing SWRL rules and OWL knowledge: edu.stanford.smi.protegex.owl.swrl.bridge.jess.exceptions.SWRLJessBridgeException: Jess reported an error in routine HasLHS.addPattern.
  Message: Variable used before definition: http://www.
  Program text: ( defrule Rule-1 ( http://www.owl-ontologies.com/Ontology1230618200.owl#hasParent ?http://www.owl-ontologies.com/Ontology1230618200.owl#x ?http://www.owl-ontologies.com/Ontology1230618200.owl#y ) ( http://www.owl-ontologies.com/Ontology1230618200.owl#hasSibling ?http://www.owl-ontologies.com/Ontology1230618200.owl#y ?http://www.owl-ontologies.com/Ontology1230618200.owl#z ) ( http://www.owl-ontologies.com/Ontology1230618200.owl#hasSex ?http://www.owl-ontologies.com/Ontology1230618200.owl#z http://www.owl-ontologies.com/Ontology1230618200.owl#male ) = > ( assert ( http://www.owl-ontologies.com/Ontology1230618200.owl#hasUncle ?http://www.owl-ontologies.com/Ontology1230618200.owl#x ?http://www.owl-ontologies.com/Ontology1230618200.owl#z ) ) ( assertOWLProperty http://www.owl-ontologies.com/Ontology1230618200.owl#hasUncle ?http://www.owl-ontologies.com/Ontology1230618200.owl#x ?http://www.owl-ontologies.com/Ontology1230618200.owl#z ) )  at line 1 in file <eval pipe>.


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms