protegeproject / swrlapi

Java API for working with the SWRL rule and SQWRL query languages
Other
99 stars 40 forks source link

`swrlb:eval` built-in fails with decimal arguments #66

Open chcorbato opened 4 years ago

chcorbato commented 4 years ago

I think this is related to #39

Setup

Protege 5.5.0 SWRLTab Protege 5.0+ Plugin (2.0.6)

Problem

Using swrlb:eval seems to fail, see this swrl rule: tomasys:FunctionDesign(?fd) ^ abb_scenario3:fd_qa_energy(?fd, ?e) ^ abb_scenario3:fd_qa_safety(?fd, ?s) ^ abb_scenario3:fd_qa_performance(?fd, ?p) ^ swrlm:eval(?r, "(e+s+p)", ?e, ?s, ?p) -> abb_scenario3:fd_qa_tradeoff(?fd, ?r)

Exception

Exception running rule engine: error running Drools rule engine:
[Error: invoker.invoke("QA_tradeoff_avg", "swrlm:eval", 0, false, new VPATH(), new BAVNs("r", "", "e", "s", "p"), new UBA("r"), new L("(e+s+p)", "xsd:string"), $e, $s, $p): built-in exception thrown by built-in swrlm:eval in rule QA_tradeoff_avg: exception thrown by built-in swrlm:eval in rule QA_tradeoff_avg: exception processing expression '(e+s+p)': variable ?e with type xsd:decimal cannot be converted to xsd:double]
martinjoconnor commented 4 years ago

Does this happen in the latest 2.0.8 version? I think I fixed this.

chcorbato commented 4 years ago

Does this happen in the latest 2.0.8 version? I think I fixed this.

Thanks for your quick reply! Yes, just checked in 2.0.8 and I get the same error.