From: Florian F. <flo...@st...> - 2008-07-30 13:51:09
|
Hi, what I mean is that after removing the axiom your example works just fine. The rest of your code also seems fine. I am pretty sure that this axiom: >> " axiom _# >> definedBy >> ?person[_"http://www.semantic-gov.org/Italy#hasCitizenship" >> hasValue ?cit] memberOf _"http://www.semantic-gov.org/Italy#Person" >> and ?cit = _"http://www.semantic-gov.org/Italy#belgianCitizenship"." is causing the problems (the unification). See http://www.wsmo.org/TR/d16/d16.1/v1.0/ definition 6.4, WSML-Rule logical expression. 1.) A head formula must not contain the unification operator (=). 2.) A formula alpha :- beta is a legal formula if alpha is in head and beta in body. 2.) The logic programming implication is not needed. If it is missing the formula is in head. Your axiom definition does not contain an implication but it contains the unification operator. So something in the axiom seems to be wrong. If this is carried over from a precondition of a capability then there might also be something wrong with the precondition. This is because the axiomdefinition, and more precisely the logical expression that is part of it (after the definedBy) that is part of the precondition has to obey the same rules and restrictions as any other axiom. If the axiom is really what you have in mind I would try rewritting it: ?person[_"http://www.semantic-gov.org/Italy#hasCitizenship" hasValue _"http://www.semantic-gov.org/Italy#belgianCitizenship"] memberOf _"http://www.semantic-gov.org/Italy#Person" Does this help you? Why this syntactic error in the axiom is not detected in wsmo4j before it is passed on to the reasoner is beyond me. Florian Wang, Xia wrote: > HI, dear Florian, > > I am so happy to hear from you. Thanks. > > It is a query for wsml web services. Problems are caused when I try to > get pre/postconditions from webserivices and transfer them to axioms, in > order to add into an ontology. The reasoner can not register the created > ontology. Error message includes "IS BOOLEAN", "Disjunction", or "IS > DECIMAL" ect. > For my case, the problem is because >> " axiom _# definedBy >> ?person[_"http://www.semantic-gov.org/Italy#hasCitizenship" hasValue ?cit] memberOf _"http://www.semantic-gov.org/Italy#Person" and ?cit = _"http://www.semantic-gov.org/Italy#belgianCitizenship"." > > causes "IS BOOLEAN" problem, the ontology can not register and the query > can not execute. > > Maybe "=, or" or any complex expression can not appear in the ontology. > So that do you know any way to transfer the pre/postconditions to axiom > with complex logicexpression, e.g, "age> 18"? > > By the way, > >>>> - What version of IRIS and respectively WSML2Reasoner are you using? > > I use the latest iris-20080604 and WSML2Reasoner20080218. > > - How does your java code look/how do you use WSML2Reasoner? > The code is as: > --------------------------------- > try { > Capability cap = serviceDescr.getCapability(); > > Set<Axiom> preSet = cap.listPreConditions(); > System.out.println("Precond " +preSet.size()); > if (preSet != null) > for (Axiom axiom : preSet) { > descr.addAxiom(axiom); > } > > } catch (InvalidModelException e) { > logger.error("Invalid model found on service or goal " > + serviceDescr.getIdentifier()); > e.printStackTrace();} > > return descr; //Ontology > } > > ------------------------------ > > > >>>> - What language variant is created ontology of? (Semantic-gov.org is > >>>> currently unreachable for some reason) I am slightly disturbed by the > >>>> unification operator ("=") in the axiom as that is not supposed to appear in the head of formula (in WSML-Flight and WSML-Rule) > >>>> Removing the axiom and trying the query you included gives me >>>> ?x _"http://www.semantic-gov.org/Italy#test" as result. > > I have removed the head of wsml-flight or wsml-rule to test. > > Still, my created ontology can not register. Do you have any > suggestions? > > Bests, > > Xia > > > > > > > -----Original Message----- > From: Florian Fischer [mailto:flo...@st...] Sent: 30 July 2008 11:51 > To: Wang, Xia > Cc: iri...@li... > Subject: Re: [iris-reasoner-support] Request for support > > Hi, > just a couple of quick questions: > - What version of IRIS and respectively WSML2Reasoner are you using? > - How does your java code look/how do you use WSML2Reasoner? > - What language variant is created ontology of? (Semantic-gov.org is currently unreachable for some reason) I am slightly disturbed by the unification operator ("=") in the axiom as that is not supposed to appear in the head of formula (in WSML-Flight and WSML-Rule) > > Removing the axiom and trying the query you included gives me > ?x > _"http://www.semantic-gov.org/Italy#test" > as result. > > Best, > Florian > > Wang, Xia wrote: >> Hi, dear guys, >> >> >> >> Can you give me any hint for my problems of IRIS reasoner. >> >> >> >> The following is the created ontology by merging the wsmo ontology and > >> its webservices ontology. >> >> >> >> Looking forward your help, >> >> >> >> xia >> >> > ------------------------------------------------------------------------ > - >> >> >> ontology _"http://www.wsmx.org/discovery/tempOntology-927853657218181538.wsml" >> >> >> >> importsOntology >> >> { _"http://www.semantic-gov.org/Belgium#GeaInstancesForPAServices", >> >> > _"http://www.wsmx.org/discovery/ontology-927853657218181539", >> > _"http://www.semantic-gov.org/Italy#PA_Turin_BelgiumChangeResidenceServi > ce_gea"} >> >> >> axiom _# >> >> definedBy >> >> ?person[_"http://www.semantic-gov.org/Italy#hasCitizenship" hasValue ?cit] memberOf _"http://www.semantic-gov.org/Italy#Person" >> >> and ?cit = _"http://www.semantic-gov.org/Italy#belgianCitizenship". >> >> >> >> instance _"http://www.semantic-gov.org/Italy#test" memberOf { _"http://www.semantic-gov.org/Italy#TurinPoliceService", _"http://www.semantic-gov.org/Ontologies/GEA#PublicService"} >> >> > _"http://www.semantic-gov.org/Ontologies/GEA#hasPublicServiceType" >> hasValue {_"http://www.semantic-gov.org/Belgium#ControlService", _"http://www.semantic-gov.org/Belgium#BelgianCitizenChangeResidence" } >> >> _"http://www.semantic-gov.org/Ontologies/GEA#hasPADomain" > hasValue >> {_"http://www.semantic-gov.org/Belgium#SecurityService", _"http://www.semantic-gov.org/Belgium#CitizenResidence" } >> >> _"http://www.semantic-gov.org/Ontologies/GEA#hasAdministrationLevel" hasValue {_"http://www.semantic-gov.org/Belgium#Local", _"http://www.semantic-gov.org/Belgium#European" } >> >> _"http://www.semantic-gov.org/Ontologies/GEA#hasLocation" > hasValue >> {_"http://www.semantic-gov.org/Belgium#PAServiceEntryPoint", _"http://www.semantic-gov.org/Belgium#NotAvailable" } >> >> _"http://www.semantic-gov.org/Ontologies/GEA#isGovernedByLaw" hasValue _"http://www.semantic-gov.org/Belgium#CivilCode_Art43" >> >> _"http://www.semantic-gov.org/Ontologies/GEA#hasEffectType" hasValue > _"http://www.semantic-gov.org/Belgium#UpdateResidenceInformation" >> >> >> >> >> -------The BaseOnto is ready and the query starts now! >> >> >> >> >> >> ****query is: >> >> ?x memberOf > _"http://www.semantic-gov.org/Ontologies/GEA#PublicService" . >> >> >> ???? > http://www.wsmx.org/discovery/tempOntology-927853657218181538.wsml >> _java.lang.IllegalArgumentException_: Can not evaluate a IS_BOOLEAN > with >> more than 0 variables (had 1). >> >> at org.deri.iris.builtins.AbstractBuiltin.evaluate(Unknown > Source) >> at org.deri.iris.rules.compiler.Builtin.process(Unknown Source) >> >> at org.deri.iris.rules.compiler.CompiledRule.evaluate(Unknown > Source) >> at > org.deri.iris.evaluation.seminaive.SemiNaiveEvaluator.evaluateRules(Unkn > own >> Source) >> >> at > org.deri.iris.evaluation.stratifiedbottomup.StratifiedBottomUpEvaluation > Strategy.<init>(Unknown >> Source) >> >> at > org.deri.iris.evaluation.stratifiedbottomup.StratifiedBottomUpEvaluation > StrategyFactory.createEvaluator(Unknown >> Source) >> >> at org.deri.iris.KnowledgeBase.<init>(Unknown Source) >> >> at > org.deri.iris.KnowledgeBaseFactory.createKnowledgeBase(Unknown >> Source) >> >> at > org.wsml.reasoner.builtin.iris.IrisFacade.register(_IrisFacade.java:401_ > ) >> at > org.wsml.reasoner.impl.DatalogBasedWSMLReasoner.registerOntologiesNoVeri > fication(_DatalogBasedWSMLReasoner.java:981_) >> at > org.wsml.reasoner.impl.DatalogBasedWSMLReasoner.registerOntologies(_Data > logBasedWSMLReasoner.java:674_) >> at > org.wsml.reasoner.impl.DatalogBasedWSMLReasoner.registerOntology(_Datalo > gBasedWSMLReasoner.java:670_) >> at newpa.CheckBaseOnto.executequery(_CheckBaseOnto.java:109_) >> >> at newpa.CheckBaseOnto.run(_CheckBaseOnto.java:84_) >> >> at newpa.Query.run(_Query.java:41_) >> >> at newpa.Test.main(_Test.java:21_) >> >> >> >> >> >> >> >> >> > ------------------------------------------------------------------------ >> > ------------------------------------------------------------------------ > - >> This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge >> Build the coolest Linux based applications with Moblin SDK & win great > prizes >> Grand prize is a trip for two to an Open Source event anywhere in the > world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> >> >> > ------------------------------------------------------------------------ >> _______________________________________________ >> iris-reasoner-support mailing list >> iri...@li... >> https://lists.sourceforge.net/lists/listinfo/iris-reasoner-support |