<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 2/10/2011 8:07 AM, Wolfgang Laun wrote:
<blockquote
cite="mid:AANLkTi=7Zr+kD+4oej4gd1gBPh46q+k69wM6G2arMd2v@mail.gmail.com"
type="cite"><br>
<br>
<div class="gmail_quote">On 9 February 2011 22:11, Edson Tirelli <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:ed.tirelli@gmail.com">ed.tirelli@gmail.com</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;">
<div><br>
</div>
<div> Pierre,</div>
<div><br>
</div>
<div> Good to see works like yours being done. </div>
<div><br>
</div>
<div> 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).</div>
</blockquote>
<div><br>
Do you mean that all of RIF can be expressed in DRL? Then I'd
agree. But you can't express all of DRL in RIF.<br>
-W<br>
<br>
</div>
</div>
</blockquote>
A translator RIF-PRD2DRL should be "<span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0);
font-family: 'Times New Roman'; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px; font-size:
medium;"><span class="Apple-style-span" style="font-family:
sans-serif;">conformant RIF-PRD consumer</span></span>" as in
the <a
href="http://www.w3.org/TR/2010/REC-rif-prd-20100622/#Semantics-preserving_transformations">recommendation</a>.
A translator DRL2RIF-PRD should be <span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0);
font-family: 'Times New Roman'; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px; font-size:
medium;"><span class="Apple-style-span" style="font-family:
sans-serif;">a "conformant RIF-PRD producer".<br>
<br>
For example, a heuristic validation (test-based) may work in a
"round-trip" i.e. take a Drools ruleset R, do </span></span>R_RIF=
DRL2RIF-PRD(R) then 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 I assume he is thinking to some lets say "nonlogical" or
"procedural" Drools constructs.<br>
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. <br>
Therefore I assume that there is very nice work to do.<br>
<br>
<span class="Apple-style-span" style="border-collapse: separate;
color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; font-size: medium;"><span
class="Apple-style-span" style="font-family: sans-serif;">-.Adrian
Giurca<br>
</span></span>
<blockquote
cite="mid:AANLkTi=7Zr+kD+4oej4gd1gBPh46q+k69wM6G2arMd2v@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left: 1px solid
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">
<div><br>
</div>
<div> Edson</div>
<div><br>
</div>
<div> </div>
<div class="gmail_quote">2011/2/9 <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:pdl@agh.edu.pl"
target="_blank">pdl@agh.edu.pl</a>></span>
<div>
<div class="h5">
<br>
<blockquote class="gmail_quote" style="border-left: 1px
solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex;
padding-left: 1ex;">
Mark, Andrew, Guys,<br>
<br>
Yes working with DRL may be better for Drools indeed.
But the only way I<br>
see this working is by implementing this directly in
the code of Drools.<br>
That's not practical for me, hence I "simply"
export/import the rules<br>
in/from XML. This way I can focus on the translation.<br>
<br>
If someone would give me pointers on an easy way to
work with DRL, I'd do<br>
that of course.<br>
<br>
I assume you already had discussions on XML (or
anything more structured<br>
and widely spread than DRL) as working format so I
won't be going there :)<br>
<br>
All the best,<br>
Pierre<br>
<br>
<br>
On 09/02/2011 16:46, Mark Proctor wrote:<br>
> On 09/02/2011 08:40, pdl at <a
moz-do-not-send="true" href="http://agh.edu.pl"
target="_blank">agh.edu.pl</a> wrote:<br>
>> Hi all,<br>
>><br>
>> I've been working on translators between
RIF-PRD, DroolsML and JessML.<br>
>> I've put the translators in the form of XSLT
stylesheets on the<br>
following<br>
>> web site along with samples of rules written
in the above languages. I<br>
>> would greatly appreciate
feedback/comments/tips/help on making these<br>
>> translators more reliable and accurate.<br>
>><br>
>> Web site: yieldrif (dot) appspot (dot) com
(in case emails containing<br>
>> URLs are bounced off)<br>
>><br>
>> Please note that this is free hosting and has
some limitations. Feel<br>
free<br>
>> to add/comment content on this web site or
drop me a line. What would<br>
be<br>
>> really helpful is a XML Schema for DroolsML
and also the rhs to be in<br>
XML<br>
>> as opposed to drools code.<br>
> Is this converting to Drools DRL? or to our
deprecate, unmaintained, out<br>
> of date and very old XML?<br>
Sorry someone just read that sentence back to me, and
it probably read<br>
very wrong.<br>
<br>
Let me start again. First up great work, it's good to
see any<br>
interchange work happening, it's not easy stuff. And I
can't wait for us<br>
to figure out how to get this working directly against
our more recent<br>
DRL :)<br>
<br>
Mark<br>
> Mark<br>
>> I look forward to hearing from you,<br>
>> Pierre<br>
>>
_______________________________________________<br>
>> rules-dev mailing list<br>
>> rules-dev at <a moz-do-not-send="true"
href="http://lists.jboss.org" target="_blank">lists.jboss.org</a><br>
>> <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-dev"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
>><br>
>><br>
><br>
> _______________________________________________<br>
> rules-dev mailing list<br>
> rules-dev at <a moz-do-not-send="true"
href="http://lists.jboss.org" target="_blank">lists.jboss.org</a><br>
> <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-dev"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
><br>
><br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-dev@lists.jboss.org"
target="_blank">rules-dev@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-dev"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</blockquote>
</div>
</div>
</div>
<font color="#888888"><br>
<br clear="all">
<br>
-- <br>
Edson Tirelli<br>
JBoss Drools Core Development<br>
JBoss by Red Hat @ <a moz-do-not-send="true"
href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
</font><br>
_______________________________________________<br>
rules-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-dev"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br>
</blockquote>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>