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