-- 作者: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>.
|