There are metrics that can be applied to Java code (or the code of similar languages). Some of these metrics might be applied to the code of a rule's right hand side, although it should be noted that RHS code should not use conditional statements (if, switch, for) as this would undermine the general production rule principle of "LHS selects - RHS executes". Stringent coding rules would simply rule out if and switch for RHS code.<br>
<br>LHS code is written in an extended expression language. It's difficult to judge RHS code based on the frequency of CEs, on the quality of CEs and the number of constraints. There is one problem category I know that can be solved using a single rule with a fairly complex CE combination. <br>
<br>Nesting "from" or "accumulate" results (as might be expected) in complex and not too efficient rules, but that's to be expected, and, occasionally, it can't be helped.<br><br>What would your metrics be based on? Showing values in 3D may or may not be a boon, depending on what the dimensions stand for.<br>
<br>Typically, computing metrics results in values that alert you to expect more errors or higher meintencance effort due to complexity. Whether it's possible to express the same logic with rules with smaller "danger" metrics remains to be seen; sometimes it's possible by redesigning, i.e., what is a fact, how facts are linked to each other, etc.<br>
<br>-W<br><br><br><br><div class="gmail_quote">On 7 May 2012 15:38, Jackson Cunha <span dir="ltr"><<a href="mailto:jackson.cereb@gmail.com" target="_blank">jackson.cereb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<h3 style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;outline-width:0px;outline-style:initial;outline-color:initial;font-weight:inherit;font-size:16px;font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif;vertical-align:baseline;color:rgb(51,51,51)">
<span style="line-height:15px;color:rgb(0,0,0);font-size:13px">Hi for all and sorry for any duplication.</span><br style="line-height:15px;color:rgb(0,0,0);font-size:13px">
<br style="line-height:15px;color:rgb(0,0,0);font-size:13px"><span style="line-height:15px;color:rgb(0,0,0);font-size:13px">My team are starting a project where we will develop a tool to visualize metrics of a production rule base and show them in a 3D form.</span><br style="line-height:15px;color:rgb(0,0,0);font-size:13px">
<br style="line-height:15px;color:rgb(0,0,0);font-size:13px"><span style="line-height:15px;color:rgb(0,0,0);font-size:13px">Through this tool we want measure quality and conformity with good practices to help in detection of anomalies and ensure a good design of a knowledge base.</span><br style="line-height:15px;color:rgb(0,0,0);font-size:13px">
<br style="line-height:15px;color:rgb(0,0,0);font-size:13px"><span style="line-height:15px;color:rgb(0,0,0);font-size:13px">Other tools and studies already exists to visualize code and calculate metrics from java code. Examples are CodeCity (</span><a href="http://www.linkedin.com/redirect?url=http%3A%2F%2Fwww%2Einf%2Eusi%2Ech%2Fphd%2Fwettel%2Fcodecity%2Ehtml&urlhash=ZkiL&_t=tracking_anet" rel="nofollow" style="padding-right:0px;padding-left:0px;border-bottom-width:0px;padding-top:0px;outline-width:initial;border-style:initial;border-color:initial;margin-bottom:0px;padding-bottom:0px;border-top-width:0px;vertical-align:baseline;line-height:15px;outline-style:none;margin-right:0px;color:rgb(0,102,153);outline-color:initial;font-size:13px;margin-left:0px;border-right-width:0px;text-decoration:none;margin-top:0px;border-left-width:0px" target="_blank">http://www.inf.usi.ch/phd/wettel/codecity.html</a><span style="line-height:15px;color:rgb(0,0,0);font-size:13px">), where java code is visualized using a city metaphor and Sonar where metrics are extracted from source code to help in code quality assurance (</span><a href="http://www.linkedin.com/redirect?url=http%3A%2F%2Fnemo%2Esonarsource%2Eorg%2Fdashboard%2Findex%2F327690&urlhash=DS1_&_t=tracking_anet" rel="nofollow" style="padding-right:0px;padding-left:0px;border-bottom-width:0px;padding-top:0px;outline-width:initial;border-style:initial;border-color:initial;margin-bottom:0px;padding-bottom:0px;border-top-width:0px;vertical-align:baseline;line-height:15px;outline-style:none;margin-right:0px;color:rgb(0,102,153);outline-color:initial;font-size:13px;margin-left:0px;border-right-width:0px;text-decoration:none;margin-top:0px;border-left-width:0px" target="_blank">http://nemo.sonarsource.org/dashboard/index/327690</a><span style="line-height:15px;color:rgb(0,0,0);font-size:13px">).</span><br style="line-height:15px;color:rgb(0,0,0);font-size:13px">
<br style="line-height:15px;color:rgb(0,0,0);font-size:13px"><span style="line-height:15px;color:rgb(0,0,0);font-size:13px">So, my questions is:</span><br style="line-height:15px;color:rgb(0,0,0);font-size:13px">
<span style="line-height:15px;color:rgb(0,0,0);font-size:13px">1 - How much relevant you think this idea is?</span><br style="line-height:15px;color:rgb(0,0,0);font-size:13px">
<span style="line-height:15px;color:rgb(0,0,0);font-size:13px">2 - You know about other research in this area?</span><br style="line-height:15px;color:rgb(0,0,0);font-size:13px">
<br style="line-height:15px;color:rgb(0,0,0);font-size:13px"><span style="line-height:15px;color:rgb(0,0,0);font-size:13px">Thanks in advance.</span><span class="HOEnZb"><font color="#888888">
</font></span></h3><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br>----------------------------------------------------------------------------------------------------------------<br>Jackson Cunha Cassimiro (CereB)<br>
Bacharel em Ciencia da Computação - UFPI<br>
MSN: <a href="mailto:jackson.cereb@gmail.com" target="_blank">jackson.cereb@gmail.com</a><br>Telefone Móvel <a href="tel:%2B55%2086%209928%201251" value="+558699281251" target="_blank">+55 86 9928 1251</a><br>Analista de Sistemas - Infoway - <a href="http://www.infoway-pi.com.br" target="_blank">http://www.infoway-pi.com.br</a><br>
Missão Infoway - "Influenciar a Gestão de Sistemas de Saúde através de e-health"<br><br>("A vida é um combate que os fracos abate, aos bravos, aos fortes só pode exaltar" - Canção do Tamoio, Gonçalves Dias)<br>
----------------------------------------------------------------------------------------------------------------<br>
</font></span><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>