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.

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.

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.

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.

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.

-W



On 7 May 2012 15:38, Jackson Cunha <jackson.cereb@gmail.com> wrote:

Hi for all and sorry for any duplication.

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.

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.

Other tools and studies already exists to visualize code and calculate metrics from java code. Examples are CodeCity (http://www.inf.usi.ch/phd/wettel/codecity.html), where java code is visualized using a city metaphor and Sonar where metrics are extracted from source code to help in code quality assurance (http://nemo.sonarsource.org/dashboard/index/327690).

So, my questions is:
1 - How much relevant you think this idea is?
2 - You know about other research in this area?

Thanks in advance.


--
----------------------------------------------------------------------------------------------------------------
Jackson Cunha Cassimiro (CereB)
Bacharel em Ciencia da Computação - UFPI
MSN: jackson.cereb@gmail.com
Telefone Móvel +55 86 9928 1251
Analista de Sistemas - Infoway - http://www.infoway-pi.com.br
Missão Infoway - "Influenciar a Gestão de Sistemas de Saúde através de e-health"

("A vida é um combate que os fracos abate, aos bravos, aos fortes só pode exaltar" - Canção do Tamoio, Gonçalves Dias)
----------------------------------------------------------------------------------------------------------------

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users