On 2/10/2011 8:07 AM, Wolfgang Laun wrote:


On 9 February 2011 22:11, Edson Tirelli <ed.tire...@gmail.com <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. 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 <http://www.w3.org/TR/2010/REC-rif-prd-20100622/#Semantics-preserving_transformations>. 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


       Edson

    2011/2/9 <p...@agh.edu.pl <mailto:p...@agh.edu.pl>>

        Mark, Andrew, Guys,

        Yes working with DRL may be better for Drools indeed. But the
        only way I
        see this working is by implementing this directly in the code
        of Drools.
        That's not practical for me, hence I "simply" export/import
        the rules
        in/from XML. This way I can focus on the translation.

        If someone would give me pointers on an easy way to work with
        DRL, I'd do
        that of course.

        I assume you already had discussions on XML (or anything more
        structured
        and widely spread than DRL) as working format so I won't be
        going there :)

        All the best,
        Pierre


        On 09/02/2011 16:46, Mark Proctor wrote:
        > On 09/02/2011 08:40, pdl at agh.edu.pl <http://agh.edu.pl>
        wrote:
        >> Hi all,
        >>
        >> I've been working on translators between RIF-PRD, DroolsML
        and JessML.
        >> I've put the translators in the form of XSLT stylesheets on the
        following
        >> web site along with samples of rules written in the above
        languages. I
        >> would greatly appreciate feedback/comments/tips/help on
        making these
        >> translators more reliable and accurate.
        >>
        >> Web site: yieldrif (dot) appspot (dot) com  (in case emails
        containing
        >> URLs are bounced off)
        >>
        >> Please note that this is free hosting and has some
        limitations. Feel
        free
        >> to add/comment content on this web site or drop me a line.
        What would
        be
        >> really helpful is a XML Schema for DroolsML and also the
        rhs to be in
        XML
        >> as opposed to drools code.
        > Is this converting to Drools DRL? or to our deprecate,
        unmaintained, out
        > of date and very old XML?
        Sorry someone just read that sentence back to me, and it
        probably read
        very wrong.

        Let me start again. First up great work, it's good to see any
        interchange work happening, it's not easy stuff. And I can't
        wait for us
        to figure out how to get this working directly against our
        more recent
        DRL :)

        Mark
        > Mark
        >> I look forward to hearing from you,
        >> Pierre
        >> _______________________________________________
        >> rules-dev mailing list
        >> rules-dev at lists.jboss.org <http://lists.jboss.org>
        >> https://lists.jboss.org/mailman/listinfo/rules-dev
        >>
        >>
        >
        > _______________________________________________
        > rules-dev mailing list
        > rules-dev at lists.jboss.org <http://lists.jboss.org>
        > https://lists.jboss.org/mailman/listinfo/rules-dev
        >
        >

        _______________________________________________
        rules-dev mailing list
        rules-dev@lists.jboss.org <mailto:rules-dev@lists.jboss.org>
        https://lists.jboss.org/mailman/listinfo/rules-dev




-- Edson Tirelli
      JBoss Drools Core Development
      JBoss by Red Hat @ www.jboss.com <http://www.jboss.com>

    _______________________________________________
    rules-dev mailing list
    rules-dev@lists.jboss.org <mailto:rules-dev@lists.jboss.org>
    https://lists.jboss.org/mailman/listinfo/rules-dev



_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Reply via email to