<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
james is having problems, so thought I'd forward for him.<br>
<br>
Mark<br>
<blockquote cite="mid:6890BE1F-1A3F-4F39-A129-130B0BA172C3@att.net"
type="cite">
<div>
<div>
<blockquote type="cite">
<div style="margin: 0px;"><span
style="font-family: 'Helvetica'; font-size: medium;"><b>From: </b></span><span
style="font-family: 'Helvetica'; font-size: medium;">James Owen <<a
moz-do-not-send="true" href="mailto:jco2009@att.net">jco2009@att.net</a>><br>
</span></div>
<div style="margin: 0px;"><span
style="font-family: 'Helvetica'; font-size: medium;"><b>Date: </b></span><span
style="font-family: 'Helvetica'; font-size: medium;">June 16, 2009
6:11:52 PM CDT<br>
</span></div>
<div style="margin: 0px;"><span
style="font-family: 'Helvetica'; font-size: medium;"><b>To: </b></span><span
style="font-family: 'Helvetica'; font-size: medium;">Rules Dev List
<<a moz-do-not-send="true" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>><br>
</span></div>
<div style="margin: 0px;"><span
style="font-family: 'Helvetica'; font-size: medium;"><b>Subject: </b></span><span
style="font-family: 'Helvetica'; font-size: medium;"><b>Re:
[rules-dev] Debugging, Tracing and Visualization of rule execution</b><br>
</span></div>
<br>
<br>
<div style="">Greetings:
<div><br>
</div>
<div>Just a word and I'm not sure how to implement this: In OPSJ
Dr. Forgy implemented "flagged" IF conditional statements such as
(pseudo code)
<div><br>
</div>
<div>Rule_1</div>
<div>IF </div>
<div>[f1]<span class="Apple-tab-span" style="white-space: pre;"> </span>something1
happens</div>
<div>[f2]<span class="Apple-tab-span" style="white-space: pre;"> </span>something2
happens</div>
<div>[f3]<span class="Apple-tab-span" style="white-space: pre;"> </span>something3
happens</div>
<div>THEN<br>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>do
something</div>
<div>ELSE [f1] fails</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>report
why or do something</div>
<div>ELSE [f2] fails</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>report
why or do something</div>
<div>ELSE [f3] fails</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>report
why or do something</div>
<div>ELSE</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>do
the EHS of the rule<span class="Apple-tab-span"
style="white-space: pre;"> </span><br>
</div>
<div><br>
</div>
<div>This is pretty much what he calls "syntatic sugar" that you
can program in the code each time. BUT, he made it so the programmer
could easily check a rule (or all of them of so desired) to see why it
failed. I used it with great success on a couple of projects and
really, really miss it when programming in any other rulebased system.</div>
<div><br>
</div>
<div>Also, this is part of the very thing that Edson was
complaining about and I call a programmer's Beta-1 Error problem. It
didn't fire when it should have fired - so why didn't it? This would
help immensely. Surely, if one old man working in his 3rd floor attic
in Pittsburgh, PA, can implement this in his rulebase in just a couple
of days (I was there when he did it back in 1998), a whole cadre of
experienced Java programmers can implement it a world-class rulebase,
right?</div>
<div><br>
<div>
<div apple-content-edited="true"> <span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 18px; 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;">
<div style=""><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 18px; 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;">
<div style="">
<div>
<div style="">
<div style="">
<div style="">
<div style="">
<div style="">
<div style="">
<div style="">
<div style="">
<div style="">
<div style="">
<div style="">
<div style="">
<div>
<div>
<div>
<div>
<div>
<div>
<div>SDG</div>
<div>jco</div>
<div>"This above all: to thine own self be true,</div>
<div>
<div>And it must follow, as the night the day,</div>
<div>Thou canst not then be false to any man."</div>
<div>Hamlet, Act 1, Scene III</div>
<div><a moz-do-not-send="true"
href="http://www-tech.mit.edu/Shakespeare/hamlet/hamlet.1.3.html">http://www-tech.mit.edu/Shakespeare/hamlet/hamlet.1.3.html</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div><br>
</div>
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
<br>
<div>
<div>On Jun 16, 2009, at 5:29 PM, Mark Proctor wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 18px; 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;">
<div bgcolor="#ffffff" text="#000000">Daniel Gebler wrote:
<blockquote
cite="mid:000901c9eecb$ae8f2bc0$0bad8340$@gebler@fredhopper.com"
type="cite">
<div class="Section1">
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">For
our integration of Drools 5.0 we want to provide end users with limited
technical skills the possibility to debug, trace and visualize the rule
execution as well as the fact base.<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><o:p> </o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">Questions
that are frequently asked by users as well as by the development/qa
team:<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; font-size: 11pt; font-family: Calibri,sans-serif;"><span>-<span
style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;"> <span
class="Apple-converted-space"> </span></span></span>Did my rule r1
fire for this query?<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; font-size: 11pt; font-family: Calibri,sans-serif;"><span>-<span
style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;"> <span
class="Apple-converted-space"> </span></span></span>Why did rule r1
not fire (i.e. which constraint doesn’t match)?<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; font-size: 11pt; font-family: Calibri,sans-serif;"><span>-<span
style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;"> <span
class="Apple-converted-space"> </span></span></span>Which kind of rule
dependencies (chaining) do I have in my rule base? Rule r1 and r2 are
dependent iff action of r1 (e.g. publish a fact) makes constraint of r2
true.<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; font-size: 11pt; font-family: Calibri,sans-serif;"><span>-<span
style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;"> <span
class="Apple-converted-space"> </span></span></span>Which rules need
to fire in order to generate the additional fact f1 in the fact base?<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; font-size: 11pt; font-family: Calibri,sans-serif;"><span>-<span
style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;"> <span
class="Apple-converted-space"> </span></span></span>What is the
smallest change in the fact base (additional facts etc.) in order to
make rule r1 to fire (abduction)?<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><o:p> </o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">Problems:<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; font-size: 11pt; font-family: Calibri,sans-serif;"><span>-<span
style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;"> <span
class="Apple-converted-space"> </span></span></span>Eclipse plugin
doesn’t provide information of what didn’t happen and why it didn’t
happen ( ‘Audit’ view allows just tracking of positive cases, i.e. what
happened). Furthermore the stability of the eclipse plugin seems to be
limited.<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; font-size: 11pt; font-family: Calibri,sans-serif;"><span>-<span
style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;"> <span
class="Apple-converted-space"> </span></span></span>Integrating over
SPI doesn’t allow to show the Rete network because Rete view works only
with drl files<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; font-size: 11pt; font-family: Calibri,sans-serif;"><span>-<span
style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;"> <span
class="Apple-converted-space"> </span></span></span>How to provide
feedback to a normal end user of the search server (limited tech
skills) about rule-related information?<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><o:p> </o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">Solution
ideas/approaches + our assessment:<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; font-size: 11pt; font-family: Calibri,sans-serif;"><span>1.<span
style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;"> <span
class="Apple-converted-space"> </span></span></span>Use a run time
monitor providing on-demand log trace information when facts are being
published. The log trace provides the information about which and why
a particular constraint is or is not satisfied. Our initial
implementation uses an aspect oriented approach (JBoss AOP) to gather
relevant information. In detail: Our initial implementation uses an
aspect oriented approach (JBoss AOP) to gather the information by
intercepting EntryPointNode.assertObject(), and traversing the rete
network to collect the constraint information for every unique
alpha/join node. This will allow to visualize the log trace (GUI) and
interpret the trace in the context of our product. We discussed this
approached in #drools with Edson Tirelli and he was very interested.<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; font-size: 11pt; font-family: Calibri,sans-serif;"><span>2.<span
style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;"> <span
class="Apple-converted-space"> </span></span></span>Use drools
AgendaEventListener. Listener does not gets enough debug info exposed,
esp. we cannot extract the cause to reject a rule. Not enough
information available therefore this one is not an option.<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><o:p> </o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">Additionally,
it would be nice for our development to also visualize the Rete-OO
network, but that seems to be impossible when integrating drools
directly via the SPI classes. Is there a way to connect the viewer to a
network inside a running VM?</div>
</div>
</blockquote>
Constructing against the SPI instead of using DRL, you are scaring me
now?<br>
<br>
Mark<br>
<blockquote
cite="mid:000901c9eecb$ae8f2bc0$0bad8340$@gebler@fredhopper.com"
type="cite">
<div class="Section1">
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><o:p> </o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">We
would like to hear whether you know any other opinions, or have points
how to implement those features. Please share your experience how to
bridge the gap between end-users with limited technical backgrounds
expressing and investigating the rule inference.<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><o:p> </o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">Thanks,<o:p></o:p></div>
<div
style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">Daniel<o:p></o:p></div>
</div>
<pre wrap=""><hr size="4" width="90%">_______________________________________________
rules-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:rules-dev@lists.jboss.org"
style="color: blue; text-decoration: underline;">rules-dev@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://lists.jboss.org/mailman/listinfo/rules-dev"
style="color: blue; text-decoration: underline;">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
</blockquote>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a moz-do-not-send="true" href="mailto:rules-dev@lists.jboss.org"
style="color: blue; text-decoration: underline;">rules-dev@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-dev"
style="color: blue; text-decoration: underline;">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</div>
</span></blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>