<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<SPAN class=hps closure_uid_4v3r4v="8637" Pc="null">Hi,</SPAN><BR>
<SPAN class=hps closure_uid_4v3r4v="8637" Pc="null"></SPAN>&nbsp;<BR>
<SPAN class=hps closure_uid_4v3r4v="8637" Pc="null">the rules that</SPAN> <SPAN class=hps closure_uid_4v3r4v="8638" Pc="null">are working</SPAN> <SPAN class=hps closure_uid_4v3r4v="8639" Pc="null">are similar to your</SPAN> <SPAN class=hps closure_uid_4v3r4v="8640" Pc="null">second</SPAN> <SPAN class=hps closure_uid_4v3r4v="8641" Pc="null">example ...</SPAN><BR>
<SPAN class=hps closure_uid_4v3r4v="8641" Pc="null"></SPAN>&nbsp;<BR>
<SPAN class=hps closure_uid_4v3r4v="8641" Pc="null">&gt;&nbsp;when<BR>&gt; $p : Product( color == "red", country == "Italy", $x : price )<BR>&gt; then<BR>&gt; $p.setPrice( $x * 0.75 )<BR>&gt; end </SPAN><BR>
<BR closure_uid_4v3r4v="8699" Pc="null"><BR closure_uid_4v3r4v="8700" Pc="null"><SPAN class=hps closure_uid_4v3r4v="8642" Pc="null">and the types</SPAN> <SPAN class=hps closure_uid_4v3r4v="8643" Pc="null">of reports that</SPAN> <SPAN class=hps closure_uid_4v3r4v="8644" Pc="null">we need to extract</SPAN>&nbsp;<SPAN class=hps closure_uid_4v3r4v="8645" Pc="null">from the&nbsp;rules</SPAN> <SPAN class=hps closure_uid_4v3r4v="8646" Pc="null">are, as</SPAN> <SPAN class=hps closure_uid_4v3r4v="8647" Pc="null">you set,</SPAN> "<SPAN class=hps closure_uid_4v3r4v="8648" Pc="null">abstract",</SPAN> <SPAN class=hps closure_uid_4v3r4v="8649" Pc="null">using</SPAN> <SPAN class=hps closure_uid_4v3r4v="8650" Pc="null">the</SPAN> <SPAN class=hps closure_uid_4v3r4v="8651" Pc="null">definitions</SPAN> <SPAN class=hps closure_uid_4v3r4v="8652" Pc="null">contained</SPAN> <SPAN class=hps closure_uid_4v3r4v="8653" Pc="null">in the</SPAN> <SPAN class=hps closure_uid_4v3r4v="8654" Pc="null">rules'</SPAN> <SPAN class=hps closure_uid_4v3r4v="8655" Pc="null">LHSs</SPAN> <SPAN class=hps closure_uid_4v3r4v="8656" Pc="null">to</SPAN> <SPAN class=hps closure_uid_4v3r4v="8657" Pc="null">Understand</SPAN> <SPAN class=hps closure_uid_4v3r4v="8658" Pc="null">Which</SPAN> <SPAN class=hps closure_uid_4v3r4v="8659" Pc="null">classes</SPAN> <SPAN class=hps closure_uid_4v3r4v="8660" Pc="null">of</SPAN> <SPAN class=hps closure_uid_4v3r4v="8661" Pc="null">objects</SPAN> c<SPAN class=hps closure_uid_4v3r4v="8662" Pc="null">ould</SPAN> <SPAN class=hps closure_uid_4v3r4v="8663" Pc="null">receive</SPAN> <SPAN class=hps closure_uid_4v3r4v="8664" Pc="null">some</SPAN> <SPAN class=hps closure_uid_4v3r4v="8665" Pc="null">kind</SPAN> <SPAN class=hps closure_uid_4v3r4v="8666" Pc="null">of</SPAN> <SPAN class=hps closure_uid_4v3r4v="8667" Pc="null">discount.</SPAN><BR closure_uid_4v3r4v="8701" Pc="null"><BR closure_uid_4v3r4v="8702" Pc="null"><SPAN class=hps closure_uid_4v3r4v="8668" Pc="null">What we</SPAN> <SPAN class=hps closure_uid_4v3r4v="8669" Pc="null">really need</SPAN> <SPAN class=hps closure_uid_4v3r4v="8670" Pc="null">to</SPAN> <SPAN class=hps closure_uid_4v3r4v="8671" Pc="null">know</SPAN> <SPAN class=hps closure_uid_4v3r4v="8672" Pc="null">if</SPAN>&nbsp;<SPAN class=hps closure_uid_4v3r4v="8673" Pc="null">its</SPAN> p<SPAN class=hps closure_uid_4v3r4v="8674" Pc="null">ossible to</SPAN> <SPAN class=hps closure_uid_4v3r4v="8675" Pc="null">extract</SPAN> <SPAN class=hps closure_uid_4v3r4v="8676" Pc="null">this information</SPAN> <SPAN class=hps closure_uid_4v3r4v="8677" Pc="null">in a structured way</SPAN> <SPAN class=hps closure_uid_4v3r4v="8678" Pc="null">...</SPAN> <SPAN class=hps closure_uid_4v3r4v="8679" Pc="null">Is there an API or software for that?</SPAN><SPAN class=hps closure_uid_4v3r4v="8687" Pc="null"></SPAN> <SPAN class=hps closure_uid_4v3r4v="8688" Pc="null">Some</SPAN> <SPAN class=hps closure_uid_4v3r4v="8689" Pc="null"><SPAN class="hps alt-edited" closure_uid_4v3r4v="8689" Pc="null">mentioned </SPAN>the</SPAN> <SPAN class=hps closure_uid_4v3r4v="8690" Pc="null">drools</SPAN><SPAN class=atn closure_uid_4v3r4v="8691" Pc="null">-</SPAN><SPAN closure_uid_4v3r4v="8692" Pc="null">verifier</SPAN> <SPAN class=hps closure_uid_4v3r4v="8693" Pc="null">API, but</SPAN> <SPAN class=hps closure_uid_4v3r4v="8694" Pc="null">from what I understand</SPAN> <SPAN class=hps closure_uid_4v3r4v="8695" Pc="null">many modifications</SPAN> <SPAN class=hps closure_uid_4v3r4v="8696" Pc="null">would be necessary, if its <SPAN class=hps closure_uid_4v3r4v="9335" Pc="null">possible at all...</SPAN><BR closure_uid_4v3r4v="9342" Pc="null"><BR closure_uid_4v3r4v="9343" Pc="null"></SPAN><BR closure_uid_4v3r4v="8704" Pc="null"><SPAN class=hps closure_uid_4v3r4v="8697" Pc="null">Thank you,</SPAN><BR>
<SPAN class=hps closure_uid_4v3r4v="8697" Pc="null">Henrique</SPAN><BR>&nbsp;<BR>
<DIV>
<DIV id=SkyDrivePlaceholder></DIV>&gt; Date: Mon, 2 Jan 2012 03:23:51 -0800<BR>&gt; From: dsotty@gmail.com<BR>&gt; To: rules-users@lists.jboss.org<BR>&gt; Subject: Re: [rules-users] Extracting management information from the content of the rules<BR>&gt; <BR>&gt; Out of curiosity, I'd like to better understand the requirements. Are we<BR>&gt; talking about rules of the form:<BR>&gt; <BR>&gt; when<BR>&gt; Product( color == "red", country == "Italy", discount &gt; 10 )<BR>&gt; then<BR>&gt; ...<BR>&gt; end<BR>&gt; <BR>&gt; i.e., the discount is stored in some field and constrained by the rules?<BR>&gt; <BR>&gt; or<BR>&gt; <BR>&gt; when<BR>&gt; $p : Product( color == "red", country == "Italy", $x : price )<BR>&gt; then<BR>&gt; $p.setPrice( $x * 0.75 )<BR>&gt; end <BR>&gt; <BR>&gt; More properly, the questions are : 1) is the discount given or computed? 2)<BR>&gt; is it available (or can be stored) in some data field or is it "transient" ?<BR>&gt; <BR>&gt; The RHS of a rule is a sort of "black box" which is more difficult to reason<BR>&gt; against, so you'll probably need some kind of reified discount:<BR>&gt; <BR>&gt; when<BR>&gt; $p : Product( color == "red", country == "Italy" )<BR>&gt; then<BR>&gt; insertLogical( new Discount( $p, 0.75 ) );<BR>&gt; end <BR>&gt; <BR>&gt; -----------------------------------------------------------------------------------------------------------------<BR>&gt; <BR>&gt; This said, there is a final, more important question. Are you interested in<BR>&gt; a report describing the <BR>&gt; characteristics of the objects which were discounted?<BR>&gt; For example, you have 1000 discounted products in your system and you want<BR>&gt; to find a "POSTERIOR"<BR>&gt; correlation between their features and the discount they got. This is the<BR>&gt; kind of problems that <BR>&gt; are solved by data mining techniques, e.g. CARTs (classification and<BR>&gt; regression trees), Association Rules (not the rules we're used to !!) or<BR>&gt; Clustering algorithms<BR>&gt; <BR>&gt; If instead you want to reason abstractly, using the definitions contained in<BR>&gt; the rules' LHSs to understand which classes of objects COULD receive some<BR>&gt; kind of discount, that's a kind of "semantic" problem and I guess that some<BR>&gt; tableau-like technique could help.<BR>&gt; <BR>&gt; This to say that, according to the exact type of "reporting" that you want<BR>&gt; to build, the "rules" you'd have to write might vary quite a lot.<BR>&gt; <BR>&gt; Best<BR>&gt; Davide<BR>&gt; <BR>&gt; --<BR>&gt; View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Extracting-management-information-from-the-content-of-the-rules-tp3625961p3626354.html<BR>&gt; Sent from the Drools: User forum mailing list archive at Nabble.com.<BR>&gt; _______________________________________________<BR>&gt; rules-users mailing list<BR>&gt; rules-users@lists.jboss.org<BR>&gt; https://lists.jboss.org/mailman/listinfo/rules-users<BR></DIV>                                               </div></body>
</html>