<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> <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> <BR>
<SPAN class=hps closure_uid_4v3r4v="8641" Pc="null">> when<BR>> $p : Product( color == "red", country == "Italy", $x : price )<BR>> then<BR>> $p.setPrice( $x * 0.75 )<BR>> 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> <SPAN class=hps closure_uid_4v3r4v="8645" Pc="null">from the 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> <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> <BR>
<DIV>
<DIV id=SkyDrivePlaceholder></DIV>> Date: Mon, 2 Jan 2012 03:23:51 -0800<BR>> From: dsotty@gmail.com<BR>> To: rules-users@lists.jboss.org<BR>> Subject: Re: [rules-users] Extracting management information from the content of the rules<BR>> <BR>> Out of curiosity, I'd like to better understand the requirements. Are we<BR>> talking about rules of the form:<BR>> <BR>> when<BR>> Product( color == "red", country == "Italy", discount > 10 )<BR>> then<BR>> ...<BR>> end<BR>> <BR>> i.e., the discount is stored in some field and constrained by the rules?<BR>> <BR>> or<BR>> <BR>> when<BR>> $p : Product( color == "red", country == "Italy", $x : price )<BR>> then<BR>> $p.setPrice( $x * 0.75 )<BR>> end <BR>> <BR>> More properly, the questions are : 1) is the discount given or computed? 2)<BR>> is it available (or can be stored) in some data field or is it "transient" ?<BR>> <BR>> The RHS of a rule is a sort of "black box" which is more difficult to reason<BR>> against, so you'll probably need some kind of reified discount:<BR>> <BR>> when<BR>> $p : Product( color == "red", country == "Italy" )<BR>> then<BR>> insertLogical( new Discount( $p, 0.75 ) );<BR>> end <BR>> <BR>> -----------------------------------------------------------------------------------------------------------------<BR>> <BR>> This said, there is a final, more important question. Are you interested in<BR>> a report describing the <BR>> characteristics of the objects which were discounted?<BR>> For example, you have 1000 discounted products in your system and you want<BR>> to find a "POSTERIOR"<BR>> correlation between their features and the discount they got. This is the<BR>> kind of problems that <BR>> are solved by data mining techniques, e.g. CARTs (classification and<BR>> regression trees), Association Rules (not the rules we're used to !!) or<BR>> Clustering algorithms<BR>> <BR>> If instead you want to reason abstractly, using the definitions contained in<BR>> the rules' LHSs to understand which classes of objects COULD receive some<BR>> kind of discount, that's a kind of "semantic" problem and I guess that some<BR>> tableau-like technique could help.<BR>> <BR>> This to say that, according to the exact type of "reporting" that you want<BR>> to build, the "rules" you'd have to write might vary quite a lot.<BR>> <BR>> Best<BR>> Davide<BR>> <BR>> --<BR>> 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>> Sent from the Drools: User forum mailing list archive at Nabble.com.<BR>> _______________________________________________<BR>> rules-users mailing list<BR>> rules-users@lists.jboss.org<BR>> https://lists.jboss.org/mailman/listinfo/rules-users<BR></DIV>                                            </div></body>
</html>