librelist archives

« back to archive

Not Supported Metrics

Not Supported Metrics

From:
Carlos Filipe Bezerra
Date:
2014-06-24 @ 17:49
Hello,

We (UnB-FGA/MES) were thinking about adding to analizo a verbose flag to
show the user the message "not supported" in the metrics that analizo
doesn't catch for each language. Would this improvement be good for the
analizo's users?
Another idea is to not show the metrics that are not caught for each
language, using the same flag.

Issue on Github: https://github.com/analizo/analizo/issues/60

Re: [analizo] Not Supported Metrics

From:
Antonio Terceiro
Date:
2014-06-24 @ 18:05
On Tue, Jun 24, 2014 at 02:49:39PM -0300, Carlos Filipe Bezerra wrote:
> Hello,
> 
> We (UnB-FGA/MES) were thinking about adding to analizo a verbose flag to
> show the user the message "not supported" in the metrics that analizo
> doesn't catch for each language. Would this improvement be good for the
> analizo's users?
> Another idea is to not show the metrics that are not caught for each
> language, using the same flag.

I think that if the metric is not supported it should not be displayed,
instead of displaying 0.

-- 
Antonio Terceiro <terceiro@softwarelivre.org>
http://softwarelivre.org/terceiro

Re: [analizo] Not Supported Metrics

From:
Lucas Kanashiro
Date:
2014-06-25 @ 02:20
I agree with Terceiro! You can do this now ;)
Em 24/06/2014 15:05, "Antonio Terceiro" <terceiro@softwarelivre.org>
escreveu:

> On Tue, Jun 24, 2014 at 02:49:39PM -0300, Carlos Filipe Bezerra wrote:
> > Hello,
> >
> > We (UnB-FGA/MES) were thinking about adding to analizo a verbose flag to
> > show the user the message "not supported" in the metrics that analizo
> > doesn't catch for each language. Would this improvement be good for the
> > analizo's users?
> > Another idea is to not show the metrics that are not caught for each
> > language, using the same flag.
>
> I think that if the metric is not supported it should not be displayed,
> instead of displaying 0.
>
> --
> Antonio Terceiro <terceiro@softwarelivre.org>
> http://softwarelivre.org/terceiro
>
>
>

Re: [analizo] Not Supported Metrics

From:
Carlos Filipe Bezerra
Date:
2014-07-07 @ 20:54
We prepared a list of metrics that are not supported for each language
covered in Analizo:

Metrics NOT covered by C language:

acc - Afferent Connections per Class (used to calculate COF - Coupling
Factor)

cbo - Coupling Between Objects *

dit - Depth of Inheritance Tree

noc - Number of Children

npa - Number of Public Attributes npm - Number of Public Methods rfc -
Response for a Class lcom4 - Lack of Cohesion of Methods

---

Metrics NOT covered by Java language:

All security metrics:

an - Argument with 'nonnull' attribute passed null

asom - Allocator sizeof operand mismatch

auv - Assigned value is garbage or undefined

bd - Bad deallocator

bf - Bad free

da - Dead assignment

dbz - Divisions by zero

df - Double free

dnp - Dereference of null pointer

dupv - Dereference of undefined pointer value

fgbo - Potential buffer overflow in call to 'gets'

mlk - Memory leak

obaa - Out-of-bound array access

osf - Offset free

pitfc - Potential insecure temporary file in call 'mktemp'

rogu - Result of operation is garbage or undefined

rsva - Return of stack variable address

saigv - Stack address stored into global variable

ua - Undefined allocation of 0 bytes (CERT MEM04-C; CWE-131)

uaf - Use-after-free

uav - Uninitialized argument value

---

Metrics NOT covered by language C++

none

---

Metrics covered by all the languages:

accm - Average Cyclomatic Complexity per Method

amloc - Average Method Lines of Code

anpm - Average Number of Parameters per Method

loc - Lines of Code

mmloc - Max Method LOC

noa - Number of Attributes

nom - Number of Methods

sc - Structural Complexity

Do You agree with this list?

We consider that the security metrics has the purpose to apply only for
C/C++ languages, so it is not covered by Java. We also separated the OO
metrics and considered that they are not covered by C, because it is a
structured language. The other metrics that we observed, can be applied to
all situations.
However, by looking for results in simple C source code, we see that the
CBO (Coupling Between Objects) metric was calculated. Is it correct? Since
it's an OO metric that's being calculated in a structured language. We
think that may influence the calculation of global metrics, for instance,
if the analyzed project contains code in C and Java.


2014-06-24 23:20 GMT-03:00 Lucas Kanashiro <kanashiro.duarte@gmail.com>:

> I agree with Terceiro! You can do this now ;)
> Em 24/06/2014 15:05, "Antonio Terceiro" <terceiro@softwarelivre.org>
> escreveu:
>
> On Tue, Jun 24, 2014 at 02:49:39PM -0300, Carlos Filipe Bezerra wrote:
>> > Hello,
>> >
>> > We (UnB-FGA/MES) were thinking about adding to analizo a verbose flag to
>> > show the user the message "not supported" in the metrics that analizo
>> > doesn't catch for each language. Would this improvement be good for the
>> > analizo's users?
>> > Another idea is to not show the metrics that are not caught for each
>> > language, using the same flag.
>>
>> I think that if the metric is not supported it should not be displayed,
>> instead of displaying 0.
>>
>> --
>> Antonio Terceiro <terceiro@softwarelivre.org>
>> http://softwarelivre.org/terceiro
>>
>>
>>

Re: [analizo] Not Supported Metrics

From:
Antonio Terceiro
Date:
2014-07-07 @ 23:21
On Mon, Jul 07, 2014 at 05:54:02PM -0300, Carlos Filipe Bezerra wrote:
> However, by looking for results in simple C source code, we see that the
> CBO (Coupling Between Objects) metric was calculated. Is it correct? Since
> it's an OO metric that's being calculated in a structured language. We
> think that may influence the calculation of global metrics, for instance,
> if the analyzed project contains code in C and Java.

It was originally defined in the context of OO design, but in my opinion
its definition can be extended to support structured code if you replace
"object" with "module", which is what analizo does (a "module" is a
source file pair with .c/.h). The same logic applies to LCOMâ‚„, if you
replace "methods" with "subroutines" in the original definition.

As with any other metric in any software project, they can't be used
blindly before being sure that it makes sense in the specific context,
but I do believe that these metrics, as implemented in analizo, provide
useful information even on structured code (even if there are bugs here
and there).

This should probably go into a FAQ.

-- 
Antonio Terceiro <terceiro@softwarelivre.org>
http://softwarelivre.org/terceiro