[RuleML-all] modeling the premisse A and B or C
Marco Ensing
l.a.marco at sbcglobal.net
Sat Jan 12 10:53:57 AST 2008
Hi Adrian,
Thanks for the research paper. That is a good read. We have been thinking
along similar lines.
We are currently discovering rule redundancies, inconsistencies and
incompleteness in a rule policy with the Rule Manager.
We have been working on a Test Case Driven Design for rule policies as well.
See
http://bizknowledge.blogspot.com/2007/06/test-suite-for-business-rules.html
but this has not been released in the product yet.
On the export; we can make it an option to export the model only with
conjunctive premises. Although every 'option' makes a product more difficult
to use. It is in conflict with our Simplicity design goal. It's always a
fine line to walk.
Marco
From: Adrian Paschke [mailto:adrian.paschke at biotec.tu-dresden.de]
Sent: Friday, January 11, 2008 9:03 AM
To: 'Marco Ensing'; david at dossot.net
Cc: ruleml-all at ruleml.org
Subject: AW: [RuleML-all] modeling the premisse A and B or C
Hi Marco,
Reaction RuleML supports both conjunctions and disjunctions in arbitrary
combinations, e.g.
IF a or b THEN c
<Rule style="reasoning"> <!-- derivation rule -->
<if>
<Or>
<Atom><Rel>a</Rel></Atom>
<Atom><Rel>b</Rel></Atom>
</Or>
</if>
<then>
<Atom><Rel>c</Rel></Atom>
</then>
</Rule>
I totally agree with you: on the PIM level a rule writer should not be
concerned with the intrinsic of different rule engines. The burden should be
on the translator from Reaction RuleML to the platform-specific execution
syntax. As I explained the translator needs to translate into a
disjunction-free format if the rule engine does not support disjunctions.
And, it possibly needs to do other refactorings of the rule base such as
removing redundancies or narrowing of the rule sets. Attached a paper where
we described a XP based technique for validating quality of rule bases and
gave several examples for refactorings of rule bases.
Cheers,
Adrian
_____
Von: Marco Ensing [mailto:l.a.marco at sbcglobal.net]
Gesendet: Freitag, 11. Januar 2008 17:05
An: 'Adrian Paschke'; david at dossot.net
Cc: ruleml-all at ruleml.org
Betreff: RE: [RuleML-all] modeling the premisse A and B or C
Hi Adrian,
Thank you for your reply. Am I correct to infer from your email that
Reaction RuleML does not support the single rule construct? (I know this is
logically incorrect J)
Personally I think that a rule writer should not be concerned with the
intrinsic of different rule engines.
Ideally a rule policy specified in a Rule Markup Language should be able to
execute on different RuleML compliant engines.
(Probably that is why semantics on simple mathematical operators like the
relational comparison '<', is also important)
One problem I see with splitting the rule is that rule auditing and rule
tracing from the execution environment will have to reverse this split. It
is also possible that this split into two rule implementations occurs inside
this platform-specific rule engine.
You probably know my view of the world; I always hope that a Business
Analyst / Business User can take the role of a Rule Engineer. It's a matter
of providing the necessary tools to guide them. E.g. a construction of 'if
(A and B) or A then ..' will be identified in the rule verification as an
anomaly.
For the time being we can let the RuleManager export two disjunct rules for
the Reaction RuleML format.
Regards,
Marco
From: Adrian Paschke [mailto:adrian.paschke at biotec.tu-dresden.de]
Sent: Friday, January 11, 2008 3:11 AM
To: david at dossot.net; 'Marco Ensing'
Cc: ruleml-all at ruleml.org
Subject: AW: [RuleML-all] modeling the premisse A and B or C
Hi Marco,
To some extend it is also a question of what kind of rule program the rule
engineer wants to write. If your platform-specific rule engine does not
support disjunction then you would need to translate a rule such as:
IF (A and B) or C THEN D
to two rules
IF A and B THEN D
IF C THEN D
That is, the translator from RuleML or Reaction RuleML needs to split a
disjunctive RuleML rule into two rules if the platform-specific rule engine
/ execution environment does not support disjunctions. But the engineer
might also avoid disjunctions and directly write two rules on the
platform-independent RuleML level.
Cheers, Adrian
_____
Von: ruleml-all-bounces at ruleml.org [mailto:ruleml-all-bounces at ruleml.org] Im
Auftrag von David Dossot
Gesendet: Donnerstag, 10. Januar 2008 19:31
An: Marco Ensing
Cc: ruleml-all at ruleml.org
Betreff: Re: [RuleML-all] modeling the premisse A and B or C
Marco,
Except the <Atom> element that you have put around the <Or> one, the single
implication is correct. Note that you can always validate RuleML with the
provided schemas, the gain confidence in the correctness of what you output.
Cheers,
David
On Jan 10, 2008 10:25 AM, Marco Ensing <l.a.marco at sbcglobal.net> wrote:
David,
Thank you for your quick reply. The extrapolation on the 'Or' was where I
was uncertain about.
To extend your referenced example with an or construct (expression in
italic):
The first rule implies that a person owns an object
if that person buys the object from a merchant
or that person inherited object from relatives and the person keeps the
object.
So would it be correct to generate:
<Implies>
<!-- explicit 'And' -->
<And>
<Atom>
<Or>
<Atom>
<Rel>buy</Rel>
<Var>person</Var>
<Var>merchant</Var>
<Var>object</Var>
</Atom>
<Atom>
<Rel>inherited</Rel>
<Var>person</Var>
<Var>relatives</Var>
<Var>object</Var>
</Atom>
</Or>
</Atom>
<Atom>
<Rel>keep</Rel>
<Var>person</Var>
<Var>object</Var>
</Atom>
</And>
<Atom>
<Rel>own</Rel>
<Var>person</Var>
<Var>object</Var>
</Atom>
</Implies>
Or must I generate two implies statements
<Implies>
<!-- explicit 'And' -->
<And>
<Atom>
<Rel>buy</Rel>
<Var>person</Var>
<Var>merchant</Var>
<Var>object</Var>
</Atom>
<Atom>
<Rel>keep</Rel>
<Var>person</Var>
<Var>object</Var>
</Atom>
</And>
<Atom>
<Rel>own</Rel>
<Var>person</Var>
<Var>object</Var>
</Atom>
</Implies>
<Implies>
<!-- explicit 'And' -->
<And>
<Atom>
<Rel>inherited</Rel>
<Var>person</Var>
<Var>relatives</Var>
<Var>object</Var>
</Atom>
<Atom>
<Rel>keep</Rel>
<Var>person</Var>
<Var>object</Var>
</Atom>
</And>
<Atom>
<Rel>own</Rel>
<Var>person</Var>
<Var>object</Var>
</Atom>
</Implies>
From: ddossot at gmail.com [mailto:ddossot at gmail.com] On Behalf Of David Dossot
Sent: Thursday, January 10, 2008 10:04 AM
To: Marco Ensing
Cc: ruleml-all at ruleml.org
Subject: Re: [RuleML-all] modeling the premisse A and B or C
Hi Marco,
This is great news! Thank you.
I will let experts reply for Reaction RuleML, but as far as NxBRE is
concerned, the syntax must be the one defined by the Naf Datalog
sub-language of RuleML 0.9.
Here is an example of:
IF (A and B)
THEN
D
--> http://www.ruleml.org/0.9/exa/own_compact.ruleml
You can easily extrapolated to adding an Or (by nesting XML elements).
Hope this helps,
David
On Jan 9, 2008 7:54 PM, Marco Ensing <l.a.marco at sbcglobal.net> wrote:
Hi All,
Currently we are exporting to the Reaction RuleML format from the Rule
Manager. This product is available for free from the website
www.acumenbusiness.com <http://www.acumenbusiness.com> . The trial period
to create rules and export them to
Reaction RuleML has been removed.
I was wondering what we should generate for the construction
IF (A and B) or C
THEN
D
How would this be expressed in RuleML 0.9 release (for NxBRE) or Reaction
Rules?
Can this be expressed in one <Rule> or does this require to generate
multiple rules?
You feedback is appreciated (and in return you will get a product with your
desired format)
Regards,
Marco Ensing
_______________________________________________
RuleML-all mailing list
RuleML-all at ruleml.org
http://mail.ruleml.org/mailman/listinfo/ruleml-all
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ruleml.org/pipermail/ruleml-all/attachments/20080112/88042890/attachment-0001.htm
More information about the RuleML-all
mailing list