What about these DRL CEs and CE phrases:<br> forall<br> from<br> from collect<br> from accumulate with function<br> from accumulate with init/action/result<br><br>Then, some rule attributes<br> no-loop<br> agenda-group<br>
salience ( <expression> ) // not a *literal* expression<br><br>What about temporal operators and other CEP features?<br><br>And I'm not even going to be mean and discuss plugins such as user-defined evaluators<br>
or user-defined accumulate functions.<br><br><br>As for DRL in XML, one might simply add JAXB annotations to the classes representing a DRL Package and its constiuents. And then marshal and schemagen. Piece of cake, theoretically ;-)<br>
<br>-W<br><br><br><div class="gmail_quote">On 10 February 2011 10:21, <span dir="ltr"><<a href="mailto:pdl@agh.edu.pl">pdl@agh.edu.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Adrian, Wolfgang, all,<br>
<br>
I've had issues translating the RHS java code for instance (c.f. XSLT<br>
stylesheet).<br>
<br>
It would be nice to have the translation protocol to/from RIF provided<br>
with the specification, at least for the main rule engines.<br>
<br>
All the best,<br>
Pierre<br>
<div class="im"><br>
On 2/10/2011 8:07 AM, Wolfgang Laun wrote:<br>
<br>
<br>
</div> On 9 February 2011 22:11, Edson Tirelli <<a href="mailto:ed.tire...@gmail.com">ed.tire...@gmail.com</a><br>
<div class="im"><mailto:<a href="mailto:ed.tire...@gmail.com">ed.tire...@gmail.com</a>>> wrote:<br>
<br>
<br>
Pierre,<br>
<br>
Good to see works like yours being done.<br>
<br>
Drools has an internal canonical model that we use to round<br>
trip rules between the syntaxes we support. The best way of<br>
supporting "RIF" in Drools is to simply add a parser that parses<br>
RIF and populates the canonical model. From that we have a DRL<br>
"dumper" that generates DRL, enabling the RIF->DRL translation.<br>
Also, if we create a RIF "dumper", one can then generate RIF rules<br>
from the canonical model, enabling DRL->RIF translation. That<br>
assumes that there is a 1-to-1 semantic mapping between RIF and<br>
DRL (I believe there is, but didn't checked).<br>
<br>
<br>
<br>
</div><div class="im"> Do you mean that all of RIF can be expressed in DRL? Then I'd agree.<br>
But you can't express all of DRL in RIF.<br>
<br>
-W<br>
<br>
<br>
A translator RIF-PRD2DRL should be "conformant RIF-PRD consumer" as in the<br>
recommendation<br>
</div><<a href="http://www.w3.org/TR/2010/REC-rif-prd-20100622/#Semantics-preserving_transformations" target="_blank">http://www.w3.org/TR/2010/REC-rif-prd-20100622/#Semantics-preserving_transformations</a>>.<br>
<div class="im">A translator DRL2RIF-PRD should be a "conformant RIF-PRD producer".<br>
<br>
For example, a heuristic validation (test-based) may work in a<br>
"round-trip" i.e. take a Drools ruleset R, do R_RIF= DRL2RIF-PRD(R) then<br>
R1= RIF-PRD2DRL(R_RIF) and compare answers by running Drools on R and R1<br>
<br>
<br>
When Wolfgang said that not all Drools constructs can translate to RIF-PRD<br>
I assume he is thinking to some lets say "nonlogical" or "procedural"<br>
Drools constructs. However, because RIF can encode any partial recursive<br>
function, DRL2RIF should be always possible i.e. when translating a ruleset<br>
from Drools, one may obtain not only PR rules but, in addition some RIF-BLD<br>
rules too.<br>
<br>
Therefore I assume that there is very nice work to do.<br>
<br>
-.Adrian Giurca<br>
<br>
<br>
</div><div><div></div><div class="h5">_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</div></div></blockquote></div><br>